".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 "
| ".S_CLOCK." | "; echo "".S_VALUE." | "; echo "|
| $clock | "; if($item["value_type"]==ITEM_VALUE_TYPE_FLOAT) { echo "$value | "; } else { echo "".htmlspecialchars($value)." | "; } echo "