40 lines
502 B
PHP
40 lines
502 B
PHP
<?php
|
|
// FILTER ALL REQUEST
|
|
if(!function_exists('strip_slash')) {
|
|
function strip_slash(&$value) {
|
|
if(is_array($value))
|
|
{
|
|
strip($value);
|
|
}
|
|
else {
|
|
$value = $value;
|
|
}
|
|
}
|
|
}
|
|
if(!function_exists('strip')) {
|
|
function strip(&$request)
|
|
{
|
|
if(!is_array($request))
|
|
{
|
|
die("Inputan Bukan Array");
|
|
}
|
|
array_walk($request, "strip_slash");
|
|
return $request;
|
|
}
|
|
}
|
|
|
|
if(!empty($_REQUEST))
|
|
{
|
|
strip($_REQUEST);
|
|
}
|
|
|
|
if(!empty($_POST))
|
|
{
|
|
strip($_POST);
|
|
}
|
|
|
|
if(!empty($_GET))
|
|
{
|
|
strip($_GET);
|
|
}
|
|
?>
|