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/report3.php | |
| parent | 26905a61d0cec458a04a971a6751e18a021d1c92 (diff) | |
| download | zabbix-cf25f64f2acd722c391ecb8fff1ec4d058a27ff3.tar.gz zabbix-cf25f64f2acd722c391ecb8fff1ec4d058a27ff3.tar.xz zabbix-cf25f64f2acd722c391ecb8fff1ec4d058a27ff3.zip | |
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/report3.php')
| -rw-r--r-- | frontends/php/report3.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/frontends/php/report3.php b/frontends/php/report3.php index 56a94e07..af17df35 100644 --- a/frontends/php/report3.php +++ b/frontends/php/report3.php @@ -78,10 +78,10 @@ ?> <?php - table_begin(); + $table = new Ctable(); if($_REQUEST["period"]=="yearly") { - table_header(array(S_YEAR,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); + $table->setHeader(array(S_YEAR,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); for($year=date("Y")-5;$year<=date("Y");$year++) { $start=mktime(0,0,0,1,1,$year); @@ -112,18 +112,18 @@ { $sla="-"; } - table_row(array( + $table->addRow(array( $year, $ok, $problems, $percentage, $sla - ),$col++); + )); } } else if($_REQUEST["period"]=="monthly") { - table_header(array(S_MONTH,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); + $table->setHeader(array(S_MONTH,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); for($month=1;$month<=12;$month++) { $start=mktime(0,0,0,$month,1,$_REQUEST["year"]); @@ -157,18 +157,18 @@ { $sla="-"; } - table_row(array( + $table->addRow(array( date("M Y",$start), $ok, $problems, $percentage, $sla - ),$col++); + )); } } else if($_REQUEST["period"]=="daily") { - table_header(array(S_DAY,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); + $table->setHeader(array(S_DAY,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); $s=mktime(0,0,0,1,1,$_REQUEST["year"]); $e=mktime(0,0,0,1,1,$_REQUEST["year"]+1); for($day=$s;$day<$e;$day+=24*3600) @@ -204,19 +204,19 @@ { $sla="-"; } - table_row(array( + $table->addRow(array( date("d M Y",$start), $ok, $problems, $percentage, $sla - ),$col++); + )); } } else { //--------Weekly------------- - table_header(array(S_FROM,S_TILL,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); + $table->setHeader(array(S_FROM,S_TILL,S_OK,S_PROBLEMS,S_PERCENTAGE,S_SLA)); $col=0; $year=date("Y"); for($year=date("Y")-2;$year<=date("Y");$year++) @@ -269,19 +269,19 @@ $sla="-"; } - table_row(array( + $table->addRow(array( $from, $till, $ok, $problems, $percentage, $sla - ),$col++); + )); } } //--------Weekly------------- } - table_end(); + $table->show(); show_footer(); ?> |
