00001 <?php
00002
00003
00004
00005
00015 function PMA_gpc_extract($array, &$target) {
00016 if (!is_array($array)) {
00017 return FALSE;
00018 }
00019 $is_magic_quotes = get_magic_quotes_gpc();
00020 foreach($array AS $key => $value) {
00021 if (is_array($value)) {
00022
00023
00024 unset($target[$key]);
00025
00026 PMA_gpc_extract($value, $target[$key]);
00027 } else if ($is_magic_quotes) {
00028 $target[$key] = stripslashes($value);
00029 } else {
00030 $target[$key] = $value;
00031 }
00032 }
00033 return TRUE;
00034 }
00035
00036 if (!empty($_GET)) {
00037 PMA_gpc_extract($_GET, $GLOBALS);
00038 }
00039
00040 if (!empty($_POST)) {
00041 PMA_gpc_extract($_POST, $GLOBALS);
00042 }
00043
00044 if (!empty($_FILES)) {
00045 foreach($_FILES AS $name => $value) {
00046 $$name = $value['tmp_name'];
00047 ${$name . '_name'} = $value['name'];
00048 }
00049 }
00050
00051 if (!empty($_SERVER)) {
00052 $server_vars = array('PHP_SELF', 'HTTP_ACCEPT_LANGUAGE', 'HTTP_AUTHORIZATION');
00053 foreach ($server_vars as $current) {
00054 if (isset($_SERVER[$current])) {
00055 $$current = $_SERVER[$current];
00056 } elseif (!isset($$current)) {
00057 $$current = '';
00058 }
00059 }
00060 unset($server_vars, $current);
00061 }
00062
00063
00064 if (isset($goto) && strpos(' ' . $goto, '/') > 0 && substr($goto, 0, 2) != './') {
00065 unset($goto);
00066 }
00067
00068 ?>