From f88cd97611e1c5182913747bf50bf426ce5f0bd1 Mon Sep 17 00:00:00 2001 From: kkalev Date: Tue, 12 Nov 2002 21:55:12 +0000 Subject: [PATCH] * 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 --- Changelog | 2 ++ htdocs/failed_logins.php3 | 27 ++++++++++++++++++++++++++- htdocs/user_admin.php3 | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 99fde22..1f32be3 100644 --- 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. diff --git a/htdocs/failed_logins.php3 b/htdocs/failed_logins.php3 index 806058f..15a166b 100644 --- a/htdocs/failed_logins.php3 +++ b/htdocs/failed_logins.php3 @@ -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; ?> + +On Access Server: + + + diff --git a/htdocs/user_admin.php3 b/htdocs/user_admin.php3 index e6491fc..4dffdd5 100644 --- a/htdocs/user_admin.php3 +++ b/htdocs/user_admin.php3 @@ -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)']); -- 2.39.5