-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP35.php
More file actions
69 lines (46 loc) · 1.13 KB
/
Copy pathP35.php
File metadata and controls
69 lines (46 loc) · 1.13 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<title>DATA</title>
</head>
<body>
<form action="P35.php" method="get">
<label for="Data">Data:</label>
<input type="text" id="usuari" name="usuari">
</form>
<?php
if (isset($_GET['usuari'])){
$usuari=$_GET['usuari'];
}
else{
$usuari="-";
}
$ara = getdate();
$arxiu = fopen('P35.txt','a');
fwrite($arxiu,$usuari." ".$ara[year]." ".$ara[mon]." ".$ara[mday]." ".$ara[wday]." ".$ara[hours]." ".$ara[minutes]." ".$ara[seconds]."\n");
$dades = file('P35.txt');
foreach($dades as $data)
if (isset($_GET['llistar'])){
echo $data;
}
fclose($arxiu);
$myFile = "P35.txt";
$lines = file($myFile);//file in to an array
foreach($lines as $line) {
$var = explode(' ', $line, 1);
$newData=explode(" ",$line);
$n1;
$n2;
echo "<table border=\"1\" width=\100px\">";
for ($n1=0;$n1<1;$n1++){
echo "<tr>";
for ($n2=0;$n2<=6;$n2++){
echo "<td width='100'>$newData[$n2]</td>";
}
}
echo "</tr>";
echo "</table>";
}
?>
</body>
</html>