Răsfoiți Sursa

add color mark for user records with different states of address records

rajven 2 ani în urmă
părinte
comite
ccd3dc3289

+ 5 - 0
html/admin/users/index.php

@@ -140,6 +140,7 @@ $sSQL = "SELECT U.id, U.login, U.fio, O.ou_name, U.enabled, U.day_quota, U.month
 $users = get_records_sql($db_link, $sSQL);
 
 foreach ($users as $row) {
+    $auth_customs = get_count_records($db_link,"User_auth","user_id=".$row['id']." AND deleted=0 AND enabled <>'".$row['enabled']."'");
     $cl = "data";
     if (! $row['enabled']) {
         $cl = "off";
@@ -147,6 +148,9 @@ foreach ($users as $row) {
     if ($row['blocked']) {
         $cl = "error";
     }
+    if ($auth_customs > 0) {
+	$cl = "custom";
+	}
     if (! get_auth_count($db_link, $row['id'])) {
         $cl = 'nb';
     }
@@ -180,6 +184,7 @@ print_navigation($page_url,$page,$displayed,$count_records[0],$total);
 <td class="nb"><?php echo WEB_color_user_empty; ?></td>
 <td class="off"><?php echo WEB_color_user_disabled; ?></td>
 <td class="error"><?php echo WEB_color_user_blocked; ?></td>
+<td class="custom"><?php echo WEB_color_user_custom; ?></td>
 </table>
 
 <script src="/js/remodal/remodal.min.js"></script>

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

@@ -65,6 +65,7 @@ define("WEB_color_auth_disabled","IP disabled");
 define("WEB_color_user_blocked","Blocked by traffic");
 define("WEB_color_device_description","Device Status");
 define("WEB_color_user_empty","Login is empty");
+define("WEB_color_user_custom","Customised");
 
 /* device and port state */
 define("WEB_device_online","Online");

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

@@ -65,6 +65,7 @@ define("WEB_color_auth_disabled","ip-адрес выключен");
 define("WEB_color_user_blocked","Блокировка по трафику");
 define("WEB_color_device_description","Состояние устройства");
 define("WEB_color_user_empty","Логин пуст");
+define("WEB_color_user_custom","Вариативно");
 
 /* device and port state */
 define("WEB_device_online","Online");