dec($task);}} switch($task) { case "default": $this->fn_default_sum(); break; case $task: $task="fn_".$task; if(method_exists($this,$task)){$this->$task();} break; default: $this->fn_default_sum(); break; } } public function fn_default_sum() { echo $this->FN_CREATEHEADER(); echo ""; echo ""; echo $this->FN_CLOSEHEADER(); echo $this->FN_CREATEBODY("white"); echo ""; echo " "; echo "
Trend Tickets Alarm Period ".date("Y")."
MTTR Ticket Period ".date("M")."/".date("Y")."
"; $qry="select category,slainhours sla from ".DB_APORTIL.".tbl_nits_mttrbycategory where isdeleted=0 and category<>'' order by id asc"; $rs=$this->selectquery($qry);$arrsla=array(); if($rs) { $avgall=0; while($rw=$this->data_row_object($rs)) { $arrsla[$rw->category]=round($rw->sla,2); $avgall+=round($rw->sla,2); //echo round($rw->sla,2)."
"; } $avgall=round(($avgall/4),2); } $this->clearrecordset($rs); echo "
Today ".date("d M Y")." 
PLATINUM : ".$arrsla["PLATINUM"]." Hours
GOLD : ".$arrsla["GOLD"]." Hours
SILVER : ".$arrsla["SILVER"]." Hours
BRONZE : ".$arrsla["BRONZE"]." Hours
$avgall Hours
average for closed ticket
Alarm By Category Period ".date("M")."/".date("Y")."
Alarm By Sitetype Period ".date("M")."/".date("Y")."
SUMMARY Ticket Period ".date("M")."/".date("Y")."

"; $qry="select category,opened,closed from ".DB_APORTIL.".tbl_nits_sumticketstatus where isdeleted=0 order by id asc"; $rs=$this->selectquery($qry); if($rs) { $grandtotal=0; while($rw=$this->data_row_object($rs)) { echo ""; echo " "; echo " "; echo " "; $total=$rw->opened+$rw->closed; echo " "; echo ""; $grandtotal+=$total; } echo ""; echo " "; echo " "; echo ""; } $this->clearrecordset($rs); echo "
Open  Closed  Total 
".$rw->category."".number_format($rw->opened)." ".number_format($rw->closed)." ".number_format($total)." 
Total :  ".number_format($grandtotal)." 
"; echo $this->FN_CREATEFOOTER(); } } ?>