Quellcode durchsuchen

add translation for device index

rajven vor 3 Jahren
Ursprung
Commit
43d3241f71

+ 7 - 7
html/admin/devices/index-passive.php

@@ -111,13 +111,13 @@ print_navigation($page_url,$page,$displayed,$count_records[0],$total);
 <table class="data">
 	<tr>
 		<td align=Center><input type="checkbox" onClick="checkAll(this.checked);"></td>
-		<td align=Center><?php print $sort_url . "&sort=login&order=$new_order>" . $cell_login . "</a>"; ?></td>
-		<td align=Center><?php print $sort_url . "&sort=ip_int&order=$new_order>" . $cell_ip . "</a>"; ?></td>
-		<td align=Center><?php print $sort_url . "&sort=mac&order=$new_order>" . $cell_mac . "</a>"; ?></td>
-		<td align=Center><?php print $sort_url . "&sort=model_name&order=$new_order>".$cell_host_model; ?></td>
-		<td align=Center><?php print $cell_comment; ?></td>
-		<td align=Center><?php print $cell_connection; ?></td>
-		<td align=Center><?php print $sort_url . "&sort=last_found&order=$new_order>Last</a>"; ?></td>
+		<td align=Center><?php print $sort_url . "&sort=login&order=$new_order>" . WEB_cell_login . "</a>"; ?></td>
+		<td align=Center><?php print $sort_url . "&sort=ip_int&order=$new_order>" . WEB_cell_ip . "</a>"; ?></td>
+		<td align=Center><?php print $sort_url . "&sort=mac&order=$new_order>" . WEB_cell_mac . "</a>"; ?></td>
+		<td align=Center><?php print $sort_url . "&sort=model_name&order=$new_order>".WEB_cell_host_model; ?></td>
+		<td align=Center><?php print WEB_cell_comment; ?></td>
+		<td align=Center><?php print WEB_cell_connection; ?></td>
+		<td align=Center><?php print $sort_url . "&sort=last_found&order=$new_order>".WEB_cell_last_found."</a>"; ?></td>
 	</tr>
 <?php
 

+ 14 - 16
html/admin/devices/index.php

@@ -18,19 +18,19 @@ if (!empty($sort_field) and !empty($order)) { $sort_sql = " ORDER BY $sort_field
 <form name="def" action="index.php" method="post">
 <table class="data">
 <tr class="info" align="right">
-<td class="info" colspan=6> Тип оборудования: <?php  print_devtypes_select($db_link, "devtypes", $f_devtype_id, "id<3"); ?>
-Показать оборудование из <?php  print_building_select($db_link, "building_id", $f_building_id); ?></td>
-<td class="info" colspan=2> <input type="submit" name="apply" value="Показать"></td>
+<td class="info" colspan=6> <?php  print WEB_device_type_show; print_devtypes_select($db_link, "devtypes", $f_devtype_id, "id<3"); ?>
+<?php print WEB_device_show_location; print_building_select($db_link, "building_id", $f_building_id); ?></td>
+<td class="info" colspan=2> <input type="submit" name="apply" value="<?php echo WEB_btn_show; ?>"></td>
 </tr>
 <tr align="center">
-<td><b><a href=index.php?sort=device_type&order=<?php print $new_order; ?>>Тип</a></b></td>
-<td><b><a href=index.php?sort=device_name&order=<?php print $new_order; ?>>Название</a></b></td>
-<td><b><a href=index.php?sort=ip&order=<?php print $new_order; ?>>IP</a></b></td>
-<td><b><a href=index.php?sort=device_model_id&order=<?php print $new_order; ?>>Модель</a></b></td>
-<td><b><a href=index.php?sort=building_id&order=<?php print $new_order; ?>>Расположен</a></b></td>
-<td><b>Портов</b></td>
-<td><b>Nagios</b></td>
-<td><b>Discavery</b></td>
+<td><b><a href=index.php?sort=device_type&order=<?php print $new_order; ?>><?php echo WEB_cell_type; ?></a></b></td>
+<td><b><a href=index.php?sort=device_name&order=<?php print $new_order; ?>><?php echo WEB_cell_name; ?></a></b></td>
+<td><b><a href=index.php?sort=ip&order=<?php print $new_order; ?>><?php echo WEB_cell_ip; ?></a></b></td>
+<td><b><a href=index.php?sort=device_model_id&order=<?php print $new_order; ?>><?php echo WEB_cell_host_model; ?></a></b></td>
+<td><b><a href=index.php?sort=building_id&order=<?php print $new_order; ?>><?php echo WEB_location_name; ?></a></b></td>
+<td><b><?php echo WEB_device_port_count; ?></b></td>
+<td><b><?php echo WEB_nagios; ?></b></td>
+<td><b><?php echo WEB_network_discovery; ?></b></td>
 </tr>
 <?php
 $filter = '';
@@ -63,12 +63,10 @@ foreach ($switches as $row) {
 </table>
 </form>
 <table class="data">
+<tr><td><?php echo WEB_color_device_description; ?></td></tr>
 <tr>
-<td>Device status</td>
-</tr>
-<tr>
-<td class="shutdown">Down</td>
-<td class="up">Online</td>
+<td class="shutdown"><?php echo WEB_color_device_down; ?></td>
+<td class="up"><?php echo WEB_color_device_online; ?></td>
 <tr>
 </table>
 <?php

+ 13 - 12
html/admin/devices/mactable.php

@@ -2,21 +2,22 @@
 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");
+
+$device=get_record($db_link,'devices',"id=".$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']);
+
 ?>
-<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
-$dev = get_record($db_link,'devices',"id=$id");
 $ports = get_records($db_link,'device_ports',"device_id=$id AND uplink=0 ORDER BY port");
-print "<b>Список маков активных на свиче ".$dev['device_name']." (".$dev['ip']."):</b>\n";
-$fdb = get_fdb_table($dev['ip'], $dev['community'], $dev['snmp_version']);
+print "<b>Список маков активных на свиче ".$device['device_name']." (".$device['ip']."):</b>\n";
+$fdb = get_fdb_table($device['ip'], $device['community'], $device['snmp_version']);
 print "<table class=\"data\" cellspacing=\"1\" cellpadding=\"4\">\n";
 print "<tr>";
 print "<td>Port</td>\n";
@@ -24,7 +25,7 @@ print "<td>User</td>\n";
 print "<td>Mac</td>\n";
 print "</tr>";
 foreach ($ports as $port) {
-    if (!$dev['fdb_snmp_index']) { $port['snmp_index'] = $port['port']; }
+    if (!$device['fdb_snmp_index']) { $port['snmp_index'] = $port['port']; }
     foreach ($fdb as $a_mac => $a_port) {
 	if ($a_port == $port['snmp_index']) {
 		print "<tr>";

+ 5 - 84
html/inc/languages/russian.php

@@ -1,88 +1,5 @@
 <?php
 
-$m = array(
-    1 => "Январь",
-    2 => "Февраль",
-    3 => "Март",
-    4 => "Апрель",
-    5 => "Май",
-    6 => "Июнь",
-    7 => "Июль",
-    8 => "Август",
-    9 => "Сентябрь",
-    10 => "Октябрь",
-    11 => "Ноябрь",
-    12 => "Декабрь"
-);
-
-/* traffic headers */
-$title_ip = "Адрес";
-$title_date = "Дата";
-$title_input = "Входящий";
-$title_output = "Исходящий";
-$title_pktin = "IN, pkt/s";
-$title_pktout = "OUT, pkt/s";
-$title_maxpktin = "Max IN, pkt/s";
-$title_maxpktout = "Max OUT, pkt/s";
-$title_sum = "Суммарно";
-$title_itog = "Итого";
-
-/* table cell names */
-$cell_login = "Логин";
-$cell_fio = "ФИО";
-$cell_ou = "Группа";
-$cell_enabled = "Включен";
-$cell_blocked = "Блокировка";
-$cell_perday = "В день";
-$cell_permonth = "В месяц";
-$cell_report = "Отчёт";
-$cell_name = "Название";
-$cell_ip = "IP";
-$cell_mac = "MAC";
-$cell_clientid = "Client-id";
-$cell_host_firmware = "Firmware";
-$cell_comment = "Комментарий";
-$cell_wikiname = "Wiki Name";
-$cell_filter = "Фильтр";
-$cell_proxy = "Proxy";
-$cell_dhcp = "Dhcp";
-$cell_nat = "Nat";
-$cell_transparent = "Transparent";
-$cell_shaper = "Шейпер";
-$cell_connection = "Подключен";
-$cell_dns_name = "Имя в dns";
-$cell_host_model = "Модель устройства";
-$cell_nagios = "Мониторинг";
-$cell_nagios_handler = "Реакция на событие";
-$cell_link = "Линк";
-$cell_traf = "Запись трафика";
-$cell_acl = "dhcp acl";
-$cell_rule = "Правил";
-
-/* lists name */
-$list_ou = "Список групп";
-$list_subnet = "Список подсетей";
-$list_customers = "Список администраторов";
-$list_filters = "Список фильтров";
-$list_users = "Список полльзователей";
-
-/* button names */
-$btn_remove = "Удалить";
-$btn_add = "Добавить";
-$btn_save = "Сохранить";
-$btn_move = "Переместить";
-$btn_apply = "Применить конфигурацию";
-$btn_device = "+Устройство";
-$btn_mac_add = "+MAC";
-$btn_mac_del = "-MAC";
-$btn_ip_add = "+IP";
-$btn_ip_del = "-IP";
-
-/* error messages */
-$msg_exists = "уже существует!";
-$msg_ip_error = "Формат адреса не верен!";
-
-
 define("WEB_MONTHS", array(
 1 => "Январь",
 2 => "Февраль",
@@ -137,6 +54,9 @@ define("WEB_snmp_community_rw","Snmp RW Community");
 define("WEB_color_description","Цветовая маркировка");
 define("WEB_color_user_disabled","Пользователь вылкючен");
 define("WEB_color_user_blocked","Блокировка по трафику");
+define("WEB_color_device_description","Device status");
+define("WEB_color_device_online","Online");
+define("WEB_color_device_down","Down");
 
 /* select items */
 define("WEB_select_item_yes","Да");
@@ -240,6 +160,7 @@ define("WEB_cell_nat","НАТ");
 define("WEB_cell_transparent","Transparent");
 define("WEB_cell_shaper","Шейпер");
 define("WEB_cell_connection","Подключен");
+define("WEB_cell_last_found","Последняя активность");
 define("WEB_cell_dns_name","Имя в dns");
 define("WEB_cell_host_model","Модель устройства");
 define("WEB_cell_nagios","Мониторинг");
@@ -384,6 +305,6 @@ define("WEB_device_port_allien","Не проверять");
 /* devices: index-passive */
 define("WEB_device_type_show","Тип оборудования");
 define("WEB_device_hide_unknown","Скрыть неизвестные");
-define("WEB_device_show_location","Расположение оборуодвания");
+define("WEB_device_show_location","Расположение оборудования");
 
 ?>