• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP user_pref_get_language函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: lang_get_default

function lang_get_default()
{
    global $g_active_language;
    $t_lang = false;
    # Confirm that the user's language can be determined
    if (auth_is_user_authenticated()) {
        $t_lang = user_pref_get_language(auth_get_current_user_id());
    }
    # Otherwise fall back to default
    if (false === $t_lang) {
        $t_lang = config_get('default_language');
    }
    if ('auto' == $t_lang) {
        $t_lang = lang_map_auto();
    }
    # Remember the language
    $g_active_language = $t_lang;
    return $t_lang;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:19,代码来源:lang_api.php


示例2: array

}
# if the user is already protected and the admin is not removing the
#  protected flag then don't update the access level and enabled flag.
#  If the user was unprotected or the protected flag is being turned off
#  then proceed with a full update.
$query_params = array();
if ($f_protected && $t_old_protected) {
    $query = "UPDATE {$t_user_table}\n\t\t\tSET username=" . db_param() . ", email=" . db_param() . ",\n\t\t\t\tprotected=" . db_param() . ", realname=" . db_param() . "\n\t\t\tWHERE id=" . db_param();
    $query_params = array($c_username, $c_email, $c_protected, $c_realname, $c_user_id);
} else {
    $query = "UPDATE {$t_user_table}\n\t\t\tSET username=" . db_param() . ", email=" . db_param() . ",\n\t\t\t\taccess_level=" . db_param() . ", enabled=" . db_param() . ",\n\t\t\t\tprotected=" . db_param() . ", realname=" . db_param() . "\n\t\t\tWHERE id=" . db_param();
    $query_params = array($c_username, $c_email, $c_access_level, $c_enabled, $c_protected, $c_realname, $c_user_id);
}
$result = db_query_bound($query, $query_params);
if ($f_send_email_notification) {
    lang_push(user_pref_get_language($f_user_id));
    $t_changes = "";
    if (strcmp($f_username, $t_old_username)) {
        $t_changes .= lang_get('username_label') . lang_get('word_separator') . $t_old_username . ' => ' . $f_username . "\n";
    }
    if (strcmp($t_realname, $t_old_realname)) {
        $t_changes .= lang_get('realname_label') . lang_get('word_separator') . $t_old_realname . ' => ' . $t_realname . "\n";
    }
    if (strcmp($t_email, $t_old_email)) {
        $t_changes .= lang_get('email_label') . lang_get('word_separator') . $t_old_email . ' => ' . $t_email . "\n";
    }
    if (strcmp($f_access_level, $t_old_access_level)) {
        $t_old_access_string = get_enum_element('access_levels', $t_old_access_level);
        $t_new_access_string = get_enum_element('access_levels', $f_access_level);
        $t_changes .= lang_get('access_level_label') . lang_get('word_separator') . $t_old_access_string . ' => ' . $t_new_access_string . "\n\n";
    }
开发者ID:nextgens,项目名称:mantisbt,代码行数:31,代码来源:manage_user_update.php


示例3: formatBugEntry

function formatBugEntry($data)
{
    lang_push(user_pref_get_language($data['handler_id']));
    $p_visible_bug_data = $data;
    $p_visible_bug_data['email_project'] = project_get_name($data['project_id']);
    $p_visible_bug_data['email_category'] = category_get_name($data['category_id']);
    $t_email_separator1 = config_get('email_separator1');
    $t_email_separator2 = config_get('email_separator2');
    $p_visible_bug_data['email_bug'] = $data['id'];
    $p_visible_bug_data['email_status'] = get_enum_element('status', $p_visible_bug_data['status'], $data['handler_id'], $data['project_id']);
    $p_visible_bug_data['email_severity'] = get_enum_element('severity', $p_visible_bug_data['severity']);
    $p_visible_bug_data['email_priority'] = get_enum_element('priority', $p_visible_bug_data['priority']);
    $p_visible_bug_data['email_reproducibility'] = get_enum_element('reproducibility', $p_visible_bug_data['reproducibility']);
    $p_visible_bug_data['email_summary'] = $data['summary'];
    $t_message = $t_email_separator1 . " \n";
    $t_message .= string_get_bug_view_url_with_fqdn($data['id'], $data['handler_id']) . " \n";
    $t_message .= $t_email_separator1 . " \n";
    $t_message .= email_format_attribute($p_visible_bug_data, 'email_project');
    $t_message .= email_format_attribute($p_visible_bug_data, 'email_bug');
    $t_message .= email_format_attribute($p_visible_bug_data, 'email_category');
    $t_message .= email_format_attribute($p_visible_bug_data, 'email_priority');
    $t_message .= email_format_attribute($p_visible_bug_data, 'email_status');
    $t_message .= $t_email_separator1 . " \n";
    $t_message .= email_format_attribute($p_visible_bug_data, 'email_summary');
    $t_message .= $t_email_separator1 . " \n\n\n";
    return $t_message;
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:27,代码来源:bug_reminder_mail.php


示例4: email_user_mention

/**
 * Send a notification to user or set of users that were mentioned in an issue
 * or an issue note.
 *
 * @param integer       $p_bug_id     Issue for which the reminder is sent.
 * @param array         $p_mention_user_ids User id or list of user ids array.
 * @param string        $p_message    Optional message to add to the e-mail.
 * @param array         $p_removed_mention_user_ids  The users that were removed due to lack of access.
 * @return array List of users ids to whom the reminder e-mail was actually sent
 */
function email_user_mention($p_bug_id, $p_mention_user_ids, $p_message, $p_removed_mention_user_ids = array())
{
    if (OFF == config_get('enable_email_notification')) {
        log_event(LOG_EMAIL_VERBOSE, 'email notifications disabled.');
        return array();
    }
    $t_project_id = bug_get_field($p_bug_id, 'project_id');
    $t_sender_id = auth_get_current_user_id();
    $t_sender = user_get_name($t_sender_id);
    $t_subject = email_build_subject($p_bug_id);
    $t_date = date(config_get('normal_date_format'));
    $t_user_id = auth_get_current_user_id();
    $t_users_processed = array();
    foreach ($p_removed_mention_user_ids as $t_removed_mention_user_id) {
        log_event(LOG_EMAIL_VERBOSE, 'skipped mention email for U' . $t_removed_mention_user_id . ' (no access to issue or note).');
    }
    $t_result = array();
    foreach ($p_mention_user_ids as $t_mention_user_id) {
        # Don't trigger mention emails for self mentions
        if ($t_mention_user_id == $t_user_id) {
            log_event(LOG_EMAIL_VERBOSE, 'skipped mention email for U' . $t_mention_user_id . ' (self-mention).');
            continue;
        }
        # Don't process a user more than once
        if (isset($t_users_processed[$t_mention_user_id])) {
            continue;
        }
        $t_users_processed[$t_mention_user_id] = true;
        # Don't email mention notifications to disabled users.
        if (!user_is_enabled($t_mention_user_id)) {
            continue;
        }
        lang_push(user_pref_get_language($t_mention_user_id, $t_project_id));
        $t_email = user_get_email($t_mention_user_id);
        if (access_has_project_level(config_get('show_user_email_threshold'), $t_project_id, $t_mention_user_id)) {
            $t_sender_email = ' <' . user_get_email($t_sender_id) . '> ';
        } else {
            $t_sender_email = '';
        }
        $t_complete_subject = sprintf(lang_get('mentioned_in'), $t_subject);
        $t_header = "\n" . lang_get('on_date') . ' ' . $t_date . ', ' . $t_sender . ' ' . $t_sender_email . lang_get('mentioned_you') . "\n\n";
        $t_contents = $t_header . string_get_bug_view_url_with_fqdn($p_bug_id) . " \n\n" . $p_message;
        $t_id = email_store($t_email, $t_complete_subject, $t_contents);
        if ($t_id !== null) {
            $t_result[] = $t_mention_user_id;
        }
        log_event(LOG_EMAIL_VERBOSE, 'queued mention email ' . $t_id . ' for U' . $t_mention_user_id);
        lang_pop();
    }
    return $t_result;
}
开发者ID:spring,项目名称:spring-website,代码行数:61,代码来源:email_api.php


示例5: date_default_timezone_set

require_once AGILEMANTIS_CORE_URI . 'config_api.php';
$_COOKIE[$g_cookie_prefix . '_STRING_COOKIE'] = $_POST['cookie_string'];
// Zugriff auf die Mantis Funktionen
//require_once ($mantisPath . 'core.php');
// Lade die Konfigurationsdatei und stelle die Datenbankverbindung her
// Zugriff auf die agileMantis Funktionen
if ($_POST['timezone']) {
    date_default_timezone_set($_POST['timezone']);
}
ob_end_clean();
if ($_POST['user']) {
    $sitekey = $agilemantis_tasks->getConfigValue('plugin_agileMantis_gadiv_sitekey');
    $heute = mktime(0, 0, 0, date('m'), date('d'), date('y'));
    $generatedKey = md5($sitekey . $heute);
    $user_id = $_POST['user'];
    $language = user_pref_get_language($user_id);
    lang_load($language, $mantisBtPath . 'plugins' . DIRECTORY_SEPARATOR . 'agileMantis' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR);
    lang_push($language);
    // Load language stuff
    if ($language == 'german') {
        require_once $mantisBtPath . 'lang' . DIRECTORY_SEPARATOR . 'strings_german.txt';
        require_once $mantisBtPath . 'plugins' . DIRECTORY_SEPARATOR . 'agileMantis' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . 'strings_german.txt';
    } else {
        require_once $mantisBtPath . 'lang' . DIRECTORY_SEPARATOR . 'strings_english.txt';
        require_once $mantisBtPath . 'plugins' . DIRECTORY_SEPARATOR . 'agileMantis' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . 'strings_english.txt';
    }
    if ($_POST['event'] == 'checkIdentity') {
        if ($generatedKey == $_POST['appletkey']) {
            echo true;
        } else {
            echo false;
开发者ID:CarlosPinedaT,项目名称:agileMantis,代码行数:31,代码来源:schnittstelle.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP user_pref_get_pref函数代码示例发布时间:2022-05-23
下一篇:
PHP user_pref_get函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap