getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } $documentid = $_GET["documentid"]; $document = $dms->getDocument($documentid); if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } $folder = $document->getFolder(); $docPathHTML = $folder->getFolderPathHTML(true). " / ".$document->getName().""; if ($document->getAccessMode($user) < M_ALL) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"])<1) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } $version = $_GET["version"]; $content = $document->getContentByVersion($version); if (!is_object($content)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } $overallStatus = $content->getStatus(); // status change control if ($overallStatus["status"] == S_REJECTED || $overallStatus["status"] == S_EXPIRED || $overallStatus["status"] == S_DRAFT_REV || $overallStatus["status"] == S_DRAFT_APP ) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_change_final_states")); } $reviewStatus = $content->getReviewStatus(); $approvalStatus = $content->getApprovalStatus(); UI::htmlStartPage(getMLText("document_title", array("documentname" => $document->getName()))); UI::globalNavigation($folder); UI::pageNavigation($docPathHTML, "view_document"); UI::contentHeading(getMLText("change_status")); ?>