Timestamp to log
Email on start encode Encode audio 48000 bps Clearly show error or success in Results page Optional savedir
This commit is contained in:
1 parent
f0279c4ca2
commit
ab642d9c51
6 files changed
+50
-28
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?php // Schedule page
|
||||
require "check.php";
|
||||
$user=$_SESSION['user'];
|
||||
$user=@$_SESSION['user'];
|
||||
if(empty($user)){
|
||||
header('Location: login.php');
|
||||
}
|
||||
@@ -22,7 +22,7 @@ function filename(){
|
||||
}
|
||||
</script>
|
||||
<div class="user"><p class="user">User: <b>'.$user.'</b></p>
|
||||
<form action="check.php" method="post">
|
||||
<form action="login.php" method="post">
|
||||
<input id="logoff" type="submit" name="logoff" value="Logoff">
|
||||
</form></div>
|
||||
<div class="container">
|
||||
@@ -49,7 +49,7 @@ if($n>0){
|
||||
print(' <select name="id" title="Click to select an optional countdown">');
|
||||
print(' <option value="_" selected>No countdown</option>');
|
||||
for($i=0; $i<$n; ++$i){
|
||||
print(' <option value="'.$id[$i].$name[$i].'">'.$name[$i].'</option>');
|
||||
print(' <option value="'.$id[$i].'">'.$name[$i].'</option>');
|
||||
}
|
||||
print(' </select>');
|
||||
}
|
||||
@@ -64,8 +64,8 @@ print(' <select name="target" required title="Click to select where to stream
|
||||
<input type="date" name="date" title="Enter the date" required>
|
||||
<input type="time" name="time" title="Enter the time" required></div>
|
||||
<input type="email" name="email" placeholder="Email to notify" title="Not required">
|
||||
<input type="submit" value="Schedule Stream" name="schedule">
|
||||
<p id="response"></p>
|
||||
<input type="submit" value="Schedule Stream" name="schedule">');
|
||||
print(' <p id="response"> </p>
|
||||
</form>
|
||||
</div>
|
||||
</div>');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php // Login page
|
||||
session_start();
|
||||
$user=$_POST['user'];
|
||||
$user=@$_POST['user'];
|
||||
if(!empty($user) && preg_match('/[A-Za-z0-9]+/', $user)!==false){ // Login attempt and valid input
|
||||
// Read hash and check password
|
||||
$mh=file(__DIR__.'/../mailhash',FILE_IGNORE_NEW_LINES & FILE_SKIP_EMPTY_LINES);
|
||||
|
||||
+20
-13
@@ -1,5 +1,4 @@
|
||||
<?php // Encode page
|
||||
session_start();
|
||||
require "check.php";
|
||||
$user=$_SESSION['user'];
|
||||
if(!isset($_POST['schedule']) || empty($user)){ // If not post: start again
|
||||
@@ -7,8 +6,12 @@ if(!isset($_POST['schedule']) || empty($user)){ // If not post: start again
|
||||
}
|
||||
|
||||
function Back($msg){
|
||||
print('<p>'.$msg.'</p>
|
||||
<form action="index.php" method="post">
|
||||
if(empty($msg)){
|
||||
print('<p style="padding:5px;background-color:green;color:white"><b>File successfully uploaded, encoding started</b></p>');
|
||||
}else{
|
||||
print('<p style="padding:5px;background-color:red;color:white"><b>ERROR: '.$msg.'</b></p>');
|
||||
}
|
||||
print('<form action="index.php" method="post">
|
||||
<input type="submit" value="Upload another file" name="submit" autofocus>
|
||||
</form></div>');
|
||||
exit;
|
||||
@@ -23,16 +26,19 @@ foreach($mh as $line){
|
||||
}
|
||||
}
|
||||
$upload=htmlspecialchars(basename($_FILES['file']['name']));
|
||||
$key=htmlspecialchars($_POST['streamkey']);
|
||||
$date=htmlspecialchars($_POST['date']);
|
||||
$time=htmlspecialchars($_POST['time']);
|
||||
$email=htmlspecialchars($_POST['email']);
|
||||
$target=htmlspecialchars($_POST['target']);
|
||||
$id=htmlspecialchars($_POST['id']);
|
||||
$key=htmlspecialchars(@$_POST['streamkey']);
|
||||
$date=htmlspecialchars(@$_POST['date']);
|
||||
$time=htmlspecialchars(@$_POST['time']);
|
||||
$email=htmlspecialchars(@$_POST['email']);
|
||||
$target=htmlspecialchars(@$_POST['target']);
|
||||
$id=htmlspecialchars(@$_POST['id']);
|
||||
if(empty($id)){
|
||||
$id='_';
|
||||
}
|
||||
if(substr($id, 0, 1)!=='_'){
|
||||
$countdown=substr($id, 1);
|
||||
$id=substr($id, 0, 1);
|
||||
}
|
||||
$id=substr($id, 0, 1);
|
||||
if($email){
|
||||
$to=$email;
|
||||
$email=':'.$email;
|
||||
@@ -51,7 +57,7 @@ print('<!DOCTYPE html>
|
||||
<link rel="icon" href="favicon.png">
|
||||
<link rel="stylesheet" href="page.css">
|
||||
<div class="user"><p class="user">User: <b>'.$user.'</b></p>
|
||||
<form action="check.php" method="post">
|
||||
<form action="login.php" method="post">
|
||||
<input id="logoff" type="submit" name="logoff" value="Logoff">
|
||||
</form></div><div class="container">
|
||||
<h1>Encoding</h1>
|
||||
@@ -82,6 +88,7 @@ if(isset($countdown)){
|
||||
print('<br><br>using <b>'.$countdown.'</b>');
|
||||
}
|
||||
print('</p>
|
||||
<p>When done encoding, email <b>'.$to.'</b></p>');
|
||||
Back('Streaming on <b>'.$date.'</b> at <b>'.$time.'</b>h on <b>'.$target.'</b>');
|
||||
<p>When done encoding, email <b>'.$to.'</b></p>
|
||||
<p>Streaming on <b>'.$date.'</b> at <b>'.$time.'</b>h on <b>'.$target.'</b></p>');
|
||||
Back('');
|
||||
?>
|
||||
Reference in new issue
Block a user