| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/Topogeo/ojs/plugins/generic/staticPages/ |
Upload File : |
<?php
/**
* @file StaticPagesHandler.inc.php
*
* Copyright (c) 2003-2012 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(array(LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_USER));
$journal =& Request::getJournal();
$journalId = $journal->getId();
$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');
}
}
}
?>