Skip to content
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