Просмотр исходного кода

lock device by web port mac-table request

Roman Dmitriev 2 лет назад
Родитель
Сommit
87e88fe1e4
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      html/admin/devices/portmactable.php

+ 6 - 0
html/admin/devices/portmactable.php

@@ -14,6 +14,11 @@ $user_info = get_record_sql($db_link,"SELECT * FROM User_list WHERE id=".$device
 
 require_once ($_SERVER['DOCUMENT_ROOT']."/inc/header.php");
 
+if (!apply_device_lock($db_link,$device_id)) {
+    header("Location: /admin/devices/editdevice.php&id=".$id."&status=locked");
+    exit;
+}
+
 print_device_submenu($page_url);
 print_editdevice_submenu($page_url,$device_id,$device['device_type'],$user_info['login']);
 
@@ -56,6 +61,7 @@ if ($snmp_ok and $port_info['snmp_index'] > 0) {
         }
     print "</table>\n";
     } else { print "No SNMP access!"; }
+    unset_lock_discovery($db_link,$device_id);
 ?>
 <table class="data">
 <tr>