" . $user['login'] . " "; print WEB_report_traffic_for_ip." ".$auth['ip'].""; ?>
>

0) { $gateway_filter="(router_id=$rgateway) AND"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; $display_date_format='%Y-%m-%d %H'; if ($days_shift <=1) { $display_date_format='%Y-%m-%d %H'; } if ($days_shift >1 and $days_shift <=30) { $display_date_format='%Y-%m-%d'; } if ($days_shift >30 and $days_shift <=730) { $display_date_format='%Y-%m'; } if ($days_shift >730) { $display_date_format='%Y'; } $sSQL = "SELECT router_id, DATE_FORMAT(ts,'$display_date_format') as tHour, SUM(byte_in) as byte_in_sum, SUM(byte_out) as byte_out_sum, MAX(ROUND(pkt_in/step)) as pkt_in_max, MAX(ROUND(pkt_out/step)) as pkt_out_max FROM user_stats_full WHERE ts>='$date1' AND ts<'$date2' AND auth_id=$id"; if ($rgateway == 0) { $sSQL = $sSQL . " GROUP BY DATE_FORMAT(ts,'$display_date_format'),router_id ORDER BY tHour,router_id"; } else { $sSQL = $sSQL . " AND router_id=$rgateway GROUP BY DATE_FORMAT(ts,'$display_date_format'),router_id ORDER BY tHour"; } $userdata = get_records_sql($db_link, $sSQL); $sum_in = 0; $sum_out = 0; foreach ($userdata as $row) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; $sum_in += $row['byte_in_sum']; $sum_out += $row['byte_out_sum']; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; ?>
".$auth['description']."TOP 10".WEB_report_detail."
" . $gateway_list[$row['router_id']] . "" . $row['tHour'] . "" . fbytes($row['byte_in_sum']) . "" . fbytes($row['byte_out_sum']) . "" . fpkts($row['pkt_in_max']) . "" . fpkts($row['pkt_out_max']) . "
" . WEB_title_itog . " " . fbytes($sum_in) . "" . fbytes($sum_out) . "