Bladeren bron

add translation for edit port

rajven 3 jaren geleden
bovenliggende
commit
cdd1cc0076
3 gewijzigde bestanden met toevoegingen van 28 en 16 verwijderingen
  1. 18 14
      html/admin/devices/editport.php
  2. 8 0
      html/inc/languages/russian.php
  3. 2 2
      html/white.css

+ 18 - 14
html/admin/devices/editport.php

@@ -15,35 +15,39 @@ if (isset($_POST["editport"])) {
     $target_id = $_POST["f_target_port"];
     bind_ports($db_link, $id, $target_id);
 
-    // redirect to device
-    $device_id = get_record_field($db_link,'device_ports','device_id',"id=".$id);
-    header("location: switchport.php?id=$device_id");
+    header("location: editport.php?id=$id");
     exit;
 }
 
 unset($_POST);
 
 $device_id = get_record_field($db_link,'device_ports','device_id',"id=".$id);
-
 $port = get_record($db_link, 'device_ports',"id=".$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,$device_id,$device['device_type'],$user_info['login']);
+
 ?>
-<div id="cont">
+<div id="contsubmenu">
 
 <form name="def" action="editport.php?id=<?php echo $id; ?>" method="post">
 <table class="data">
 <tr align="center">
 <td width=20>id</td>
-<td width=40>Порт N</td>
-<td width=40>Порт</td>
-<td width=40>snmp</td>
+<td width=40><?php echo WEB_device_port_number; ?></td>
+<td width=40><?php echo WEB_device_port_name; ?></td>
+<td width=40><?php echo WEB_device_port_snmp_index; ?></td>
 <td width=100>ifIndex</td>
-<td width=200>Комментарий</td>
-<td width=100>Device</td>
-<td width=40>Uplink</td>
-<td width=40>Nagios</td>
-<td width=40>Не проверять</td>
+<td width=200><?php echo WEB_cell_comment; ?></td>
+<td width=100><?php echo WEB_device_port_uplink_device; ?></td>
+<td width=40><?php echo WEB_device_port_uplink; ?></td>
+<td width=40><?php echo WEB_nagios; ?></td>
+<td width=40><?php echo WEB_device_port_allien; ?></td>
 </tr>
 <?php
 print "<tr>";
@@ -59,7 +63,7 @@ print "<td class=\"data\">"; print_qa_select('f_nagios', $port['nagios']); print
 print "<td class=\"data\">"; print_qa_select('f_skip', $port['skip']); print "</td>\n";
 ?>
 </tr>
-<tr><td colspan=2><input type="submit" name="editport" value="Сохранить"></td></tr>
+<tr><td colspan=2><input type="submit" name="editport" value="<?php echo WEB_btn_save; ?>"></td></tr>
 </table>
 </form>
 <?php

+ 8 - 0
html/inc/languages/russian.php

@@ -368,4 +368,12 @@ define("WEB_device_mac_table","Show mac table");
 define("WEB_device_walk_port_list","Port Walk");
 define("WEB_device_port_count","Портов");
 
+/* editport */
+define("WEB_device_port_number","Порт N");
+define("WEB_device_port_name","Порт");
+define("WEB_device_port_snmp_index","Номер порта в snmp");
+define("WEB_device_port_uplink_device","Устройство");
+define("WEB_device_port_uplink","Uplink");
+define("WEB_device_port_allien","Не проверять");
+
 ?>

+ 2 - 2
html/white.css

@@ -45,9 +45,9 @@ a:hover                         { color: #ed8b0d; text-decoration: none; }
 #title                          { position: absolute; top: 15px; left: 15px; font-size: 18pt; color: #ed8b0d; }
 #subtitle                       { position: absolute; top: 43px; left: 15px; font-size: 8pt; }
 #submenu                        { position: absolute; top: 55px; left: 20px; }
-#subsubmenu                     { position: absolute; top: 75px; left: 20px; }
+#subsubmenu                     { position: absolute; top: 80px; left: 20px; }
 #cont                           { position: absolute; top: 70px; left: 15px; background-color: url('img/vr.gif'); background-repeat: repeat-y; background-position: right; }
-#contsubmenu                    { position: absolute; top: 90px; left: 15px; background-color: url('img/vr.gif'); background-repeat: repeat-y; background-position: right; }
+#contsubmenu                    { position: absolute; top: 100px; left: 15px; background-color: url('img/vr.gif'); background-repeat: repeat-y; background-position: right; }
 #copyright                      { margin-top: 10px; margin-bottom: 10px; }
 #msg                            { font-size: 18pt; color: black; color: red; }