My script is renaming uploads randomly
<p>The script I have should upload the file, resize and rename with the appropriate size.  It is doing that, but instead of renaming the  with only the last part it renames it with a temp name only.  Here is the script, any help would be greatly appreciated. I have uploaded the script <a href="http://www.filefactory.com/file/cbc8a99/n/class-form.php" rel="nofollow">here</a>:</p>
