1
0
Roman Dmitriev 2 жил өмнө
parent
commit
316ffb3e11

+ 3 - 0
html/admin/customers/editsubnet.php

@@ -105,6 +105,9 @@ print "<td class=\"$cl\"><input type=\"text\" name='s_subnet' value='".$subnet_i
 <td><td><b><?php echo WEB_cell_comment; ?></b></td>
 <?php print "<td colspan=2 class=\"data\"><input type=\"text\" name='s_comment' value='".$subnet_info['comment']."'></td>\n"; ?></tr>
 
+<td><td><b><?php echo WEB_network_vlan; ?></b></td>
+<?php print "<td colspan=2 class=\"data\"><input type=\"text\" name='s_vlan' value='".$subnet_info['vlan']."' pattern='^(409[0-6]|(40[0-8]|[1-3]\d\d|[1-9]\d|[1-9])\d|[1-9])$'></td>\n"; ?></tr>
+
 <td><td><b><?php echo WEB_network_gateway; ?></b></td>
 <?php 
 $cell_disabled = '';

+ 2 - 0
html/admin/customers/index-subnets.php

@@ -64,6 +64,7 @@ print_control_submenu($page_url);
             <tr align="center">
                 <td></td>
                 <td><b><?php echo WEB_network_subnet; ?></b></td>
+                <td><b><?php echo WEB_network_vlan; ?></b></td>
                 <td><b><?php echo WEB_network_use_dhcp; ?></b></td>
                 <td><b><?php echo WEB_network_static; ?></b></td>
                 <td><b><?php echo WEB_network_office_subnet; ?></b></td>
@@ -80,6 +81,7 @@ print_control_submenu($page_url);
                 print "<tr align=center>\n";
                 print "<td class=\"data\" style='padding:0'><input type=checkbox name=s_id[] value='" . $row['id'] . "'></td>\n";
                 print "<td class=\"data\" align=left><a href=editsubnet.php?id=".$row["id"].">" . $row["subnet"] . "</a></td>\n";
+                print "<td class=\"data\">" . $row['vlan'] . " </td>\n";
                 print_td_yes_no($row['dhcp']);
                 print_td_yes_no($row['static']);
                 print_td_yes_no($row['office']);

+ 9 - 0
html/inc/common.php

@@ -4871,8 +4871,17 @@ function get_const($const_name)
     return NULL;
 }
 
+function get_eye_version ($db)
+{
+$v_table=get_record_sql($db,"SELECT version FROM version");
+if (!empty($v_table)) { return $v_table['version']; }
+return NULL;
+}
+
 $config["org_name"] = get_option($db_link, 32);
 
+$config["version"] = get_eye_version($db_link);
+
 $config["KB"] = get_option($db_link, 1);
 if ($config["KB"] == 0) {
     $config["KB"] = 1000;

+ 1 - 1
html/inc/footer.php

@@ -1,4 +1,4 @@
-<div id="copyright">Copyright &copy; 2008-2024 Eye v2.4.14 &nbsp<a href="https://github.com/rajven/Eye">rnd@rajven.ru</a></div>
+<div id="copyright">Copyright &copy; 2008-2024 Eye v<?php print $config["version"]; ?> &nbsp<a href="https://github.com/rajven/Eye">rnd@rajven.ru</a></div>
 
 <?php
 $end_time = microtime();

+ 1 - 1
html/inc/footer.small.php

@@ -1,4 +1,4 @@
-<div id="copyright">Copyright &copy; 2008-2024 Eye v2.4.14 &nbsp<a href="https://github.com/rajven/Eye">rnd@rajven.ru</a></div>
+<div id="copyright">Copyright &copy; 2008-2024 Eye v<?php print $config["version"]; ?> &nbsp<a href="https://github.com/rajven/Eye">rnd@rajven.ru</a></div>
 <?php
 $end_time = microtime();
 $end_array = explode(" ",$end_time);

+ 1 - 0
html/inc/languages/english.php

@@ -263,6 +263,7 @@ define("WEB_config_value","Value");
 /* control-subnets-usage */
 define("WEB_network_usage_title","Usage statistics for the organization's networks");
 define("WEB_network_subnet","Network");
+define("WEB_network_vlan","Vlan");
 define("WEB_network_all_ip","Total<br>addresses");
 define("WEB_network_used_ip","Busy");
 define("WEB_network_free_ip","Free<br>(total)");

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

@@ -263,6 +263,7 @@ define("WEB_config_value","Значение");
 /* control-subnets-usage */
 define("WEB_network_usage_title","Статистика использования сетей организации");
 define("WEB_network_subnet","Сеть");
+define("WEB_network_vlan","Vlan");
 define("WEB_network_all_ip","Всего<br>адресов");
 define("WEB_network_used_ip","Занято");
 define("WEB_network_free_ip","Свободно<br>(всего)");

+ 1 - 0
html/utils/devices_remove.php

@@ -14,6 +14,7 @@ if (isset($_POST["RemoveDevice"]) and (isset($_POST["f_deleted"]))) {
 					run_sql($db_link, "DELETE FROM connections WHERE device_id=".$val);
 					run_sql($db_link, "DELETE FROM device_l3_interfaces WHERE device_id=".$val);
 					run_sql($db_link, "DELETE FROM device_ports WHERE device_id=".$val);
+					run_sql($db_link, "DELETE FROM device_subnets WHERE device_id=".$val);
 					delete_record($db_link, "devices", "id=".$val);
 					}
 				}

+ 1 - 0
html/utils/user_remove.php

@@ -18,6 +18,7 @@ if (isset($_POST["RemoveUser"]) and (isset($_POST["f_deleted"]))) {
 					run_sql($db_link, "DELETE FROM connections WHERE device_id=" . $device['id']);
 					run_sql($db_link, "DELETE FROM device_l3_interfaces WHERE device_id=" . $device['id']);
 					run_sql($db_link, "DELETE FROM device_ports WHERE device_id=" . $device['id']);
+					run_sql($db_link, "DELETE FROM device_subnets WHERE device_id=".$device['id']);
 					delete_record($db_link, "devices", "id=" . $device['id']);
 				}
 				run_sql($db_link, "DELETE FROM auth_rules WHERE user_id=$val");

+ 1 - 0
updates/2-4-14/subnets.sql

@@ -0,0 +1 @@
+ALTER TABLE `subnets` ADD `vlan_tag` INT NOT NULL DEFAULT '1' AFTER `subnet`;

+ 2 - 0
updates/2-4-14/version.sql

@@ -0,0 +1,2 @@
+CREATE TABLE `stat`.`version` ( `version` VARCHAR(10) NOT NULL DEFAULT '2.4.14' ) ENGINE = InnoDB;
+INSERT INTO `version` (`version`) VALUES ('2.4.14');