function he_wall_include_footer_logic($page) { global $smarty, $setting, $user, $owner, $url, $misc, $datetime, $database, $admin, $ads, $se_javascript, $lang_packlist, $global_plugins, $global_timezone; // GET LANGUAGES AVAILABLE IF NECESSARY if ($setting['setting_lang_anonymous'] == 1 || $setting['setting_lang_allow'] == 1 && $user->user_exists != 0) { $lang_packlist_raw = SECore::getLanguages(); //$lang_packlist = SELanguage::list_packs(); ksort($lang_packlist_raw); $lang_packlist = array_values($lang_packlist_raw); } $smarty->assign_by_ref('url', $url); $smarty->assign_by_ref('misc', $misc); $smarty->assign_by_ref('datetime', $datetime); $smarty->assign_by_ref('database', $database); $smarty->assign_by_ref('admin', $admin); $smarty->assign_by_ref('user', $user); $smarty->assign_by_ref('owner', $owner); $smarty->assign_by_ref('ads', $ads); $smarty->assign_by_ref('setting', $setting); $smarty->assign_by_ref('se_javascript', $se_javascript); $smarty->assign('lang_packlist', $lang_packlist); $smarty->assign('global_plugins', $global_plugins); $smarty->assign('global_page', $page); $smarty->assign('global_timezone', $global_timezone); $smarty->assign('global_language', SELanguage::info('language_id')); return $smarty->fetch($page, null, null, false); }
define('SE_PAGE_AJAX', TRUE); } if (!defined('SE_PAGE_AJAX')) { // UPDATE STATS TABLE update_stats("views"); // LOAD ADS $ads->load(); } // CREATE GLOBAL CSS STYLES VAR (USED FOR CUSTOM USER-DEFINED PROFILE/PLUGIN STYLES) $global_css = ""; SE_DEBUG ? $_benchmark->end('initialization') : NULL; SE_DEBUG ? $_benchmark->start('plugins') : NULL; // INCLUDE RELEVANT PLUGIN FILES // AND SET PLUGIN HEADER TEMPLATES $show_menu_user = FALSE; $global_plugins =& SECore::getPlugins(); foreach ($global_plugins as $plugin_type => $plugin_info) { $plugin_vars = array(); if (file_exists("header_{$plugin_info['plugin_type']}.php")) { include "header_{$plugin_info['plugin_type']}.php"; } // Set the hooks for each of the plugin templates if not using the new hooked template includes (backwards compatibility) if (empty($plugin_vars['uses_tpl_hooks'])) { if (file_exists(SE_ROOT . "/templates/header_{$plugin_info['plugin_type']}.tpl")) { $smarty->assign_hook('header', "header_{$plugin_info['plugin_type']}.tpl"); } if (file_exists(SE_ROOT . "/templates/footer_{$plugin_info['plugin_type']}.tpl")) { $smarty->assign_hook('footer', "footer_{$plugin_info['plugin_type']}.tpl"); } if (!empty($plugin_vars['menu_main'])) { $smarty->assign_hook('menu_main', $plugin_vars['menu_main']);
<?php /* $Id: footer.php 59 2009-02-13 03:25:54Z nico-izo $ */ // ENSURE THIS IS BEING INCLUDED IN AN SE SCRIPT defined('SE_PAGE') or exit; SE_DEBUG ? $_benchmark->end('page') : NULL; SE_DEBUG ? $_benchmark->start('shutdown') : NULL; // GET LANGUAGES AVAILABLE IF NECESSARY if ($setting['setting_lang_anonymous'] == 1 || $setting['setting_lang_allow'] == 1 && $user->user_exists != 0) { $lang_packlist_raw = SECore::getLanguages(); //$lang_packlist = SELanguage::list_packs(); ksort($lang_packlist_raw); $lang_packlist = array_values($lang_packlist_raw); } // ASSIGN LOGGED-IN USER VARS if ($user->user_exists) { $smarty->assign('user_unread_pms', $user->user_message_total(0, 1)); } // CALL SPECIFIC PAGE HOOK ($hook = SE_Hook::exists('se_' . $page)) ? SE_Hook::call($hook, array()) : NULL; // CALL FOOTER HOOK ($hook = SE_Hook::exists('se_footer')) ? SE_Hook::call($hook, array()) : NULL; // CHECK IF IN SMOOTHBOX $global_smoothbox = false; if (isset($_GET['in_smoothbox'])) { if ($_GET['in_smoothbox'] == true) { $global_smoothbox = true; } } // ASSIGN GLOBAL SMARTY OBJECTS/VARIABLES $smarty->assign_by_ref('url', $url);
function SEUser($user_unique = array('0', '', ''), $select_fields = array('*', '*', '*', '*')) { global $database; // SET VARS $this->is_error = 0; $this->user_exists = 0; $this->user_info['user_id'] = 0; $this->user_info['user_subnet_id'] = 0; $this->moderation_privacy = 1; $user_unique_id = !empty($user_unique[0]) ? $user_unique[0] : NULL; $user_unique_username = !empty($user_unique[1]) ? $user_unique[1] : NULL; $user_unique_email = !empty($user_unique[2]) ? $user_unique[2] : NULL; // VERIFY USER_ID/USER_USERNAME/USER_EMAIL IS VALID AND SET APPROPRIATE OBJECT VARIABLES if ($user_unique_id || $user_unique_username || $user_unique_email) { // SET USERNAME AND EMAIL TO LOWERCASE $user_username = strtolower($user_unique_username); $user_email = strtolower($user_unique_email); // SELECT USER USING SPECIFIED SELECTION PARAMETER $sql_array = array(); if (!empty($user_unique[0])) { $sql_array[] = "SELECT {$select_fields[0]} FROM se_users WHERE user_id='{$user_unique_id}' LIMIT 1"; } if (!empty($user_unique[1])) { $sql_array[] = "SELECT {$select_fields[0]} FROM se_users WHERE LOWER(user_username)='{$user_username}' LIMIT 1"; } if (!empty($user_unique[2])) { $sql_array[] = "SELECT {$select_fields[0]} FROM se_users WHERE LOWER(user_email)='{$user_email}' LIMIT 1"; } if (count($sql_array) > 1) { $sql = '(' . join(') UNION (', $sql_array) . ')'; } else { $sql = $sql_array[0]; } $user = $database->database_query($sql); if ($database->database_num_rows($user) == 1) { $this->user_exists = 1; $this->user_info = $database->database_fetch_assoc($user); // SET USER SALT $this->user_salt = $this->user_info['user_code']; // SET DISPLAY NAME (BACKWARDS COMPAT) //$this->user_displayname = $this->user_info['user_displayname']; $this->user_displayname(); // SELECT PROFILE CATEGORY INFO if (!empty($this->user_info['user_profilecat_id'])) { $this->profilecat_info =& SEUser::getProfileCategoryInfo($this->user_info['user_profilecat_id']); } //if(isset($this->user_info[user_profilecat_id])) { $this->profilecat_info = $database->database_fetch_assoc($database->database_query("SELECT profilecat_id, profilecat_title FROM se_profilecats WHERE profilecat_id=".$this->user_info[user_profilecat_id]." LIMIT 1")); } // SELECT PROFILE INFO if (!empty($select_fields[1])) { $this->profile_info =& SEUser::getProfileValues($this->user_info['user_id']); } //if($select_fields[1] != "") { $this->profile_info = $database->database_fetch_assoc($database->database_query("SELECT $select_fields[1] FROM se_profilevalues WHERE profilevalue_user_id='".$this->user_info[user_id]."'")); } // SELECT LEVEL INFO if (!empty($select_fields[2])) { $this->level_info =& SEUser::getLevelSettings($this->user_info['user_level_id']); } //if($select_fields[2] != "") { $this->level_info = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_levels WHERE level_id='".$this->user_info[user_level_id]."'")); } // GET USER SETTINGS $this->usersetting_info =& SEUser::getUserSettings($this->user_info['user_id']); // SELECT SUBNET INFO if ($this->user_info['user_subnet_id']) { if (!empty($select_fields[3])) { $this->subnet_info =& SECore::getSubnetworkInfo($this->user_info['user_subnet_id']); } //if($select_fields[3] != "") { $this->subnet_info = $database->database_fetch_assoc($database->database_query("SELECT subnet_id, subnet_name FROM se_subnets WHERE subnet_id='".$this->user_info[user_subnet_id]."'")); } } else { $this->subnet_info['subnet_id'] = 0; $this->subnet_info['subnet_name'] = 152; } SE_Language::_preload($this->subnet_info['subnet_name']); } } }