diff --git a/statsGraph.php b/statsGraph.php new file mode 100644 --- /dev/null +++ b/statsGraph.php @@ -0,0 +1,43 @@ + $file) { + if(is_numeric($file->getFilename())){ + $uctime = $file->getCTime(); + $ctime = date("m/d/Y",$uctime); + $ctime = strtotime($ctime); // Results in a day-specific unix timestamp + + if($ctime < $stopDate && $ctime > $startDate) { + $currDate = $file->getCTime(); + if(!isset($arr[$currDate])) { + $arr[$currDate] = 1; + } + else { + $arr[$currDate]++; + } + } + } + } + + $gphArr = array(); + $i = 0; + foreach($arr as $index => $item) { + $gphArr[$i]['count'] = $item; + $gphArr[$i]['label'] = date("j/n", $index); + $i++; + } +//echo "
"; +// print_r($gphArr); + // Graph array + $myGraph = new barGraph($gphArr, 900, 100); +?>