'; include("fbegin.inc"); echo '

ifBWStats: Daily Statistics For '.$interfacename.'

'; echo 'Month Ending: '.str_replace('%20', ' ', $queryparts[3]).'

'; //display tabs echo ''; echo ''; echo ''; echo '
'; $tab_array[0] = array ("Daily", false, "ifbwstats_cur.php"); $tab_array[1] = array ("Monthly", false, "ifbwstats_disp.php"); $tab_array[2] = array ("Settings", false, "pkg_edit.php?xml=ifbwstats.xml"); $tab_array[3] = array ("Archive", true, $url); display_top_tabs($tab_array); echo '
'; echo '
'; $foundfile = 'null'; if (file_exists($queryparts[0])) $foundfile = $queryparts[0]; if ($foundfile == 'null') { echo 'Sorry, no data file found.'; } else { $fp = fopen($foundfile,"r") or die("Error Reading File"); $data = fread($fp, filesize($foundfile)); fclose($fp); $wandataall = explode("\n", $data); $n = count($wandataall); $monthintotal = 0; $monthouttotal = 0; $monthdaystart = 0; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; for ($i=$queryparts[1] ; $i < $queryparts[2]+1 ; $i++ ) { $dataset=explode("|", $wandataall[$i]); $dateset=explode("-", $dataset[0]); $monthintotal = $monthintotal + $dataset[1]; $monthouttotal = $monthouttotal + $dataset[2]; $total = round((($dataset[1]+$dataset[2])/1024/1024/1024),2); $dataset[1] = round(($dataset[1]/1024/1024),2); $dataset[2] = round(($dataset[2]/1024/1024),2); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } $total = round((($monthintotal + $monthouttotal)/1024/1024/1024),2); $monthintotal = round(($monthintotal/1024/1024/1024),2); $monthouttotal = round(($monthouttotal/1024/1024/1024),2); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
DateDownloadedUploadedTotal Transfered
'.$dataset[0].''.$dataset[1].'MB'.$dataset[2].'MB'.$total.'GB
Month Totals↓'.$monthintotal.'GB↑'.$monthouttotal.'GB↕'.$total.'GB
'; } echo '
'; echo '
'; include("fend.inc"); echo ''; echo ''; ?>