='$date1' AND User_stats_full.timestamp<'$date2' "; if ($rou !== 0) { $trafSQL = $trafSQL . " AND User_list.ou_id=$rou"; } if ($rgateway == 0) { $trafSQL = $trafSQL . " GROUP by User_auth.id,User_stats_full.router_id"; } else { $trafSQL = $trafSQL . " AND User_stats_full.router_id=$rgateway GROUP by User_auth.id,User_stats_full.router_id"; } $countSQL = "SELECT Count(*) FROM ($trafSQL) A"; $count_records = get_single_field($db_link,$countSQL); $total=ceil($count_records/$displayed); if ($page>$total) { $page=$total; } if ($page<1) { $page=1; } $start = ($page * $displayed) - $displayed; #set sort $trafSQL=$trafSQL ." $sort_sql LIMIT $start,$displayed"; print_navigation($page_url,$page,$displayed,$count_records,$total); print "

\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; $total_in = 0; $total_out = 0; $traf = get_records_sql($db_link, $trafSQL); foreach ($traf as $row) { if ($row['tin'] + $row['tout'] == 0) { continue; } $total_in += $row['tin']; $total_out += $row['tout']; $s_router = !empty($gateway_list[$row['router_id']]) ? $gateway_list[$row['router_id']] : ''; $cl = $row['tout'] > 2 * $row['tin'] ? "nb" : "data"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; ?>
".WEB_cell_login."".WEB_cell_ip."".WEB_cell_gateway."".WEB_title_input."".WEB_title_output."".WEB_title_maxpktin."".WEB_title_maxpktout."
" . $row['login'] . "" . $row['ip'] . "$s_router" . fbytes($row['tin']) . "" . fbytes($row['tout']) . "" . fpkts($row['pin']) . "" . fpkts($row['pout']) . "
".WEB_title_itog."" . fbytes($total_in) . "" . fbytes($total_out) . "