/** * outputs the right page, handling templates * * @return bool * * @author Dimitri Lameri <*****@*****.**> */ public static function showPage($StPage = '') { $StPage = preg_replace('/[^A-Z0-9]*/i', '', $StPage); if (!empty($StPage) && file_exists(ABSTEMPLATEDIR . $StPage . '.php')) { self::$CurrentPage = $StPage; require_once ABSTEMPLATEDIR . $StPage . '.php'; } else { if ($StPage = getSessionProp('lastPage')) { self::$CurrentPage = $StPage; require_once ABSTEMPLATEDIR . $StPage . '.php'; unsetSessionProp('lastPage'); } else { self::$CurrentPage = 'home'; require_once ABSTEMPLATEDIR . 'home.php'; } } return true; }
/** * get the saved notice and shows it * * @return string * * @author Dimitri Lameri <*****@*****.**> */ public static function getNotice($StID) { $Html = getSessionProp('notice' . $StID); if ($Html) { unsetSessionProp('notice' . $StID); return $Html; } }