No permissions !"); // show_footer(); // exit; // } ?> Undefined serviceid !"); show_footer(); exit; } $service=get_service_by_serviceid($HTTP_GET_VARS["serviceid"]); ?> "; echo "",$service["name"],"";; show_table_v_delimiter(); $result=DBselect("select h.hostid,h.host from hosts h,items i where h.status in (0,2) and h.hostid=i.hostid group by h.hostid,h.host order by h.host"); $year=date("Y"); for($year=date("Y")-2;$year<=date("Y");$year++) { if( isset($HTTP_GET_VARS["year"]) && ($HTTP_GET_VARS["year"] == $year) ) { echo "["; } echo "".$year.""; if(isset($HTTP_GET_VARS["year"]) && ($HTTP_GET_VARS["year"] == $year) ) { echo "]"; } echo " "; } show_table_header_end(); ?> "; echo "
| From | "; echo "Till | "; echo "OK | "; echo "Problems | "; echo "Percentage | "; echo "SLA | "; echo "||
| "; echo date("d M Y",$period_start); echo " | "; echo ""; echo date("d M Y",$period_end); echo " | "; $t=sprintf("%2.2f%%",$stat["problem"]); $t_time=sprintf("%dd %dh %dm",$stat["problem_time"]/(24*3600),($stat["problem_time"]%(24*3600))/3600,($stat["problem_time"]%(3600))/(60)); $f=sprintf("%2.2f%%",$stat["ok"]); $f_time=sprintf("%dd %dh %dm",$stat["ok_time"]/(24*3600),($stat["ok_time"]%(24*3600))/3600,($stat["ok_time"]%(3600))/(60)); echo ""; echo "$f_time" ; echo " | "; echo ""; echo "$t_time" ; echo " | "; echo ""; echo "$f/$t" ; echo " | "; if($service["showsla"]==1) { if($stat["ok"]>=$service["goodsla"]) { echo "".$service["goodsla"]."% | "; } else { echo "".$service["goodsla"]."% | "; } } else { echo "- | "; } echo "