diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-03 10:03:54 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-03 10:03:54 +0000 |
commit | 26905a61d0cec458a04a971a6751e18a021d1c92 (patch) | |
tree | 5f601cc98feb07330cfc0ba280841929d1a042fe /frontends/php/graphs.php | |
parent | bebbe1e18bdd25e6f976f8a39a308e65728b957d (diff) | |
download | zabbix-26905a61d0cec458a04a971a6751e18a021d1c92.tar.gz zabbix-26905a61d0cec458a04a971a6751e18a021d1c92.tar.xz zabbix-26905a61d0cec458a04a971a6751e18a021d1c92.zip |
PHP code cleanup. Use of class Ctable.
git-svn-id: svn://svn.zabbix.com/trunk@2484 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/graphs.php')
-rw-r--r-- | frontends/php/graphs.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/frontends/php/graphs.php b/frontends/php/graphs.php index 882ea298..ed31226e 100644 --- a/frontends/php/graphs.php +++ b/frontends/php/graphs.php @@ -155,8 +155,8 @@ show_header2($h1,$h2,"<form name=\"form2\" method=\"get\" action=\"graphs.php\">","</form>"); ?> <?php - table_begin(); - table_header(array(S_ID,S_NAME,S_WIDTH,S_HEIGHT,S_ACTIONS)); + $table = new Ctable(S_NO_GRAPHS_DEFINED); + $table->setHeader(array(S_ID,S_NAME,S_WIDTH,S_HEIGHT,S_ACTIONS)); if(isset($_REQUEST["hostid"])&&($_REQUEST["hostid"]!=0)) { @@ -166,7 +166,6 @@ { $result=DBselect("select distinct g.graphid,g.name,g.width,g.height from graphs g order by g.name"); } - $col=0; while($row=DBfetch($result)) { if(!check_right("Graph","U",$row["graphid"])) @@ -181,21 +180,15 @@ if(DBnum_rows($result2)>0) continue; } - table_row(array( + $table->addRow(array( $row["graphid"], "<a href=\"graph.php?graphid=".$row["graphid"]."\">".$row["name"]."</a>", $row["width"], $row["height"], "<A HREF=\"graphs.php?graphid=".$row["graphid"]."#form\">Change</A>" - ),$col++); + )); } - if(DBnum_rows($result)==0) - { - echo "<TR BGCOLOR=#EEEEEE>"; - echo "<TD COLSPAN=5 ALIGN=CENTER>".S_NO_GRAPHS_DEFINED."</TD>"; - echo "<TR>"; - } - table_end(); + $table->show(); ?> <?php echo "<a name=\"form\"></a>"; |