".S_NO_PERMISSIONS.""); show_footer(); exit; } ?> $host : $description"; show_table_header($h1); $h1=""; if($_GET["action"] =="showhistory") { $h1=$h1."[".S_LAST_HOUR_GRAPH."] "; } else { $item=get_item_by_itemid($_GET["itemid"]); if($item["value_type"] == 0) { $h1=$h1."".S_LAST_HOUR_GRAPH." "; } } if($_GET["action"] =="showhistory2") { $h1=$h1."[".S_LAST_HOUR_GRAPH_DIFF."] "; } else { $item=get_item_by_itemid($_GET["itemid"]); if($item["value_type"] == 0) { $h1=$h1."".S_LAST_HOUR_GRAPH_DIFF." "; } } if($_GET["action"] =="showvalues") { $h1=$h1."[".S_VALUES_OF_LAST_HOUR."] "; } else { $h1=$h1."".S_VALUES_OF_LAST_HOUR." "; } if($_GET["action"] =="showfreehist") { $h1=$h1."[".S_VALUES_OF_SPECIFIED_PERIOD."] "; } else { $h1=$h1."".S_VALUES_OF_SPECIFIED_PERIOD." "; } if($_GET["action"] =="showplaintxt") { $h1=$h1."[".S_VALUES_IN_PLAIN_TEXT_FORMAT."] "; } else { $h1=$h1."".S_VALUES_IN_PLAIN_TEXT_FORMAT." "; } show_table_header($h1); echo "
"; if($_GET["action"]=="showfreehist") { if(!isset($_GET["period"])) { show_freehist($_GET["itemid"],$_GET["period"]); } exit; } if($_GET["action"]=="showplaintxt") { if(!isset($_GET["period"])) { show_plaintxt($_GET["itemid"],$_GET["period"]); } exit; } if($_GET["action"]=="showvalues") { if(!isset($_GET["from"])) { $_GET["from"]=0; } if(!isset($_GET["period"])) { $_GET["period"]=3600; } $time=time(NULL)-$_GET["period"]-$_GET["from"]*3600; $till=time(NULL)-$_GET["from"]*3600; $hours=$_GET["period"]/3600; show_table_header("Showing history of ".$_GET["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($_GET["itemid"]); if($item["value_type"]==0) { $sql="select clock,value from history where itemid=".$_GET["itemid"]." and clock>$time and clock<$till order by clock desc"; } else { $sql="select clock,value from history_str where itemid=".$_GET["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 ""; if($item["value_type"]==ITEM_VALUE_TYPE_FLOAT) { echo ""; } else { echo ""; } echo ""; } echo "
".S_CLOCK."".S_VALUE."
$clock$value".htmlspecialchars($value)."
"; show_footer(); exit; } if($_GET["action"]=="showhistory") { if(!isset($_GET["period"])) { $_GET["period"]=3600; } if(!isset($_GET["from"])) { $_GET["from"]=0; } if(isset($_GET["year"])) { $_GET["from"]=($now-mktime($_GET["hour"], 0, 0, $_GET["month"], $_GET["day"],$_GET["year"]))/3600; } @show_history($_GET["itemid"],$_GET["from"],$_GET["period"],0); show_footer(); exit; } if($_GET["action"]=="showhistory2") { @show_history($_GET["itemid"],$_GET["from"],$_GET["period"],1); show_footer(); exit; } ?>