5 #include "menulist.html"
6 #include "static-configuration"
9 // We just email notification for now. Auto-analysis RSN.
10 if ($_FILES["uploadedfile"]["error"] > 0) {
11 echo "Error: " . $_FILES["uploadedfile"]["error"] . "<br />";
15 $dest = tempnam($tempfolder, "upload-");
16 move_uploaded_file($_FILES["uploadedfile"]["tmp_name"], $dest);
19 $subject = "CCAN: code upload by '" . $_POST['email'] . "' with name " . $_FILES["uploadedfile"]["name"];
20 $message = "File type: ".$_FILES["uploadedfile"]["type"]."\n".
21 "Size: ".$_FILES["uploadedfile"]["size"]."\n".
22 "Claimed email: ".$_POST['email']."\n".
23 "File destination: ".$dest."\n";
25 mail($ccanadmin, $subject, $message, "From: $frommail");
26 echo "<div align=\"center\"> Thanks!<br>
27 Mail will be send to admin to publish the code.<//div>";