function RunMagicQuotes(&$str) { global $needFilter,$cfg_notallowstr,$cfg_replacestr; if(!get_magic_quotes_gpc()) { if( is_array($str) ) { foreach($str as $key => $val) $str[$key] = RunMagicQuotes($val); }else{ if($needFilter) FilterNotSafeString($str); $str = addslashes($str); } } else { if($needFilter) { $str = stripslashes($str); FilterNotSafeString($str); $str = addslashes($str); } } return $str; }
} } } if (is_array($_POST)) { foreach ($_POST as $key => $value) { if (!isset(${$key})) { if (is_array($value)) { foreach ($value as $nnk => $nnv) { if ($cfg_needFilter) { FilterNotSafeString($nnv); } ${$key}[$nnk] = addslashes($nnv); } } else { if ($cfg_needFilter) { FilterNotSafeString($value); } ${$key} = addslashes($value); } } } } if (is_array($_COOKIE)) { foreach ($_COOKIE as $key => $value) { if (!isset(${$key})) { ${$key} = addslashes($value); } } } if (is_array($_FILES)) { foreach ($_FILES as $name => $value) {