-
Notifications
You must be signed in to change notification settings - Fork 1
/
split.php
56 lines (50 loc) · 1.58 KB
/
split.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<?php
$myfile = $_POST['hiddenfilename'];
echo 'my file is'; echo $myfile;
if ($_POST['mediaserie'] == '1' and $_POST['media'] != 'None'){
$fp = fopen("dati/$myfile.txt", 'a');
fwrite($fp, '\provaserie[');
fwrite($fp, $_POST['media']);
fwrite($fp,'][1]{');
fwrite($fp, $_POST['dist']);
fwrite($fp, '}{');
fwrite($fp, $_POST['time']);
fwrite($fp, "}\n");
fclose($fp);
}elseif ($_POST['media'] != 'None'){
$fp = fopen("dati/$myfile.txt", 'a');
fwrite($fp, '\provaserie[');
fwrite($fp, $_POST['media']);
fwrite($fp,']{');
fwrite($fp, $_POST['dist']);
fwrite($fp, '}{');
fwrite($fp, $_POST['time']);
fwrite($fp, "}\n");
fclose($fp);
}else{
$fp = fopen("dati/$myfile.txt", 'a');
fwrite($fp, '\provaserie{');
fwrite($fp, $_POST['dist']);
fwrite($fp, '}{');
fwrite($fp, $_POST['time']);
fwrite($fp, "}\n");
fclose($fp);
}
?>
<!-- TODO: da pensare bene come fare -->
<body>
<h1>Inserisci gli split:</h1>
<?php echo $myfile;?>
<p> TODO </p>
<form method = 'post' action = 'next.php'>
<input type = 'hidden' name ='hiddenfilename' value = '<?php echo "$myfile";?>' >
<!--Distanza split: <input type = 'text' name = 'distsplit'><br>
Tempo split: <input type = 'text' name = 'timesplit'> <br>
-->
<input type = 'submit' name = 'next' value = 'Prossima prova'>
<input type = 'submit' name = 'newser' value = 'Nuova serie' formaction="new_ser.php"> <br>
<!--<input type = 'submit' name = 'split' value = 'Split'>-->
<input type = 'submit' name = 'stop' value = 'Stop' formaction="stop.php">
</form>
</body>