xssFilterHard($_GET["q"]); $Action = $_GET["q"]; } else { $Action = "none"; } //$Action = isset($_GET["q"]) ? $_GET["q"] : "none"; if($Action =="none"){ displayUploadForm(); }else if($Action=="upload"){ uploadContentFile(); } ?> xssFilterHard($_SERVER["QUERY_STRING"],'url'); } $html = "

File:   (*.html, *.htm)
Uploading... \"\"
"; echo $html; } // uploads the file to the destination path, and returns a link with link path substituted for destination path function uploadContentFile() { $filter = new InputFilter(); $_FILES["upload_file"] = $filter->xssFilterHard($_FILES["upload_file"]); $StatusMessage = ""; $ActualFileName = ""; $DestPath = sys_get_temp_dir(); $aux=''; $chain = preg_replace("/\r\n+|\r+|\n+|\t+/i", " ", file_get_contents($_FILES["upload_file"]["tmp_name"])); $chain=preg_replace('#(.*?)#is', ' ', $chain); $chain=strip_tags($chain, '