include("header.inc");
$sizelimit = "yes"; //Do you want a size limit, yes or no?
$sizebytes = "200000"; //size limit in bytes
$dl = "http://www.asiawind.com/culturenet/img"; //url where files are uploaded
$absolute_path = "/WWW/Web/culturenet/img"; //Absolute path to where files are uploaded
$websiteurl = "http://www.asiawind.com/culturenet"; //Url to you website
$websitename = "Chinese CultureNet at Asiawind.com";
switch($action) {
default:
echo"
Upload
Click here:
Powered by PHP Uploader Downloader
";
break;
/* case "download":
echo "
File Download
Upload File Return to $websitename";
$list = "";
$list .= "| Click To Download |
";
$dir = opendir($absolute_path);
while($file = readdir($dir)) {
if (($file != "..") and ($file != ".")) {
$list .= "| $file |
";
}
}
$list .= "
";
echo $list;
echo"
Powered by PHP Uploader Downloader
";
break;
*/
case "upload":
echo"
File Upload
Powered by PHP Uploader Downloader
";
break;
//File Upload
case "doupload":
$dir = "dir";
if ($file != "") {
if (file_exists("$absolute_path/$file_name")) {
die("File already exists");
}
if (($sizelimit == "yes") && ($file_size > $sizebytes)) {
die("File is to big. It must be $sizebytes bytes or less.");
}
@copy($file, "$absolute_path/$file_name") or die("The file you are trying to upload couldn't be copied to the server");
} else {
die("Must select file to upload");
}
echo "
File Uploaded
";
echo $file_name." was uploaded";
echo "
Upload Another File
Return to $websitename
Powered by PHP Uploader Downloader
";
break;
}
include ("footer.inc");
?>