Exemplo n.º 1
0
     $objUser = clsUser::getCookie();
 } else {
     $objUser = $_SESSION['objUser'];
 }
 /* This re-loads the user object in case it's changed. */
 if ($objUser) {
     $objUser = new clsUser($objUser->get('id'));
 }
 if ($objUser && $objUser->isNew()) {
     $objUser = null;
 }
 if (!preg_match('/^[a-zA-Z2-9_-]*$/', $strAction)) {
     throw new Exception(ERRORMSG_INVALID);
 }
 $objTemplate = new clsTemplate('default');
 $objTemplate->setText('SCRIPT', clsDB::initializeJS());
 $objTemplate->setText('TITLE', "OSPAP2");
 /* Inline CSS for advanced. */
 $objTemplate->setText('HEAD', clsUser::getAdvancedStyle($objUser));
 if (isset($_REQUEST['error']) && isset($arrMessages[$_REQUEST['error']])) {
     $objTemplate->setText('ERROR', $arrMessages[$_REQUEST['error']]);
 } else {
     if (isset($_REQUEST['message']) && isset($arrMessages[$_REQUEST['message']])) {
         $objTemplate->setText('MESSAGE', $arrMessages[$_REQUEST['message']]);
     }
 }
 $objTemplate->setScript('MENU', 'menu');
 $objTemplate->setScript('LOGO', 'logo');
 $objTemplate->setText('COPYRIGHT', "Written by <a href='mailto:ronospap@skullsecurity.org'>Ron</a>. This page and code are public domain. Code is available upon request. No warranty or promises of any kind.");
 switch ($strAction) {
     case '':