diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-08-01 15:51:49 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-08-01 15:51:49 +0000 |
| commit | 45d9a5cfcd90e2086d74dce58338f75b721b647d (patch) | |
| tree | c3cacfeb7d1a8e4ea936527d5146292a6af974ab /frontends/php/compare.php | |
| parent | 667ee48caee487831dbc44583e021832489e8390 (diff) | |
| download | zabbix-45d9a5cfcd90e2086d74dce58338f75b721b647d.tar.gz zabbix-45d9a5cfcd90e2086d74dce58338f75b721b647d.tar.xz zabbix-45d9a5cfcd90e2086d74dce58338f75b721b647d.zip | |
- use $_GET, $_POST, $_COOKIE to be PHP5-compatible. Thanks to Martin MOHNHAUP. (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1368 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/compare.php')
| -rw-r--r-- | frontends/php/compare.php | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/frontends/php/compare.php b/frontends/php/compare.php index 8a6df047..3324c3a5 100644 --- a/frontends/php/compare.php +++ b/frontends/php/compare.php @@ -26,7 +26,7 @@ ?> <?php - if(!check_right("Item","R",$HTTP_GET_VARS["itemid"])) + if(!check_right("Item","R",$_GET["itemid"])) { show_table_header("<font color=\"AA0000\">No permissions !</font>"); show_footer(); @@ -36,48 +36,48 @@ <?php show_table_header_begin(); - $result=DBselect("select i.description,h.host,h.hostid from items i,hosts h where i.hostid=h.hostid and i.itemid=".$HTTP_GET_VARS["itemid"]); + $result=DBselect("select i.description,h.host,h.hostid from items i,hosts h where i.hostid=h.hostid and i.itemid=".$_GET["itemid"]); $description=DBget_field($result,0,0); $host=DBget_field($result,0,1); $hostid=DBget_field($result,0,2); - echo "<A HREF='latest.php?hostid=$hostid'>$host</A> : <a href='history.php?action=showhistory&itemid=".$HTTP_GET_VARS["itemid"]."'>$description</a>"; + echo "<A HREF='latest.php?hostid=$hostid'>$host</A> : <a href='history.php?action=showhistory&itemid=".$_GET["itemid"]."'>$description</a>"; show_table_v_delimiter(); echo "<font size=2>"; - if(isset($HTTP_GET_VARS["type"])&&$HTTP_GET_VARS["type"]=="year") + if(isset($_GET["type"])&&$_GET["type"]=="year") { - echo "<b>[<a href='compare.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=year'>year</a>]</b> "; + echo "<b>[<a href='compare.php?itemid=".$_GET["itemid"]."&type=year'>year</a>]</b> "; } else { - echo "<a href='compare.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=year'>year</a> "; + echo "<a href='compare.php?itemid=".$_GET["itemid"]."&type=year'>year</a> "; } - if(isset($HTTP_GET_VARS["type"])&&$HTTP_GET_VARS["type"]=="month") + if(isset($_GET["type"])&&$_GET["type"]=="month") { - echo "<b>[<a href='compare.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=month'>month</a>]</b> "; + echo "<b>[<a href='compare.php?itemid=".$_GET["itemid"]."&type=month'>month</a>]</b> "; } else { - echo "<a href='compare.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=month'>month</a> "; + echo "<a href='compare.php?itemid=".$_GET["itemid"]."&type=month'>month</a> "; } - if(isset($HTTP_GET_VARS["type"])&&$HTTP_GET_VARS["type"]=="week") + if(isset($_GET["type"])&&$_GET["type"]=="week") { - echo "<b>[<a href='compare.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=week'>week</a>]</b> "; + echo "<b>[<a href='compare.php?itemid=".$_GET["itemid"]."&type=week'>week</a>]</b> "; } else { - echo "<a href='compare.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=week'>week</a> "; + echo "<a href='compare.php?itemid=".$_GET["itemid"]."&type=week'>week</a> "; } echo "</font>"; - if(isset($HTTP_GET_VARS["type"])) + if(isset($_GET["type"])) { show_table_v_delimiter(); - echo "<b>[<a href='compare.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=".$HTTP_GET_VARS["type"]."&type2=day'>day</a>]</b> "; + echo "<b>[<a href='compare.php?itemid=".$_GET["itemid"]."&type=".$_GET["type"]."&type2=day'>day</a>]</b> "; } show_table_header_end(); @@ -85,9 +85,9 @@ ?> <?php - if(isset($HTTP_GET_VARS["itemid"])&&isset($HTTP_GET_VARS["type"])) + if(isset($_GET["itemid"])&&isset($_GET["type"])) { - show_table_header(strtoupper($HTTP_GET_VARS["type"])); + show_table_header(strtoupper($_GET["type"])); } else { @@ -97,22 +97,22 @@ echo "<TR BGCOLOR=#EEEEEE>"; echo "<TR BGCOLOR=#DDDDDD>"; echo "<TD ALIGN=CENTER>"; - if(isset($HTTP_GET_VARS["itemid"])&&isset($HTTP_GET_VARS["type"])) + if(isset($_GET["itemid"])&&isset($_GET["type"])) { - if(isset($HTTP_GET_VARS["trendavg"])) + if(isset($_GET["trendavg"])) { echo "<script language=\"JavaScript\">"; echo "if (navigator.appName == \"Microsoft Internet Explorer\")"; echo "{"; - echo " document.write(\"<IMG SRC='chart3.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=".$HTTP_GET_VARS["type"]."&trendavg=1&width=\"+(document.body.clientWidth-108)+\"'>\")"; + echo " document.write(\"<IMG SRC='chart3.php?itemid=".$_GET["itemid"]."&type=".$_GET["type"]."&trendavg=1&width=\"+(document.body.clientWidth-108)+\"'>\")"; echo "}"; echo "else if (navigator.appName == \"Netscape\")"; echo "{"; - echo " document.write(\"<IMG SRC='chart3.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=".$HTTP_GET_VARS["type"]."&trendavg=1&width=\"+(document.width-108)+\"'>\")"; + echo " document.write(\"<IMG SRC='chart3.php?itemid=".$_GET["itemid"]."&type=".$_GET["type"]."&trendavg=1&width=\"+(document.width-108)+\"'>\")"; echo "}"; echo "else"; echo "{"; - echo " document.write(\"<IMG SRC='chart3.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=".$HTTP_GET_VARS["type"]."&trendavg=1'>\")"; + echo " document.write(\"<IMG SRC='chart3.php?itemid=".$_GET["itemid"]."&type=".$_GET["type"]."&trendavg=1'>\")"; echo "}"; echo "</script>"; } @@ -121,15 +121,15 @@ echo "<script language=\"JavaScript\">"; echo "if (navigator.appName == \"Microsoft Internet Explorer\")"; echo "{"; - echo " document.write(\"<IMG SRC='chart3.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=".$HTTP_GET_VARS["type"]."&width=\"+(document.body.clientWidth-108)+\"'>\")"; + echo " document.write(\"<IMG SRC='chart3.php?itemid=".$_GET["itemid"]."&type=".$_GET["type"]."&width=\"+(document.body.clientWidth-108)+\"'>\")"; echo "}"; echo "else if (navigator.appName == \"Netscape\")"; echo "{"; - echo " document.write(\"<IMG SRC='chart3.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=".$HTTP_GET_VARS["type"]."&width=\"+(document.width-108)+\"'>\")"; + echo " document.write(\"<IMG SRC='chart3.php?itemid=".$_GET["itemid"]."&type=".$_GET["type"]."&width=\"+(document.width-108)+\"'>\")"; echo "}"; echo "else"; echo "{"; - echo " document.write(\"<IMG SRC='chart3.php?itemid=".$HTTP_GET_VARS["itemid"]."&type=".$HTTP_GET_VARS["type"]."'>\")"; + echo " document.write(\"<IMG SRC='chart3.php?itemid=".$_GET["itemid"]."&type=".$_GET["type"]."'>\")"; echo "}"; echo "</script>"; } |
