diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-12-12 09:42:46 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-12-12 09:42:46 +0000 |
| commit | c0529a72a421c43e903376c9c2661cf9b2e221d8 (patch) | |
| tree | c1597b558cb9a46961d204e9461d5c2a6eea59e6 /frontends/php/include/classes/ctable.inc.php | |
| parent | 1e32b65c56449dba7140c470a2e18024a05063d4 (diff) | |
- [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/classes/ctable.inc.php')
| -rw-r--r-- | frontends/php/include/classes/ctable.inc.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/frontends/php/include/classes/ctable.inc.php b/frontends/php/include/classes/ctable.inc.php index 03711739..5ccca19d 100644 --- a/frontends/php/include/classes/ctable.inc.php +++ b/frontends/php/include/classes/ctable.inc.php @@ -62,15 +62,17 @@ } elseif(is_array($item)){ foreach($item as $el){ - if(strtolower(get_class($el))=='ccol') { - parent::AddItem($el); + if(strtolower(get_class($el))=='ccol') { + parent::AddItem($el); } elseif(!is_null($el)) { - parent::AddItem('<td>'.unpack_object($el).'</td>'); +// parent::AddItem('<td>'.unpack_object($el).'</td>'); + parent::AddItem(new CCol($el)); } } } elseif(!is_null($item)){ - parent::AddItem('<td>'.unpack_object($item).'</td>'); +// parent::AddItem('<td>'.unpack_object($item).'</td>'); + parent::AddItem(new CCol($item)); } } @@ -150,7 +152,8 @@ $this->oddRowClass: $this->evenRowClass); }/**/ - return $item->ToString(); + return $item; +// return $item->ToString(); } function SetHeader($value=NULL,$class=NULL){ @@ -169,6 +172,7 @@ if(is_null($class)) $class = $this->footerClass; $this->footer = $this->PrepareRow($value,$class); + $this->footer = $this->footer->ToString(); } function AddRow($item,$rowClass=NULL){ @@ -178,7 +182,7 @@ } function ShowRow($item,$rowClass=NULL){ - echo $this->PrepareRow($item,$rowClass); + echo $this->PrepareRow($item,$rowClass)->ToString(); ++$this->rownum; } /* protected */ @@ -196,6 +200,7 @@ $ret = ""; if($this->rownum == 0 && isset($this->message)) { $ret = $this->PrepareRow(new CCol($this->message,'message')); + $ret = $ret->ToString(); } $ret .= $this->footer; $ret .= parent::EndToString(); |
