SQL = " . $query);
$status="Folder created";
}
// delete folder?
if (isset($HTTP_POST_VARS["folderDelete"])) {
$user=$_COOKIE["UKSMMSUser"]; // get username from the cookie
$title=$_POST["efolder"];
$query="delete from folders where foldername='$title' and username='$user'";
$sth=mysql_query($query) or die("Delete failed: " . mysql_error() . "
SQL = " . $query);
$query="update images set folder='' where folder='$title' and username='$user'";
$sth=mysql_query($query) or die("Update failed: " . mysql_error() . "
SQL = " . $query);
$status="Folder deleted";
}
// move resource into new folder?
if (isset($HTTP_POST_VARS["imageMove"])) {
$user=$_COOKIE["UKSMMSUser"]; // get username from the cookie
$title=$_POST["cfolder"]; // get selected folder
$rid=$_POST["rid"];
$query="update images set folder='$title' where id=$rid and username='$user'";
$sth=mysql_query($query) or die("Update failed: " . mysql_error() . "
SQL = " . $query);
$status="File moved";
}
// upload Images?
if (isset($HTTP_POST_VARS["imageUpload"]))
{ //open1
$user=$_COOKIE["UKSMMSUser"]; // get username from the cookie
if (($_FILES['imagefile']['type'] == "image/gif") or ($_FILES['imagefile']['type'] == "image/jpg") or ($_FILES['imagefile']['type'] == "image/jpeg")) { //open2
copy ($_FILES['imagefile']['tmp_name'], "resources/$user/".$_FILES['imagefile']['name']) or die ("Could not copy");
$status = '
';
$status .= "Name: ".$_FILES['imagefile']['name']."
";
$status .= "Size: ".$_FILES['imagefile']['size']."
";
$status .= "Type: ".$_FILES['imagefile']['type']."
";
$status .= 'Upload completed....
$status
\n"; } else { // there was a problem print "In this area of the site you can upload images, SMS and MMS messages to the site and organise them into folders for easy management. Any messages sent to you automatically via our MMS server will also appear here.