-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathonu_s.php
More file actions
60 lines (40 loc) · 1.44 KB
/
Copy pathonu_s.php
File metadata and controls
60 lines (40 loc) · 1.44 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
История сигналов
<br/>
<br/>
<?php
echo "<br/><font size=\"2\">Показать последние ";
echo "<a href=\"?page=onu&olt=$ip&mac=$mac&show=onu_s&count=50\">50</a> ";
echo "<a href=\"?page=onu&olt=$ip&mac=$mac&show=onu_s&count=100\">100</a> ";
echo "<a href=\"?page=onu&olt=$ip&mac=$mac&show=onu_s&count=500\">500</a> ";
echo "<a href=\"?page=onu&olt=$ip&mac=$mac&show=onu_s&count=1000\">1000</a> ";
echo "измерений</font><br/><br/><div align=\"center\">";
if ($count==NULL) {
$count=50;
} else {
}
$conn = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
mysql_query("SET NAMES utf8");
mysql_select_db($mysql_db);
$sql = "select * from ( select * from onus_s where mac=\"$mac\" order by datetime desc limit $count ) sub order by datetime DESC;";
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
die('Could not enter data: ' . mysql_error());
}
$number = mysql_num_rows($retval);
?>
<table border="0" cellpadding="10" cellspacing="0">
<?php
if ($number == 0) {
echo "Onu not measured";
} else {
while ($row=mysql_fetch_array($retval)) {
$pwr = $row['pwr'];
$datetime = $row['datetime'];
echo "<tr class=\"rx\"><td class=\"rx\">$datetime</td><td class=\"rx\"> <font color=\"orange\">$pwr</font></td></tr>";
}
}
mysql_close($conn);
echo "</table></div>";
//echo "<img src=\"graph_test.php?olt=$tables&iface=$iface\">";
?>