|
|
@@ -2,21 +2,26 @@
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/auth.php");
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/languages/" . HTML_LANG . ".php");
|
|
|
require_once ($_SERVER['DOCUMENT_ROOT']."/inc/idfilter.php");
|
|
|
-?>
|
|
|
-<html>
|
|
|
-<head>
|
|
|
-<title>Панель администратора</title>
|
|
|
-<link rel="stylesheet" type="text/css" href="/<?php echo HTML_STYLE.".css"; ?>">
|
|
|
-<meta http-equiv="content-type" content="application/xhtml+xml">
|
|
|
-<meta charset="UTF-8">
|
|
|
-</head>
|
|
|
-<body>
|
|
|
-<div id="cont">
|
|
|
-<?php
|
|
|
+
|
|
|
$port_id = $id;
|
|
|
-$sSQL = "SELECT DP.port, DP.snmp_index, D.device_name, D.ip, D.snmp_version, D.community, D.fdb_snmp_index, D.vendor_id FROM `device_ports` AS DP, devices AS D WHERE D.id = DP.device_id AND DP.id=$port_id";
|
|
|
+$sSQL = "SELECT DP.device_id, DP.port, DP.snmp_index, D.device_name, D.ip, D.snmp_version, D.community, D.fdb_snmp_index, D.vendor_id FROM `device_ports` AS DP, devices AS D WHERE D.id = DP.device_id AND DP.id=$port_id";
|
|
|
$port_info = get_record_sql($db_link, $sSQL);
|
|
|
|
|
|
+$device_id = $port_info["device_id"];
|
|
|
+
|
|
|
+$device=get_record($db_link,'devices',"id=".$device_id);
|
|
|
+$user_info = get_record_sql($db_link,"SELECT * FROM User_list WHERE id=".$device['user_id']);
|
|
|
+
|
|
|
+require_once ($_SERVER['DOCUMENT_ROOT']."/inc/header.php");
|
|
|
+
|
|
|
+print_device_submenu($page_url);
|
|
|
+print_editdevice_submenu($page_url,$id,$device['device_type'],$user_info['login']);
|
|
|
+
|
|
|
+?>
|
|
|
+
|
|
|
+<div id="contsubmenu">
|
|
|
+<?php
|
|
|
+
|
|
|
$display_name = " ".$port_info['port']." свича ".$port_info['device_name'];
|
|
|
print "<b>".$port_info['device_name']." [".$port_info['port']."] </b><br>\n";
|
|
|
|
|
|
@@ -30,7 +35,7 @@ if ($port_info['vendor_id'] == 9) {
|
|
|
|
|
|
if ($port_info['snmp_index'] > 0) {
|
|
|
print "<table class=\"data\" cellspacing=\"1\" cellpadding=\"4\">\n";
|
|
|
- print "<tr><td><b>Список маков активных на порту</b></td></tr>\n";
|
|
|
+ print "<tr><td><b>".WEB_device_port_mac_table_show."</b></td></tr>\n";
|
|
|
if (! $port_info['fdb_snmp_index']) { $port_info['snmp_index'] = $port_info['port']; }
|
|
|
$fdb = get_fdb_port_table($port_info['ip'], $port_info['snmp_index'], $port_info['community'], $port_info['snmp_version']);
|
|
|
foreach ($fdb as $a_mac => $a_port) {
|
|
|
@@ -46,12 +51,12 @@ if ($port_info['snmp_index'] > 0) {
|
|
|
?>
|
|
|
<table class="data">
|
|
|
<tr>
|
|
|
-<td>Mac</td>
|
|
|
-<td>User</td>
|
|
|
-<td>Last found</td>
|
|
|
+<td><?php echo WEB_cell_mac; ?></td>
|
|
|
+<td><?php echo WEB_cell_login; ?></td>
|
|
|
+<td><?php echo WEB_cell_last_found; ?></td>
|
|
|
</tr>
|
|
|
<?php
|
|
|
-print "<b>Список маков когда-либо обнаруженных на порту</b><br>\n";
|
|
|
+print "<b>".WEB_device_port_mac_table_history."</b><br>\n";
|
|
|
$d_sql = "select A.ip,A.ip_int,A.mac,A.id,A.dns_name,A.last_found from User_auth as A, connections as C where C.port_id=$port_id and A.id=C.auth_id order by A.ip_int";
|
|
|
$t_device = mysqli_query($db_link, $d_sql);
|
|
|
while (list ($f_ip, $f_int, $f_mac, $f_auth_id, $f_dns, $f_last) = mysqli_fetch_array($t_device)) {
|
|
|
@@ -74,7 +79,5 @@ while (list ($fmac, $f_last) = mysqli_fetch_array($maclist)) {
|
|
|
print "<td class=\"data\">$f_last</td>\n";
|
|
|
print "</tr>";
|
|
|
}
|
|
|
+require_once ($_SERVER['DOCUMENT_ROOT']."/inc/footer.php");
|
|
|
?>
|
|
|
-</table>
|
|
|
-</body>
|
|
|
-</html>
|