/** * constructor */ public function __construct() { parent::__construct(); $this->portal = new MyPortal($GLOBALS['identifier']); $new_themes = PSUTheme::new_themes($this->portal->person->wp_id); $this->tpl->assign('new_themes', $new_themes); $this->tpl->body_style_classes[] = 'myplymouth'; if ($this->portal->is_fluid()) { $this->tpl->body_style_classes[] = 'fluid'; } //end if MyController::_detect_disabled_chat($this->portal, $this->tpl); }
<?php require dirname(dirname(dirname(__DIR__))) . '/legacy/git-bootstrap.php'; require_once 'autoload.php'; PSU::session_start(); header("Cache-Control: no-cache, must-revalidate"); require_once __DIR__ . '/includes/holidays.php'; require_once __DIR__ . '/includes/crews.php'; /************[ BEGIN: Main Vars ]***********/ $theme = new PSUTheme(PSU::db('myplymouth'), dirname(__FILE__)); $theme->loadUserTheme($_SESSION['wp_id']); $day = date('j'); $month = date('n'); $month_name = strtolower(date('F')); $year = date('Y'); /************[ END: Main Vars ]***********/ /**************************************** * GENERAL SETTINGS ****************************************/ @(include_once 'general.php'); /**************************************** * MONTH SETTINGS ****************************************/ @(include_once 'months/' . $month_name . '.php'); /**************************************** * EXTREME SETTINGS ****************************************/ @(include_once 'extreme.php'); /**************************************** * set header and output ****************************************/
/** * Returns true if the user has specified that they want a fluid layout */ public function is_fluid() { static $fluid; if (is_bool($fluid)) { return $fluid; } //end if $theme_data = PSUTheme::getUserTheme($this->wp_id, '*', 'GetRow'); if ($theme_data['allow_fluid'] === '0') { $fluid = false; } else { $fluid = (bool) PSU::db('go')->GetOne("SELECT 1 FROM user_meta WHERE wp_id = ? AND name = 'fluid' AND value = '1'", array($this->wp_id)); } //end else return $fluid; }
$GLOBALS['WEBAPP_URL'] = 'https://' . $_SERVER['HTTP_HOST'] . '/webapp'; // Local Includes $GLOBALS['LOCAL_INCLUDES'] = $GLOBALS['BASE_DIR'] . '/includes'; // Templates $GLOBALS['TEMPLATES'] = $GLOBALS['BASE_DIR'] . '/templates'; /*******************[End Site Constants]*****************/ /*******************[Common Includes]**********************/ require_once PSU_BASE_DIR . '/webapp/my/includes/MyPortal.class.php'; /*******************[End Common Includes]**********************/ /*******************[Authentication Stuff]*****************/ IDMObject::authN(); /*******************[End Authentication Stuff]*****************/ /*******************[Database Connections]*****************/ $GLOBALS['MY'] = PSU::db('myplymouth'); /*******************[End Database Connections]*****************/ $theme = new PSUTheme($GLOBALS['MY']); function isAdmin() { return IDMObject::authZ('permission', 'theme_admin'); } //end isAdmin $theme_level = array('basic', 'holiday', 'event'); if (isAdmin()) { $theme_level[] = 'admin'; } //end if if ($_SESSION['username'] == 'nrporter') { $theme_level[] = 'extreme'; $theme_level[] = 'dev'; } //end if