-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreporte.php
47 lines (47 loc) · 940 Bytes
/
reporte.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
<html>
<head>
<title>IDERA - Reporte</title>
</head>
<body>
<div>
<h1>REPORTE DE CANTIDAD DE CAPAS HISTORICO</h1>
</div>
<div>
<button onclick="window.open('exportCSV.php')">DESCARGAR CSV</button>
</div>
<div>
<table>
<tr>
<td>
NODO
</td>
<td>
FECHA
</td>
<td>
CANTIDAD
</td>
</tr>
<?php
try {
$file_db = new PDO('sqlite:estadisticas.sqlite');
$sql = "SELECT * FROM estadisticas ";
foreach ($file_db->query($sql) as $row) {
?>
<tr>
<td><?php
echo $row['provider'] . "\t";?></td>
<td><?php
echo $row['fecha'] . "\t";?></td><td><?php
echo $row['cant_capas'] . "\n";
?></td></tr><?php
}
}
catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>
</table>
</div>
</body>
</html>