The full code for the upload script i found is below
<?php
/*
File Thingie version 1.41 - Andreas Haugstrup Pedersen <andreas@solitude.dk> October 1st, 2003
The newest version of File Thingie can be found at <http://www.solitude.dk/filethingie/>
Comments, suggestions etc. are welcome and encouraged at the above e-mail.
LICENSE INFORMATION:
This work is licensed under the Creative Commons Attribution-NoDerivs-NonCommercial.
To view a copy of this license, visit <http://creativecommons.org/licenses/by-nd-nc/1.0/>
If you want to use File Thingie for a commercial work please contact me at <andreas@solitude.dk>
KNOWN ISSUES IN THIS VERSION:
- You cannot rename file which has a single prime (') in the name.
Changelog for version 1.41:
- Option for allowing all file types for upload added.
- Fixed two typos that made some error messages not display.
- Fixed rare bug where users could delete files they weren't supposed to.
*/
error_reporting (E_ALL ^ E_NOTICE);
session_start();
/* Setup information. Change as appropriate */
$username = "!##@@!#!"; /* The username. Case sensitive. */
$password = "@#!$#!!"; /* The password. Case sensitive */
$dir = "%##%@$!$"; /* The subdir name. This file has to be located
one step above this. Don't start with a slash */
$maxsize = 1000000000; /* Maximum upload size in bytes */
$showphp = FALSE; /* Decides whether it should be allowed to show
source on PHP files. Can have the values TRUE
or FALSE. Set to FALSE by default for security
reasons. */
$edithtml = TRUE; /* Decides if HTML/CSS files can be edited. TRUE
on deafult. */
$edittxt = TRUE; /* Decides if text files can be edited. TRUE on deafult. */
$editphp = TRUE; /* Decides if PHP files can be edited. FALSE on deafult. */
$converttabs = TRUE; /* Decides if tabs should be converted into spaces
when a file is opened for edit. TRUE on deafult. */
$phpendings = array("php", "php3", "php4", "phtml"); /* List of PHP file endings. Used for security when
editing and showing source. */
$htmlendings = array("htm", "html", "css"); /* List of HTML file endings. Used for security when
editing, showing source and making W3C links. */
$useimage = "none"; /* Path to the image you wish shown in File Thingie.
Default value is "none" for no image. */
$dateformat = "Y/m/d G:i:s"; /* The date format used for displaying last file change.
See <http://www.php.net/date> for other options. */
$showdatecolumn = TRUE; /* FALSE disables the date column for last file change.
TRUE enables it. Value is TRUE by default. */
$showW3link = TRUE; /* TRUE enables direct links to validate HTML/CSS at
the W3C validator. FALSE disables it. Value is
TRUE by default. */
$disableMimeCheck = FALSE; /* TRUE disables check on MIME types. Only file endings are
checked. Set to FALSE by default for security reasons. */
$defaultSort = "name"; /* This is the default way files are sorted when you first
log in. It can have three values: "name" sorts on file
name; "size" sorts on file size; "date" sorts on the
last modification time. */
$defaultLang = "en"; /* The language code for the default language. */
$allowAllFiles = FALSE; /* If set to TRUE there are no restrictions as to what
kind of files are allowed for uploading. This is not
encouraged and the default is FALSE for security
reasons. */
/* List of allowed file endings and their MIME-types. Both file ending and MIME-type has to match before the file is allowed for upload. */
$allowedfile["jpg"] = "image/jpeg"; /* JPEG image file (.jpg) */
$allowedfile["jpeg"] = "image/jpeg"; /* JPEG image file (.jpeg) */
$allowedfile["jpe"] = "image/jpeg"; /* JPEG image file (.jpe) */
$allowedfile["gif"] = "image/gif"; /* GIF image file */
$allowedfile["png"] = "image/png"; /* PNG image file */
$allowedfile["tif"] = "image/tif"; /* TIFF image file (.tif) */
$allowedfile["tiff"] = "image/tiff"; /* TIFF image file (.tiff) */
$allowedfile["html"] = "text/html"; /* HTML file (.html) */
$allowedfile["htm"] = "text/html"; /* HTML file (.htm) */
$allowedfile["css"] = "text/css"; /* CSS file (.css) */
//$allowedfile["xml"] = "text/xml"; /* XML file (.xml) */
$allowedfile["txt"] = "text/plain"; /* Regular text file */
$allowedfile["doc"] = "application/msword"; /* MS Word document */
$allowedfile["rtf"] = "application/rtf"; /* RTF document */
$allowedfile["pdf"] = "application/pdf"; /* PDF document */
$allowedfile["pot"] = "application/mspowerpoint"; /* MS PowerPoint document (.pot) */
$allowedfile["pps"] = "application/mspowerpoint"; /* MS PowerPoint document (.pps) */
$allowedfile["ppt"] = "application/mspowerpoint"; /* MS PowerPoint document (.ppt) */
$allowedfile["ppz"] = "application/mspowerpoint"; /* MS PowerPoint document (.ppz) */
$allowedfile["xls"] = "application/x-excel"; /* MS Excel document */
$allowedfile["zip"] = "application/zip"; /* Zip File*/
$allowedfile["php"] = "application/octet-stream"; /* PHP file. Turned off per default for security reasons */
//$allowedfile["php3"] = "application/octet-stream"; /* PHP3 file. Turned off per default for security reasons */
$allowedAlternate["jpg"] = "image/pjpeg"; /* JPEG image file alternate (.jpg) */
$allowedAlternate["jpeg"] = "image/pjpeg"; /* JPEG image file alternate (.jpeg) */
$allowedAlternate["jpe"] = "image/pjpeg"; /* JPEG image file alternate (.jpe) */
$allowedAlternate["png"] = "image/x-png"; /* PNG image file alternate. */
$allowedfiles["mtw"] = "application/octet-stream";
/*All Video Extensions*/
$allowedfile["wmv"] = "video/x-ms-wmv"; //.wmv
$allowedfile["avi"] = "video/x-msvideo"; //.avi
$allowedfile["mpeg"] = "video/mpeg"; //.mpeg
$allowedfile["mpg"] = "video/mpg"; //.mpg
$allowedfile["mov"] = "video/mov"; //.mov
/* End setup information */
.
.
.
?>
Too long to post all of it here, but that shows the file types part of it