$this->db2->query('UPDATE users SET dbrd_whattodo_closed="' . $tmp . '" WHERE id="' . $this->user->id . '" LIMIT 1'); $this->user->info->dbrd_whattodo_closed = $tmp; $this->network->get_user_by_id($this->user->id, TRUE); echo 'OK'; exit; } if ($this->param('from') == 'ajax' && isset($_POST['toggle_grpmenu'])) { $tmp = intval($_POST['toggle_grpmenu']) == 0 ? 1 : 0; $this->db2->query('UPDATE users SET dbrd_groups_closed="' . $tmp . '" WHERE id="' . $this->user->id . '" LIMIT 1'); $this->user->info->dbrd_groups_closed = $tmp; $this->network->get_user_by_id($this->user->id, TRUE); echo 'OK'; exit; } if ($this->param('from') == 'ajax' && isset($_POST['hide_wrongaddr_warning'])) { setcookie('wrongaddr_warning_' . md5($C->DOMAIN), 'off', time() + 7 * 24 * 60 * 60, '/', cookie_domain()); echo 'OK'; exit; } $D->groupsmenu_active = $this->user->info->dbrd_groups_closed == 1 ? FALSE : TRUE; $D->rss_feeds = array(array($C->SITE_URL . 'rss/my:dashboard', $this->lang('rss_mydashboard', array('#USERNAME#' => $this->user->info->username))), array($C->SITE_URL . 'rss/my:posts', $this->lang('rss_myposts', array('#USERNAME#' => $this->user->info->username))), array($C->SITE_URL . 'rss/my:private', $this->lang('rss_myprivate', array('#USERNAME#' => $this->user->info->username))), array($C->SITE_URL . 'rss/my:mentions', $this->lang('rss_mymentions', array('#USERNAME#' => $this->user->info->username))), array($C->SITE_URL . 'rss/my:bookmarks', $this->lang('rss_mybookmarks', array('#USERNAME#' => $this->user->info->username))), array($C->SITE_URL . 'rss/all:posts', $this->lang('rss_everybody', array('#SITE_TITLE#' => $C->SITE_TITLE)))); $tabs = array('all', '@me', 'private', 'commented', 'bookmarks', 'everybody', 'group', 'reshares', 'feeds', 'tweets'); $filters = array('all', 'videos', 'images', 'links', 'files'); $at_tmp = array('videos' => 'videoembed', 'images' => 'image', 'links' => 'link', 'files' => 'file'); $tab = 'all'; if ($this->param('tab') && in_array($this->param('tab'), $tabs)) { $tab = $this->param('tab'); } $filter = 'all'; if ($this->param('filter') && in_array($this->param('filter'), $filters)) { $filter = $this->param('filter');
//ADDITIONAL CACHE OPTIONS// //These options are in BETA version!!! $C->post_cache_is_activated = FALSE; //most of the post data will be cached - mentions, attached files, reshares $C->user_cache_is_activated = FALSE; //cache for user's saved searches, private groups, protected members $C->comment_cache_is_activated = FALSE; //ADDITIONAL CACHE OPTIONS// $C->RSS_FEED_POSTS_NUMBER_FILTER = TRUE; $C->SPAM_CONTROL = FALSE; ini_set('magic_quotes_runtime', 0); ini_set('session.name', my_session_name($C->DOMAIN)); ini_set('session.cache_expire', 300); ini_set('session.cookie_lifetime', 0); ini_set('session.cookie_path', '/'); ini_set('session.cookie_domain', cookie_domain()); ini_set('session.cookie_httponly', 1); ini_set('session.use_only_cookies', 1); ini_set('session.gc_maxlifetime', 10800); ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 1000); ini_set('zlib.output_compression_level', 7); ini_set('max_execution_time', 20); if (!function_exists('mb_internal_encoding')) { require_once $C->INCPATH . 'helpers/func_mbstring.php'; } mb_internal_encoding('UTF-8'); if (!function_exists('json_encode')) { require_once $C->INCPATH . 'helpers/func_json.php'; } if (!function_exists('strptime')) {
public function logout() { if (!$this->is_logged) { return FALSE; } setcookie('rememberme', NULL, time() + 60 * 24 * 60 * 60, '/', cookie_domain()); $_COOKIE['rememberme'] = NULL; $this->sess['IS_LOGGED'] = FALSE; $this->sess['LOGGED_USER'] = NULL; unset($this->sess['IS_LOGGED']); unset($this->sess['LOGGED_USER']); $this->id = FALSE; $this->info = new stdClass(); $this->is_logged = FALSE; }