summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-29 04:24:45 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-29 04:24:45 +0000
commitc79f8f2fa32a24fb2d5ae2b2e5e8cbad8b3fdf82 (patch)
tree0933b84b72e82503e92afba4628a153d40049e36 /frontends/php
parentd6979e8ed003b82e31e7bd7402efa5264b4a8430 (diff)
downloadzabbix-c79f8f2fa32a24fb2d5ae2b2e5e8cbad8b3fdf82.tar.gz
zabbix-c79f8f2fa32a24fb2d5ae2b2e5e8cbad8b3fdf82.tar.xz
zabbix-c79f8f2fa32a24fb2d5ae2b2e5e8cbad8b3fdf82.zip
Changes in forms.
git-svn-id: svn://svn.zabbix.com/trunk@471 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/chart2.php2
-rw-r--r--frontends/php/graph.php3
-rw-r--r--frontends/php/hosts.php6
-rw-r--r--frontends/php/include/config.inc.php8
-rw-r--r--frontends/php/items.php2
5 files changed, 16 insertions, 5 deletions
diff --git a/frontends/php/chart2.php b/frontends/php/chart2.php
index e2f2577f..9dd01576 100644
--- a/frontends/php/chart2.php
+++ b/frontends/php/chart2.php
@@ -112,7 +112,7 @@
$color[$item]=DBget_field($result2,$item,2);
$host[$item]=DBget_field($result2,$item,3);
- $result=DBselect("select clock,value from history where itemid=".$HTTP_GET_VARS["itemid"]." and clock>$from_time and clock<$to_time order by clock");
+ $result=DBselect("select clock,value from history where itemid=$itemid and clock>$from_time and clock<$to_time order by clock");
$len[$item]=0;
$x[$item]=array();
$y[$item]=array();
diff --git a/frontends/php/graph.php b/frontends/php/graph.php
index b45a032b..a242192a 100644
--- a/frontends/php/graph.php
+++ b/frontends/php/graph.php
@@ -72,7 +72,8 @@
echo "New item for graph";
show_table2_v_delimiter();
- echo "<form method=\"get\" action=\"graph.php?graphid=".$HTTP_GET_VARS["graphid"]."\">";
+ echo "<form method=\"get\" action=\"graph.php\">";
+ echo "<input name=\"graphid\" type=\"hidden\" value=".$HTTP_GET_VARS["graphid"].">";
if(isset($HTTP_GET_VARS["gitemid"]))
{
echo "<input name=\"gitemid\" type=\"hidden\" value=".$HTTP_GET_VARS["gitemid"].">";
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php
index 980a5b32..10eb2f09 100644
--- a/frontends/php/hosts.php
+++ b/frontends/php/hosts.php
@@ -22,16 +22,19 @@
{
$result=add_host($HTTP_GET_VARS["host"],$HTTP_GET_VARS["port"],$HTTP_GET_VARS["status"],$HTTP_GET_VARS["template"],$HTTP_GET_VARS["useip"],$HTTP_GET_VARS["ip"],$HTTP_GET_VARS["host_templateid"]);
show_messages($result,"Host added","Cannot add host");
+ unset($HTTP_GET_VARS["hostid"]);
}
if($HTTP_GET_VARS["register"]=="update")
{
$result=update_host($HTTP_GET_VARS["hostid"],$HTTP_GET_VARS["host"],$HTTP_GET_VARS["port"],$HTTP_GET_VARS["status"],$HTTP_GET_VARS["useip"],$HTTP_GET_VARS["ip"]);
show_messages($result,"Host details updated","Cannot update host details");
+ unset($HTTP_GET_VARS["hostid"]);
}
if($HTTP_GET_VARS["register"]=="changestatus")
{
$result=update_host_status($HTTP_GET_VARS["hostid"],$HTTP_GET_VARS["status"]);
show_messages($result,"Host status updated","Cannot update host status");
+ unset($HTTP_GET_VARS["hostid"]);
}
if($HTTP_GET_VARS["register"]=="delete")
{
@@ -47,6 +50,8 @@
?>
<?
+ if(!isset($HTTP_GET_VARS["hostid"]))
+{
echo "<TABLE BORDER=0 COLS=4 align=center WIDTH=100% BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
echo "<TR>";
echo "<TD WIDTH=3% NOSAVE><B>Id</B></TD>";
@@ -105,6 +110,7 @@
echo "</TR>";
}
echo "</TABLE>";
+}
?>
<?
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index a1cc9637..bf6b651a 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -2965,6 +2965,8 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
function insert_login_form()
{
+ global $HTTP_GET_VARS;
+
show_table2_header_begin();
echo "Login";
@@ -2973,12 +2975,14 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
echo "Login name";
show_table2_h_delimiter();
- echo "<input name=\"name\" value=\"$name\" size=20>";
+// echo "<input name=\"name\" value=\"".$HTTP_GET_VARS["name"]."\" size=20>";
+ echo "<input name=\"name\" value=\"\" size=20>";
show_table2_v_delimiter();
echo "Password";
show_table2_h_delimiter();
- echo "<input type=\"password\" name=\"password\" value=\"$password\" size=20>";
+// echo "<input type=\"password\" name=\"password\" value=\"$password\" size=20>";
+ echo "<input type=\"password\" name=\"password\" value=\"\" size=20>";
show_table2_v_delimiter2();
echo "<input type=\"submit\" name=\"register\" value=\"Enter\">";
diff --git a/frontends/php/items.php b/frontends/php/items.php
index 727266ed..1d9a9abc 100644
--- a/frontends/php/items.php
+++ b/frontends/php/items.php
@@ -183,7 +183,7 @@
if(DBget_field($result,0,0)>0)
{
echo "<a name=\"form\"></a>";
- insert_item_form($HTTP_GET_VARS["itemid"]);
+ @insert_item_form($HTTP_GET_VARS["itemid"]);
}
?>