/** * @return void */ protected function initAuth() { $this->iAuthType = AP_SESS_AUTH_TYPE_NONE; if ((isset($_GET['login']) || isset($_POST['login'])) && (CPost::Has('AdmloginInput') || CGet::Has('AdmloginInput')) && CPost::Has('AdmpasswordInput')) { $sAdmloginInput = CPost::Get('AdmloginInput'); if (CGet::Has('AdmloginInput')) { $sAdmloginInput = CGet::Get('AdmloginInput'); } $sLoginSuffix = CPost::Get('LoginSuffix', ''); if (CGet::Has('LoginSuffix')) { $sLoginSuffix = CGet::Get('LoginSuffix', ''); } if ($this->CallModuleFunction('CCommonModule', 'AuthLogin', array($sAdmloginInput . $sLoginSuffix, CPost::Get('AdmpasswordInput')))) { CApi::Location(AP_INDEX_FILE . '?enter'); } else { CSession::Destroy(); CApi::Location(AP_INDEX_FILE . '?auth_error'); } exit; } else { if ($this->bSessionIsStarted) { $this->CallModuleFunction('CCommonModule', 'AuthCheckSet'); if ($this->IsTenantAuthType()) { $aTabs =& $this->GetTabs(); $aNewTabs = array(); foreach ($aTabs as $aTabValue) { if (in_array($aTabValue[0], array(CApi::I18N('ADMIN_PANEL/TABNAME_COMMON'), CApi::I18N('ADMIN_PANEL/TABNAME_DOMAINS'), CApi::I18N('ADMIN_PANEL/TABNAME_USERS')))) { $aNewTabs[] = $aTabValue; } } $aTabs = $aNewTabs; } } else { CSession::Destroy(); CApi::Location(AP_INDEX_FILE . '?sess_error'); exit; } } }
{ $_GET[$sKey] = $mValue; } /** * @param mixed $mValue * @return mixed */ private static function _stripSlashesValue($mValue) { if (!self::$bIsMagicQuotesOn) { return $mValue; } $sType = gettype($mValue); if ($sType === 'string') { return stripslashes($mValue); } else { if ($sType === 'array') { $aReturnValue = array(); $mValueKeys = array_keys($mValue); foreach ($mValueKeys as $sKey) { $aReturnValue[$sKey] = self::_stripSlashesValue($mValue[$sKey]); } return $aReturnValue; } else { return $mValue; } } } } CGet::$bIsMagicQuotesOn = (bool) ini_get('magic_quotes_gpc');
require_once("lib/view/CView.php"); require_once("lib/view/CViewFunctions.php"); try { /* Laden der Objekte */ $cSysConfig = new CSysConfig (); $cGlob = new CGlob (); $cPageUrl = new CPageUrl ($cSysConfig); $cSession = new CSession ($cSysConfig); $cDatabase = new CDatabase ($cSysConfig); $cModel = new CModel ($cSysConfig); $cUser = new CUser ($cSysConfig); $cAccess = new CAccess ($cSysConfig); $cPage = new CPage ($cSysConfig); $cGet = new CGet ($cSysConfig); $cForm = new CForm ($cSysConfig); $cEvent = new CEvent ($cSysConfig); $cAuth = new CAuthentification ($cSysConfig); $cLink = new CLink ($cSysConfig); $cPlugSys = new CPlugInSystem ($cSysConfig); $cView = new CView ($cSysConfig); /* Zauber Objekt, kann strings in werte verwandeln */ $cParam = new CParam ($cSysConfig, $cUser, $cSession, $cGlob, $cModel, $cForm, $cEvent, $cAccess, $cAuth, $cPage); /* Für die Plugins, entählt erlaubte funktionen, Funktons Wrapper */ $cPlugFunct = new CPlugInFunctions ($cModel, $cParam, $cGlob, $cSession);