" align="center" colspan="5">
|
">
|
|
|
|
|
db->query("select loginid,ip,li,lo from access_log order by li desc "
. "limit $show_maxlog");
while ($phpgw->db->next_record()) {
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
// In case there was a problem creating there session. eg, bad login time
// I still want it to be printed here. This will alert the admin there
// is a problem.
if ($phpgw->db->f("li") && $phpgw->db->f("lo")) {
$total = $phpgw->db->f("lo") - $phpgw->db->f("li");
if ($total > 86400 && $total > 172800)
$total = gmdate("z \d\a\y\s - G:i:s",$total);
else if ($total > 172800)
$total = gmdate("z \d\a\y - G:i:s",$total);
else
$total = gmdate("G:i:s",$total);
} else
$total = " ";
if ($phpgw->db->f("li"))
$li = $phpgw->preferences->show_date($phpgw->db->f("li"));
else
$li = " ";
if ($phpgw->db->f("lo"))
$lo = $phpgw->preferences->show_date($phpgw->db->f("lo"));
else
$lo = " ";
echo "" . $phpgw->db->f("loginid") . " | "
. $phpgw->db->f("ip") . " | $li | $lo | $total |
";
}
$phpgw->db->query("select count(*) from access_log");
$phpgw->db->next_record();
$total = $phpgw->db->f(0);
$phpgw->db->query("select count(*) from access_log where lo!='0'");
$phpgw->db->next_record();
$loggedout = $phpgw->db->f(0);
$percent = round((10000 * ($loggedout / $total)) / 100);
echo ""
. lang_admin("Total records") . ": $total |
";
echo ""
. lang_admin("Percent of users that logged out") . ": $percent% |
";
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");