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

<?php
$domain = 'kaoscube.org';
$genetikx = $_POST["genetikx"];
$time = $_POST["time"];
$locality = $_POST["locality"];
# $target_file = $target_dir . basename($_FILES["file"]["name"]);
$target_dir = "uploads/";
$randNum = abs(intval(shell_exec('bash genRandNum.sh')));
echo $randNum;
$target_file = $target_dir . $randNum;
move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
$myfile = fopen("entries.csv", "a") or die("Unable to open file!");
fwrite($myfile, "$randNum , $genetikx , $time , $locality , $target_file \n");
fclose($myfile);
$shellcommand = "bash createQRcode.sh $domain/$randNum barcodes/$randNum.png";
$output = shell_exec($shellcommand);
?>
<hmtl>
<body>
</br></br></br>
<center>
<p style="font-size:50vh;">
Oi
</p>
</center>
</br></br></br>
</body>
</html>