|
|
@@ -19,7 +19,7 @@ if ($f_id > 0) { $where_dev = " and D.id=$f_id "; }
|
|
|
<div id="cont">
|
|
|
<br>
|
|
|
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
|
|
|
- Отчёт по свичу <?php print_device_select($db_link, "device_show", $f_id); ?>
|
|
|
+ Отчёт по свичу <?php print_netdevice_select($db_link, "device_show", $f_id); ?>
|
|
|
Начало: <input type="date" name="date_start" value="<?php echo $date1; ?>" />
|
|
|
Конец: <input type="date" name="date_stop" value="<?php echo $date2; ?>" />
|
|
|
Отображать:<?php print_row_at_pages('rows',$displayed); ?>
|
|
|
@@ -27,7 +27,7 @@ if ($f_id > 0) { $where_dev = " and D.id=$f_id "; }
|
|
|
</form>
|
|
|
|
|
|
<?php
|
|
|
-$countSQL="SELECT Count(*) FROM Unknown_mac AS U, devices AS D, device_ports AS DP WHERE U.device_id = D.id AND U.port_id = DP.id AND U.timestamp>='$date1' AND U.timestamp<'$date2' $where_dev";
|
|
|
+$countSQL="SELECT Count(*) FROM Unknown_mac AS U, devices AS D, device_ports AS DP WHERE D.device_type<=2 and U.device_id = D.id AND U.port_id = DP.id AND U.timestamp>='$date1' AND U.timestamp<'$date2' $where_dev";
|
|
|
$res = mysqli_query($db_link, $countSQL);
|
|
|
$count_records = mysqli_fetch_array($res);
|
|
|
$total=ceil($count_records[0]/$displayed);
|
|
|
@@ -46,7 +46,7 @@ print_navigation($page_url,$page,$displayed,$count_records[0],$total);
|
|
|
</tr>
|
|
|
<?php
|
|
|
|
|
|
-$sSQL = "SELECT U.mac, U.timestamp, DP.port, D.device_name FROM Unknown_mac AS U, devices AS D, device_ports AS DP WHERE U.device_id = D.id AND U.port_id = DP.id AND U.timestamp>='$date1' AND U.timestamp<'$date2' $where_dev ORDER BY U.mac LIMIT $start,$displayed";
|
|
|
+$sSQL = "SELECT U.mac, U.timestamp, DP.port, D.device_name FROM Unknown_mac AS U, devices AS D, device_ports AS DP WHERE D.device_type<=2 and U.device_id = D.id AND U.port_id = DP.id AND U.timestamp>='$date1' AND U.timestamp<'$date2' $where_dev ORDER BY U.mac LIMIT $start,$displayed";
|
|
|
$maclog = get_records_sql($db_link, $sSQL);
|
|
|
foreach ($maclog as $row) {
|
|
|
print "<tr align=center align=center class=\"tr1\" onmouseover=\"className='tr2'\" onmouseout=\"className='tr1'\">\n";
|