<?php
function replace($var){
$new_var=str_replace(";","",$var);
$new_var=str_replace("!","",$new_var);
$new_var=str_replace("#","",$new_var);
$new_var=str_replace("%","",$new_var);
$new_var=str_replace("&","",$new_var);
$new_var=str_replace("(","",$new_var);
$new_var=str_replace(")","",$new_var);
$new_var=str_replace("[","",$new_var);
$new_var=str_replace("]","",$new_var);
$new_var=str_replace("{","",$new_var);
$new_var=str_replace("}","",$new_var);
$new_var=str_replace("DROP","",$new_var);
$new_var=str_replace("INSERT","",$new_var);
$new_var=str_replace("ALTER","",$new_var);
$new_var=str_replace("SHUTDOWN","",$new_var);
$new_var=str_replace("UPDATE","",$new_var);
$new_var=str_replace("update","",$new_var);
$new_var=str_replace("drop","",$new_var);
$new_var=str_replace("insert","",$new_var);
$new_var=str_replace("alter","",$new_var);
$new_var=str_replace("shutdown","",$new_var);
$new_var=str_replace("--","",$new_var);
$new_var=str_replace("\'\'","",$new_var);
return $new_var;
}
function r_text($var){
$new_var=str_replace(";","",$var);
$new_var=str_replace("!","",$new_var);
$new_var=str_replace("#","",$new_var);
$new_var=str_replace("%","",$new_var);
$new_var=str_replace("&","",$new_var);
$new_var=str_replace("(","",$new_var);
$new_var=str_replace(")","",$new_var);
$new_var=str_replace("{","",$new_var);
$new_var=str_replace("}","",$new_var);
$new_var=str_replace("DROP","",$new_var);
$new_var=str_replace("INSERT","",$new_var);
$new_var=str_replace("ALTER","",$new_var);
$new_var=str_replace("SHUTDOWN","",$new_var);
$new_var=str_replace("UPDATE","",$new_var);
$new_var=str_replace("update","",$new_var);
$new_var=str_replace("drop","",$new_var);
$new_var=str_replace("insert","",$new_var);
$new_var=str_replace("alter","",$new_var);
$new_var=str_replace("shutdown","",$new_var);
$new_var=str_replace("--","",$new_var);
$new_var=str_replace("\'\'","",$new_var);
return $new_var;
}
function textarea($var){
$new_var=str_replace("DROP","",$new_var);
$new_var=str_replace("INSERT","",$new_var);
$new_var=str_replace("ALTER","",$new_var);
$new_var=str_replace("SHUTDOWN","",$new_var);
$new_var=str_replace("UPDATE","",$new_var);
$new_var=str_replace("update","",$new_var);
$new_var=str_replace("drop","",$new_var);
$new_var=str_replace("alter","",$new_var);
$new_var=str_replace("shutdown","",$new_var);

return $new_var;
}
function unentities($data){
if(trim($data) != ""){
return str_replace(array('&lt', '&gt', '&#039', '&quot', '&amp', '&#92', '%3D', '%26'), array('<', '>', "'", '"', '&', '\\', '=', '&'), $data);
} else return $data;
} // End unentities() --------------
function addentities($data){
if(trim($data) != ""){
$data = htmlentities($data, ENT_QUOTES);
return str_replace('\\', '& #92;', $data);
} else return $data;
}
?>