Unauthorized Service Usage History for $login
Could not include SQL library functions. Aborting EOM; exit(); } $now = time(); $now_str = ($now_str != '') ? "$now_str" : date($config[sql_date_format],$now + 86400); $prev_str = ($prev_str != '') ? "$prev_str" : "0001-01-01 00:00:00"; $now_str = da_sql_escape_string($now_str); $prev_str = da_sql_escape_string($prev_str); $num = 0; $pagesize = ($pagesize) ? $pagesize : 10; if (!is_numeric($pagesize) && $pagesize != 'all') $pagesize = 10; $limit = ($pagesize == 'all') ? '' : "$pagesize"; $selected[$pagesize] = 'selected'; $login = ($login != '') ? $login : 'anyone'; $usercheck = ($login == 'anyone') ? "LIKE '%'" : "= '$login'"; $order = ($order != '') ? $order : $config[general_accounting_info_order]; if ($order != 'desc' && $order != 'asc') $order = 'desc'; $selected[$order] = 'selected'; echo << Unauthorized Service Usage History for $login
EOM; if ($login != 'anyone'){ echo << EOM; include("../html/user_toolbar.html.php3"); print << EOM; } if ($do_delete == 1 && ($row_id != 0 && is_numeric($row_id))){ $link = @da_sql_connect($config); if ($link){ $search = @da_sql_query($link,$config, "SELECT id,admin FROM $config[sql_badusers_table] WHERE id = '$row_id';"); if ($search){ $row = @da_sql_fetch_array($search,$config); if ($row[id] == $row_id){ $admin = "$row[admin]"; if (($admin != '-' && $_SERVER["PHP_AUTH_USER"] == $admin) || $admin == '-'){ $sql_servers = array(); if ($config[sql_extra_servers] != '') $sql_servers = explode(' ',$config[sql_extra_servers]); $sql_servers[] = $config[sql_server]; foreach ($sql_servers as $server){ $link2 = @da_sql_host_connect($server,$config); if ($link2){ $r = da_sql_query($link2,$config, "DELETE FROM $config[sql_badusers_table] WHERE id = '$row_id';"); if (!$r) echo "SQL Error:" . da_sql_error($link2,$config) . "
\n"; @da_sql_close($link2,$config); } else echo "SQL Error: Could not connect to SQL database: $server
\n"; } } } } else echo "Database query failed: " . da_sql_error($link,$config) . "
\n"; @da_sql_close($link,$config); } else echo "Could not connect to SQL database
\n"; } echo <<
Unauthorized Service Usage History for $login 
$prev_str up to $now_str
EOM; ?>

= '$prev_str' " . da_sql_limit($limit,1,$config) . " ORDER BY incidentdate $order " . da_sql_limit($limit,2,$config) . " ;"); if ($search){ while( $row = @da_sql_fetch_array($search,$config) ){ $num++; $id = $row[id]; $user = "$row[username]"; $User = urlencode($user); $date = "$row[incidentdate]"; $reason = "$row[reason]"; $admin = "$row[admin]"; if ($admin == $auth_user || $admin == '-') $action = ""; else $action = ""; if ($admin == '') $admin = '-'; if ($reason == '') $reason = '-'; echo << $action EOM; } } else echo "Database query failed: " . da_sql_error($link,$config) . "
\n"; } else echo "Could not connect to SQL database
\n"; echo <<
#userdateadminreasonadministrator action
-$num $user $date $admin $reason

  EOM; ?>
the from date matches any login after the 00:00 that day, and the to date any login before the 23:59 that day. the default values shown are the current week.
userfrom dateto datepagesizeorder