Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?php
2
/************************************************************************/
3
/* G-Shout : Gravitasi Shoutbox                                         */
4
/* ============================================                         */
5
/*                                                                      */
6
/* Copyright (c) 2005 by Yohanes Pradono                                */
7
/* http://gravitasi.com                                                 */
8
/*                                                                      */
9
/* This program is free software. You can redistribute it and/or modify */
10
/* it under the terms of the GNU General Public License as published by */
11
/* the Free Software Foundation; either version 2 of the License.       */
12
/*                                                                      */
13
/************************************************************************/
14
 
15
// to prevent direct access
16
if (eregi("globals.inc.php",$_SERVER['PHP_SELF'])) {           
17
	die("<b>Access Denied!</b><br /><i>You can't access this file directly...</i><br /><br />- G-Shout -");
18
}
19
 
20
/**
21
* Support for register_globals Off code
22
**/
23
 
24
$raw = phpversion();
25
list($v_Upper,$v_Major,$v_Minor) = explode(".",$raw);
26
 
27
if (($v_Upper == 4 && $v_Major < 1) || $v_Upper < 4) {
28
	$_FILES = $HTTP_POST_FILES;
29
	$_ENV = $HTTP_ENV_VARS;
30
	$_GET = $HTTP_GET_VARS;
31
	$_POST = $HTTP_POST_VARS;
32
	$_COOKIE = $HTTP_COOKIE_VARS;
33
	$_SERVER = $HTTP_SERVER_VARS;
34
	$_SESSION = $HTTP_SESSION_VARS;
35
	$_FILES = $HTTP_POST_FILES;
36
}
37
 
38
if (!ini_get('register_globals')) {
39
	while(list($key,$value)=each($_FILES)) $GLOBALS[$key]=$value;
40
	while(list($key,$value)=each($_ENV)) $GLOBALS[$key]=$value;
41
	while(list($key,$value)=each($_GET)) $GLOBALS[$key]=$value;
42
	while(list($key,$value)=each($_POST)) $GLOBALS[$key]=$value;
43
	while(list($key,$value)=each($_COOKIE)) $GLOBALS[$key]=$value;
44
	while(list($key,$value)=each($_SERVER)) $GLOBALS[$key]=$value;
45
	while(list($key,$value)=@each($_SESSION)) $GLOBALS[$key]=$value;
46
	foreach($_FILES as $key => $value){
47
		$GLOBALS[$key]=$_FILES[$key]['tmp_name'];
48
		foreach($value as $ext => $value2){
49
			$key2 = $key."_".$ext;
50
			$GLOBALS[$key2]=$value2;
51
		}
52
	}
53
}
54
?>