本文整理汇总了PHP中SE_Language::select方法的典型用法代码示例。如果您正苦于以下问题:PHP SE_Language::select方法的具体用法?PHP SE_Language::select怎么用?PHP SE_Language::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SE_Language
的用法示例。
在下文中一共展示了SE_Language::select方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setcookie
// SET UP LANGUAGE VARIABLES
if (!empty($_GET['lang_id'])) {
$lang_id = NULL;
if ($user->user_exists && $setting['setting_lang_allow']) {
$lang_id = $user->user_info['user_language_id'] = (int) $_GET['lang_id'];
$database->database_query("UPDATE se_users SET user_language_id='{$user->user_info['user_language_id']}' WHERE user_id='{$user->user_info['user_id']}' LIMIT 1");
}
if (!$user->user_exists && $setting['setting_lang_anonymous']) {
$lang_id = (int) $_GET['lang_id'];
}
if ($lang_id) {
setcookie('se_language_anonymous', $lang_id, time() + 99999999, "/");
$_COOKIE['se_language_anonymous'] = $lang_id;
}
}
SE_Language::select($user);
if (SE_Language::info('language_setlocale')) {
$multi_language = 1;
setlocale(LC_TIME, SE_Language::info('language_setlocale'));
}
header("Content-Language: " . SE_Language::info('language_code'));
// CREATE ACTIONS CLASS
$actions = new se_actions();
// CREATE NOTIFICATION CLASS
$notify = new se_notify();
// CREATE ADS CLASS
$ads = new se_ads();
// Define SE_PAGE_AJAX in your page before the header include to not load ads or update page views
if (!defined('SE_PAGE_AJAX') && ($page == "chat_frame" || $page == "chat_ajax" || $page == "misc_js" || $page == "ad")) {
define('SE_PAGE_AJAX', TRUE);
}
示例2: SE_Javascript
$admin->admin_checkCookies();
// INSTANTIATE JAVASCRIPT OBJECT
$se_javascript = new SE_Javascript();
$smarty->assign_by_ref('se_javascript', $se_javascript);
// ADMIN IS NOT LOGGED IN AND NOT ON LOGIN PAGE
if ($page != "admin_login" && $page != "admin_lostpass" && $page != "admin_lostpass_reset" && $admin->admin_exists == 0) {
header("Location: admin_login.php");
exit;
}
// SET UP LANGUAGE VARIABLES
if (!empty($_GET['lang_id']) && $admin->admin_exists) {
$admin->admin_info['admin_language_id'] = (int) $_GET['lang_id'];
$database->database_query("UPDATE se_admins SET admin_language_id='{$admin->admin_info['admin_language_id']}' WHERE admin_id='{$admin->admin_info['admin_id']}' LIMIT 1");
}
// SET UP LANGUAGE VARIABLES
SE_Language::select($admin);
if (SE_Language::info('language_setlocale')) {
$multi_language = 1;
setlocale(LC_TIME, SE_Language::info('language_setlocale'));
}
header("Content-Language: " . SE_Language::info('language_code'));
// GET PLUGIN USER LEVEL MENU OPTIONS AND INCLUDE PLUGIN PAGES
$global_plugins = array();
$level_menu = array();
$plugins = $database->database_query("SELECT * FROM se_plugins WHERE plugin_disabled=0 ORDER BY plugin_order ASC");
while ($plugin_info = $database->database_fetch_assoc($plugins)) {
$plugin_vars = array();
if (file_exists("admin_header_{$plugin_info['plugin_type']}.php")) {
include "admin_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)
示例3: SE_Javascript
$provider->provider_checkCookies();
// INSTANTIATE JAVASCRIPT OBJECT
$se_javascript = new SE_Javascript();
$smarty->assign_by_ref('se_javascript', $se_javascript);
// ADMIN IS NOT LOGGED IN AND NOT ON LOGIN PAGE
if ($page != "adm/adm_login" && $provider->provider_exists == 0) {
header("Location: adm_login.php");
exit;
}
// SET UP LANGUAGE VARIABLES
if (!empty($_GET['lang_id']) && $provider->provider_exists) {
$provider->provider_info['language_id'] = (int) $_GET['lang_id'];
//$database->database_query("UPDATE se_admins SET admin_language_id='{$admin->admin_info['admin_language_id']}' WHERE admin_id='{$admin->admin_info['admin_id']}' LIMIT 1");
}
// SET UP LANGUAGE VARIABLES
SE_Language::select($provider);
if (SE_Language::info('language_setlocale')) {
$multi_language = 1;
setlocale(LC_TIME, SE_Language::info('language_setlocale'));
}
Header("Content-Language: " . SE_Language::info('language_code'));
// Nasty code to flush site settings
if ((!empty($_GET['task']) || !empty($_POST['task'])) && is_object($cache_object)) {
$cache_object->remove('site_settings');
}
/*
if($provider->active_login == 0)
{
if($provider->provider_info['private_password'] != "")
{
if(isset($_POST['submit']))