summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-02-13 14:39:13 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-02-13 14:39:13 +0000
commit42858cb993ece4f6cdf86d3bc77a3e0451e2a66a (patch)
treeed54d37750ea42c92aaa05eb22ea8adb39ab8e82 /frontends/php/include
parent243d617eb24a7ba56683fcc976701064720181ba (diff)
downloadzabbix-42858cb993ece4f6cdf86d3bc77a3e0451e2a66a.tar.gz
zabbix-42858cb993ece4f6cdf86d3bc77a3e0451e2a66a.tar.xz
zabbix-42858cb993ece4f6cdf86d3bc77a3e0451e2a66a.zip
- fixed navigation bar for Sreens (Eugene)
(http://www.zabbix.com/forum/showthread.php?t=2148) git-svn-id: svn://svn.zabbix.com/trunk@2637 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/graphs.inc.php56
-rw-r--r--frontends/php/include/html.inc.php10
-rw-r--r--frontends/php/include/validate.inc.php22
3 files changed, 48 insertions, 40 deletions
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php
index 0963cbbb..709b37ab 100644
--- a/frontends/php/include/graphs.inc.php
+++ b/frontends/php/include/graphs.inc.php
@@ -508,41 +508,41 @@
$h2=$h2.form_select("period",365*24*3600,"year");
$h2=$h2."</select>";
$h2=$h2."<select class=\"biginput\" name=\"dec\" onChange=\"submit()\">";
- $h2=$h2.form_select("dec",0,S_DECREASE);
- $h2=$h2.form_select("dec",3600,"-1h");
- $h2=$h2.form_select("dec",4*3600,"-4h");
- $h2=$h2.form_select("dec",24*3600,"-24h");
- $h2=$h2.form_select("dec",7*24*3600,"-week");
- $h2=$h2.form_select("dec",31*24*3600,"-month");
- $h2=$h2.form_select("dec",365*24*3600,"-year");
+ $h2=$h2.form_select(NULL,0,S_DECREASE);
+ $h2=$h2.form_select(NULL,3600,"-1h");
+ $h2=$h2.form_select(NULL,4*3600,"-4h");
+ $h2=$h2.form_select(NULL,24*3600,"-24h");
+ $h2=$h2.form_select(NULL,7*24*3600,"-week");
+ $h2=$h2.form_select(NULL,31*24*3600,"-month");
+ $h2=$h2.form_select(NULL,365*24*3600,"-year");
$h2=$h2."</select>";
$h2=$h2."<select class=\"biginput\" name=\"inc\" onChange=\"submit()\">";
- $h2=$h2.form_select("inc",0,S_INCREASE);
- $h2=$h2.form_select("inc",3600,"+1h");
- $h2=$h2.form_select("inc",4*3600,"+4h");
- $h2=$h2.form_select("inc",24*3600,"+24h");
- $h2=$h2.form_select("inc",7*24*3600,"+week");
- $h2=$h2.form_select("inc",31*24*3600,"+month");
- $h2=$h2.form_select("inc",365*24*3600,"+year");
+ $h2=$h2.form_select(NULL,0,S_INCREASE);
+ $h2=$h2.form_select(NULL,3600,"+1h");
+ $h2=$h2.form_select(NULL,4*3600,"+4h");
+ $h2=$h2.form_select(NULL,24*3600,"+24h");
+ $h2=$h2.form_select(NULL,7*24*3600,"+week");
+ $h2=$h2.form_select(NULL,31*24*3600,"+month");
+ $h2=$h2.form_select(NULL,365*24*3600,"+year");
$h2=$h2."</select>";
$h2=$h2.SPACE.S_MOVE.SPACE;
$h2=$h2."<select class=\"biginput\" name=\"left\" onChange=\"submit()\">";
- $h2=$h2.form_select("left",0,S_LEFT_DIR);
- $h2=$h2.form_select("left",1,"-1h");
- $h2=$h2.form_select("left",4,"-4h");
- $h2=$h2.form_select("left",24,"-24h");
- $h2=$h2.form_select("left",7*24,"-week");
- $h2=$h2.form_select("left",31*24,"-month");
- $h2=$h2.form_select("left",365*24,"-year");
+ $h2=$h2.form_select(NULL,0,S_LEFT_DIR);
+ $h2=$h2.form_select(NULL,1,"-1h");
+ $h2=$h2.form_select(NULL,4,"-4h");
+ $h2=$h2.form_select(NULL,24,"-24h");
+ $h2=$h2.form_select(NULL,7*24,"-week");
+ $h2=$h2.form_select(NULL,31*24,"-month");
+ $h2=$h2.form_select(NULL,365*24,"-year");
$h2=$h2."</select>";
$h2=$h2."<select class=\"biginput\" name=\"right\" onChange=\"submit()\">";
- $h2=$h2.form_select("right",0,S_RIGHT_DIR);
- $h2=$h2.form_select("right",1,"+1h");
- $h2=$h2.form_select("right",4,"+4h");
- $h2=$h2.form_select("right",24,"+24h");
- $h2=$h2.form_select("right",7*24,"+week");
- $h2=$h2.form_select("right",31*24,"+month");
- $h2=$h2.form_select("right",365*24,"+year");
+ $h2=$h2.form_select(NULL,0,S_RIGHT_DIR);
+ $h2=$h2.form_select(NULL,1,"+1h");
+ $h2=$h2.form_select(NULL,4,"+4h");
+ $h2=$h2.form_select(NULL,24,"+24h");
+ $h2=$h2.form_select(NULL,7*24,"+week");
+ $h2=$h2.form_select(NULL,31*24,"+month");
+ $h2=$h2.form_select(NULL,365*24,"+year");
$h2=$h2."</select>";
$h2=$h2.SPACE;
$h2=$h2."<input name=\"stime\" size=18 class=\"biginput\" value=\"yyyymmddhhmm\" size=12>";
diff --git a/frontends/php/include/html.inc.php b/frontends/php/include/html.inc.php
index 4c888aaa..23ac7cb8 100644
--- a/frontends/php/include/html.inc.php
+++ b/frontends/php/include/html.inc.php
@@ -50,8 +50,14 @@
function form_select($var, $value, $label)
{
global $_REQUEST;
-
- return "<option value=\"$value\" ".iif(isset($_REQUEST[$var])&&$_REQUEST[$var]==$value,"selected","").">$label";
+
+ $selected = "";
+ if(!is_null($var))
+ {
+ if(isset($_REQUEST[$var])&&$_REQUEST[$var]==$value)
+ $selected = "selected";
+ }
+ return "<option value=\"$value\" $selected>$label";
}
function form_input($name, $value, $size)
diff --git a/frontends/php/include/validate.inc.php b/frontends/php/include/validate.inc.php
index 4de30e9a..39e9a66f 100644
--- a/frontends/php/include/validate.inc.php
+++ b/frontends/php/include/validate.inc.php
@@ -19,6 +19,13 @@
**/
?>
<?php
+
+ function unset_request($key)
+ {
+// SDI("unset: $key");
+ unset($_REQUEST[$key]);
+ }
+
define('ZBX_VALID_OK', 0);
define('ZBX_VALID_ERROR', 1);
define('ZBX_VALID_WARNING', 2);
@@ -100,8 +107,7 @@
{
if(!isset($fields[$key]))
{
-//echo "Unset: $key<br>";
- unset($_REQUEST[$key]);
+ unset_request($key);
}
}
}
@@ -114,8 +120,7 @@
if(($flags&P_NZERO)&&(isset($_REQUEST[$field]))&&($_REQUEST[$field]==0))
{
-//echo "Unset: $field<br>";
- unset($_REQUEST[$field]);
+ unset_request($field);
}
}
}
@@ -129,8 +134,7 @@
if(($flags&P_ACT)&&(isset($_REQUEST[$field])))
{
-//echo "Unset:".$field."<br>";
- unset($_REQUEST[$field]);
+ unset_request($field);
}
}
}
@@ -139,8 +143,7 @@
{
foreach($_REQUEST as $key => $val)
{
-//echo "Unset:".$key."<br>";
- unset($_REQUEST[$key]);
+ unset_request($key);
}
}
@@ -231,8 +234,7 @@
if(!isset($_REQUEST[$field]))
return ZBX_VALID_OK;
-//echo "Unset:".$field."<br>";
- unset($_REQUEST[$field]);
+ unset_request($field);
if($flags&P_SYS)
{