diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-08-25 11:00:37 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-08-25 11:00:37 +0000 |
| commit | c6fcb6eab3c55dc1a6f26e3790c267d7449c888f (patch) | |
| tree | 6bc50eb51e3279d897758e15269984bc9e16a2f3 /frontends/php/graph.php | |
| parent | 15f955a9e8abcd424c85344473d669319b42519c (diff) | |
Getting rid of dependency on register_globals
git-svn-id: svn://svn.zabbix.com/trunk@462 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/graph.php')
| -rw-r--r-- | frontends/php/graph.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/frontends/php/graph.php b/frontends/php/graph.php index ba8a5115..36ea0c0b 100644 --- a/frontends/php/graph.php +++ b/frontends/php/graph.php @@ -11,16 +11,16 @@ ?> <? - if(isset($register)) + if(isset($HTTP_GET_VARS["register"])) { - if($register=="add") + if($HTTP_GET_VARS["register"]=="add") { - $result=add_item_to_graph($graphid,$itemid,$color); + $result=add_item_to_graph($HTTP_GET_VARS["graphid"],$HTTP_GET_VARS["itemid"],$HTTP_GET_VARS["color"]); show_messages($result,"Item added","Cannot add item"); } - if($register=="delete") + if($HTTP_GET_VARS["register"]=="delete") { - $result=delete_graphs_item($gitemid); + $result=delete_graphs_item($HTTP_GET_VARS["gitemid"]); show_messages($result,"Item deleted","Cannot delete item"); unset($gitemid); } @@ -28,13 +28,13 @@ ?> <? - $result=DBselect("select name from graphs where graphid=$graphid"); + $result=DBselect("select name from graphs where graphid=".$HTTP_GET_VARS["graphid"]); $row=DBfetch($result); show_table_header($row["name"]); echo "<TABLE BORDER=0 COLS=4 align=center WIDTH=100% BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>"; echo "<TR BGCOLOR=#DDDDDD>"; echo "<TD ALIGN=CENTER>"; - echo "<IMG SRC=\"chart2.php?graphid=$graphid&period=3600&from=0\">"; + echo "<IMG SRC=\"chart2.php?graphid=".$HTTP_GET_VARS["graphid"]."&period=3600&from=0\">"; echo "</TD>"; echo "</TR>"; echo "</TABLE>"; @@ -47,7 +47,7 @@ echo "<TD WIDTH=10% NOSAVE><B>Actions</B></TD>"; echo "</TR>"; - $sql="select i.itemid,h.host,i.description,gi.gitemid,gi.color from hosts h,graphs_items gi,items i where i.itemid=gi.itemid and gi.graphid=$graphid and h.hostid=i.hostid"; + $sql="select i.itemid,h.host,i.description,gi.gitemid,gi.color from hosts h,graphs_items gi,items i where i.itemid=gi.itemid and gi.graphid=".$HTTP_GET_VARS["graphid"]." and h.hostid=i.hostid"; $result=DBselect($sql); $col=0; while($row=DBfetch($result)) @@ -58,7 +58,7 @@ echo "<TD>".$row["host"]."</TD>"; echo "<TD><a href=\"chart.php?itemid=".$row["itemid"]."&period=3600&from=0\">".$row["description"]."</a></TD>"; echo "<TD>".$row["color"]."</TD>"; - echo "<TD><A HREF=\"graph.php?register=delete&graphid=$graphid&gitemid=".$row["gitemid"]."\">Delete</A></TD>"; + echo "<TD><A HREF=\"graph.php?register=delete&graphid=".$HTTP_GET_VARS["graphid"]."&gitemid=".$row["gitemid"]."\">Delete</A></TD>"; echo "</TR>"; } echo "</TABLE>"; @@ -72,10 +72,10 @@ echo "New item for graph"; show_table2_v_delimiter(); - echo "<form method=\"post\" action=\"graph.php?graphid=$graphid\">"; - if(isset($gitemid)) + echo "<form method=\"get\" action=\"graph.php?graphid=".$HTTP_GET_VARS["graphid"].">"; + if(isset($HTTP_GET_VARS["gitemid"])) { - echo "<input name=\"gitemid\" type=\"hidden\" value=$gitemid>"; + echo "<input name=\"gitemid\" type=\"hidden\" value=".$HTTP_GET_VARS["gitemid"].">"; } echo "Parameter"; |
