* 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.
$selected[$order] = 'selected';
if ($callerid != '')
$callerid_str = "AND CallingStationId = '$callerid'";
+if ($server != '' && $server != 'all')
+ $server_str = "AND NASIPAddress = '$server'";
?>
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) ){
?>
<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>
"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)']);