HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/pear/RVSeagullMod/modules/main/classes/PublicMgr.php
<?php
##copyright##

class PublicMgr extends SGL_Manager
{
    function PublicMgr()
    {
        SGL::logMessage(null, PEAR_LOG_DEBUG);
        parent::SGL_Manager();

        $this->pageTitle   = 'Public';
        
        
        $this->_aActionsMapping =  array(
            'view'   => array('view'),
            'print'   => array('print'),
        );
    }

    function validate($req, &$input)
    {
        SGL::logMessage(null, PEAR_LOG_DEBUG);
        $this->validated    = true;
        $input->masterTemplate = $this->masterTemplate;
        
        $input->action = ($req->get('action')) ? $req->get('action') : 'view';
        $input->page = ($req->get('page')) ? $req->get('page') : '';
        
        if ($input->action == 'print') {
            $input->masterTemplate =  'masterBlank.html';
        }
        
        
        if ($this->_loadTemplate($input) === true) { 
            $input->pageTitle = $this->pageTitle . ' :: ' . $input->page;
            $input->template = $input->fullPage;
        } else {
            SGL::raiseError('Cannot find page file! ' . $input->page);
            $input->template =  'error.html';
            $input->pageTitle = 'Error :: ' . $input->page;
        }   
    }
    
    function display(&$output)
    {
       $output->addJavascriptFile('js/scriptaculous/lib/prototype.js');
       $output->addJavascriptFile('js/scriptaculous/src/effects.js');
       $output->addJavascriptFile('js/lightbox/lightbox.js');
       $output->addCssFile('js/lightbox/css/lightbox.css'); 
       
    }
    
    function _loadTemplate(&$input)
    {
        SGL::logMessage(null, PEAR_LOG_DEBUG);
//        $input->page = trim(strtolower($input->page));
        $input->fullPage = $input->page . '.html';

        $defaultTheme = 'rvtheme';

        if (isset($_SESSION['aPrefs']['theme'])) {
            $defaultTheme = $_SESSION['aPrefs']['theme'];
        }
        
        if (file_exists(SGL_THEME_DIR . '/' . $defaultTheme . '/main/' . $input->fullPage)) {
            return true;
        } elseif (file_exists(SGL_MOD_DIR . '/main/templates/' . $input->fullPage)) {
            return true;
        }
        return false;
    }
    
    function _cmd_view(&$input, &$output)
    {
        SGL::logMessage(null, PEAR_LOG_DEBUG);
        $output->testTime = @strftime("%b %d %Y %H:%M:%S", time());
    }
    
    function _cmd_print(&$input, &$output)
    {
        SGL::logMessage(null, PEAR_LOG_DEBUG);
        
    }
}
?>