Category Report

From
To

= '08:00:00' AND AccessTime < '16:00:00' And AccessDate >='".$startDate."' and AccessDate <='".$endDate."'"; if($DEBUG) echo $query."
"; echo $query."
"; $result = mysql_query($query); $rowsnum = mysql_num_rows($result); return $rowsnum; } function findTotalAfternoon($med,$startDate,$endDate) { $query="SELECT * FROM `OM_log` WHERE type ='".$med."' AND AccessTime >= '16:00:00' AND AccessTime < '19:00:00' And AccessDate >='".$startDate."' and AccessDate <='".$endDate."'"; if($DEBUG) echo $query."
"; echo $query."
"; $result = mysql_query($query); $rowsnum = mysql_num_rows($result); return $rowsnum; } function findTotalNight($med,$startDate,$endDate) { $query="SELECT * FROM `OM_log` WHERE type ='".$med."' AND AccessTime >= '19:00:00' AND AccessTime < '21:00:00' And AccessDate >='".$startDate."' and AccessDate <='".$endDate."'"; if($DEBUG) echo $query."
"; echo $query."
"; $result = mysql_query($query); $rowsnum = mysql_num_rows($result); return $rowsnum; } if (isset($_POST['submit'])) { // get the first date $startDate=$_POST['date3']; $endDate=$_POST['date4']; //echo "the start date is ".$startDate."
"; //echo "the end date is ".$endDate."
"; // convert the date to the m/d/yyyy format $newStartDate=$startDate." 0:0:1 AM"; $newEndDate=$endDate." 11:59:59 PM"; //echo $newStartDate; //echo $newEndDate; echo "

The Data is between ".$newStartDate. " to ".$newEndDate."

"; // Need to find out the logs on the basis of the Media Type //Create an array of all the media types $mediaTypesArray=array("Audio","Video","DVD","PDF","Software","Internet"); $reportDataArray=array(); // for each Media Type find out the following for($i=0;$i"; if($DEBUG) echo " the data is
"; $totalTimes=0; $totalMorn=0; $totalAfter=0; $totalNight=0; //generate the report ?> getTotalMorning(); $totalAfter=$totalAfter+$temp->getTotalAfternoon(); $totalNight=$totalNight+$temp->getTotalNight(); $totalTimes=$totalTimes+$temp->getTotal(); echo ""; } echo ""; ?>
CategoryTimes8:00AM-4:00PM4:00PM-7:00PM7:00PM-9:00PM
".$temp->getCategoryData()."".$temp->getTotal()."".$temp->getTotalMorning()."".$temp->getTotalAfternoon()."".$temp->getTotalNight()."
Total".$totalTimes."".$totalMorn."".$totalAfter."".$totalNight."
dired link