function initUploadHandler() { if (is_null($this->upload_handler)) { require_once getabspath("classes/uploadhandler.php"); $this->upload_handler = new UploadHandler(getOptionsForMultiUpload($this->container->pSet, $this->field)); if (!is_null($this->pageObject)) { $this->upload_handler->pSet = $this->pageObject->pSetEdit; } else { $this->upload_handler->pSet = $this->container->pSet; } $this->upload_handler->field = $this->field; $this->upload_handler->table = $this->container->pSet->_table; $this->upload_handler->pageType = $this->container->pageType; } }
if (!$isPDF) { add_nocache_headers(); } include_once "include/" . GetTableURL($strTableName) . "_variables.php"; // check if logged in if ($requestAction == 'POST') { $havePermission = CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Add") || CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Edit"); } else { $havePermission = CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Search"); } if (!isLogged() && $pageType != PAGE_REGISTER || !$havePermission) { header("Location: login.php"); return; } require_once getabspath('classes/uploadhandler.php'); $upload_handler = new UploadHandler(getOptionsForMultiUpload($pSet, $field)); $upload_handler->pSet = $pSet; $upload_handler->field = $field; $upload_handler->table = $strTableName; $upload_handler->pageType = $pageType; switch ($requestAction) { case 'DELETE': printHeaders(); $formStamp = postvalue("formStamp"); if ($formStamp != "") { $upload_handler->formStamp = $formStamp; $upload_handler->delete(); } break; case 'POST': printHeaders();