From 180d85520fa4c856e46b58153bc0c7f1f8b48d98 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Thu, 1 Sep 2005 11:06:42 +0000 Subject: Improvements for navigation bar. git-svn-id: svn://svn.zabbix.com/trunk@2016 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/graphs.inc.php | 83 +++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 24 deletions(-) (limited to 'frontends/php/include/graphs.inc.php') diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php index 3dfa5b83..227a2c7b 100644 --- a/frontends/php/include/graphs.inc.php +++ b/frontends/php/include/graphs.inc.php @@ -202,6 +202,32 @@ } } + function navigation_bar_calc() + { + if(!isset($_GET["period"])) $_GET["period"]=3600; + if(!isset($_GET["from"])) $_GET["from"]=0; + + if(isset($_GET["inc"])) $_GET["period"]= $_GET["period"]+$_GET["inc"]; + if(isset($_GET["dec"])) $_GET["period"]= $_GET["period"]-$_GET["dec"]; + + if(isset($_GET["left"])) $_GET["from"]= $_GET["from"]+$_GET["left"]; + if(isset($_GET["right"])) $_GET["from"]= $_GET["from"]-$_GET["right"]; + + unset($_GET["inc"]); + unset($_GET["dec"]); + unset($_GET["left"]); + unset($_GET["right"]); + + if($_GET["from"]<=0) $_GET["from"]=0; + if($_GET["period"]<=0) $_GET["period"]=3600; + + if(isset($_GET["reset"])) + { + $_GET["period"]=3600; + $_GET["from"]=0; + } + } + function navigation_bar($url) { $h1=S_NAVIGATE; @@ -217,17 +243,8 @@ $h2=$h2.form_select("period",31*24*3600,"month"); $h2=$h2.form_select("period",365*24*3600,"year"); $h2=$h2.""; - $h2=$h2.""; $h2=$h2.""; + $h2=$h2.""; $h2=$h2." ".S_MOVE." "; $h2=$h2.""; $h2=$h2.""; $h2=$h2." "; $h2=$h2.""; $h2=$h2." "; $h2=$h2.""; + $h2=$h2.""; if(isset($_GET["graphid"])&&($_GET["graphid"]!=0)) { @@ -271,6 +298,14 @@ { $h2=$h2.""; } + if(isset($_GET["from"])) + { + $h2=$h2.""; + } + if(isset($_GET["fullscreen"])) + { + $h2=$h2.""; + } show_header2($h1,$h2,"
","
"); -- cgit