- if((($_FILES['uploadedfile']['type'] == "application/zip") ||
- ($_FILES['uploadedfile']['type'] == "application/x-zip-compressed") ||
- ($_FILES['uploadedfile']['type'] == "application/x-zip") ||
- ($_FILES['uploadedfile']['type'] == "application/octet-stream")) &&
- (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))) {
+ if(($_FILES['uploadedfile']['type'] == "application/zip") ||
+ ($_FILES['uploadedfile']['type'] == "application/x-zip-compressed") ||
+ ($_FILES['uploadedfile']['type'] == "application/x-zip") ||
+ ($_FILES['uploadedfile']['type'] == "application/octet-stream")) {
+
+ if(!move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
+ $uploadstatus = "<b><font color=red> -E- Unable to move the uploaded file to ";
+ $uploadstatus.= "the target path (check the path and permissions) of: $target_path</font></b>";
+ $this->t->set_var('uploadstatus',$uploadstatus);
+ $this->t->pfp('uploadhandle','upload',True);
+ return 0;
+ }
+