<script type='text/javascript'>
function check_file_type(file){
sfile = file;
sfile = file.substr(-4);
alert("Hi");
if (sfile != ".swf" && sfile != ".fla"){
alert("That file is not the right type.");
}
</script>
<?php
if ($_POST['upload']){
}
if (!$_POST['upload']){
echo("
<h1>NG Uploader</h1><br><brr
<strong>Allowed File Types (*.swf, *.fla, *.mp3, *.wav, *.bmp, *.gif, *.png, *.jpg, *.jpeg, *.txt, *.zip, and *.rar) | Limit 7 MB</strong><br><br>
<form name='upload' method='post'>
<strong>File Name</strong> (Not required, but use this if you wish for people to search for this file.)<br>
<input type='text' name='name' class='input'><br>
<strong>Your Name</strong> (Not required, but use this if you wish for people to search files after your name.)<br>
<input type='text' name='by' class='input'><br>
<strong>File</strong><br>
<input type='file' name='file' id='file' class='browsek' onclick='javascript:check_file_type(this.value);'><br><br>
<input type='submit' name='upload' value='Upload!' class='btn'> <input type='reset' value='Reset' class='btn'>
");
}