]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
* Allow selecting a specific access server in the failed logins page
authorkkalev <kkalev>
Tue, 12 Nov 2002 21:55:12 +0000 (21:55 +0000)
committerkkalev <kkalev>
Tue, 12 Nov 2002 21:55:12 +0000 (21:55 +0000)
* In the user admin page use AcctStartTime not AcctStopTime when calculating usage for the last 7 days

Changelog
htdocs/failed_logins.php3
htdocs/user_admin.php3

index 99fde222e5f754f519597a55d7d3c3a903635158..1f32be3e6288b657708f84298cdbe080e849c46d 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -9,6 +9,8 @@ Ver 1.61:
 * Fix a bug in lib/defaults.php3 which did not allow the default.vals file to be used correctly
 * Include password.php3 in lib/ldap/password_check.php3
 * When searching a user in ldap through the find page only try to find the users which have a uid attribute (username)
+* Allow selecting a specific access server in the failed logins page
+* In the user admin page use AcctStartTime not AcctStopTime when calculating usage for the last 7 days
 Ver 1.60:
 * Use require_once when including lib/functions.php3 in lib/sql
 * In the buttons toolbar Edit User should not be clickable.
index 806058f51e564ada58ab26fb467ac48e9a752e34..15a166bce6a0874d66021a42eaaccf266e61991f 100644 (file)
@@ -35,6 +35,8 @@ if ($order != 'desc' && $order != 'asc')
 $selected[$order] = 'selected';
 if ($callerid != '')
        $callerid_str = "AND CallingStationId = '$callerid'";
+if ($server != '' && $server != 'all')
+       $server_str = "AND NASIPAddress = '$server'";
 
 ?>
 
@@ -86,7 +88,7 @@ if ($link){
        WHERE AcctStopTime <= '$now_str' AND AcctStopTime >= '$prev_str'
        AND (AcctTerminateCause LIKE 'Login-Incorrect%' OR
        AcctTerminateCause LIKE 'Invalid-User%' OR
-       AcctTerminateCause LIKE 'Multiple-Logins%') $callerid_str
+       AcctTerminateCause LIKE 'Multiple-Logins%') $callerid_str $server_str
        ORDER BY AcctStopTime $order $limit;");
        if ($search){
                while( $row = @da_sql_fetch_array($search,$config) ){
@@ -165,6 +167,29 @@ EOM;
 ?>
 
 <td><input type="submit" class=button value="show"></td></tr>
+<tr><td>
+<b>On Access Server:</b>
+</td></tr><tr><td>
+<select name="server">
+<?php
+while(1){
+       $i++;
+       $name = 'nas' . $i . '_name';
+       if ($config[$name] == ''){
+               $i--;
+               break;
+       }
+       $name_ip = 'nas' . $i . '_ip';
+       if ($server == $config[$name_ip])
+               echo "<option selected value=\"$config[$name_ip]\">$config[$name]\n";
+       else
+               echo "<option value=\"$config[$name_ip]\">$config[$name]\n";
+}
+if ($server == '' || $server == 'all')
+       echo "<option selected value=\"all\">all\n";
+?>
+</select>
+</td></tr>
 </table></td></tr></form>
 </table>
 </tr>
index e6491fc9a1f4bafa04d262e0c55c22cbe1960922..4dffdd5ec7ceecfb2303eb0424e452dd1eac1e73 100644 (file)
@@ -88,7 +88,7 @@ if ($link){
        "SELECT sum(AcctSessionTime),sum(AcctInputOctets),sum(AcctOutputOctets),
        avg(AcctSessionTime),avg(AcctInputOctets),avg(AcctOutputOctets),COUNT(*) FROM
        $config[sql_accounting_table] WHERE UserName = '$login'
-       AND AcctStopTime >= '$week_str' AND AcctStopTime <= '$now_str';");
+       AND AcctStartTime >= '$week_str' AND AcctStartTime <= '$now_str';");
        if ($search){
                $row = @da_sql_fetch_array($search,$config);
                $tot_time = time2str($row['sum(AcctSessionTime)']);