Updated php-5.x compatibility ($HTTP_GET_VARS).
authorshort <>
Sat, 14 May 2005 00:02:10 +0000 (00:02 +0000)
committershort <>
Sat, 14 May 2005 00:02:10 +0000 (00:02 +0000)
public_html/cgi-bin/postget.php

index 8ebabc7..1515e4f 100644 (file)
@@ -1,11 +1,11 @@
 <?php
        $path_priv="/home/lace/priv/";
 <?php
        $path_priv="/home/lace/priv/";
-       $getget=isset($HTTP_GET_VARS["_getget"]);
+       $getget=isset($_REQUEST["_getget"]);
        $wherename=($getget ? "_getget" : "_postget");
        $wherename=($getget ? "_getget" : "_postget");
-       $where=$HTTP_GET_VARS[$wherename];
-       unset($HTTP_GET_VARS[$wherename]);
+       $where=$_REQUEST[$wherename];
+       unset($_REQUEST[$wherename]);
 
 
-       foreach ($HTTP_GET_VARS as $key=>$val) {
+       foreach ($_REQUEST as $key=>$val) {
                if (ereg("^_priv_(postget.*)\$",$val,$matched)) {
                        $permit=array("127.0.0.1"=>1,"192.168.192.1"=>1,"192.168.90.11"=>1,"192.168.90.12"=>1);
                        if (!$permit[$HTTP_SERVER_VARS["REMOTE_ADDR"]])
                if (ereg("^_priv_(postget.*)\$",$val,$matched)) {
                        $permit=array("127.0.0.1"=>1,"192.168.192.1"=>1,"192.168.90.11"=>1,"192.168.90.12"=>1);
                        if (!$permit[$HTTP_SERVER_VARS["REMOTE_ADDR"]])
                                                ."<br />"
                                                );
                        else
                                                ."<br />"
                                                );
                        else
-                               $HTTP_GET_VARS[$key]=chop(join(" ",file($path_priv.$matched[1],false/*use_include_path*/)));
+                               $_REQUEST[$key]=chop(join(" ",file($path_priv.$matched[1],false/*use_include_path*/)));
                        }
                }
 
        if ($getget) {
                $first='?';
                        }
                }
 
        if ($getget) {
                $first='?';
-               foreach ($HTTP_GET_VARS as $key=>$val) {
+               foreach ($_REQUEST as $key=>$val) {
                        $where.="${first}".urlencode($key)."=".urlencode($val);
                        $first='&';
                        }
                        $where.="${first}".urlencode($key)."=".urlencode($val);
                        $first='&';
                        }
@@ -46,7 +46,7 @@
                print(""
                                ."<body onload=\"document.forms[0].submit();\">\n"
                                ."<form action=\"".htmlspecialchars($where)."\" method=\"post\"><p>\n");
                print(""
                                ."<body onload=\"document.forms[0].submit();\">\n"
                                ."<form action=\"".htmlspecialchars($where)."\" method=\"post\"><p>\n");
-               foreach ($HTTP_GET_VARS as $key=>$val)
+               foreach ($_REQUEST as $key=>$val)
                        print("<input type=\"hidden\" name=\"".htmlspecialchars($key)."\" value=\"".htmlspecialchars($val)."\" />\n");
                print("<input type=\"submit\" />\n");
                print("</p></form></body>\n");
                        print("<input type=\"hidden\" name=\"".htmlspecialchars($key)."\" value=\"".htmlspecialchars($val)."\" />\n");
                print("<input type=\"submit\" />\n");
                print("</p></form></body>\n");