exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } $document = $dms->getDocument($_GET["documentid"]); if (!is_object($document)) { $view->exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } /* Create object for checking access to certain operations */ $accessop = new SeedDMS_AccessOperation($document, $user, $settings); $folder = $document->getFolder(); if ($document->getAccessMode($user) < M_READ) { $view->exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } /* Recalculate the status of a document and reload the page if the status * has changed. A status change may occur if the document has expired in * the mean time */ if ($document->verifyLastestContentExpriry()){ header("Location:../out/out.ViewDocument.php?documentid=".$document->getID()); } if($view) { $view->setParam('dms', $dms); $view->setParam('user', $user); $view->setParam('folder', $folder); $view->setParam('document', $document); $view->setParam('accessobject', $accessop); $view->setParam('viewonlinefiletypes', $settings->_viewOnlineFileTypes); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); $view->setParam('cachedir', $settings->_cacheDir); $view->setParam('workflowmode', $settings->_workflowMode); $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('previewWidthDetail', $settings->_previewWidthDetail); $view->setParam('currenttab', isset($_GET['currenttab']) ? $_GET['currenttab'] : ""); $view->setParam('timeout', $settings->_cmdTimeout); $view($_GET); exit; } ?>