- MRTG-PHP , the MRTG log file veiwer -

Page jumps
"; traverse_dir("$dir/$file"); chdir($dir); } } else if (stristr($file,"html") <> "" AND stristr($file,"~") <> "~") { $j =0; $oldfile=$namefile; $namefile = ""; While ($file[$j] <> "_") { $namefile = $namefile . $file[$j]; $j++ ;} $count++; $filearray[$count][0] = $file; $filearray[$count][1] = $namefile; if ($oldfile!=$namefile and $first=1) echo "$namefile
"; $first=0; } } echo "
"; $first=1; $namefile=""; $tablestart = 1; $alt = 1; for ($counter=0; $counter<=$count; $counter++) { if ($counter>0) $oldfile = $filearray[$counter-1][1]; if ($oldfile!=$filearray[$counter][1] and $first=1) { if ($tablestart == 1) $tablestart = 0; else echo ""; echo "

" . $filearray[$counter][1] . "
"; } $first=0; $j =0; $ifname=""; $iftype=""; $system=""; $maintain=""; $des=""; $speed=""; $log=file($filearray[$counter][0]); while (strchr($log[$j],"

")=="") $j++; $logline=$log[$j]; $i=strpos($logline,"ifName")+21; While ($logline[$i] <> "<") {$ifname=$ifname.$logline[$i]; $i++;} If (!$ifname) $ifname = "Not set"; $i=strpos($logline,"ifType")+21; While ($logline[$i] <> "<") {$iftype=$iftype.$logline[$i]; $i++;} If (!$iftype) $iftype = "Not set"; $i=strpos($logline,"System")+21; While ($logline[$i] <> "<") {$system=$system.$logline[$i]; $i++;} If (!$system) $system = "Not set"; $i=strpos($logline,"Maintain")+21; While ($logline[$i] <> "<") {$maintain=$maintain.$logline[$i]; $i++;} If (!$maintain) $maintain = "Not set"; $i=strpos($logline,"Description")+21; While ($logline[$i] <> "<") {$des=$des.$logline[$i]; $i++;} If (strlen($des)<4) $des = "Not set"; $i=strpos($logline,"Max Speed")+21; While ($logline[$i] <> "<") {$speed=$speed.$logline[$i]; $i++;} If (!$speed) $speed = "Not set"; ?>
>

align="right">Description >
align="right">Maintainer >
align="right">System >
align="right">Connection Name >
align="right">Connection Type >
align="right">Max Speed >
-Back to top-

MRTG-PHP Written by David Boyer and Jo Joseph