#!/usr/local/bin/php pps) { $bigger_stat = $q->pps; } } } else { foreach ($statistics as $q) { if ($bigger_stat < $q->bandwidth) { $bigger_stat = $q->bandwidth; } } } $finscript = ""; foreach ($statistics as $q) { if ($stat_type == "0") { $packet_s = round(150 * (1 - $q->pps / $bigger_stat), 0); } else { $packet_s = round(150 * (1 - $q->bandwidth / $bigger_stat), 0); } if ($packet_s < 0) { $packet_s = 0; } $finscript .= "jQuery('#queue{$q->queuename}widthb').width('{$packet_s}');"; $finscript .= "jQuery('#queue{$q->queuename}widtha').width('" . (150 - $packet_s) . "');"; $finscript .= "jQuery('#queue{$q->queuename}pps').val('" . number_format($q->pps, 1) . "');"; $finscript .= "jQuery('#queue{$q->queuename}bps').val('" . format_bits($q->bandwidth) . "');"; $finscript .= "jQuery('#queue{$q->queuename}borrows').val('{$q->borrows}');"; $finscript .= "jQuery('#queue{$q->queuename}suspends').val('{$q->suspends}');"; $finscript .= "jQuery('#queue{$q->queuename}drops').val('{$q->drops}');"; $finscript .= "jQuery('#queue{$q->queuename}length').val('{$q->queuelength}');"; } unset($statistics, $altqstats); header("Content-type: text/javascript"); echo $finscript; exit; } $pgtitle = array(gettext("Status"), gettext("Traffic shaper"), gettext("Queues")); $shortcut_section = "trafficshaper"; include("head.inc"); ?>
"; exit; } ?>