diff --git a/uploadpage/index.php b/uploadpage/index.php index e20ce19..515765e 100755 --- a/uploadpage/index.php +++ b/uploadpage/index.php @@ -37,10 +37,9 @@ function filename(){ -
Uploaded '.$upload.'
'); -if(preg_match('/20[0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]/', $datetime)===false){ - Back('Date/time somehow incorrect: '.$datetime); +if(preg_match('/20[0-9][0-9]-[0-1][0-9]-[0-3][0-9]/', $date)===false){ + Back('Date somehow incorrect: '.$date); +} +if(preg_match('/[0-2][0-9]:[0-6][0-9]/', $time)===false){ + Back('Time somehow incorrect: '.$time); } $now=date('Y-m-dHi'); -if(strcmp($now, $date.$time)>0){ +if(strcmp($now, $date.$tme)>=0){ Back('Scheduling '.$now.' in the past: '.$date.' '.$time); } $nextyear=date('Y-m-dHi', strtotime('+1 year')); -if(strcmp($nextyear, $date.$time)<0){ +if(strcmp($nextyear, $date.$tme)<0){ Back('Scheduling too far into the future: '.$date.' '.$time); } if($_FILES['file']['error']!=UPLOAD_ERR_OK){ @@ -71,5 +74,5 @@ if(!move_uploaded_file($_FILES['file']['tmp_name'], $file)){ print('Streaming '.$name.'.mp4
'); print('When done encoding, email '.$to.'
'); -Back('Streaming on '.$date.' at '.$hour.':'.$min.'h on '.$target.''); +Back('Streaming on '.$date.' at '.$time.'h on '.$target.''); ?>