From 2912a3d68f09d38e6909d98be74bfec79ad0cfb7 Mon Sep 17 00:00:00 2001 From: jengo Date: Mon, 6 Nov 2000 11:38:22 +0000 Subject: [PATCH] Fixed logout field not showing up properly --- admin/accesslog.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/admin/accesslog.php b/admin/accesslog.php index f359cfe0a8..443acb4565 100755 --- a/admin/accesslog.php +++ b/admin/accesslog.php @@ -45,30 +45,34 @@ // 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 = ($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) + } else if ($total > 172800) { $total = gmdate("z \d\a\y - G:i:s",$total); - else + } else { $total = gmdate("G:i:s",$total); - } else + } + } else { $total = " "; + } - if ($phpgw->db->f("li")) + if ($phpgw->db->f("li")) { $li = $phpgw->common->show_date($phpgw->db->f("li")); - else + } else { $li = " "; + } - if ($phpgw->db->f("lo")) + if ($phpgw->db->f("lo") != '') { $lo = $phpgw->common->show_date($phpgw->db->f("lo")); - else + } else { $lo = " "; + } $t->set_var("row_loginid",$phpgw->db->f("loginid")); $t->set_var("row_ip",$phpgw->db->f("ip")); $t->set_var("row_li",$li); - $t->set_var("row_lo",$li); + $t->set_var("row_lo",$lo); $t->set_var("row_total",$total); if ($phpgw->db->num_rows() == 1) {