diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-03 10:15:28 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-03 10:15:28 +0000 |
| commit | cf25f64f2acd722c391ecb8fff1ec4d058a27ff3 (patch) | |
| tree | 9f8dda2178b1412d6e83f0e24bd0c8319deae041 /frontends/php/alerts.php | |
| parent | 26905a61d0cec458a04a971a6751e18a021d1c92 (diff) | |
PHP code cleanup. Use of class Ctable().
git-svn-id: svn://svn.zabbix.com/trunk@2485 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/alerts.php')
| -rw-r--r-- | frontends/php/alerts.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/frontends/php/alerts.php b/frontends/php/alerts.php index 17d3c904..53b32116 100644 --- a/frontends/php/alerts.php +++ b/frontends/php/alerts.php @@ -88,8 +88,8 @@ } $result=DBselect($sql); - table_begin(); - table_header(array(S_TIME, S_TYPE, S_STATUS, S_RECIPIENTS, S_SUBJECT, S_MESSAGE, S_ERROR)); + $table = new Ctable(S_NO_ALERTS); + $table->setHeader(array(S_TIME, S_TYPE, S_STATUS, S_RECIPIENTS, S_SUBJECT, S_MESSAGE, S_ERROR)); $col=0; $zzz=0; while($row=DBfetch($result)) @@ -123,23 +123,16 @@ { $error=array("value"=>$row["error"],"class"=>"on"); } - table_row(array( + $table->addRow(array( $time, $row["description"], $status, $sendto, $subject, $message, - $error), - $col++); + $error)); } - if(DBnum_rows($result)==0) - { - echo "<TR BGCOLOR=#EEEEEE>"; - echo "<TD COLSPAN=7 ALIGN=CENTER>".S_NO_ALERTS."</TD>"; - echo "<TR>"; - } - table_end(); + $table->show(); ?> <?php |
