diff --git a/htdocs/system/application/models/onlineusermodel.php b/htdocs/system/application/models/onlineusermodel.php index c1776e5..ef70898 100755 --- a/htdocs/system/application/models/onlineusermodel.php +++ b/htdocs/system/application/models/onlineusermodel.php @@ -11,8 +11,7 @@ function onlineusermodel(){ function get_onlineusers() { // this works no matter what ...I think !!! - // return $this->db->query('select username, MAX(acctstarttime) as start, MAX(acctstoptime) as stop, sum(acctsessiontime) as time,sum(acctoutputoctets)+sum(acctinputoctets) as packet from radacct group by username having (start > stop) or (stop IS NULL)'); - return $this->db->query('select username, MAX(acctstarttime) as start, (acctstoptime) as stop, sum(acctsessiontime) as time,sum(acctoutputoctets)+sum(acctinputoctets) as packet from radacct where (acctstoptime IS NULL) group by username'); + return $this->db->query('select username, MAX(acctstarttime) as start, (acctstoptime) as stop, sum(acctsessiontime) as time,(sum(acctoutputoctets)+sum(acctinputoctets))/1048576 as packet from radacct where (acctstoptime IS NULL) group by username'); } } diff --git a/htdocs/system/application/views/onlineusers_view.php b/htdocs/system/application/views/onlineusers_view.php index 483b026..8923498 100755 --- a/htdocs/system/application/views/onlineusers_view.php +++ b/htdocs/system/application/views/onlineusers_view.php @@ -21,7 +21,7 @@