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

PHP get_user_avatar_url函数代码示例

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

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



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

示例1: get_subscribed_topic_func

function get_subscribed_topic_func()
{
    global $config, $db, $user, $auth, $mobiquo_config;
    // Only registered users can go beyond this point
    if (!$user->data['is_registered']) {
        return get_error(9);
    }
    $topic_list = array();
    if ($config['allow_topic_notify']) {
        $forbidden_forums = $auth->acl_getf('!f_read', true);
        $forbidden_forums = array_unique(array_keys($forbidden_forums));
        if (isset($mobiquo_config['hide_forum_id'])) {
            $forbidden_forums = array_unique(array_merge($forbidden_forums, $mobiquo_config['hide_forum_id']));
        }
        $sql_array = array('SELECT' => 't.*, 
                            f.forum_name,
                            u.user_avatar,
                            u.user_avatar_type', 'FROM' => array(TOPICS_WATCH_TABLE => 'tw', TOPICS_TABLE => 't', USERS_TABLE => 'u'), 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . '
                AND t.topic_id = tw.topic_id
                AND u.user_id = t.topic_last_poster_id
                AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true), 'ORDER_BY' => 't.topic_last_post_time DESC');
        $sql_array['LEFT_JOIN'] = array();
        $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 't.forum_id = f.forum_id');
        if ($config['allow_bookmarks']) {
            $sql_array['SELECT'] .= ', bm.topic_id as bookmarked';
            $sql_array['LEFT_JOIN'][] = array('FROM' => array(BOOKMARKS_TABLE => 'bm'), 'ON' => 'bm.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = bm.topic_id');
        }
        $sql = $db->sql_build_query('SELECT', $sql_array);
        $result = $db->sql_query_limit($sql, 20);
        $topic_list = array();
        while ($row = $db->sql_fetchrow($result)) {
            $forum_id = $row['forum_id'];
            $topic_id = isset($row['b_topic_id']) ? $row['b_topic_id'] : $row['topic_id'];
            // Replies
            $replies = $auth->acl_get('m_approve', $forum_id) ? $row['topic_replies_real'] : $row['topic_replies'];
            if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id'])) {
                $topic_id = $row['topic_moved_id'];
            }
            // Get folder img, topic status/type related information
            $folder_img = $folder_alt = $topic_type = '';
            topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
            $short_content = get_short_content($row['topic_last_post_id']);
            if ($forum_id) {
                $topic_tracking = get_complete_topic_tracking($forum_id, $topic_id);
                $new_post = $topic_tracking[$topic_id] < $row['topic_last_post_time'] ? true : false;
            } else {
                $new_post = false;
            }
            $user_avatar_url = get_user_avatar_url($row['user_avatar'], $row['user_avatar_type']);
            $allow_change_type = $auth->acl_get('m_', $forum_id) || $user->data['is_registered'] && $user->data['user_id'] == $row['topic_poster'] ? true : false;
            $xmlrpc_topic = new xmlrpcval(array('forum_id' => new xmlrpcval($forum_id), 'forum_name' => new xmlrpcval(html_entity_decode($row['forum_name']), 'base64'), 'topic_id' => new xmlrpcval($topic_id), 'topic_title' => new xmlrpcval(html_entity_decode(strip_tags(censor_text($row['topic_title']))), 'base64'), 'reply_number' => new xmlrpcval(intval($replies), 'int'), 'view_number' => new xmlrpcval(intval($row['topic_views']), 'int'), 'short_content' => new xmlrpcval($short_content, 'base64'), 'post_author_id' => new xmlrpcval($row['topic_last_poster_id']), 'post_author_name' => new xmlrpcval(html_entity_decode($row['topic_last_poster_name']), 'base64'), 'new_post' => new xmlrpcval($new_post, 'boolean'), 'post_time' => new xmlrpcval(mobiquo_iso8601_encode($row['topic_last_post_time']), 'dateTime.iso8601'), 'icon_url' => new xmlrpcval($user_avatar_url), 'can_delete' => new xmlrpcval($auth->acl_get('m_delete', $forum_id), 'boolean'), 'can_bookmark' => new xmlrpcval($user->data['is_registered'] && $config['allow_bookmarks'], 'boolean'), 'isbookmarked' => new xmlrpcval($row['bookmarked'] ? true : false, 'boolean'), 'can_close' => new xmlrpcval($auth->acl_get('m_lock', $forum_id) || $auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $row['topic_poster'], 'boolean'), 'is_closed' => new xmlrpcval($row['topic_status'] == ITEM_LOCKED, 'boolean'), 'can_stick' => new xmlrpcval($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $row['topic_type'] != POST_STICKY, 'boolean')), 'struct');
            $topic_list[] = $xmlrpc_topic;
        }
        $db->sql_freeresult($result);
    }
    $topic_num = count($topic_list);
    $response = new xmlrpcval(array('total_topic_num' => new xmlrpcval($topic_num, 'int'), 'topics' => new xmlrpcval($topic_list, 'array')), 'struct');
    return new xmlrpcresp($response);
}
开发者ID:patrickrolanddg,项目名称:dragonfly-tapatalk,代码行数:59,代码来源:get_subscribed_topic.php


示例2: login_func

function login_func($xmlrpc_params)
{
    global $auth, $user, $config, $db, $phpbb_root_path, $phpEx;
    $params = php_xmlrpc_decode($xmlrpc_params);
    $user->setup('ucp');
    $username = $params[0];
    $password = $params[1];
    $viewonline = isset($params[2]) ? !$params[2] : 1;
    set_var($username, $username, 'string', true);
    set_var($password, $password, 'string', true);
    header('Set-Cookie: mobiquo_a=0');
    header('Set-Cookie: mobiquo_b=0');
    header('Set-Cookie: mobiquo_c=0');
    $login_result = $auth->login($username, $password, true, $viewonline);
    $usergroup_id = array();
    if ($login_result['status'] == LOGIN_SUCCESS) {
        $auth->acl($user->data);
        //add tapatalk_users here,for push service
        if ($params[3] == '1' && push_table_exists()) {
            global $table_prefix;
            $sql = "SELECT * FROM " . $table_prefix . "tapatalk_users where userid = '" . $user->data['user_id'] . "'";
            $result = $db->sql_query($sql);
            $userInfo = $db->sql_fetchrow($result);
            $db->sql_freeresult($result);
            $time = time();
            if (empty($userInfo)) {
                $sql_data[$table_prefix . "tapatalk_users"]['sql'] = array('userid' => $user->data['user_id'], 'announcement' => 1, 'pm' => 1, 'subscribe' => 1, 'quote' => 1, 'tag' => 1, 'newtopic' => 1, 'updated' => time());
                $sql = 'INSERT INTO ' . $table_prefix . "tapatalk_users" . ' ' . $db->sql_build_array('INSERT', $sql_data[$table_prefix . "tapatalk_users"]['sql']);
                $db->sql_query($sql);
            } else {
                $sql = "UPDATE " . $table_prefix . "tapatalk_users \n\t        \tSET updated= '" . time() . "' WHERE userid='" . $user->data['user_id'] . "'";
                $db->sql_query($sql);
            }
        }
        // Compatibility with mod NV who was here
        if (file_exists($phpbb_root_path . 'includes/mods/who_was_here.' . $phpEx)) {
            include_once $phpbb_root_path . 'includes/mods/who_was_here.' . $phpEx;
            if (class_exists('phpbb_mods_who_was_here') && method_exists('phpbb_mods_who_was_here', 'update_session')) {
                @phpbb_mods_who_was_here::update_session();
            }
        }
    } else {
        $error_msg = str_replace('%s', '', strip_tags($user->lang[$login_result['error_msg']]));
        return new xmlrpcresp(new xmlrpcval(array('result' => new xmlrpcval(false, 'boolean'), 'result_text' => new xmlrpcval($error_msg, 'base64')), 'struct'));
    }
    if ($config['max_attachments'] == 0) {
        $config['max_attachments'] = 100;
    }
    $usergroup_id[] = new xmlrpcval($user->data['group_id']);
    $can_readpm = $config['allow_privmsg'] && $auth->acl_get('u_readpm') && ($user->data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'));
    $can_sendpm = $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user->data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'));
    $can_upload = $config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && (function_exists('phpbb_is_writable') ? phpbb_is_writable($phpbb_root_path . $config['avatar_path']) : 1) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
    $can_search = $auth->acl_get('u_search') && $auth->acl_getf_global('f_search') && $config['load_search'];
    $can_whosonline = $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel');
    $max_filesize = $config['max_filesize'] === '0' || $config['max_filesize'] > 10485760 ? 10485760 : $config['max_filesize'];
    $response = new xmlrpcval(array('result' => new xmlrpcval(true, 'boolean'), 'user_id' => new xmlrpcval($user->data['user_id'], 'string'), 'username' => new xmlrpcval($user->data['username'], 'base64'), 'usergroup_id' => new xmlrpcval($usergroup_id, 'array'), 'icon_url' => new xmlrpcval(get_user_avatar_url($user->data['user_avatar'], $user->data['user_avatar_type']), 'string'), 'post_count' => new xmlrpcval($user->data['user_posts'], 'int'), 'can_pm' => new xmlrpcval($can_readpm, 'boolean'), 'can_send_pm' => new xmlrpcval($can_sendpm, 'boolean'), 'can_moderate' => new xmlrpcval($auth->acl_get('m_') || $auth->acl_getf_global('m_'), 'boolean'), 'max_attachment' => new xmlrpcval($config['max_attachments'], 'int'), 'max_png_size' => new xmlrpcval($max_filesize, 'int'), 'max_jpg_size' => new xmlrpcval($max_filesize, 'int'), 'can_search' => new xmlrpcval($can_search, 'boolean'), 'can_whosonline' => new xmlrpcval($can_whosonline, 'boolean'), 'can_upload_avatar' => new xmlrpcval($can_upload, 'boolean')), 'struct');
    return new xmlrpcresp($response);
}
开发者ID:autonomous1,项目名称:tapatalk-phpbb3,代码行数:58,代码来源:login.php


示例3: search_user_func

function search_user_func()
{
    global $user, $config, $auth, $db, $phpbb_root_path;
    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup(array('memberlist', 'groups'));
    if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) {
        if ($user->data['user_id'] != ANONYMOUS) {
            trigger_error('NO_VIEW_USERS');
        }
        trigger_error('LOGIN_EXPLAIN_MEMBERLIST');
    }
    if ($config['load_search'] || $auth->acl_get('a_')) {
        $username = request_var('username', '', true);
        $email = strtolower(request_var('email', ''));
        $sql_where .= $username ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
        $sql_where .= $auth->acl_get('a_user') && $email ? ' OR u.user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
    } else {
        trigger_error('NO_VIEW_USERS');
    }
    $page = request_var('page', 1);
    $per_page = request_var('perpage', 20);
    $start = ($page - 1) * $per_page;
    $default_key = 'c';
    $sort_key = request_var('sk', $default_key);
    $sort_dir = request_var('sd', 'a');
    $sort_key_sql = array('a' => 'u.username_clean', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber');
    // Sorting and order
    if (!isset($sort_key_sql[$sort_key])) {
        $sort_key = $default_key;
    }
    $order_by .= $sort_key_sql[$sort_key] . ' ' . ($sort_dir == 'a' ? 'ASC' : 'DESC');
    // Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly
    if ($sort_key == 'm') {
        $order_by .= ', u.user_posts DESC';
    }
    // Count the users ...
    if ($sql_where) {
        $sql = 'SELECT COUNT(u.user_id) AS total_users
			FROM ' . USERS_TABLE . " u\r\r\n\t\t\tWHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")\r\r\n\t\t\t{$sql_where}";
        $result = $db->sql_query($sql);
        $total_users = (int) $db->sql_fetchfield('total_users');
        $db->sql_freeresult($result);
    } else {
        $total_users = $config['num_users'];
    }
    // Get us some users :D
    $sql = "SELECT u.*\r\r\n\t\tFROM " . USERS_TABLE . " u\r\r\n\t\tWHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")\r\r\n\t\t\t{$sql_where}\r\r\n\t\tORDER BY {$order_by}";
    $result = $db->sql_query_limit($sql, $per_page, $start);
    $user_list = array();
    while ($row = $db->sql_fetchrow($result)) {
        $return_user_lists[] = new xmlrpcval(array('username' => new xmlrpcval(basic_clean($row['username']), 'base64'), 'user_id' => new xmlrpcval($row['user_id'], 'string'), 'icon_url' => new xmlrpcval(get_user_avatar_url($row['user_avatar'], $row['user_avatar_type']), 'string')), 'struct');
    }
    $db->sql_freeresult($result);
    $suggested_users = new xmlrpcval(array('total' => new xmlrpcval($total_users, 'int'), 'list' => new xmlrpcval($return_user_lists, 'array')), 'struct');
    return new xmlrpcresp($suggested_users);
}
开发者ID:danielgospodinow,项目名称:GamingZone,代码行数:58,代码来源:search_user.php


示例4: prefetch_account_func

function prefetch_account_func()
{
    global $db;
    $user = tt_get_user_by_email(trim($_POST['email']));
    if (empty($user['user_id'])) {
        trigger_error("Can't find the user");
    }
    $result = array('result' => new xmlrpcval(true, 'boolean'), 'result_text' => new xmlrpcval('', 'base64'), 'user_id' => new xmlrpcval($user['user_id'], 'string'), 'login_name' => new xmlrpcval(basic_clean($user['username']), 'base64'), 'display_name' => new xmlrpcval(basic_clean($user['username']), 'base64'), 'avatar' => new xmlrpcval(get_user_avatar_url($user['user_avatar'], $user['user_avatar_type']), 'string'));
    return new xmlrpcresp(new xmlrpcval($result, 'struct'));
}
开发者ID:danielgospodinow,项目名称:GamingZone,代码行数:10,代码来源:prefetch_account.php


示例5: build_evobar_menu


//.........这里部分代码省略.........
                 $debug_text .= 'do index';
             }
             $entries['tools']['entries']['noindex'] = array('text' => $debug_text, 'disabled' => true);
             $entries['tools']['entries'][''] = array('separator' => true);
         }
         if ($current_User->check_perm('users', 'view')) {
             // Users:
             $entries['tools']['disabled'] = false;
             $entries['tools']['entries']['users'] = array('text' => T_('Users') . '&hellip;', 'href' => $admin_url . '?ctrl=users');
         }
         // PLACE HOLDER FOR MESSAGING MODULE:
         $entries['tools']['entries']['messaging'] = NULL;
         // PLACE HOLDER FOR FILES MODULE:
         $entries['tools']['entries']['files'] = NULL;
         $perm_spam = $current_User->check_perm('spamblacklist', 'view');
         $perm_options = $current_User->check_perm('options', 'view');
         $perm_emails = $current_User->check_perm('emails', 'view');
         $perm_slugs = $current_User->check_perm('slugs', 'view');
         $perm_maintenance = $current_User->check_perm('perm_maintenance', 'upgrade');
         if ($perm_spam || $perm_options || $perm_slugs || $perm_maintenance) {
             if ($perm_emails) {
                 $entries['tools']['entries']['email'] = array('text' => T_('Emails'), 'href' => $admin_url . '?ctrl=email', 'entries' => array('blocked' => array('text' => T_('Addresses') . '&hellip;', 'href' => $admin_url . '?ctrl=email'), 'sent' => array('text' => T_('Sent') . '&hellip;', 'href' => $admin_url . '?ctrl=email&amp;tab=sent'), 'return' => array('text' => T_('Returned') . '&hellip;', 'href' => $admin_url . '?ctrl=email&amp;tab=return'), 'settings' => array('text' => T_('Settings') . '&hellip;', 'href' => $admin_url . '?ctrl=email&amp;tab=settings')));
             }
             $entries['tools']['disabled'] = false;
             $entries['tools']['entries']['tools_sep'] = array('separator' => true);
             if ($perm_options) {
                 $entries['tools']['entries']['status'] = array('text' => T_('System status') . '&hellip;', 'href' => $admin_url . '?ctrl=system');
             }
             if ($perm_options) {
                 $entries['tools']['entries']['crontab'] = array('text' => T_('Scheduler') . '&hellip;', 'href' => $admin_url . '?ctrl=crontab');
             }
             if ($perm_spam) {
                 $entries['tools']['entries']['antispam'] = array('text' => T_('Antispam'), 'href' => $admin_url . '?ctrl=antispam', 'entries' => array('blacklist' => array('text' => T_('Blacklist') . '&hellip;', 'href' => $admin_url . '?ctrl=antispam')));
                 if ($perm_options) {
                     // If we have access to options, then we add a submenu:
                     $entries['tools']['entries']['antispam']['entries']['ipranges'] = array('text' => T_('IP Ranges') . '&hellip;', 'href' => $admin_url . '?ctrl=antispam&amp;tab3=ipranges');
                     $entries['tools']['entries']['antispam']['entries']['settings'] = array('text' => T_('Settings') . '&hellip;', 'href' => $admin_url . '?ctrl=antispam&amp;tab3=settings');
                     if ($current_User->check_perm('options', 'edit')) {
                         $entries['tools']['entries']['antispam']['entries']['tools'] = array('text' => T_('Tools') . '&hellip;', 'href' => $admin_url . '?ctrl=antispam&amp;tab3=tools');
                     }
                 }
             }
             if ($perm_slugs) {
                 $entries['tools']['entries']['slugs'] = array('text' => T_('Slugs') . '&hellip;', 'href' => $admin_url . '?ctrl=slugs');
             }
         }
         if ($perm_options) {
             // Global settings:
             $entries['tools']['entries']['general'] = array('text' => T_('General') . '&hellip;', 'href' => $admin_url . '?ctrl=gensettings');
             $entries['tools']['entries']['regional'] = array('text' => T_('Regional'), 'href' => $admin_url . '?ctrl=regional', 'entries' => array('locales' => array('text' => T_('Locales') . '&hellip;', 'href' => $admin_url . '?ctrl=locales'), 'time' => array('text' => T_('Time') . '&hellip;', 'href' => $admin_url . '?ctrl=time'), 'countries' => array('text' => T_('Countries') . '&hellip;', 'href' => $admin_url . '?ctrl=countries'), 'regions' => array('text' => T_('Regions') . '&hellip;', 'href' => $admin_url . '?ctrl=regions'), 'subregions' => array('text' => T_('Sub-regions') . '&hellip;', 'href' => $admin_url . '?ctrl=subregions'), 'cities' => array('text' => T_('Cities') . '&hellip;', 'href' => $admin_url . '?ctrl=cities'), 'currencies' => array('text' => T_('Currencies') . '&hellip;', 'href' => $admin_url . '?ctrl=currencies')));
             $entries['tools']['entries']['plugins'] = array('text' => T_('Plugins') . '&hellip;', 'href' => $admin_url . '?ctrl=plugins');
             $entries['tools']['entries']['remote'] = array('text' => T_('Remote publishing') . '&hellip;', 'href' => $admin_url . '?ctrl=remotepublish');
             $entries['tools']['entries']['maintenance'] = array('text' => T_('Maintenance'), 'href' => $admin_url . '?ctrl=tools', 'entries' => array('tools' => array('text' => T_('Tools') . '&hellip;', 'href' => $admin_url . '?ctrl=tools'), 'import' => array('text' => T_('Import') . '&hellip;', 'href' => $admin_url . '?ctrl=tools&amp;tab3=import'), 'test' => array('text' => T_('Testing') . '&hellip;', 'href' => $admin_url . '?ctrl=tools&amp;tab3=test'), 'backup' => array('text' => T_('Backup') . '&hellip;', 'href' => $admin_url . '?ctrl=backup'), 'upgrade' => array('text' => T_('Check for updates') . '&hellip;', 'href' => $admin_url . '?ctrl=upgrade')));
         }
     }
     global $debug, $debug_jslog;
     if ($debug || $debug_jslog) {
         // Show JS log menu if debug is enabled
         $entries['jslog'] = array('text' => T_('JS log'), 'title' => T_('JS log'), 'class' => 'jslog_switcher');
     }
     if ($entries !== NULL) {
         $topleft_Menu->add_menu_entries(NULL, $entries);
     }
     // ---------------------------------------------------------------------------
     /*
      * RIGHT MENU
      */
     global $localtimenow, $is_admin_page;
     $entries = array('userprefs' => array('text' => $current_User->get_avatar_imgtag('crop-top-15x15', '', 'top') . ' <strong>' . $current_User->get_colored_login() . '</strong>', 'href' => get_user_profile_url(), 'entries' => array('profile' => array('text' => T_('Edit your profile') . '&hellip;', 'href' => get_user_profile_url()), 'avatar' => array('text' => T_('Your profile picture') . '&hellip;', 'href' => get_user_avatar_url()), 'pwdchange' => array('text' => T_('Change password') . '&hellip;', 'href' => get_user_pwdchange_url()), 'userprefs' => array('text' => T_('Preferences') . '&hellip;', 'href' => get_user_preferences_url()), 'subs' => array('text' => T_('Notifications') . '&hellip;', 'href' => get_user_subs_url()))), 'time' => array('text' => date(locale_shorttimefmt(), $localtimenow), 'disabled' => true, 'class' => 'noborder'));
     // ADMIN SKINS:
     if ($is_admin_page) {
         $admin_skins = get_admin_skins();
         if (count($admin_skins) > 1) {
             // We have several admin skins available: display switcher:
             $entries['userprefs']['entries']['admskins_sep'] = array('separator' => true);
             $entries['userprefs']['entries']['admskins'] = array('text' => T_('Admin skin'));
             $redirect_to = rawurlencode(regenerate_url('', '', '', '&'));
             foreach ($admin_skins as $admin_skin) {
                 $entries['userprefs']['entries']['admskins']['entries'][$admin_skin] = array('text' => $admin_skin, 'href' => $dispatcher . '?ctrl=users&amp;action=change_admin_skin&amp;new_admin_skin=' . rawurlencode($admin_skin) . '&amp;redirect_to=' . $redirect_to);
             }
         }
     }
     $entries['userprefs']['entries']['logout_sep'] = array('separator' => true);
     $entries['userprefs']['entries']['logout'] = array('text' => T_('Logout'), 'href' => get_user_logout_url());
     // AB switch:
     if ($perm_admin_normal) {
         // User must have permission to access admin...
         if ($is_admin_page) {
             if (!empty($Blog)) {
                 $entries['abswitch'] = array('text' => T_('Blog') . ' ' . get_icon('switch-to-blog'), 'href' => $Blog->get('url'));
             } else {
                 $entries['abswitch'] = array('text' => T_('Home') . ' ' . get_icon('switch-to-blog'), 'href' => $home_url);
             }
         } else {
             $entries['abswitch'] = array('text' => T_('Admin') . ' ' . get_icon('switch-to-admin'), 'href' => $admin_url);
         }
     }
     $topright_Menu->add_menu_entries(NULL, $entries);
     $topright_Menu->add_menu_entries(NULL, array('logout' => array('text' => T_('Logout') . ' ' . get_icon('close'), 'class' => 'rollover_sprite', 'href' => get_user_logout_url())));
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:101,代码来源:__core.init.php


示例6: reply_post_func


//.........这里部分代码省略.........
            trigger_error(sprintf($user->lang['IP_BLACKLISTED'], $user->ip, $dnsbl[1]));
        }
    }
    // Store message, sync counters
    $data = array('topic_title' => empty($post_data['topic_title']) ? $post_data['post_subject'] : $post_data['topic_title'], 'topic_first_post_id' => isset($post_data['topic_first_post_id']) ? (int) $post_data['topic_first_post_id'] : 0, 'topic_last_post_id' => isset($post_data['topic_last_post_id']) ? (int) $post_data['topic_last_post_id'] : 0, 'topic_time_limit' => (int) $post_data['topic_time_limit'], 'topic_attachment' => isset($post_data['topic_attachment']) ? (int) $post_data['topic_attachment'] : 0, 'post_id' => 0, 'topic_id' => (int) $topic_id, 'forum_id' => (int) $forum_id, 'icon_id' => (int) $post_data['icon_id'], 'poster_id' => (int) $post_data['poster_id'], 'enable_sig' => (bool) $post_data['enable_sig'], 'enable_bbcode' => (bool) $post_data['enable_bbcode'], 'enable_smilies' => (bool) $post_data['enable_smilies'], 'enable_urls' => (bool) $post_data['enable_urls'], 'enable_indexing' => (bool) $post_data['enable_indexing'], 'message_md5' => (string) $message_md5, 'post_time' => isset($post_data['post_time']) ? (int) $post_data['post_time'] : $current_time, 'post_checksum' => isset($post_data['post_checksum']) ? (string) $post_data['post_checksum'] : '', 'post_edit_reason' => $post_data['post_edit_reason'], 'post_edit_user' => isset($post_data['post_edit_user']) ? (int) $post_data['post_edit_user'] : 0, 'forum_parents' => $post_data['forum_parents'], 'forum_name' => $post_data['forum_name'], 'notify' => $notify, 'notify_set' => $post_data['notify_set'], 'poster_ip' => isset($post_data['poster_ip']) ? $post_data['poster_ip'] : $user->ip, 'post_edit_locked' => (int) $post_data['post_edit_locked'], 'bbcode_bitfield' => $message_parser->bbcode_bitfield, 'bbcode_uid' => $message_parser->bbcode_uid, 'message' => $message_parser->message, 'attachment_data' => $message_parser->attachment_data, 'filename_data' => $message_parser->filename_data, 'topic_approved' => isset($post_data['topic_approved']) ? $post_data['topic_approved'] : false, 'post_approved' => isset($post_data['post_approved']) ? $post_data['post_approved'] : false, 'post_expire_time' => -1);
    include $phpbb_root_path . 'includes/functions_posting.' . $phpEx;
    $update_message = true;
    $cwd = getcwd();
    chdir('../');
    $phpbb_root_path_tmp = $phpbb_root_path;
    $phpbb_root_path = './';
    $redirect_url = submit_post('reply', $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message);
    chdir($cwd);
    $phpbb_root_path = $phpbb_root_path_tmp;
    // Check the permissions for post approval, as well as the queue trigger where users are put on approval with a post count lower than specified. Moderators are not affected.
    $approved = true;
    if (($config['enable_queue_trigger'] && $user->data['user_posts'] < $config['queue_trigger_posts'] || !$auth->acl_get('f_noapprove', $data['forum_id'])) && !$auth->acl_get('m_approve', $data['forum_id'])) {
        $approved = false;
    }
    $reply_success = false;
    $post_id = '';
    if ($redirect_url) {
        preg_match('/&amp;p=(\\d+)/', $redirect_url, $matches);
        $post_id = $matches[1];
        $reply_success = true;
        // get new post_content
        $message = censor_text($data['message']);
        $quote_wrote_string = $user->lang['WROTE'];
        $message = str_replace('[/quote:' . $data['bbcode_uid'] . ']', '[/quote]', $message);
        $message = preg_replace('/\\[quote(?:=&quot;(.*?)&quot;)?:' . $data['bbcode_uid'] . '\\]/ise', "'[quote]' . ('\$1' ? '\$1' . ' {$quote_wrote_string}:\n' : '\n')", $message);
        $blocks = preg_split('/(\\[\\/?quote\\])/i', $message, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
        $quote_level = 0;
        $message = '';
        foreach ($blocks as $block) {
            if ($block == '[quote]') {
                if ($quote_level == 0) {
                    $message .= $block;
                }
                $quote_level++;
            } else {
                if ($block == '[/quote]') {
                    if ($quote_level <= 1) {
                        $message .= $block;
                    }
                    if ($quote_level >= 1) {
                        $quote_level--;
                    }
                } else {
                    if ($quote_level <= 1) {
                        $message .= $block;
                    }
                }
            }
        }
        $message = preg_replace('/\\[(youtube|video|googlevideo|gvideo):' . $data['bbcode_uid'] . '\\](.*?)\\[\\/\\1:' . $data['bbcode_uid'] . '\\]/sie', "video_bbcode_format('\$1', '\$2')", $message);
        $message = preg_replace('/\\[(BBvideo)[\\d, ]+:' . $row['bbcode_uid'] . '\\](.*?)\\[\\/\\1:' . $row['bbcode_uid'] . '\\]/si', "[url=\$2]YouTube Video[/url]", $message);
        $message = preg_replace('/\\[(spoil|spoiler):' . $row['bbcode_uid'] . '\\](.*?)\\[\\/\\1:' . $row['bbcode_uid'] . '\\]/si', "[spoiler]\$2[/spoiler]", $message);
        $message = preg_replace('/\\[b:' . $data['bbcode_uid'] . '\\](.*?)\\[\\/b:' . $data['bbcode_uid'] . '\\]/si', '[b]$1[/b]', $message);
        $message = preg_replace('/\\[i:' . $data['bbcode_uid'] . '\\](.*?)\\[\\/i:' . $data['bbcode_uid'] . '\\]/si', '[i]$1[/i]', $message);
        $message = preg_replace('/\\[u:' . $data['bbcode_uid'] . '\\](.*?)\\[\\/u:' . $data['bbcode_uid'] . '\\]/si', '[u]$1[/u]', $message);
        $message = preg_replace('/\\[color=#(\\w{6}):' . $data['bbcode_uid'] . '\\](.*?)\\[\\/color:' . $data['bbcode_uid'] . '\\]/si', '[color=#$1]$2[/color]', $message);
        // Second parse bbcode here
        if ($data['bbcode_bitfield']) {
            $bbcode = new bbcode(base64_encode($data['bbcode_bitfield']));
            $bbcode->bbcode_second_pass($message, $data['bbcode_uid'], $data['bbcode_bitfield']);
        }
        $message = bbcode_nl2br($message);
        $message = smiley_text($message);
        if (!empty($data['attachment_data'])) {
            parse_attachments($forum_id, $message, $data['attachment_data'], $update_count);
        }
        $updated_post_title = html_entity_decode(strip_tags(censor_text($data['topic_title'])), ENT_QUOTES, 'UTF-8');
        $edit_allowed = $auth->acl_get('m_edit', $forum_id) || $auth->acl_get('f_edit', $forum_id) && !$data['post_edit_locked'] && ($data['post_time'] > time() - $config['edit_time'] * 60 || !$config['edit_time']);
        $delete_allowed = $auth->acl_get('m_delete', $forum_id) || $auth->acl_get('f_delete', $forum_id) && ($data['post_time'] > time() - $config['delete_time'] * 60 || !$config['delete_time']) && !$data['post_edit_locked'];
        $attachments = array();
        if (sizeof($attach_list) && sizeof($data['attachment_data'])) {
            $sql = 'SELECT *
                FROM ' . ATTACHMENTS_TABLE . '
                WHERE ' . $db->sql_in_set('attach_id', $attach_list) . '
                    AND in_message = 0
                ORDER BY filetime DESC';
            $result = $db->sql_query($sql);
            while ($row = $db->sql_fetchrow($result)) {
                $attachment_by_id[$row['attach_id']] = $row;
            }
            $db->sql_freeresult($result);
            foreach ($data['attachment_data'] as $attachment) {
                if (preg_match('/<img src=\\".*?(\\/download\\/file.php\\?id=(\\d+).*?)\\"/is', $attachment, $matches)) {
                    $file_url = html_entity_decode($phpbb_home . $matches[1]);
                    $attach_id = $matches[2];
                    unset($matches);
                    $xmlrpc_attachment = new xmlrpcval(array('filename' => new xmlrpcval($attachment_by_id[$attach_id]['real_filename'], 'base64'), 'filesize' => new xmlrpcval($attachment_by_id[$attach_id]['filesize'], 'int'), 'content_type' => new xmlrpcval('image'), 'thumbnail_url' => new xmlrpcval(''), 'url' => new xmlrpcval($file_url)), 'struct');
                    $attachments[] = $xmlrpc_attachment;
                }
            }
        }
    }
    $xmlrpc_reply_topic = new xmlrpcval(array('result' => new xmlrpcval($reply_success, 'boolean'), 'post_id' => new xmlrpcval($post_id, 'string'), 'state' => new xmlrpcval($approved ? 0 : 1, 'int'), 'post_title' => new xmlrpcval($updated_post_title, 'base64'), 'post_content' => new xmlrpcval(post_html_clean($message), 'base64'), 'post_author_name' => new xmlrpcval(html_entity_decode($user->data['username']), 'base64'), 'is_online' => new xmlrpcval(true, 'boolean'), 'can_edit' => new xmlrpcval($edit_allowed, 'boolean'), 'icon_url' => new xmlrpcval($user->optionget('viewavatars') ? get_user_avatar_url($user->data['user_avatar'], $user->data['user_avatar_type']) : ''), 'post_time' => new xmlrpcval(mobiquo_iso8601_encode($current_time), 'dateTime.iso8601'), 'can_delete' => new xmlrpcval($delete_allowed, 'boolean'), 'allow_smilies' => new xmlrpcval($data['enable_smilies'] ? true : false, 'boolean'), 'attachments' => new xmlrpcval($attachments, 'array')), 'struct');
    return new xmlrpcresp($xmlrpc_reply_topic);
}
开发者ID:autonomous1,项目名称:tapatalk-phpbb3,代码行数:101,代码来源:reply_post.php


示例7: build_evobar_menu


//.........这里部分代码省略.........
         $perm_maintenance = $current_User->check_perm('perm_maintenance', 'upgrade');
         if ($perm_spam || $perm_options || $perm_maintenance) {
             $entries['tools']['entries'][] = array('separator' => true);
             if ($perm_emails) {
                 $entries['tools']['entries']['email'] = array('text' => T_('Emails'), 'href' => $admin_url . '?ctrl=campaigns', 'entries' => array('campaigns' => array('text' => T_('Campaigns') . '&hellip;', 'href' => $admin_url . '?ctrl=campaigns'), 'blocked' => array('text' => T_('Addresses') . '&hellip;', 'href' => $admin_url . '?ctrl=email'), 'sent' => array('text' => T_('Sent') . '&hellip;', 'href' => $admin_url . '?ctrl=email&amp;tab=sent'), 'return' => array('text' => T_('Returned') . '&hellip;', 'href' => $admin_url . '?ctrl=email&amp;tab=return'), 'settings' => array('text' => T_('Settings') . '&hellip;', 'href' => $admin_url . '?ctrl=email&amp;tab=settings')));
             }
             $entries['tools']['disabled'] = false;
             $entries['tools']['entries']['system'] = array('text' => T_('System'), 'href' => $admin_url . '?ctrl=system');
             if ($perm_options) {
                 $entries['tools']['entries']['system']['entries']['status'] = array('text' => T_('Status') . '&hellip;', 'href' => $admin_url . '?ctrl=system');
             }
             if ($perm_options) {
                 $entries['tools']['entries']['system']['entries']['crontab'] = array('text' => T_('Scheduler') . '&hellip;', 'href' => $admin_url . '?ctrl=crontab');
             }
             if ($perm_spam) {
                 $entries['tools']['entries']['system']['entries']['antispam'] = array('text' => T_('Antispam') . '&hellip;', 'href' => $admin_url . '?ctrl=antispam');
             }
         }
         if ($perm_options) {
             // Global settings:
             $entries['tools']['entries']['system']['entries']['regional'] = array('text' => T_('Regional') . '&hellip;', 'href' => $admin_url . '?ctrl=regional');
             $entries['tools']['entries']['system']['entries']['skins'] = array('text' => T_('Skins') . '&hellip;', 'href' => $admin_url . '?ctrl=skins&amp;tab=system');
             $entries['tools']['entries']['system']['entries']['plugins'] = array('text' => T_('Plugins') . '&hellip;', 'href' => $admin_url . '?ctrl=plugins');
             $entries['tools']['entries']['system']['entries']['remote'] = array('text' => T_('Remote publishing') . '&hellip;', 'href' => $admin_url . '?ctrl=remotepublish');
             $entries['tools']['entries']['system']['entries']['maintenance'] = array('text' => T_('Maintenance') . '&hellip;', 'href' => $admin_url . '?ctrl=tools');
             $entries['tools']['entries']['system']['entries']['syslog'] = array('text' => T_('System log'), 'href' => '?ctrl=syslog');
         }
     }
     if ($entries !== NULL) {
         $topleft_Menu->add_menu_entries(NULL, $entries);
     }
     // ---------------------------------------------------------------------------
     /*
      * RIGHT MENU
      */
     global $localtimenow, $is_admin_page;
     $entries = array();
     // Dev menu:
     global $debug_jslog;
     if ($debug || $debug_jslog) {
         // Show JS log menu if debug is enabled
         $dev_entries[] = array('separator' => true);
         $dev_entries['jslog'] = array('text' => T_('JS log'), 'title' => T_('JS log'), 'class' => 'jslog_switcher');
     }
     if (!empty($dev_entries)) {
         // Add Dev menu if at least one entry is should be displayed
         $entries['dev'] = array('href' => $admin_url . '#', 'text' => '<span class="fa fa-wrench"></span> Dev', 'entries' => $dev_entries);
     }
     // User menu:
     $current_user_Group = $current_User->get_Group();
     $userprefs_entries = array('name' => array('text' => $current_User->get_avatar_imgtag('crop-top-32x32', '', 'left') . '&nbsp;' . $current_User->get_preferred_name() . '<br />&nbsp;<span class="note">' . $current_user_Group->get_name() . '</span>', 'href' => get_user_profile_url()));
     $userprefs_entries[] = array('separator' => true);
     $user_profile_url = get_user_profile_url();
     if (!empty($user_profile_url)) {
         // Display this menu item only when url is available to current user
         $userprefs_entries['profile'] = array('text' => T_('Edit your profile') . '&hellip;', 'href' => $user_profile_url);
     }
     $user_avatar_url = get_user_avatar_url();
     if (!empty($user_avatar_url)) {
         // Display this menu item only when url is available to current user
         $userprefs_entries['avatar'] = array('text' => T_('Your profile picture') . '&hellip;', 'href' => $user_avatar_url);
     }
     $user_pwdchange_url = get_user_pwdchange_url();
     if (!empty($user_pwdchange_url)) {
         // Display this menu item only when url is available to current user
         $userprefs_entries['pwdchange'] = array('text' => T_('Change password') . '&hellip;', 'href' => $user_pwdchange_url);
     }
     $user_preferences_url = get_user_preferences_url();
     if (!empty($user_preferences_url)) {
         // Display this menu item only when url is available to current user
         $userprefs_entries['userprefs'] = array('text' => T_('Preferences') . '&hellip;', 'href' => $user_preferences_url);
     }
     $user_subs_url = get_user_subs_url();
     if (!empty($user_subs_url)) {
         // Display this menu item only when url is available to current user
         $userprefs_entries['subs'] = array('text' => T_('Notifications') . '&hellip;', 'href' => $user_subs_url);
     }
     $entries['userprefs'] = array('text' => '<strong>' . $current_User->get_colored_login(array('login_text' => 'name')) . '</strong>', 'href' => get_user_profile_url(), 'entries' => $userprefs_entries);
     $entries['time'] = array('text' => date(locale_shorttimefmt(), $localtimenow), 'disabled' => true, 'entry_class' => 'rwdhide');
     if ($current_User->check_perm('admin', 'normal') && $current_User->check_perm('options', 'view')) {
         // Make time as link to Timezone settings if permission
         $entries['time']['disabled'] = false;
         $entries['time']['href'] = $admin_url . '?ctrl=time';
     }
     // ADMIN SKINS:
     if ($is_admin_page) {
         $admin_skins = get_admin_skins();
         if (count($admin_skins) > 1) {
             // We have several admin skins available: display switcher:
             $entries['userprefs']['entries']['admskins'] = array('text' => T_('Admin skin'));
             $redirect_to = rawurlencode(regenerate_url('', '', '', '&'));
             foreach ($admin_skins as $admin_skin) {
                 $entries['userprefs']['entries']['admskins']['entries'][$admin_skin] = array('text' => $admin_skin, 'href' => $admin_url . '?ctrl=users&amp;action=change_admin_skin&amp;new_admin_skin=' . rawurlencode($admin_skin) . '&amp;redirect_to=' . $redirect_to);
             }
         }
     }
     $entries['userprefs']['entries'][] = array('separator' => true);
     $entries['userprefs']['entries']['logout'] = array('text' => T_('Log out!'), 'href' => get_user_logout_url());
     $topright_Menu->add_menu_entries(NULL, $entries);
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:101,代码来源:__core.init.php


示例8: get_online_users_func


//.........这里部分代码省略.........
                $forum_id = $row['session_forum_id'];
                if ($forum_id && $auth->acl_get('f_list', $forum_id)) {
                    $location = '';
                    $location_url = append_sid("{$phpbb_root_path}viewforum.{$phpEx}", 'f=' . $forum_id);
                    if ($forum_data[$forum_id]['forum_type'] == FORUM_LINK) {
                        $location = sprintf($user->lang['READING_LINK'], $forum_data[$forum_id]['forum_name']);
                        break;
                    }
                    switch ($on_page[1]) {
                        case 'posting':
                            preg_match('#mode=([a-z]+)#', $row['session_page'], $on_page);
                            $posting_mode = !empty($on_page[1]) ? $on_page[1] : '';
                            switch ($posting_mode) {
                                case 'reply':
                                case 'quote':
                                    $location = sprintf($user->lang['REPLYING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                                    break;
                                default:
                                    $location = sprintf($user->lang['POSTING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                                    break;
                            }
                            break;
                        case 'viewtopic':
                            $location = sprintf($user->lang['READING_TOPIC'], $forum_data[$forum_id]['forum_name']);
                            break;
                        case 'viewforum':
                            $location = sprintf($user->lang['READING_FORUM'], $forum_data[$forum_id]['forum_name']);
                            break;
                    }
                } else {
                    $location = $user->lang['INDEX'];
                    $location_url = append_sid("{$phpbb_root_path}index.{$phpEx}");
                }
                break;
            case 'search':
                $location = $user->lang['SEARCHING_FORUMS'];
                $location_url = append_sid("{$phpbb_root_path}search.{$phpEx}");
                break;
            case 'faq':
                $location = $user->lang['VIEWING_FAQ'];
                $location_url = append_sid("{$phpbb_root_path}faq.{$phpEx}");
                break;
            case 'viewonline':
                $location = $user->lang['VIEWING_ONLINE'];
                $location_url = append_sid("{$phpbb_root_path}viewonline.{$phpEx}");
                break;
            case 'memberlist':
                $location = strpos($row['session_page'], 'mode=viewprofile') !== false ? $user->lang['VIEWING_MEMBER_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
                $location_url = append_sid("{$phpbb_root_path}memberlist.{$phpEx}");
                break;
            case 'mcp':
                $location = $user->lang['VIEWING_MCP'];
                $location_url = append_sid("{$phpbb_root_path}index.{$phpEx}");
                break;
            case 'ucp':
                $location = $user->lang['VIEWING_UCP'];
                // Grab some common modules
                $url_params = array('mode=register' => 'VIEWING_REGISTER', 'i=pm&mode=compose' => 'POSTING_PRIVATE_MESSAGE', 'i=pm&' => 'VIEWING_PRIVATE_MESSAGES', 'i=profile&' => 'CHANGING_PROFILE', 'i=prefs&' => 'CHANGING_PREFERENCES');
                foreach ($url_params as $param => $lang) {
                    if (strpos($row['session_page'], $param) !== false) {
                        $location = $user->lang[$lang];
                        break;
                    }
                }
                $location_url = append_sid("{$phpbb_root_path}index.{$phpEx}");
                break;
            case 'download/file':
                $location = $user->lang['DOWNLOADING_FILE'];
                $location_url = append_sid("{$phpbb_root_path}index.{$phpEx}");
                break;
            case 'report':
                $location = $user->lang['REPORTING_POST'];
                $location_url = append_sid("{$phpbb_root_path}index.{$phpEx}");
                break;
            default:
                $location = $user->lang['INDEX'];
                $location_url = append_sid("{$phpbb_root_path}index.{$phpEx}");
                break;
        }
        $user_avatar_url = get_user_avatar_url($row['user_avatar'], $row['user_avatar_type']);
        $row['from'] = 'broswer';
        if (!empty($row['is_tapatalk'])) {
            $row['from'] = 'tapatalk';
        } else {
            if (!empty($row['is_byo'])) {
                $row['from'] = 'byo';
            } else {
                if (strpos($row['session_browser'], 'Android') !== false || strpos($row['session_browser'], 'iPhone') !== false || strpos($row['session_browser'], 'BlackBerry') !== false) {
                    $row['from'] = 'mobile';
                }
            }
        }
        $user_list[] = new xmlrpcval(array('user_id' => new xmlrpcval($row['user_id'], 'string'), 'username' => new xmlrpcval(basic_clean($row['username']), 'base64'), 'from' => new xmlrpcval($row['from'], 'string'), 'user_type' => check_return_user_type($row['username']), 'user_name' => new xmlrpcval($row['username'], 'base64'), 'icon_url' => new xmlrpcval($user_avatar_url), 'display_text' => new xmlrpcval($location, 'base64')), 'struct');
    }
    $db->sql_freeresult($result);
    unset($prev_id, $prev_ip);
    $online_users = array('member_count' => new xmlrpcval($logged_visible_online, 'int'), 'guest_count' => new xmlrpcval($guest_counter, 'int'), 'list' => new xmlrpcval($user_list, 'array'));
    $response = new xmlrpcval($online_users, 'struct');
    return new xmlrpcresp($response);
}
开发者ID:danielgospodinow,项目名称:GamingZone,代码行数:101,代码来源:get_online_users.php


示例9: get_user_info_func


//.........这里部分代码省略.........
        $inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN'];
        switch ($member['user_inactive_reason']) {
            case INACTIVE_REGISTER:
                $inactive_reason = $user->lang['INACTIVE_REASON_REGISTER'];
                break;
            case INACTIVE_PROFILE:
                $inactive_reason = $user->lang['INACTIVE_REASON_PROFILE'];
                break;
            case INACTIVE_MANUAL:
                $inactive_reason = $user->lang['INACTIVE_REASON_MANUAL'];
                break;
            case INACTIVE_REMIND:
                $inactive_reason = $user->lang['INACTIVE_REASON_REMIND'];
                break;
        }
        $template->assign_vars(array('S_USER_INACTIVE' => true, 'USER_INACTIVE_REASON' => $inactive_reason));
    }
    $custom_fields_list = get_custom_fields();
    if (!empty($member['user_sig'])) {
        $custom_fields_list[] = new xmlrpcval(array('name' => new xmlrpcval($user->lang['SIGNATURE'], 'base64'), 'value' => new xmlrpcval(basic_clean($member['user_sig']), 'base64')), 'struct');
    }
    if ($member['user_id'] == $user->data['user_id'] && push_table_exists()) {
        $sql = "SELECT * FROM " . $table_prefix . "tapatalk_users WHERE userid = '" . $member['user_id'] . "'";
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        if (!empty($row)) {
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Message', 'base64'), 'value' => new xmlrpcval($row['pm'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Quoted', 'base64'), 'value' => new xmlrpcval($row['quote'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Mentioned', 'base64'), 'value' => new xmlrpcval($row['tag'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - New Topic', 'base64'), 'value' => new xmlrpcval($row['newtopic'] ? 'On' : 'Off', 'base64')), 'struct'));
            array_push($custom_fields_list, new xmlrpcval(array('name' => new xmlrpcval('Notification - Replies', 'base64'), 'value' => new xmlrpcval($row['subscribe'] ? 'On' : 'Off', 'base64')), 'struct'));
        }
    }
    $user_avatar_url = get_user_avatar_url($member['user_avatar'], $member['user_avatar_type']);
    // Forum info
    $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
        FROM ' . FORUMS_TABLE . '
        ORDER BY left_id ASC';
    $result = $db->sql_query($sql, 600);
    $forum_data = array();
    while ($row = $db->sql_fetchrow($result)) {
        $forum_data[$row['forum_id']] = $row;
    }
    $db->sql_freeresult($result);
    // get user current activity
    preg_match('#^([a-z0-9/_-]+)#i', $member['session_page'], $on_page);
    if (!sizeof($on_page)) {
        $on_page[1] = '';
    }
    switch ($on_page[1]) {
        case 'index':
            $location = $user->lang['INDEX'];
            break;
        case 'adm/index':
            $location = $user->lang['ACP'];
            break;
        case 'posting':
        case 'viewforum':
        case 'viewtopic':
            $forum_id = $member['session_forum_id'];
            if ($forum_id && $auth->acl_get('f_list', $forum_id)) {
                $location = '';
                if ($forum_data[$forum_id]['forum_type'] == FORUM_LINK) {
                    $location = sprintf($user->lang['READING_LINK'], $forum_data[$forum_id]['forum_name']);
                    break;
                }
开发者ID:danielgospodinow,项目名称:GamingZone,代码行数:67,代码来源:get_use

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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