Skip to content

Changed Online Users Packet Data usage to MBs to make it more readable #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions htdocs/system/application/models/onlineusermodel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/system/application/views/onlineusers_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<td><?=$row->username;?></td>
<td><?=$row->start;?></td>
<td><?=$row->time;?></td>
<td><?=$row->packet;?></td>
<td><?=$row->packet;?> MB</td>
<td><?=anchor('onlineuser/disconnect/'.$row->username,'disconnect','class="disconnect" ')?></td>
</tr>
<?php endforeach;?>
Expand Down