//save browser info to user config array // ***************************** if (empty($ip)) { $USERCONFIG['ip'] = $REMOTE_ADDR; } $USERCONFIG['mask'] = $mask; $USERCONFIG['lang'] = $lang; if (($bname == 'msie' || $bname == 'opera') && $bversion > 4 || $bname == 'netscape' && $bversion > 3.5 || $bname == 'mozilla') { $USERCONFIG['dhtml'] = 1; } // ***************************** // Save config to db // ***************************** $mask = $USERCONFIG['mask']; # save mask before serializing $cfg_obj->saveConfig($user_id, $USERCONFIG); setcookie('ck_config', $user_id, time() + 3600 * 24 * 365); # expires after 1 year } # # save user_id to session # $HTTP_SESSION_VARS['sess_user_id'] = $user_id; if (empty($HTTP_SESSION_VARS['sess_user_name'])) { $HTTP_SESSION_VARS['sess_user_name'] = 'default'; } # # set the initial session timeout start value # $HTTP_SESSION_VARS['sess_tos'] = date('His'); #
$lang_tables = array('stdpass.php'); define('LANG_FILE', 'specials.php'); //$local_user='******'; define('NO_2LEVEL_CHK', 1); require_once $root_path . 'include/inc_front_chain_lang.php'; $breakfile = 'config_options.php' . URL_APPEND; $thisfile = basename($_SERVER['PHP_SELF']); if (isset($mode) && $mode == 'save') { // Save to user config table $config_new['template_smarty'] = $template_smarty; include_once $root_path . 'include/care_api_classes/class_userconfig.php'; $user = new UserConfig(); if ($user->getConfig($_COOKIE['ck_config'])) { $config =& $user->getConfigData(); $config = array_merge($config, $config_new); if ($user->saveConfig($_COOKIE['ck_config'], $config)) { header('location:' . basename(__FILE__) . URL_REDIRECT_APPEND . '&saved=1'); exit; } } } elseif (!isset($cfg['template_smarty']) || empty($cfg['template_smarty'])) { if (!isset($GLOBAL_CONFIG)) { $GLOBAL_CONFIG = array(); } include_once $root_path . 'include/care_api_classes/class_globalconfig.php'; $gc = new GlobalConfig($GLOBAL_CONFIG); $gc->getConfig('template_smarty'); if (!empty($GLOBAL_CONFIG['template_smarty'])) { $cfg['template_smarty'] = $GLOBAL_CONFIG['template_smarty']; } else { $cfg['template_smarty'] = 'default';