No permissions !"); show_footer(); exit; } ?> $host : $description"; } else { echo "$host : $description"; } show_table_v_delimiter(); echo("
"); if($HTTP_GET_VARS["action"] =="showhistory") { echo("[Last hour graph] "); } else { $item=get_item_by_itemid($HTTP_GET_VARS["itemid"]); if($item["value_type"] == 0) { echo("Last hour graph "); } } if($HTTP_GET_VARS["action"] =="showhistory2") { echo("[Last hour graph (diff)] "); } else { $item=get_item_by_itemid($HTTP_GET_VARS["itemid"]); if($item["value_type"] == 0) { echo("Last hour graph (diff) "); } } if($HTTP_GET_VARS["action"] =="showvalues") { echo("[Values of last hour] "); } else { echo("Values of last hour "); } if($HTTP_GET_VARS["action"] =="showfreehist") { echo("[Values of specified period] "); } else { echo("Values of specified period "); } if($HTTP_GET_VARS["action"] =="showplaintxt") { echo("[Values in plaint text format] "); } else { echo("Values in plaint text format "); } echo("
\n"); show_table_header_end(); echo("
"); if($HTTP_GET_VARS["action"]=="showfreehist") { if(!isset($HTTP_GET_VARS["period"])) { show_freehist($HTTP_GET_VARS["itemid"],$HTTP_GET_VARS["period"]); } exit; } if($HTTP_GET_VARS["action"]=="showplaintxt") { if(!isset($HTTP_GET_VARS["period"])) { show_plaintxt($HTTP_GET_VARS["itemid"],$HTTP_GET_VARS["period"]); } exit; } if($HTTP_GET_VARS["action"]=="showvalues") { if(!isset($HTTP_GET_VARS["from"])) { $HTTP_GET_VARS["from"]=0; } if(!isset($HTTP_GET_VARS["period"])) { $HTTP_GET_VARS["period"]=3600; } $time=time(NULL)-$HTTP_GET_VARS["period"]-$HTTP_GET_VARS["from"]*3600; $till=time(NULL)-$HTTP_GET_VARS["from"]*3600; $hours=$HTTP_GET_VARS["period"]/3600; show_table_header("Showing history of $period seconds($hours h)
[from: ".date("Y.M.d H:i:s",$time)."] [till: ".date("Y.M.d H:i:s",$till)."]"); echo ""; echo ""; echo ""; echo ""; echo ""; $item=get_item_by_itemid($HTTP_GET_VARS["itemid"]); if($item["value_type"]==0) { $sql="select clock,value from history where itemid=".$HTTP_GET_VARS["itemid"]." and clock>$time and clock<$till order by clock desc"; } else { $sql="select clock,value from history_str where itemid=".$HTTP_GET_VARS["itemid"]." and clock>$time and clock<$till order by clock desc"; } $result=DBselect($sql); $col=0; for($i=0;$i"; $col=0; } else { echo ""; $col=1; } $clock=DBget_field($result,$i,0); $value=DBget_field($result,$i,1); $clock=date("Y.M.d H:i:s",$clock); echo ""; echo ""; echo ""; } echo "
ClockValue
$clock$value
"; show_footer(); exit; } if($HTTP_GET_VARS["action"]=="showhistory") { if(!isset($HTTP_GET_VARS["period"])) { $HTTP_GET_VARS["period"]=3600; } if(!isset($HTTP_GET_VARS["from"])) { $HTTP_GET_VARS["from"]=0; } if(isset($HTTP_GET_VARS["year"])) { $HTTP_GET_VARS["from"]=($now-mktime($HTTP_GET_VARS["hour"], 0, 0, $HTTP_GET_VARS["month"], $HTTP_GET_VARS["day"],$HTTP_GET_VARS["year"]))/3600; } @show_history($HTTP_GET_VARS["itemid"],$HTTP_GET_VARS["from"],$HTTP_GET_VARS["period"],0); show_footer(); exit; } if($HTTP_GET_VARS["action"]=="showhistory2") { @show_history($HTTP_GET_VARS["itemid"],$HTTP_GET_VARS["from"],$HTTP_GET_VARS["period"],1); show_footer(); exit; } ?>