annotate trunk/scripts/aim-o-matic/aim-o-matic.php @ 536:2964a3b4a00a
New design params, including narrower AGC, Greenwood map for more channels, default 71, some renaming, open loop feature, ...
author |
dicklyon@google.com |
date |
Thu, 22 Mar 2012 22:37:56 +0000 |
parents |
2e53a3b92525 |
children |
|
rev |
line source |
tom@520
|
1 <?php
|
tom@520
|
2 if ($_FILES["audio_file"]["size"] < 20000000 && $_FILES["config_file"]["size"] < 2000000) {
|
tom@520
|
3 if ($_FILES["audio_file"]["error"] > 0 || $_FILES["config_file"]["error"]) {
|
tom@520
|
4 echo "error: file upload failed";
|
tom@520
|
5 } else {
|
tom@520
|
6 $id_string = uniqid("aim-o-matic", true);
|
tom@520
|
7 $ext = pathinfo($_FILES["audio_file"]["name"], PATHINFO_EXTENSION);
|
tom@520
|
8 move_uploaded_file($_FILES["audio_file"]["tmp_name"], "/home/ubuntu/upload/" . $id_string . "." . $ext);
|
tom@520
|
9 move_uploaded_file($_FILES["config_file"]["tmp_name"], "/home/ubuntu/upload/" . $id_string . ".config");
|
tom@520
|
10 echo "Results will be avaiable shortly, here:<br>";
|
tom@520
|
11 echo "<a href='results/" . $id_string . "/'>" . $id_string . "</a>";
|
tom@520
|
12 }
|
tom@520
|
13 } else {
|
tom@520
|
14 echo "error: file too large";
|
tom@520
|
15 }
|
tom@520
|
16
|
tom@520
|
17 ?>
|