diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-17 16:33:34 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-17 16:33:34 +0000 |
| commit | 9eaf71aa5dcdaa32ee823059500d60e597f856e4 (patch) | |
| tree | f667c5383c76967f9ae1cc203d59ca17efe56a87 /frontends/php/config.php | |
| parent | 0f6562e1ff12b714a422703215ad9f0e6e00ed8d (diff) | |
| download | zabbix-9eaf71aa5dcdaa32ee823059500d60e597f856e4.tar.gz zabbix-9eaf71aa5dcdaa32ee823059500d60e597f856e4.tar.xz zabbix-9eaf71aa5dcdaa32ee823059500d60e597f856e4.zip | |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2535 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/config.php')
| -rw-r--r-- | frontends/php/config.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/frontends/php/config.php b/frontends/php/config.php index 8548a2c1..1e5185fc 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -44,6 +44,36 @@ ?> <?php + function BETWEEN($min,$max) + { + return "({}>=$min&&{}<=$max)&&"; + } + + function GT($value) + { + return "({}>=$value)&&"; + } + + function IN($array) + { + return "in_array({},array($array))&&"; + } + + define("NOT_EMPTY","({}!='')&&"); + +// VAR TYPE OPTIONAL TABLE FIELD OPTIONAL VALIDATION EXCEPTION + $fields=array( + "config"=> array(T_ZBX_INT, O_OPT, NULL, NULL, IN("0,1,3,4,5"), NULL), + "refresh_unsupported"=> array(T_ZBX_INT, O_MAND, "config", NULL, BETWEEN(30,65535), NULL) + ); + + if(!check_fields($fields)) + { + show_messages(); + } +?> + +<?php /* if(isset($_REQUEST["config"])) $_REQUEST["config"]=$_REQUEST["config"]; */ $_REQUEST["config"]=@iif(isset($_REQUEST["config"]),$_REQUEST["config"],get_profile("web.config.config",0)); |
