protected function EventIndex()
 {
     $sLanguage = Router::GetActionEvent();
     if ($sLanguage) {
         $this->Session_Set('language', $sLanguage);
         if (Config::Get('plugin.aceadminpanel.lang_save_period')) {
             @setcookie('LANG_CURRENT', $sLanguage, time() + 60 * 60 * 24 * intVal(Config::Get('plugin.aceadminpanel.lang_save_period')), Config::Get('sys.cookie.path'), Config::Get('sys.cookie.host'));
         }
         if (isset($_SERVER['HTTP_REFERER'])) {
             func_header_location($_SERVER['HTTP_REFERER']);
         }
     }
     func_header_location(Config::Get('path.root.web'));
 }
Ejemplo n.º 2
0
 /**
  * Выполняет редирект, предварительно завершая работу Engine
  *
  * @param string $sLocation
  */
 public static function Location($sLocation)
 {
     self::getInstance()->oEngine->Shutdown();
     func_header_location($sLocation);
 }
 /**
  * Delete banner
  *
  * @return void
  */
 protected function EventBannerDelete()
 {
     $sBannerId = $this->GetParam(0);
     $this->PluginBanneroid_Banner_HideBanner($sBannerId);
     func_header_location(Config::Get("path.root.web") . '/banneroid/');
 }
Ejemplo n.º 4
0
 protected function EventUsersActivate()
 {
     $this->Security_ValidateSendForm();
     $sUserLogin = $this->GetParam(1);
     $oUser = $this->User_GetUserByLogin($sUserLogin);
     $oUser->setActivate(1);
     $oUser->setDateActivate(date('Y-m-d H:i:s'));
     $this->User_Update($oUser);
     if (isset($_SERVER['HTTP_REFERER'])) {
         func_header_location($_SERVER['HTTP_REFERER']);
     }
 }
Ejemplo n.º 5
0
    db_query("DELETE FROM {$sql_tbl['temporary_data']} WHERE expire < " . time());
}
#
# Remember visitor for a long time period
#
$remember_user = true;
#
# Time period for which user info should be stored (days)
#
$remember_user_days = 30;
#
# Redirect from alias host to main host
#
if (!defined("XCART_EXT_ENV") && $REQUEST_METHOD == 'GET' && isset($_SERVER['HTTP_HOST'])) {
    $tmp = explode(":", $_SERVER['HTTP_HOST'], 2);
    $server_http_host = $tmp[0];
    if ($server_http_host != $xcart_http_host && $server_http_host != $xcart_https_host && (!$HTTPS || !$HTTPS_RELAY)) {
        func_header_location(($HTTPS ? "https://" . $xcart_https_host : "http://" . $xcart_http_host) . $REQUEST_URI, true, 301);
    }
}
#
# Initialize character set of database. Used in func_translit function
#
$tmp = func_query_first("SHOW VARIABLES LIKE 'character_set" . (defined('X_MYSQL40_COMP_MODE') ? "_client'" : "'"));
$config['db_charset'] = $tmp['Value'];
unset($tmp);
#
# WARNING !
# Please ensure that you have no whitespaces / empty lines below this message.
# Adding a whitespace or an empty line below this line will cause a PHP error.
#