getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } $documentid = $_POST["documentid"]; $document = getDocument($documentid); if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } if (!isset($_POST["fileid"]) || !is_numeric($_POST["fileid"]) || intval($_POST["fileid"])<1) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_file_id")); } $fileid = $_POST["fileid"]; $file = getDocumentFile($fileid); if (!is_object($file)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_file_id")); } if (($document->getAccessMode($user) < M_ALL)&&($user->getID()!=$file->getUserID())) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } if (!$document->removeDocumentFile($fileid)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } add_log_line("?documentid=".$documentid."&fileid=".$fileid); header("Location:../out/out.ViewDocument.php?documentid=".$documentid); ?>