Diff for phpPlatonLib/Platon/Platon.php between version 1.20 and 1.21
| version 1.20, 2003/07/19 11:52:04 |
version 1.21, 2004/01/02 11:31:39 |
|
|
| * @access public |
* @access public |
| */ |
*/ |
| |
|
| /* $Platon: $ */ |
/* $Platon: phpPlatonLib/Platon/Platon.php,v 1.20 2003/07/19 11:52:04 nepto Exp $ */ |
| |
|
| class Platon |
class Platon |
| { |
{ |
|
|
| */ |
*/ |
| function get_cgi_var($name, $default_value = null) /* {{{ */ |
function get_cgi_var($name, $default_value = null) /* {{{ */ |
| { |
{ |
| |
static $magic_quotes_gpc = null; |
| |
if ($magic_quotes_gpc === null) { |
| |
$magic_quotes_gpc = get_magic_quotes_gpc(); |
| |
} |
| global $HTTP_GET_VARS; |
global $HTTP_GET_VARS; |
| $var = @$HTTP_GET_VARS[$name]; |
$var = @$HTTP_GET_VARS[$name]; |
| if (! isset($var)) { |
if (! isset($var)) { |
|
|
| $var = @$HTTP_POST_VARS[$name]; |
$var = @$HTTP_POST_VARS[$name]; |
| } |
} |
| if (isset($var)) { |
if (isset($var)) { |
| if (is_array($var)) { |
if ($magic_quotes_gpc) { |
| foreach (array_keys($var) as $key) { |
if (is_array($var)) { |
| $var[$key] = stripslashes($var[$key]); |
foreach (array_keys($var) as $key) { |
| |
$var[$key] = stripslashes($var[$key]); |
| |
} |
| |
} else { |
| |
$var = stripslashes($var); |
| } |
} |
| } else { |
|
| $var = stripslashes($var); |
|
| } |
} |
| } else { |
} else { |
| $var = @$default_value; |
$var = @$default_value; |
Platon Group <platon@platon.org> http://platon.org/
|
|