summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/config.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-25 15:08:07 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-25 15:08:07 +0000
commit3d3f9639bc0524d6085d11041d70d23fbbda1c88 (patch)
tree6750314aafcbb445cfc34e25f812e1daf1ae0140 /frontends/php/include/config.inc.php
parent6a0a2faf91cefb2d62cca7dc6faf685b5e90df03 (diff)
- Frontend improvements (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2564 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
-rw-r--r--frontends/php/include/config.inc.php31
1 files changed, 20 insertions, 11 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 486fcd44..a86df47f 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -1218,30 +1218,39 @@ function SDI($msg) { echo "DEBUG INFO: $msg ".BR; } # DEBUG INFO!!!
}
# Show screen cell containing plain text values
- function show_screen_plaintext($itemid,$elements)
+ function& get_screen_plaintext($itemid,$elements)
{
$item=get_item_by_itemid($itemid);
if($item["value_type"]==0)
{
- $sql="select clock,value from history where itemid=$itemid order by clock desc limit $elements";
+ $sql="select clock,value from history where itemid=$itemid".
+ " order by clock desc limit $elements";
}
else
{
- $sql="select clock,value from history_str where itemid=$itemid order by clock desc limit $elements";
+ $sql="select clock,value from history_str where itemid=$itemid".
+ " order by clock desc limit $elements";
}
$result=DBselect($sql);
- table_begin();
- table_header(array(S_TIMESTAMP,$item["description"]));
- $col=0;
+ $table = new CTableInfo();
+ $table->SetHeader(array(S_TIMESTAMP,$item["description"]));
+// table_begin();
+// table_header(array(S_TIMESTAMP,$item["description"]));
+// $col=0;
while($row=DBfetch($result))
{
- table_row(array(
+ $table->AddRow(array(
date(S_DATE_FORMAT_YMDHMS,$row["clock"]),
- $row["value"],
- ),$col++);
- }
- table_end();
+ $row["value"])
+ );
+// table_row(array(
+// date(S_DATE_FORMAT_YMDHMS,$row["clock"]),
+// $row["value"],
+// ),$col++);
+ }
+// table_end();
+ return $table;
}
# Show values in plain text