annotate scripts/aim-o-matic/aim-o-matic.php @ 640:d08c02c8e26f

More small style revisions to C++ CARFAC, adjusted struct member variable naming, header guards and #include structure.
author alexbrandmeyer
date Wed, 29 May 2013 15:37:28 +0000
parents b106283f812f
children
rev   line source
tom@459 1 <?php
tom@459 2 if ($_FILES["audio_file"]["size"] < 20000000 && $_FILES["config_file"]["size"] < 2000000) {
tom@459 3 if ($_FILES["audio_file"]["error"] > 0 || $_FILES["config_file"]["error"]) {
tom@459 4 echo "error: file upload failed";
tom@459 5 } else {
tom@459 6 $id_string = uniqid("aim-o-matic", true);
tom@459 7 $ext = pathinfo($_FILES["audio_file"]["name"], PATHINFO_EXTENSION);
tom@459 8 move_uploaded_file($_FILES["audio_file"]["tmp_name"], "/home/ubuntu/upload/" . $id_string . "." . $ext);
tom@459 9 move_uploaded_file($_FILES["config_file"]["tmp_name"], "/home/ubuntu/upload/" . $id_string . ".config");
tom@459 10 echo "Results will be avaiable shortly, here:<br>";
tom@459 11 echo "<a href='results/" . $id_string . "/'>" . $id_string . "</a>";
tom@459 12 }
tom@459 13 } else {
tom@459 14 echo "error: file too large";
tom@459 15 }
tom@459 16
tom@459 17 ?>