Полный лог
0) { $gateway_filter="(router_id=$rgateway) AND"; }
$countSQL="SELECT Count(*) FROM Traffic_detail as A WHERE $gateway_filter (auth_id='$id') and `timestamp`>='$date1' and `timestamp`<'$date2'";
$res = mysqli_query($db_link, $countSQL);
$count_records = mysqli_fetch_array($res);
$total=ceil($count_records[0]/$displayed);
if ($page>$total) { $page=$total; }
if ($page<1) { $page=1; }
$start = ($page * $displayed) - $displayed;
print_navigation($page_url,$page,$displayed,$count_records[0],$total);
$gateway_list = get_gateways($db_link);
?>
| id"; print $url; ?> |
Дата"; print $url; ?> |
Роутер |
Протокол |
Откуда"; print $url; ?> |
DNS |
Порт |
Куда"; print $url; ?> |
DNS |
Порт |
Байт"; print $url; ?> |
Pkt"; print $url; ?> |
='$date1' and `timestamp`<'$date2'
ORDER BY `timestamp` ASC LIMIT $start,$displayed) as T ON A.id = T.id ORDER BY $sort_table.$sort_field $order";
$userdata = mysqli_query($db_link, $fsql);
while (list ($uid,$udata, $urouter, $uproto, $sip, $sport,$dip, $dport, $ubytes, $upkt) = mysqli_fetch_array($userdata)) {
print "\n";
print "| $uid | \n";
print "$udata | \n";
print "$gateway_list[$urouter] | \n";
if ($uproto==='6') { $uproto = 'tcp'; }
if ($uproto==='17') { $uproto = 'udp'; }
print "" . $uproto . " | \n";
print "" . long2ip($sip) . " | \n";
$ip_name = '-';
if ($rdns) { $ip_name = ResolveIP($db_link,$sip); }
print "" . $ip_name . " | \n";
print "" .$sport . " | \n";
print "" . long2ip($dip) . " | \n";
$ip_name = '-';
if ($rdns) { $ip_name = ResolveIP($db_link,$dip); }
print "" . $ip_name . " | \n";
print "" . $dport . " | \n";
print "" . fbytes($ubytes) . " | \n";
print "" . $upkt . " | \n";
print "
\n";
}
?>