]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
* If the same attribute appears more than once in the user edit page then show a...
authorkkalev <kkalev>
Wed, 10 Jul 2002 14:53:51 +0000 (14:53 +0000)
committerkkalev <kkalev>
Wed, 10 Jul 2002 14:53:51 +0000 (14:53 +0000)
  occurences next to the attribute name
* Add a server argument to user_finger.php3. If it is set then the page will only show the logged in users
  in that access server instead of all of them. Update the README with documentation for that fact.

Changelog
README
htdocs/user_edit.php3
htdocs/user_finger.php3

index 4e7634c200a734f8112186b023d16fee47b2d5af..89f3327b9dd4de9871051c8a1d614ba5a516d743 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -14,6 +14,10 @@ Ver 1.30:
 * Pass the whole password as salt in da_encrypt() in password_check.php3
 * Refresh the online users page every 50 secs. Patch by Alexandre Strube <surak@barroco.com.br>
 * Check if the last logged in server and client ip are valid before calling gethostbyaddr
+* If the same attribute appears more than once in the user edit page then show a count of the number of
+  occurences next to the attribute name
+* Add a server argument to user_finger.php3. If it is set then the page will only show the logged in users
+  in that access server instead of all of them. Update the README with documentation for that fact.
 Ver 1.29:
 * Add general_ld_library_path directive and set LD_LIBRARY_PATH accordingly (used in snmpfinger and
   radaclient).
diff --git a/README b/README
index a106ef8e750761d2bca80f657f020d6526ec8395..b6f7ff19c54e365757a191d7c32f4c102ede1145 100644 (file)
--- a/README
+++ b/README
@@ -19,6 +19,7 @@ There are also a few more things included:
   stoptime = 0. It will not do an harm even if it deletes valid entries since radiusd will fall
   back to insert if update fails.
 
+
 The structure of the tree is:
 
 conf:: Contains various configuration files.
@@ -63,6 +64,9 @@ htdocs:: user_state.php3 =>
        separated by new lines:
        account_status(active or inactive),lock message,weekly limit,daily limit,
        weekly used,weekly connections,daily used,daily connections
+htdocs:: user_finger.php3 =>
+       It will inger the nas(es) and show the logged in users. If an argument server is passed then
+       it will only show users for the specific access server.
 
 html:: Contains the html code for a few pages 
 html::user_admin.html.php3 =>
index bd8bf681ab1dd6189ecaee8d58278ee859fa3404..b7f5c3c465a4f4523722f367b559397ca97e204a 100644 (file)
@@ -119,10 +119,14 @@ User Password (changes only)
                        print <<<EOM
 <tr>
 <td align=right bgcolor="#d0ddb0">
-$desc
+EOM;
+                       if ($i == 1)
+                               echo "$desc\n";
+                       else
+                               echo "$desc ($i)\n";
+                       print <<<EOM
 </td>
 EOM;
-
                        if ($show_ops)
                                print <<<EOM
 <td>
index 1613d20285c80ff50841373c83abbac5c05fb60c..7211f6b1af38e67b1f0e0d737edc8481f306d0f0 100644 (file)
@@ -31,6 +31,7 @@ $link = @da_sql_pconnect($config);
 $link2 = connect2db($config);
 if ($link){
        $h = 21;
+       $servers_num = 0;
        while(1){
                $i++;
                $num = 0;
@@ -45,10 +46,18 @@ if ($link){
                        $i--;
                        break;
                }
+               if ($server != ''){
+                       if ($config[$name] == $server)
+                               $servers_num++;
+                       else
+                               continue;
+               }
+               else
+                       $servers_num++;
                $name_data = $config[$ip];
                $community_data = $config[$community];
-               $server_name[$i] = $config[$name];
-               $server_model[$i] = $config[$model];
+               $server_name[$servers_num] = $config[$name];
+               $server_model[$servers_num] = $config[$model];
                if ($config[general_ld_library_path] != '')
                        putenv("LD_LIBRARY_PATH=$config[general_ld_library_path]");
                $extra = "";
@@ -67,26 +76,26 @@ if ($link){
                                $num++;
                                $h += 21;
                                $user = $row['UserName'];
-                               $finger_info[$i][$num]['ip'] = $row['FramedIPAddress'];
-                               if ($finger_info[$i][$num]['ip'] == '')
-                                       $finger_info[$i][$num]['ip'] = '-';
+                               $finger_info[$servers_num][$num]['ip'] = $row['FramedIPAddress'];
+                               if ($finger_info[$servers_num][$num]['ip'] == '')
+                                       $finger_info[$servers_num][$num]['ip'] = '-';
                                $session_time = $row['AcctStartTime'];
                                $session_time = date2timediv($session_time);
-                               $finger_info[$i][$num]['session_time'] = time2strclock($session_time);
-                               $finger_info[$i][$num]['user'] = $user;
-                               $finger_info[$i][$num]['callerid'] = $row['CallingStationId'];
-                               if ($finger_info[$i][$num]['callerid'] == '')
-                                       $finger_info[$i][$num]['callerid'] = '-';
+                               $finger_info[$servers_num][$num]['session_time'] = time2strclock($session_time);
+                               $finger_info[$servers_num][$num]['user'] = $user;
+                               $finger_info[$servers_num][$num]['callerid'] = $row['CallingStationId'];
+                               if ($finger_info[$servers_num][$num]['callerid'] == '')
+                                       $finger_info[$servers_num][$num]['callerid'] = '-';
                                if ($user_info["$user"] == ''){
                                        $user_info["$user"] = get_user_info($link2,$user,$config);
                                        if ($user_info["$user"] == '' || $user_info["$user"] == ' ')
                                                $user_info["$user"] = 'Unknown User';
                                }
                        }
-                       $height[$i] = $h;
+                       $height[$servers_num] = $h;
                }
-               $server_loggedin[$i] = $num;
-               $server_rem[$i] = ($config[$portnum]) ? ($config[$portnum] - $num) : 'unknown';
+               $server_loggedin[$servers_num] = $num;
+               $server_rem[$servers_num] = ($config[$portnum]) ? ($config[$portnum] - $num) : 'unknown';
        }
 }
 ?>
@@ -116,7 +125,7 @@ if ($link){
 echo <<<EOM
        <b>$date</b>
 EOM;
-       for($j = 1; $j <= $i; $j++){
+       for($j = 1; $j <= $servers_num; $j++){
                echo <<<EOM
 <p>
        <table width=100% cellpadding=0 height=30><tr>