Ver Fonte

added dns-aliases for ip-list

Dmitriev Roman há 3 meses atrás
pai
commit
0ba83cedc0

+ 14 - 2
html/admin/iplist/index.php

@@ -211,7 +211,7 @@ print_navigation($page_url,$page,$displayed,$count_records,$total);
                 <td align=Center><?php print WEB_cell_traf; ?></td>
                 <td align=Center><?php print WEB_cell_dhcp; ?></td>
                 <td align=Center><?php print WEB_cell_acl; ?></td>
-                <td align=Center><?php print $sort_url . "&sort=arp_found&order=$new_order>Last</a>"; ?></td>
+                <td align=Center><?php print $sort_url . "&sort=arp_found&order=$new_order>Arp/Mac</a>"; ?></td>
                 <td align=Center><?php print WEB_cell_connection; ?></td>
         </tr>
 <?php
@@ -234,6 +234,7 @@ foreach ($users as $user) {
     }
     if ($user['last_found'] == '0000-00-00 00:00:00') { $user['last_found'] = ''; }
     if ($user['arp_found'] == '0000-00-00 00:00:00') { $user['arp_found'] = ''; }
+    if ($user['mac_found'] == '0000-00-00 00:00:00') { $user['mac_found'] = ''; }
     print "<tr align=center>\n";
     $cl = "data";
     if (!$user['enabled']) { $cl = "warn"; }
@@ -250,7 +251,18 @@ foreach ($users as $user) {
     } else {
         print "<td class=\"$cl\" width=200 >".$user['description']."</td>\n";
     }
-    print "<td class=\"$cl\" >".$user['dns_name']."</td>\n";
+
+    $aliases = get_records_sql($db, 'SELECT * FROM user_auth_alias WHERE auth_id='.$user['id']);
+    $dns_display = $user['dns_name'];
+    if (!empty($aliases)) {
+        $dns_display .= '<hr>';
+        $alias_list = [];
+        foreach ($aliases as $alias) {
+            $alias_list[] = htmlspecialchars($alias['alias'], ENT_QUOTES, 'UTF-8');
+        }
+        $dns_display .= implode('<br>', $alias_list);
+    }
+    print "<td class=\"$cl\" >".$dns_display."</td>\n";
     print "<td class=\"$cl\" >" . get_group($db_link, $user['filter_group_id']) . "</td>\n";
     print "<td class=\"$cl\" >" . get_queue($db_link, $user['queue_id']) . "</td>\n";
     print_td_qa($user['save_traf'],FALSE,$cl);

+ 1 - 1
html/admin/users/editauth.php

@@ -335,7 +335,7 @@ if (empty($auth_info['end_life']) or $auth_info['end_life'] == '0000-00-00 00:00
             </tr>
             <tr>
                 <td><input type="text" name="f_dns_name" size="14"  value="<?php echo $auth_info['dns_name']; ?>" pattern="^([a-zA-Z0-9-]{1,63})(\.[a-zA-Z0-9-]{1,63})*\.?$">
-                    <input type="checkbox" id="f_dns_ptr" name="f_dns_ptr" value="1" <?php echo $f_dns_ptr; ?>> &nbsp ptr
+                    <input type="checkbox" id="f_dns_ptr" name="f_dns_ptr" value="1" <?php echo $f_dns_ptr; ?>> &nbsp <?php print WEB_cell_ptr_only; ?>
                 </td>
                 <td><input type="text" name="f_description" value="<?php echo $auth_info['description']; ?>"></td>
                 <td><?php print_qa_select('f_enabled', $auth_info['enabled']); ?></td>

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

@@ -201,6 +201,7 @@ define("WEB_cell_connection","Connected");
 define("WEB_cell_last_found","Last MAC/ARP activity");
 define("WEB_cell_arp_found","Last ARP activity");
 define("WEB_cell_mac_found","Last MAC activity");
+define("WEB_cell_ptr_only","Create only PTR");
 define("WEB_cell_dns_name","Dns Name");
 define("WEB_cell_aliases","Aliases");
 define("WEB_cell_host_model","Device Model");

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

@@ -201,6 +201,7 @@ define("WEB_cell_connection","Подключен");
 define("WEB_cell_last_found","Был mac/arp");
 define("WEB_cell_arp_found","Был arp");
 define("WEB_cell_mac_found","Был mac");
+define("WEB_cell_ptr_only","Только PTR");
 define("WEB_cell_dns_name","Имя в dns");
 define("WEB_cell_aliases","Альясы");
 define("WEB_cell_host_model","Модель устройства");

+ 0 - 1
install-eye.sh

@@ -588,7 +588,6 @@ install_source_code() {
             cp -R html/* /opt/Eye/html/ 2>/dev/null || true
         fi
         download_additional_scripts
-        chmod -R 755 /opt/Eye/html
         chown -R eye:eye /opt/Eye/html
     fi