the interface of the KaosCube
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
805 B

1 year ago
  1. <?php
  2. $domain = 'kaoscube.org';
  3. $genetikx = $_POST["genetikx"];
  4. $time = $_POST["time"];
  5. $locality = $_POST["locality"];
  6. # $target_file = $target_dir . basename($_FILES["file"]["name"]);
  7. $target_dir = "uploads/";
  8. $randNum = abs(intval(shell_exec('bash genRandNum.sh')));
  9. echo $randNum;
  10. $target_file = $target_dir . $randNum;
  11. move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
  12. $myfile = fopen("entries.csv", "a") or die("Unable to open file!");
  13. fwrite($myfile, "$randNum , $genetikx , $time , $locality , $target_file \n");
  14. fclose($myfile);
  15. $shellcommand = "bash createQRcode.sh $domain/$randNum barcodes/$randNum.png";
  16. $output = shell_exec($shellcommand);
  17. ?>
  18. <hmtl>
  19. <body>
  20. </br></br></br>
  21. <center>
  22. <p style="font-size:50vh;">
  23. Oi
  24. </p>
  25. </center>
  26. </br></br></br>
  27. </body>
  28. </html>