Small update
[iDB.git] / inc / misc / killglobals.php
blob4bec9354216b5060e6ff6fb7f3d515d4c6abf565
1 <?php
2 /*
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
13 Kill Register Globals (Register Globals are very lame we dont need them anyways. :P)
15 $FileInfo: killglobals.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
17 $File3Name = basename($_SERVER['SCRIPT_NAME']);
18 if ($File3Name=="killqlobals.php"||$File3Name=="/killqlobals.php") {
19 require('index.php');
20 exit(); }
21 function unregister_globals() {
22 $REQUEST = $_REQUEST;
23 $GET = $_GET;
24 $POST = $_POST;
25 $COOKIE = $_COOKIE;
26 if(isset($_SESSION)) {
27 $SESSION = $_SESSION; }
28 $FILES = $_FILES;
29 $ENV = $_ENV;
30 $SERVER = $_SERVER;
31 foreach($GLOBALS as $key => $value) {
32 if($key!='GLOBALS') {
33 unset($GLOBALS[$key]); } }
34 $_REQUEST = $REQUEST;
35 $_GET = $GET;
36 $_POST = $POST;
37 $_COOKIE = $COOKIE;
38 if(isset($SESSION)) {
39 $_SESSION = $SESSION; }
40 $_FILES = $FILES;
41 $_ENV = $ENV;
42 $_SERVER = $SERVER; }
43 unregister_globals();