summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/html.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-12-12 09:42:46 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-12-12 09:42:46 +0000
commitc0529a72a421c43e903376c9c2661cf9b2e221d8 (patch)
treec1597b558cb9a46961d204e9461d5c2a6eea59e6 /frontends/php/include/html.inc.php
parent1e32b65c56449dba7140c470a2e18024a05063d4 (diff)
downloadzabbix-c0529a72a421c43e903376c9c2661cf9b2e221d8.tar.gz
zabbix-c0529a72a421c43e903376c9c2661cf9b2e221d8.tar.xz
zabbix-c0529a72a421c43e903376c9c2661cf9b2e221d8.zip
- [ZBX-208] html output parsing (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5164 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/html.inc.php')
-rw-r--r--frontends/php/include/html.inc.php51
1 files changed, 25 insertions, 26 deletions
diff --git a/frontends/php/include/html.inc.php b/frontends/php/include/html.inc.php
index 7233eb6e..75893b27 100644
--- a/frontends/php/include/html.inc.php
+++ b/frontends/php/include/html.inc.php
@@ -19,16 +19,21 @@
**/
?>
<?php
- function bold($str)
- {
+ function bold($str){
if(is_array($str)){
foreach($str as $key => $val)
- if(is_string($val))
- $str[$key] = "<b>$val</b>";
- } elseif(is_string($str)) {
- $str = "<b>$str</b>";
+ if(is_string($val)){
+ $b = new CTag('strong','yes');
+ $b->AddItem($val);
+ $str[$key] = $b;
+ }
+ }
+ else if(is_string($str)) {
+ $b = new CTag('strong','yes');
+ $b->AddItem($str);
+ $str = $b;
}
- return $str;
+ return $str;
}
function bfirst($str) // mark first symbol of string as bold
@@ -110,38 +115,28 @@
return $result;
}
- function url_param($parameter,$request=true,$name=null)
- {
- $result = "";
-
-
- if(!is_array($parameter))
- {
- if(!isset($name))
- {
+ function url_param($parameter,$request=true,$name=null){
+ $result = '';
+ if(!is_array($parameter)){
+ if(!isset($name)){
if(!$request)
fatal_error('not request variable require url name [url_param]');
-
+
$name = $parameter;
}
}
- if($request)
- {
- global $_REQUEST;
-
+ if($request){
$var =& $_REQUEST[$parameter];
}
- else
- {
+ else{
$var =& $parameter;
}
- if(isset($var))
- {
+ if(isset($var)){
$result = prepare_url($var,$name);
}
- return $result;
+ return $result;
}
function table_begin($class="tableinfo")
@@ -207,4 +202,8 @@
echo "</TR>";
echo "</TABLE>";
}
+
+ function BR(){
+ return new CTag('br','no');
+ }
?>