SessionTimeout = $this->Application->ConfigValue('SessionTimeout'); $path = (BASE_PATH == '') ? '/' : BASE_PATH; $this->SetCookiePath($path); $cookie_name = $this->Application->ConfigValue('SessionCookieName'); if ( !$cookie_name ) { $cookie_name = 'sid'; } $admin_session = ($this->Application->isAdmin && $special !== 'front') || ($special == 'admin'); if ( $admin_session ) { $cookie_name = 'adm_' . $cookie_name; } $this->SetCookieName($cookie_name); $this->SetCookieDomain(SERVER_NAME); if ( $admin_session ) { $mode = self::smAUTO; } elseif ( defined('IS_INSTALL') && IS_INSTALL ) { $mode = self::smCOOKIES_ONLY; } else { $ses_mode = $this->Application->ConfigValue('CookieSessions'); if ( $ses_mode == 2 ) { $mode = self::smAUTO; } elseif ( $ses_mode == 1 ) { $mode = self::smCOOKIES_ONLY; } elseif ( $ses_mode == 0 ) { $mode = self::smGET_ONLY; } else { $mode = self::smAUTO; } } $this->SetMode($mode); parent::Init($prefix, $special); } function Destroy() { $this->Storage->DeleteSession(); $this->Storage->DeleteEditTables(); $this->Data = new Params(); $this->SID = $this->CachedSID = ''; $this->SessionSet = false; if ($this->CookiesEnabled) { $this->SetSessionCookie(); //will remove the cookie due to value (sid) is empty } $this->SetSession(); //will create a new session } }