当前位置: 首页>>代码示例>>PHP>>正文


PHP setup_extra_lang函数代码示例

本文整理汇总了PHP中setup_extra_lang函数的典型用法代码示例。如果您正苦于以下问题:PHP setup_extra_lang函数的具体用法?PHP setup_extra_lang怎么用?PHP setup_extra_lang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setup_extra_lang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add_permission_language

/**
* Add permission language - this will make sure custom files will be included
*/
function add_permission_language()
{
    global $user, $class_plugins;
    // First of all, our own file. We need to include it as the first file because it presets all relevant variables.
    // MIGHTY GORGON - LANG - BEGIN
    global $class_plugins;
    global $db, $cache, $lang;
    setup_extra_lang(array('lang_cms_permissions', 'lang_permissions'));
    // Add Plugins Lang!
    if (!class_exists('class_plugins')) {
        include IP_ROOT_PATH . 'includes/class_plugins.' . PHP_EXT;
    }
    if (empty($class_plugins)) {
        $class_plugins = new class_plugins();
    }
    foreach ($cache->obtain_plugins_config() as $k => $plugin) {
        if (!empty($plugin['plugin_enabled'])) {
            $class_plugins->setup_lang($plugin['plugin_dir'] . '/', 'permissions');
        }
    }
    // Merge $lang with $user->lang
    merge_user_lang();
    // MIGHTY GORGON - LANG - END
    // CODE REMOVED
    /*
    $files_to_add = array();
    
    // Now search in acp and mods folder for permissions_ files.
    foreach (array('acp/', 'mods/') as $path)
    {
    	$dh = @opendir($user->lang_path . $user->lang_name . '/' . $path);
    
    	if ($dh)
    	{
    		while (($file = readdir($dh)) !== false)
    		{
    			if (($file !== 'permissions_phpbb.' . PHP_EXT) && (strpos($file, 'permissions_') === 0) && (substr($file, -(strlen(PHP_EXT) + 1)) === '.' . PHP_EXT))
    			{
    				$files_to_add[] = $path . substr($file, 0, -(strlen(PHP_EXT) + 1));
    			}
    		}
    		closedir($dh);
    	}
    }
    
    if (!sizeof($files_to_add))
    {
    	return false;
    }
    
    $user->add_lang($files_to_add);
    */
    return true;
}
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:57,代码来源:functions_admin_phpbb3.php

示例2: define

    define('IP_ROOT_PATH', './');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
include IP_ROOT_PATH . 'common.' . PHP_EXT;
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
if (!$user->data['session_logged_in']) {
    message_die(GENERAL_MESSAGE, $lang['NOT_LOGGED_IN_VIEW_PAGE']);
}
include_once IP_ROOT_PATH . 'includes/digest_constants.' . PHP_EXT;
setup_extra_lang(array('lang_digests'));
if (empty($config['cron_digests_interval']) || $config['cron_digests_interval'] == -1) {
    message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
}
// Get the server time zone. This is not necessarily what appears in $config['board_timezone']
$board_timezone = gmdate('Z') / 3600;
// Get current user's timezone
$user_timezone = (double) $user->data['user_timezone'];
// Offset the timezone information. We will store in the subscriptions table the
// server time to send the digest, since mail_digests.php expects it this way.
$offset = $board_timezone - $user_timezone;
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    if ($user->data['session_logged_in']) {
        $template_to_parse = 'digests.tpl';
        // get current subscription data for this user, if any
        $sql = 'SELECT count(*) AS count FROM ' . DIGEST_SUBSCRIPTIONS_TABLE . ' WHERE user_id = ' . $user->data['user_id'];
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:digests.php

示例3: basename

if (!empty($setmodules)) {
    $filename = basename(__FILE__);
    $module['1610_Users']['100_Jr_Admin'] = $filename;
    return;
}
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
include_once IP_ROOT_PATH . 'includes/functions_jr_admin_acp.' . PHP_EXT;
include_once IP_ROOT_PATH . 'includes/functions_jr_admin.' . PHP_EXT;
include_once IP_ROOT_PATH . 'includes/functions_groups.' . PHP_EXT;
include_once 'pagestart.' . PHP_EXT;
setup_extra_lang(array('lang_jr_admin'));
/**************************************************************************
* Module Actual Start
**************************************************************************/
/* If for some reason you need to disable the version check in THIS HACK ONLY,
change the blow to true instead of false.  No other hacks will be affected
by this change.
*/
define('DISABLE_VERSION_CHECK', false);
/* Debugging for this file */
$debug = false;
/**************************************************************************
* Constants and Main Vars.
**************************************************************************/
$status_message = '';
//Check for color groups mod
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:31,代码来源:admin_jr_admin.php

示例4: trim

                    $output .= $lines[$i] . "\n";
                }
                $lines[$i] = '';
            }
        }
        return trim($output);
    }
}
// Functions - END
// Mighty Gorgon - ACP Privacy - BEGIN
$is_allowed = check_acp_module_access();
if (empty($is_allowed)) {
    message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
}
// Mighty Gorgon - ACP Privacy - END
setup_extra_lang(array('lang_bb_db_admin'));
$mode = request_var('mode', '');
$action = request_var('action', '');
$mass = request_var('mass', '');
$mass_change = request_var('mass_change', '');
// Auth Check - BEGIN
$allowed = false;
$founder_id = defined('FOUNDER_ID') ? FOUNDER_ID : get_founder_id();
if ($user->data['user_id'] == $founder_id) {
    $allowed = true;
}
if (!$allowed && defined('MAIN_ADMINS_ID')) {
    $allowed_admins = explode(',', MAIN_ADMINS_ID);
    if (in_array($user->data['user_id'], $allowed_admins)) {
        $allowed = true;
    }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:admin_bb_db.php

示例5: define

*/
define('IN_ICYPHOENIX', true);
if (!empty($setmodules)) {
    $filename = basename(__FILE__);
    $module['2200_Photo_Album']['130_Album_Permissions'] = $filename;
    return;
}
// Load default Header
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
setup_extra_lang(array('lang_album_main', 'lang_album_admin'));
require ALBUM_MOD_PATH . 'album_common.' . PHP_EXT;
$album_user_id = ALBUM_PUBLIC_GALLERY;
if (!isset($_POST['submit'])) {
    album_read_tree();
    $s_album_cat_list = album_get_tree_option(ALBUM_ROOT_CATEGORY, ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL | ALBUM_SELECTBOX_INCLUDE_ROOT);
    $template->set_filenames(array('body' => ADM_TPL . 'album_cat_select_body.tpl'));
    $template->assign_vars(array('L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], 'L_SELECT_CAT' => $lang['Select_a_Category'], 'S_ALBUM_ACTION' => append_sid("admin_album_auth." . PHP_EXT), 'L_LOOK_UP_CAT' => $lang['Look_up_Category'], 'CAT_SELECT_TITLE' => $s_album_cat_list));
    $template->pparse('body');
    include IP_ROOT_PATH . ADM . '/page_footer_admin.' . PHP_EXT;
} else {
    if (!isset($_GET['cat_id'])) {
        $cat_id = intval($_POST['cat_id']);
        $template->set_filenames(array('body' => ADM_TPL . 'album_auth_body.tpl'));
        $template->assign_vars(array('L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_GROUPS' => $lang['Usergroups'], 'L_VIEW' => $lang['View'], 'L_UPLOAD' => $lang['Upload'], 'L_RATE' => $lang['Rate'], 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], 'S_ALBUM_ACTION' => append_sid('admin_album_auth.' . PHP_EXT . '?cat_id=' . $cat_id)));
        $groups_data = get_groups_data(false, false, array());
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:31,代码来源:admin_album_auth.php

示例6: define

/* MG Lang DB - END */
define('IN_ICYPHOENIX', true);
if (!empty($setmodules)) {
    $file = basename(__FILE__);
    $module['1100_General']['230_Language'] = $file;
    return;
}
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
include_once IP_ROOT_PATH . 'includes/class_lang_user_created.' . PHP_EXT;
setup_extra_lang(array('lang_admin_extend_lang'));
@set_time_limit(0);
$mem_limit = check_mem_limit();
@ini_set('memory_limit', $mem_limit);
$lang_management = new lang_management();
$value_maxlength = 250;
// Remove the ADMIN / NORMAL options => force $_POST options
$_POST['search_admin'] = 2;
$_POST['new_level'] = 'normal';
// get languages installed
$countries = $lang_management->get_countries();
// get packs installed
$packs = $lang_management->get_packs();
// get entries (all lang keys)
$entries = $lang_management->get_entries();
// get parameters
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:admin_lang_user_created.php

示例7: die

* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_ICYPHOENIX')) {
    die('Hacking attempt');
}
// Usage
/*
// BBCBMG - BEGIN
define('IN_ICYPHOENIX', true);
//$bbcbmg_in_acp = true;
include(IP_ROOT_PATH . 'includes/bbcb_mg.' . PHP_EXT);
$template->assign_var_from_handle('BBCB_MG', 'bbcb_mg');
// BBCBMG - END
*/
setup_extra_lang(array('lang_bbcb_mg'));
// This page is not in layout special...
$cms_page_id_tmp = 'pic_upload';
$cms_auth_level_tmp = isset($config['auth_view_pic_upload']) ? $config['auth_view_pic_upload'] : AUTH_ALL;
$view_pic_upload = check_page_auth($cms_page_id_tmp, $cms_auth_level_tmp, true);
if (defined('BBCB_MG_SMALL')) {
    $template->set_filenames(array('bbcb_mg' => 'bbcb_mg_small.tpl'));
} elseif (defined('BBCB_MG_CUSTOM')) {
    $template->set_filenames(array('bbcb_mg' => 'bbcb_mg_custom.tpl'));
} else {
    $template->set_filenames(array('bbcb_mg' => 'bbcb_mg.tpl'));
}
if (!empty($config['enable_postimage_org'])) {
    $template->assign_var('S_POSTIMAGE_ORG', true);
}
if (!empty($config['enable_colorpicker'])) {
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:bbcb_mg.php

示例8: define

if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
// SETTINGS - BEGIN
$is_plugin = false;
$settings_basename = 'captcha';
$acp_file = IP_ROOT_PATH . ADM . '/' . basename(__FILE__);
// SETTINGS - END
$class_settings->setup_modules('', $settings_basename . '_');
$lang_files = $class_settings->obtain_lang_files($settings_basename . '_');
if (!empty($lang_files)) {
    setup_extra_lang($lang_files);
}
// OTHERS SETTINGS - BEGIN
$acp_module_title = $lang['ACP_CAPTCHA'];
$acp_module_title_explain = $lang['ACP_CAPTCHA_EXPLAIN'];
$acp_modules = $class_settings->modules;
$acp_default_config = get_config(false);
// OTHERS SETTINGS - END
/*
include(IP_ROOT_PATH . 'includes/captcha/captcha_factory.' . PHP_EXT);
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
*/
include IP_ROOT_PATH . ADM . '/acp_config_include.' . PHP_EXT;
// footer
$template->pparse('body');
include IP_ROOT_PATH . ADM . '/page_footer_admin.' . PHP_EXT;
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:admin_captcha.php

示例9: define

*
*/
define('IN_ICYPHOENIX', true);
if (!empty($setmodules)) {
    $file = basename(__FILE__);
    $module['2000_Downloads']['130_Fchecker'] = $file;
    return;
}
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
setup_extra_lang(array('lang_admin_pafiledb'));
include IP_ROOT_PATH . 'includes/pafiledb_common.' . PHP_EXT;
$this_dir = IP_ROOT_PATH . DOWNLOADS_PATH;
$html_path = create_server_url() . DOWNLOADS_PATH;
$safety = request_var('safety', 0);
$template->set_filenames(array('admin' => ADM_TPL . 'pa_admin_file_checker.tpl'));
$template->assign_vars(array('L_FILE_CHECKER' => $lang['File_checker'], 'L_FCHECKER_EXPLAIN' => $lang['File_checker_explain']));
if ($safety == 1) {
    $saved = 0;
    $template->assign_block_vars("check", array());
    $template->assign_vars(array('L_FILE_CHECKER_SP1' => $lang['Checker_sp1']));
    $sql = "SELECT * FROM " . PA_FILES_TABLE;
    $overall_result = $db->sql_query($sql);
    while ($temp = $db->sql_fetchrow($overall_result)) {
        $temp_dlurl = $temp['file_dlurl'];
        if (substr($temp_dlurl, 0, strlen($html_path)) !== $html_path) {
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:admin_pa_fchecker.php

示例10: submit_post


//.........这里部分代码省略.........
            $sql = "SELECT count(1) chk_reg FROM " . REGISTRATION_DESC_TABLE . " WHERE topic_id = {$topic_id}";
            $result = $db->sql_query($sql);
            $chk_reg = $db->sql_fetchfield('chk_reg', 0, $result) != 0 ? true : false;
        }
        $sql = $mode != 'editpost' || $mode == 'editpost' && $chk_reg == false ? "INSERT INTO " . REGISTRATION_DESC_TABLE . " (topic_id, reg_active, reg_max_option1, reg_max_option2, reg_max_option3, reg_start, reg_length) VALUES ({$topic_id}, {$reg_active}, {$reg_max_option1}, {$reg_max_option2}, {$reg_max_option3}, {$current_time}, " . $reg_length * 86400 . ")" : "UPDATE " . REGISTRATION_DESC_TABLE . " SET reg_active = {$reg_active}, reg_max_option1 = {$reg_max_option1}, reg_max_option2 = {$reg_max_option2}, reg_max_option3 = {$reg_max_option3}, reg_length = " . $reg_length * 86400 . " WHERE topic_id = {$topic_id}";
        $db->sql_query($sql);
    }
    // Event Registration - END
    // To show also admins modifications decomment this line!!!
    //if( ($user->data['user_level'] == ADMIN) && !$config['always_show_edit_by'] )
    if ($user->data['user_level'] == ADMIN) {
        $edited_sql = '';
    } else {
        // Original phpBB "Edit By"
        //$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
        $edited_sql = ", post_edit_time = '" . $current_time . "', post_edit_count = (post_edit_count + 1), post_edit_id = '" . $user->data['user_id'] . "' ";
        if ($config['always_show_edit_by'] == true) {
            $edited_sql = $mode == 'editpost' ? $edited_sql : '';
        } else {
            $edited_sql = $mode == 'editpost' && !$post_data['last_post'] ? $edited_sql : '';
        }
    }
    $lock_post = request_boolean_var('post_locked', false);
    $sql = $mode != 'editpost' ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_subject, post_text, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_autolinks_acronyms, enable_sig, post_locked, post_images) VALUES (" . $topic_id . ", " . $forum_id . ", " . $user->data['user_id'] . ", '" . $db->sql_escape($post_username) . "', '" . $db->sql_escape($post_subject) . "', '" . $db->sql_escape($post_message) . "', " . $current_time . ", '" . $db->sql_escape($user->ip) . "', " . $bbcode_on . ", " . $html_on . ", " . $smilies_on . ", " . $acro_auto_on . ", " . $attach_sig . ", " . (!empty($lock_post) ? '1' : '0') . ", '" . $db->sql_escape($post_data['post_images']) . "')" : "UPDATE " . POSTS_TABLE . " SET post_username = '" . $db->sql_escape($post_username) . "', post_text = '" . $db->sql_escape($post_message) . "', post_text_compiled = '', post_subject = '" . $db->sql_escape($post_subject) . "', enable_bbcode = " . $bbcode_on . ", enable_html = " . $html_on . ", enable_smilies = " . $smilies_on . ", enable_autolinks_acronyms = " . $acro_auto_on . ", enable_sig = " . $attach_sig . ", post_locked = " . (!empty($lock_post) ? '1' : '0') . ", post_images = '" . $db->sql_escape($post_data['post_images']) . "' " . $edited_sql . " WHERE post_id = " . $post_id;
    //die($sql);
    $db->sql_transaction('begin');
    $db->sql_query($sql);
    if ($mode != 'editpost') {
        $post_id = $db->sql_nextid();
    }
    // UPI2DB - BEGIN
    if ($config['upi2db_on']) {
        $mark_edit = $user->data['user_level'] == ADMIN || $user->data['user_level'] == MOD ? $mark_edit : true;
        if ($mode != 'editpost' || $mode == 'editpost' && $post_data['last_post'] && $config['upi2db_last_edit_as_new'] && $mark_edit || $mode == 'editpost' && !$post_data['last_post'] && $config['upi2db_edit_as_new'] && $mark_edit || $mode == 'reply') {
            $sql = "SELECT post_id FROM " . UPI2DB_LAST_POSTS_TABLE . "\n\t\t\t\tWHERE post_id = " . $post_id;
            $result = $db->sql_query($sql);
            $id_vorhanden = $db->sql_numrows($result);
            $db->sql_freeresult($result);
            if ($id_vorhanden == 0) {
                $pt_or_pet = $mode != 'editpost' ? "post_time" : "post_edit_time";
                $sql = "INSERT INTO " . UPI2DB_LAST_POSTS_TABLE . " (post_id, topic_id, forum_id, poster_id, " . $pt_or_pet . ", topic_type, post_edit_by) VALUES ('{$post_id}', '{$topic_id}', '{$forum_id}', '" . $user->data['user_id'] . "', '{$current_time}', '{$topic_type}', '" . $user->data['user_id'] . "')";
            } else {
                $sql = "UPDATE " . UPI2DB_LAST_POSTS_TABLE . " SET post_edit_time = '" . $current_time . "', topic_type = '" . $topic_type . "', post_edit_by = '" . $user->data['user_id'] . "' WHERE post_id = " . $post_id;
            }
            $db->sql_query($sql);
        }
        // Edited By Mighty Gorgon - BEGIN
        if ($user->data['user_level'] != ADMIN && $user->data['user_level'] != MOD) {
            if ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE || $topic_type == POST_GLOBAL_ANNOUNCE) {
                $sql = "DELETE FROM " . UPI2DB_ALWAYS_READ_TABLE . "\n\t\t\t\t\tWHERE forum_id =  " . $forum_id;
                $db->sql_query($sql);
            }
        }
        // Edited By Mighty Gorgon - END
    }
    // UPI2DB - END
    add_search_words('single', $post_id, $post_message, $post_subject);
    // DOWNLOADS - BEGIN
    if (!empty($config['plugins']['downloads']['enabled'])) {
        setup_extra_lang(array('lang_downloads'), IP_ROOT_PATH . PLUGINS_PATH . $config['plugins']['downloads']['dir'] . 'language/');
        include IP_ROOT_PATH . PLUGINS_PATH . $config['plugins']['downloads']['dir'] . 'classes/class_dlmod.' . PHP_EXT;
        $dl_mod = new dlmod();
        $dl_config = $dl_mod->get_config();
        if ($dl_config['enable_post_dl_traffic']) {
            if (!$dl_config['delay_post_traffic'] || (time() - $user->data['user_regdate']) / 84600 > $dl_config['delay_post_traffic']) {
                $dl_traffic = 0;
                if ($mode == 'newtopic') {
                    $dl_traffic = $dl_config['newtopic_traffic'];
                } elseif ($mode == 'reply' || $mode == 'quote') {
                    $dl_traffic = $dl_config['reply_traffic'];
                }
                if ($dl_traffic > 0) {
                    $sql = "UPDATE " . USERS_TABLE . "\n\t\t\t\t\t\tSET user_traffic = user_traffic + {$dl_traffic}\n\t\t\t\t\t\tWHERE user_id = " . $user->data['user_id'];
                    $db->sql_query($sql);
                }
            }
        }
    }
    // DOWNLOADS - END
    // ReSync last topic title if needed
    if ($mode == 'editpost' && $post_data['first_post']) {
        $sql = "UPDATE " . FORUMS_TABLE . " f\n\t\t\tSET f.forum_last_post_subject = '" . $db->sql_escape($post_subject) . "'\n\t\t\tWHERE f.forum_last_topic_id = " . $topic_id;
        $result = $db->sql_query($sql);
    }
    $db->sql_transaction('commit');
    empty_cache_folders(POSTS_CACHE_FOLDER);
    empty_cache_folders(FORUMS_CACHE_FOLDER);
    board_stats();
    cache_tree(true);
    $cash_string = '';
    // MG Cash MOD For IP - BEGIN
    if (!empty($config['plugins']['cash']['enabled'])) {
        $cash_message = $GLOBALS['cm_posting']->update_post($mode, $post_data, $forum_id, $topic_id, $post_id, $topic_type, $post_username, $post_message);
        $cash_string = '<br />' . $cash_message;
    }
    // MG Cash MOD For IP - END
    $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_POST_URL . '=' . $post_id) . '#p' . $post_id . '">';
    $message = $lang['Stored'] . $cash_string . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_POST_URL . '=' . $post_id) . '#p' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid(CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id) . '">', '</a>');
    return false;
}
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:101,代码来源:functions_post.php

示例11: page_header


//.........这里部分代码省略.........
                $lang['NEW_POSTS_SHORT'] = $lang['New_Label'] . ' (' . $new_posts . ')';
                $lang['NEW_POSTS_LONG'] = $lang['New_Messages_Label'] . ' (' . $new_posts . ')';
                $lang['Search_new2'] = $lang['Search_new2'] . ' (' . $new_posts . ')';
                $lang['Search_new_p'] = $lang['Search_new_p'] . ' (' . $new_posts . ')';
                $db->sql_freeresult($result);
            }
        } else {
            $lang['NEW_POSTS_SHORT'] = $lang['New_Label'];
            $lang['NEW_POSTS_LONG'] = $lang['New_Messages_Label'];
        }
    }
    // LOGGED IN CHECK - END
    if (!defined('IN_CMS')) {
        // UPI2DB - BEGIN
        $upi2db_first_use = '';
        $u_display_new = array();
        if ($user->data['upi2db_access']) {
            $u_display_new = index_display_new($user->data['upi2db_unread']);
            $template->assign_block_vars('switch_upi2db_on', array());
            $template->assign_var('IS_UPI2DB', true);
            $upi2db_first_use = $user->data['user_upi2db_datasync'] == '0' ? '<script type="text/javascript">' . "\n" . '// <![CDATA[' . "\n" . 'alert ("' . $lang['upi2db_first_use_txt'] . '");' . "\n" . '// ]]>' . "\n" . '</script>' : '';
        } else {
            if ($user->data['session_logged_in']) {
                $template->assign_block_vars('switch_upi2db_off', array());
            }
        }
        // UPI2DB - END
        // Digests - BEGIN
        if (!empty($config['cron_digests_interval']) && $config['cron_digests_interval'] > 0) {
            if (!defined('DIGEST_SITE_URL')) {
                $digest_server_url = create_server_url();
                define('DIGEST_SITE_URL', $digest_server_url);
            }
            setup_extra_lang(array('lang_digests'));
            if ($user->data['session_logged_in']) {
                $template->assign_block_vars('switch_show_digests', array());
            }
        }
        // Digests - END
        // Visit Counter - BEGIN
        if ($config['visit_counter_switch']) {
            $sql = "UPDATE " . CONFIG_TABLE . "\n\t\t\t\t\tSET config_value = (config_value + 1)\n\t\t\t\t\tWHERE config_name = 'visit_counter'";
            $result = $db->sql_query($sql);
        }
        // Visit Counter - END
        // Mighty Gorgon - Random Quote - Begin
        $randomquote_phrase = '';
        if ($config['show_random_quote']) {
            @(include_once IP_ROOT_PATH . 'language/lang_' . $config['default_lang'] . '/lang_randomquote.' . PHP_EXT);
            $randomquote_phrase = $randomquote[rand(0, sizeof($randomquote) - 1)];
        }
        // Mighty Gorgon - Random Quote - End
        // Mighty Gorgon - Advanced Switches - END
        // Show Online Block - BEGIN
        // Get basic (usernames + totals) online situation
        $online_userlist = '';
        $l_online_users = '';
        $ac_online_users = array('reg' => 0, 'guests' => 0, 'tot' => 0, 'list' => '', 'text' => '');
        if (defined('SHOW_ONLINE') && !$user->data['is_bot']) {
            include IP_ROOT_PATH . 'includes/users_online_block.' . PHP_EXT;
        }
        // Show Online Block - END
        // CrackerTracker v5.x
        /*
         * CrackerTracker IP Range Scanner
         */
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:67,代码来源:functions.php

示例12: define

// Mighty Gorgon - ACP Privacy - END
define('DBMTNC_VERSION', '1.3.6');
// CONFIG_LEVEL = 0: configuration is disabled
// CONFIG_LEVEL = 1: only general configuration available
// CONFIG_LEVEL = 2: also configuration of rebuilding available
// CONFIG_LEVEL = 3: also configuration of current rebuilding available
define('CONFIG_LEVEL', 3);
// Level of configuration available (see above)
define('HEAP_SIZE', 500);
// Limit of Heap-Table for session data
require IP_ROOT_PATH . 'includes/functions_dbmtnc.' . PHP_EXT;
include_once IP_ROOT_PATH . 'includes/functions_selects.' . PHP_EXT;
// Set up timer
$timer = getmicrotime();
// Get language file for this mod
setup_extra_lang(array('lang_dbmtnc'));
// Set up variables and constants
$function = request_var('function', '');
$mode_id = request_var('mode', '');
if ($mode_id == 'perform' && !isset($_POST['confirm'])) {
    $mode_id = '';
}
// Check for parameters
reset($config_data);
while (list(, $value) = each($config_data)) {
    if (!isset($config[$value])) {
        message_die(GENERAL_MESSAGE, sprintf($lang['Incomplete_configuration'], $value));
    }
}
// Switch of GZIP-compression when necessary and send the page header
if ($mode_id == 'start' || $mode_id == 'perform') {
开发者ID:GabrielAnca,项目名称:icy_phoenix,代码行数:31,代码来源:admin_db_maintenance.php

示例13: define

*/
define('IN_ICYPHOENIX', true);
if (!empty($setmodules)) {
    $file = basename(__FILE__);
    $module['1000_Configuration']['190_Spider_Bots'] = $file;
    return;
}
// Load default header
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
setup_extra_lang(array('lang_bots'));
$mode_array = array('add', 'delete', 'save', 'update');
$mode = request_var('mode', '');
$mode = in_array($mode, $mode_array) ? $mode : '';
$update = request_var('update', false);
if ($update) {
    $mode = 'update';
}
$bot_id = request_var('bot_id', 0);
$bot_active = request_var('bot_active', 0);
$bot_name = request_var('bot_name', '', true);
$bot_color = request_var('bot_color', '');
$bot_agent = request_var('bot_agent', '', true);
$bot_ip = request_var('bot_ip', '');
$bot_last_visit = request_var('bot_last_visit', 0);
$bot_visit_counter = request_var('bot_visit_counter', 0);
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:admin_bots.php

示例14: jr_admin_make_info_box

function jr_admin_make_info_box()
{
    global $template, $lang, $module, $user, $config;
    /* Debug? Changes the status standing of ADMIN!!! You are warned */
    $debug = false;
    if ($user->data['user_level'] != ADMIN || $debug) {
        setup_extra_lang(array('lang_jr_admin'));
        $jr_admin_userdata = jr_admin_get_user_info($user->data['user_id']);
        $template->set_filenames(array('JR_ADMIN_INFO' => ADM_TPL . 'jr_admin_user_info_header.tpl'));
        $template->assign_vars(array('JR_ADMIN_START_DATE' => create_date($config['default_dateformat'], $jr_admin_userdata['start_date'], $config['board_timezone']), 'JR_ADMIN_UPDATE_DATE' => create_date($config['default_dateformat'], $jr_admin_userdata['update_date'], $config['board_timezone']), 'JR_ADMIN_ADMIN_NOTES' => $jr_admin_userdata['admin_notes'], 'L_VERSION' => $lang['Version'], 'L_JR_ADMIN_TITLE' => $lang['Junior_Admin_Info'], 'VERSION' => MOD_VERSION, 'L_MODULE_COUNT' => $lang['Module_Count'], 'L_NOTES' => $lang['Notes'], 'L_ALLOW_VIEW' => $lang['Allow_View'], 'L_START_DATE' => $lang['Start_Date'], 'L_UPDATE_DATE' => $lang['Update_Date'], 'L_ADMIN_NOTES' => $lang['Admin_Notes']));
        //Switch the info area if allowed to view it
        if ($jr_admin_userdata['notes_view']) {
            $template->assign_block_vars('jr_admin_info_switch', array());
        }
        $template->assign_var_from_handle('JR_ADMIN_INFO_TABLE', 'JR_ADMIN_INFO');
    }
}
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:17,代码来源:functions_jr_admin.php

示例15: cms_block_ads

 function cms_block_ads()
 {
     global $db, $cache, $config, $template, $images, $user, $lang, $block_id, $cms_config_vars;
     setup_extra_lang(array('lang_main_ads'));
     $banner_var_all = '';
     $banner_var_guests = '';
     switch ($cms_config_vars['md_ads_type'][$block_id]) {
         case 1:
             $banner_var_all = 'banner_h_s_all';
             $banner_var_guests = 'banner_h_s_guests';
             break;
         case 2:
             $banner_var_all = 'banner_h_m_all';
             $banner_var_guests = 'banner_h_m_guests';
             break;
         case 3:
             $banner_var_all = 'banner_h_l_all';
             $banner_var_guests = 'banner_h_l_guests';
             break;
         case 4:
             $banner_var_all = 'banner_v_s_all';
             $banner_var_guests = 'banner_v_s_guests';
             break;
         case 5:
             $banner_var_all = 'banner_v_m_all';
             $banner_var_guests = 'banner_v_m_guests';
             break;
         case 6:
             $banner_var_all = 'banner_v_l_all';
             $banner_var_guests = 'banner_v_l_guests';
             break;
         case 7:
             $banner_var_all = 'banner_b_s_all';
             $banner_var_guests = 'banner_b_s_guests';
             break;
         case 8:
             $banner_var_all = 'banner_b_m_all';
             $banner_var_guests = 'banner_b_m_guests';
             break;
         case 9:
             $banner_var_all = 'banner_b_l_all';
             $banner_var_guests = 'banner_b_l_guests';
             break;
         default:
             $banner_var_all = 'banner_h_l_all';
             $banner_var_guests = 'banner_h_l_guests';
             break;
     }
     $ads_blocks = array();
     $ads_content = '';
     if (is_array(${$banner_var_all}) && sizeof(${$banner_var_all}) > 0) {
         foreach (${$banner_var_all} as $tmp_ads) {
             $ads_blocks[] = $tmp_ads;
         }
     }
     if (!$user->data['session_logged_in'] && is_array(${$banner_var_guests}) && sizeof(${$banner_var_guests}) > 0) {
         foreach (${$banner_var_guests} as $tmp_ads) {
             $ads_blocks[] = $tmp_ads;
         }
     }
     $ads_counter = sizeof($ads_blocks);
     if ($ads_counter > 0) {
         $microtime = explode(' ', microtime());
         $ads_seed = intval($microtime[0] * 100000) % $ads_counter;
         $ads_content = $ads_blocks[$ads_seed];
     }
     $template->assign_vars(array('ADS_CONTENT' => $ads_content));
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:68,代码来源:ads.php


注:本文中的setup_extra_lang函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。