static function getParamsAsArray($what = "") { switch ($what) { case "get": return strip_slashes_extended($_GET); break; case "post": return strip_slashes_extended($_POST); break; case "cookie": return $_COOKIE; break; default: return strip_slashes_extended($_REQUEST); break; } }
function getServerParam($param, $htmlencode = false, $xss_check = true, $quotes_encode = true) { if ($param == "") { return ''; } if (!isset($_SERVER[$param])) { return ''; } $value = _purify($_SERVER[$param], $xss_check); if ($htmlencode) { if ($quotes_encode) { return htmlspecialchars(stripslashes($value), ENT_QUOTES); } else { return htmlspecialchars(stripslashes($value), ENT_NOQUOTES); } } if (get_magic_quotes_gpc()) { $value = strip_slashes_extended($value); } return $value; }
static function getParamsAsArray($what = "", $xss_check = true) { switch ($what) { case "get": $value = $_GET; break; case "post": $value = $_POST; break; case "cookie": return $_COOKIE; break; default: $value = $_REQUEST; break; } $value = self::_purify($value, $xss_check); if (get_magic_quotes_gpc()) { return strip_slashes_extended($value); } return $value; }
function strip_slashes_extended($array) { if (is_array($array)) { foreach ($array as $k => &$v) { $v = strip_slashes_extended($v); } } else { $array = stripslashes($array); } return $array; }
static function getParamsAsArray($what = "", $xss_check = true) { switch ($what) { case "get": $value = $_GET; break; case "post": $value = $_POST; break; case "cookie": return $_COOKIE; break; case "files": return $_FILES; break; case "request": // This should not be called, as it depends on server's configuration return $_REQUEST; break; default: $value = self::$_request; break; } $value = self::_purify($value, $xss_check); if (get_magic_quotes_gpc()) { return strip_slashes_extended($value); } return $value; }