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")); } $folder = $document->getFolder(); if ($document->getAccessMode($user) < M_READ) { $view->exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } if ($document->verifyLastestContentExpriry()){ header("Location:../out/out.ViewDocument.php?documentid=".$document->getID()); } /* Create object for checking access to certain operations */ $accessop = new LetoDMS_AccessOperation($document, $user, $settings); 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('cachedir', $settings->_cacheDir); $view->show(); exit; } ?>