summaryrefslogtreecommitdiffstats
path: root/frontends/php/items.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-06 15:24:33 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-06 15:24:33 +0000
commit7a1590d2ea50d61eb7f695d6371a48e609117e50 (patch)
tree066605dd07f91ff67ce51d30ffa0e60f1999e550 /frontends/php/items.php
parent5199d6f9a9f2d3829780e8b5a70b286cbfbcb40c (diff)
downloadzabbix-7a1590d2ea50d61eb7f695d6371a48e609117e50.tar.gz
zabbix-7a1590d2ea50d61eb7f695d6371a48e609117e50.tar.xz
zabbix-7a1590d2ea50d61eb7f695d6371a48e609117e50.zip
Frontend improvements.
git-svn-id: svn://svn.zabbix.com/trunk@2494 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/items.php')
-rw-r--r--frontends/php/items.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/frontends/php/items.php b/frontends/php/items.php
index 3010f1d4..3bb890c1 100644
--- a/frontends/php/items.php
+++ b/frontends/php/items.php
@@ -243,10 +243,13 @@
if(isset($_REQUEST["hostid"]))
{
- table_begin();
- table_header(array(S_ID,S_KEY,S_DESCRIPTION,nbsp(S_UPDATE_INTERVAL),S_HISTORY,S_TRENDS,S_TYPE,S_STATUS,S_ERROR));
- echo "<form method=\"get\" action=\"items.php\">";
- echo "<input class=\"biginput\" name=\"hostid\" type=hidden value=".$_REQUEST["hostid"]." size=8>";
+ $table = new Ctable();
+ $table->setHeader(array(S_ID,S_KEY,S_DESCRIPTION,nbsp(S_UPDATE_INTERVAL),S_HISTORY,S_TRENDS,S_TYPE,S_STATUS,S_ERROR));
+ $h="<form method=\"get\" action=\"items.php\">";
+ $h=$h."<input class=\"biginput\" name=\"hostid\" type=hidden value=".$_REQUEST["hostid"]." size=8>";
+
+ $table->setAfterHeader($h);
+
$result=DBselect("select h.host,i.key_,i.itemid,i.description,h.port,i.delay,i.history,i.lastvalue,i.lastclock,i.status,i.nextcheck,h.hostid,i.type,i.trends,i.error from hosts h,items i where h.hostid=i.hostid and h.hostid=".$_REQUEST["hostid"]." order by h.host,i.key_,i.description");
$col=0;
while($row=DBfetch($result))
@@ -316,7 +319,7 @@
{
$error=array("value"=>$row["error"],"class"=>"on");
}
- table_row(array(
+ $table->AddRow(array(
$input,
$key,
$row["description"],
@@ -326,26 +329,23 @@
$type,
$status,
$error
- ),$col++);
+ ));
}
- table_end();
+ $table->show();
$h="<input class=\"button\" type=\"submit\" name=\"register\" value=\"Activate selected\" onClick=\"return Confirm('".S_ACTIVATE_SELECTED_ITEMS_Q."');\">";
$h=$h."<input class=\"button\" type=\"submit\" name=\"register\" value=\"Disable selected\" onClick=\"return Confirm('".S_DISABLE_SELECTED_ITEMS_Q."');\">";
$h=$h."<input class=\"button\" type=\"submit\" name=\"register\" value=\"Delete selected\" onClick=\"return Confirm('".S_DELETE_SELECTED_ITEMS_Q."');\">";
+ $h=$h."</form>";
show_table_header($h);
}
- else
- {
-// echo "<center>Select Host</center>";
- }
}
?>
<?php
-// if(isset($_REQUEST["register"])&&(in_array($_REQUEST["register"],array("Create Item","change"))))
+ if(isset($_REQUEST["register"])&&(in_array($_REQUEST["register"],array("Create Item","change"))))
{
$result=DBselect("select count(*) as cnt from hosts");
$row=DBfetch($result);