diff --git a/img/helper.clean.php b/img/helper.clean.php new file mode 100644 index 0000000..e803029 --- /dev/null +++ b/img/helper.clean.php @@ -0,0 +1,37 @@ +"); + include('dbsettings.php'); + $output = strip_tags($input); + $output = stripslashes($output); + $output = $db->real_escape_string($output); + $output = strtolower($output); + return $output; + } + + function comment($input){ + if ($input == null) die("Sanatize() - No Input Provided, Aborting\r\n
"); + include('dbsettings.php'); + $output = strip_tags($input); + $output = stripslashes($output); + $output = $db->real_escape_string($output); + return $output; + } + + function cln_file_name($string) { + $cln_filename_find=array("/\.[^\.]+$/", "/[^\d\w\s-]/", "/\s\s+/", "/[-]+/", "/[_]+/"); + $cln_filename_repl=array("", "", " ", "-", "_"); + $string=preg_replace($cln_filename_find, $cln_filename_repl, $string); + return trim($string); + } + +?> \ No newline at end of file