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


PHP can_moderate函数代码示例

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


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

示例1: vbseo_can_moderation_linkback

function vbseo_can_moderation_linkback($pingid, $forumid = 0)
{
    global $db, $vbulletin, $vbseo_pback_in_use;
    if (!$forumid) {
        $vbseo_pback_in_use = $pback = $db->query_first("SELECT tb.*,t.forumid FROM " . vbseo_tbl_prefix('vbseo_linkback') . " tb\nLEFT JOIN " . vbseo_tbl_prefix('thread') . " t on tb.t_threadid=t.threadid\nWHERE t_id='{$pingid}'");
        $forumid = $pback['forumid'];
    }
    return $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'] || can_moderate($forumid, 'vbseo_linkbacks');
}
开发者ID:holandacz,项目名称:nb4,代码行数:9,代码来源:vbseo_moderate.php

示例2: prep_post_end

 /**
  * Processes miscellaneous post items at the end of the construction process.
  */
 function prep_post_end()
 {
     global $show;
     $this->post['editlink'] = can_moderate($this->forum['forumid'], 'canannounce') ? 'announcement.php?' . $this->registry->session->vars['sessionurl'] . 'do=edit&a=' . $this->post['announcementid'] : false;
     $this->post['replylink'] = false;
     $this->post['forwardlink'] = false;
     $show['postcount'] = false;
     $show['reputationlink'] = false;
     $show['reportlink'] = false;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:13,代码来源:class_postbit_alt.php

示例3: fetchCanViewAlbumPhoto

 protected function fetchCanViewAlbumPhoto($attachmentid)
 {
     if (!$this->fetchCanViewAlbums() or !($attachment = $this->content['album_attachment'][$attachmentid]) or !($album = $this->content['album'][$attachment['albumid']]) or !$this->fetchCanViewAlbum($album['albumid'])) {
         return false;
     }
     if ($attachment['state'] == 'moderation' and !can_moderate(0, 'canmoderatepictures') and $attachment['userid'] != vB::$vbulletin->userinfo['userid'] and !can_moderate(0, 'caneditalbumpicture')) {
         return false;
     }
     return true;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:10,代码来源:base.php

示例4: fetch_announcement_permission_error

/**
* Checks whether or not an administrator can post announcements
*
* @param	integer	Forum ID
*
* @return	integer	The return value of this function is really rubbish... who wrote this?
*/
function fetch_announcement_permission_error($forumid)
{
    global $vbulletin, $phrase;
    if ($forumid == -1 and !($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'])) {
        return 1;
    } else {
        if ($forumid != -1 and !can_moderate($forumid, 'canannounce')) {
            return 2;
        }
    }
    return 0;
}
开发者ID:holandacz,项目名称:nb4,代码行数:19,代码来源:adminfunctions_announcement.php

示例5: check_pt_search_floodcheck

/**
* Check whether this search is flooding
*/
function check_pt_search_floodcheck()
{
    global $vbulletin, $db;
    if ($prevsearch = $db->query_first("\r\n\t\tSELECT issuesearchid, dateline\r\n\t\tFROM " . TABLE_PREFIX . "pt_issuesearch AS issuesearch\r\n\t\tWHERE " . (!$vbulletin->userinfo['userid'] ? "ipaddress = '" . $db->escape_string(IPADDRESS) . "'" : "userid = " . $vbulletin->userinfo['userid']) . "\r\n\t\tORDER BY dateline DESC LIMIT 1\r\n\t")) {
        if ($vbulletin->options['searchfloodtime'] > 0) {
            $timepassed = TIMENOW - $prevsearch['dateline'];
            $is_special_user = ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] or can_moderate());
            if ($timepassed < $vbulletin->options['searchfloodtime'] and !$is_special_user) {
                standard_error(fetch_error('searchfloodcheck', $vbulletin->options['searchfloodtime'], $vbulletin->options['searchfloodtime'] - $timepassed));
            }
        }
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:16,代码来源:functions_pt_search.php

示例6: fetchCanViewCmsComment

 protected function fetchCanViewCmsComment($postid)
 {
     if (!($post = $this->content['cms_post'][$postid]) or !($node = $this->content['cms_node'][$post['nodeid']]) or !$this->fetchCanViewCmsArticle($post['nodeid']) or !$node['comments_enabled']) {
         return false;
     }
     $forumid = $post['forumid'];
     $canviewothers = vB::$vbulletin->userinfo['forumpermissions']["{$forumid}"] & vB::$vbulletin->bf_ugp_forumpermissions['canviewothers'];
     $canviewthreads = vB::$vbulletin->userinfo['forumpermissions']["{$forumid}"] & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads'];
     $threadviewable = (($post['visible'] == 1 or $post['visible'] == 0 and can_moderate($forumid)) and $canviewthreads);
     if (!$threadviewable or !$this->fetchCanViewForum($forumid) or !$canviewothers and $post['postuserid'] != vB::$vbulletin->userinfo['userid']) {
         return false;
     }
     return true;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:14,代码来源:base.php

示例7: fetchCanViewThread

 protected function fetchCanViewThread($threadid)
 {
     if (!($threadrecord = $this->content['thread'][$threadid])) {
         return false;
     }
     $forumid = $threadrecord['forumid'];
     $canviewothers = vB::$vbulletin->userinfo['forumpermissions']["{$forumid}"] & vB::$vbulletin->bf_ugp_forumpermissions['canviewothers'];
     $canviewthreads = vB::$vbulletin->userinfo['forumpermissions']["{$forumid}"] & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads'];
     $threadviewable = (($threadrecord['visible'] == 1 or can_moderate($forumid)) and $canviewthreads);
     if (!$threadviewable or !$this->fetchCanViewForum($forumid) or !$canviewothers and $threadrecord['postuserid'] != vB::$vbulletin->userinfo['userid']) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:15,代码来源:base.php

示例8: fetchCanViewSocialgroupPhoto

 protected function fetchCanViewSocialgroupPhoto($attachmentid)
 {
     if (!$this->fetchCanUseGroups()) {
         return false;
     }
     if (!($attachment = $this->content['socialgroup_attachment'][$attachmentid])) {
         return false;
     }
     if (!($group = $this->content['socialgroup'][$attachment['groupid']])) {
         return false;
     }
     if (!vB::$vbulletin->options['socnet_groups_pictures_enabled'] or !($group['options'] & vB::$vbulletin->bf_misc_socialgroupoptions['enable_group_albums']) or $group['membertype'] != 'member' and !can_moderate(0, 'caneditgrouppicture')) {
         return false;
     }
     return true;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:16,代码来源:base.php

示例9: do_get_profile

function do_get_profile()
{
    global $vbulletin;
    $userinfo = vB_Api::instance('user')->fetchUserInfo();
    $cleaned = vB::getCleaner()->cleanArray($_REQUEST, array('userid' => vB_Cleaner::TYPE_UINT));
    if (!$userinfo['userid'] && !$cleaned['userid']) {
        return json_error(ERR_INVALID_LOGGEDIN, RV_NOT_LOGGED_IN);
    }
    if (!$cleaned['userid']) {
        $cleaned['userid'] = $userinfo['userid'];
    }
    $profile = vB_Api::instance('user')->fetchProfileInfo($cleaned['userid']);
    if (empty($profile)) {
        return json_error(ERR_NO_PERMISSION);
    }
    $values = array();
    foreach ($profile['customFields']['default'] as $name => $value) {
        $value = $value['val'];
        if ($value === null) {
            $value = '';
        }
        $values[] = array('name' => (string) new vB_Phrase('cprofilefield', $name), 'value' => $value);
    }
    $groups = array();
    $groups[] = array('name' => 'about', 'values' => $values);
    $out = array('username' => prepare_utf8_string($profile['username']), 'joindate' => prepare_utf8_string(fr_date($profile['joindate'])), 'posts' => $profile['posts'], 'online' => fr_get_user_online($profile['lastactivity']), 'avatar_upload' => $profile['canuseavatar'] ? true : false, 'groups' => $groups);
    $avatarurl = vB_Library::instance('vb4_functions')->avatarUrl($cleaned['userid']);
    if ($avatarurl) {
        $out['avatarurl'] = $avatarurl;
    }
    cache_moderators();
    cache_permissions($vbulletin->userinfo);
    $canbanuser = ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] or can_moderate(0, 'canbanusers'));
    if ($canbanuser) {
        $out['ban'] = true;
    }
    return $out;
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:38,代码来源:profile.php

示例10: vb_number_format

 if (!$post['p_title']) {
     $post['p_title'] = '&laquo;' . $vbphrase['n_a'] . '&raquo;';
 }
 $post['counter'] = vb_number_format($post['counter']);
 $post['size'] = vb_number_format($post['size'], 1, true);
 $post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['p_dateline'], true);
 $post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['p_dateline']);
 $post['attachmentextension'] = strtolower(file_extension($post['filename']));
 $show['thumbnail'] = iif($post['hasthumbnail'] == 1 and $vbulletin->options['attachthumbs'] and $showthumbs, 1, 0);
 $show['inprogress'] = iif(!$post['postid'], true, false);
 $show['deletebox'] = false;
 if ($post['inprogress']) {
     $show['deletebox'] = true;
 } else {
     if ($post['open'] or $vbulletin->options['allowclosedattachdel'] or can_moderate($post['forumid'], 'canopenclose')) {
         if (can_moderate($post['forumid'], 'caneditposts')) {
             $show['deletebox'] = true;
         } else {
             $forumperms = fetch_permissions($post['forumid']);
             if ($forumperms & $vbulletin->bf_ugp_forumpermissions['caneditpost'] and $vbulletin->userinfo['userid'] == $post['userid']) {
                 if ($vbulletin->options['allowattachdel'] or !$vbulletin->options['edittimelimit'] or $post['p_dateline'] >= TIMENOW - $vbulletin->options['edittimelimit'] * 60) {
                     $show['deletebox'] = true;
                 }
             }
         }
     }
 }
 if ($show['deletebox']) {
     $show['deleteoption'] = true;
 }
 ($hook = vBulletinHook::fetch_hook('profile_editattachments_bit')) ? eval($hook) : false;
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:profile.php

示例11: fetch_seo_url

		$vbulletin->url = fetch_seo_url('member', $userinfo);
		eval(print_standard_redirect('visitormessagedelete'));
	}
	else
	{
		$vbulletin->url = fetch_seo_url('member', $userinfo);
		eval(print_standard_redirect('visitormessage_nodelete'));
	}
}

// ############################### start retrieve ip ###############################
if ($_REQUEST['do'] == 'viewip')
{
	// check moderator permissions for getting ip
	if (!can_moderate(0, 'canviewips'))
	{
		print_no_permission();
	}

	if (!$messageinfo['vmid'])
	{
		eval(standard_error(fetch_error('invalidid', $vbphrase['message'], $vbulletin->options['contactuslink'])));
	}

	$messageinfo['hostaddress'] = @gethostbyaddr(long2ip($messageinfo['ipaddress']));

	($hook = vBulletinHook::fetch_hook('visitor_message_getip')) ? eval($hook) : false;

	eval(standard_error(fetch_error('thread_displayip', long2ip($messageinfo['ipaddress']), htmlspecialchars_uni($messageinfo['hostaddress'])), '', 0));
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:visitormessage.php

示例12: construct_online_bit

function construct_online_bit($userinfo, $doall = 0)
{
    global $vbulletin, $limitlower, $limitupper, $stylevar, $vbphrase, $ipclass, $show;
    global $wol_album, $wol_attachment, $wol_calendar, $wol_event, $wol_inf, $wol_pm, $wol_post, $wol_search, $wol_socialgroup, $wol_thread, $wol_user;
    static $count;
    $count++;
    $show['nopermission'] = false;
    $show['lockedout'] = false;
    $show['errormessage'] = false;
    if ($doall == 1 and ($count > $limitupper or $count < $limitlower)) {
        return '';
    }
    if ($userinfo['attachmentid']) {
        $postid = $wol_attachment["{$userinfo['attachmentid']}"];
    } else {
        $postid = $userinfo['postid'];
    }
    if ($postid) {
        $threadid = $wol_post["{$postid}"];
    } else {
        $threadid = $userinfo['threadid'];
    }
    $forumid = $userinfo['forumid'];
    $calendarid = $userinfo['calendarid'];
    $eventid = $userinfo['eventid'];
    $searchid = $userinfo['searchid'];
    $groupid = $userinfo['socialgroupid'];
    $albumid = $userinfo['albumid'];
    if ($albumid) {
        require_once DIR . '/includes/functions_album.php';
        $albumname = fetch_censored_text($wol_album["{$albumid}"]['title']);
        $canviewalbum = true;
        if ($wol_album["{$albumid}"]['state'] == 'profile' and !can_view_profile_albums($wol_album["{$albumid}"]['userid'])) {
            $canviewalbum = false;
        } else {
            if ($wol_album["{$albumid}"]['state'] == 'private' and !can_view_private_albums($wol_album["{$albumid}"]['userid'])) {
                $canviewalbum = false;
            }
        }
    }
    if ($groupid) {
        $groupname = fetch_censored_text($wol_socialgroup["{$groupid}"]['name']);
        $canviewgroup = true;
    }
    if ($searchid) {
        $searchquery = $wol_search["{$searchid}"]['query'];
        $searchuser = $wol_search["{$searchid}"]['searchuser'];
        $searchuserid = $wol_search["{$searchid}"]['userid'];
    }
    if (!$forumid and isset($wol_thread["{$threadid}"]['forumid'])) {
        $forumid = $wol_thread["{$threadid}"]['forumid'];
    } else {
        if (!$forumid and isset($wol_thread["{$wol_post[$postid]}"]['forumid'])) {
            $forumid = $wol_thread["{$wol_post[$postid]}"]['forumid'];
        }
    }
    $threadtitle = fetch_censored_text($wol_thread["{$threadid}"]['title']);
    $threadprefix = $wol_thread["{$threadid}"]['prefixid'] ? $vbphrase['prefix_' . $wol_thread["{$threadid}"]['prefixid'] . '_title_rich'] . ' ' : '';
    $canview = $vbulletin->userinfo['forumpermissions']["{$forumid}"] & $vbulletin->bf_ugp_forumpermissions['canview'];
    $canviewothers = $vbulletin->userinfo['forumpermissions']["{$forumid}"] & $vbulletin->bf_ugp_forumpermissions['canviewothers'];
    $canviewthreads = $vbulletin->userinfo['forumpermissions']["{$forumid}"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads'];
    $postuserid = $wol_thread["{$threadid}"]['postuserid'];
    $forumtitle = $vbulletin->forumcache["{$forumid}"]['title'];
    $threadpreview = $wol_thread["{$threadid}"]['preview'];
    if (!$calendarid and isset($wol_event["{$eventid}"]['calendarid'])) {
        $calendarid = $wol_event["{$eventid}"]['calendarid'];
    }
    $eventtitle = htmlspecialchars_uni($wol_event["{$eventid}"]['title']);
    $eventpostuserid = $wol_event["{$eventid}"]['postuserid'];
    $calendartitle = $wol_calendar["{$calendarid}"];
    $canviewcalendar = $vbulletin->userinfo['calendarpermissions']["{$calendarid}"] & $vbulletin->bf_ugp_calendarpermissions['canviewcalendar'];
    $canviewothersevent = $vbulletin->userinfo['calendarpermissions']["{$calendarid}"] & $vbulletin->bf_ugp_calendarpermissions['canviewothersevent'];
    if (($wol_thread["{$threadid}"]['isdeleted'] or !$wol_thread["{$threadid}"]['visible']) and !can_moderate($forumid)) {
        $threadviewable = 0;
    } else {
        $threadviewable = 1;
    }
    if ($threadviewable and $threadtitle and $canview and ($canviewothers or $postuserid == $vbulletin->userinfo['userid']) and verify_forum_password($forumid, $vbulletin->forumcache["{$forumid}"]['password'], false)) {
        $seetitle = 1;
    }
    if ($forumtitle and ($canview or $vbulletin->forumcache["{$forumid}"]['showprivate'] > 1 or !$vbulletin->forumcache["{$forumid}"]['showprivate'] and $vbulletin->options['showprivateforums'])) {
        $seeforum = 1;
    }
    if ($eventtitle and $canviewcalendar and ($canviewothersevent or $eventpostuserid == $vbulletin->userinfo['userid'])) {
        $seeevent = 1;
    }
    if ($calendartitle and $canviewcalendar) {
        $seecalendar = 1;
    }
    if ($vbulletin->userinfo['permissions']['wolpermissions'] & $vbulletin->bf_ugp_wolpermissions['canwhosonlinefull']) {
        if ($userinfo['pmid']) {
            $seeuserid = $wol_pm["{$userinfo['pmid']}"];
        } else {
            if ($userinfo['searchid']) {
                $seeuserid = $wol_search["{$searchid}"]['targetuserid'];
            } else {
                if ($userinfo['infractionid']) {
                    $seeuserid = $wol_inf["{$userinfo['infractionid']}"]['userid'];
                } else {
                    $seeuserid = $userinfo['targetuserid'];
//.........这里部分代码省略.........
开发者ID:holandacz,项目名称:nb4,代码行数:101,代码来源:functions_online.php

示例13: fetch_quotable_posts

/**
* Fetches and prepares posts for quoting. Returned text is BB code.
*
* @param	array	Array of post IDs to pull from
* @param	integer	The ID of the thread that is being quoted into
* @param	integer	Returns the number of posts that were unquoted because of the value of the next argument
* @param	array	Returns the IDs of the posts that were actually quoted
* @param	string	Controls what posts are successfully quoted: all, only (only the thread ID), other (only other thread IDs)
* @param	boolean	Whether to undo the htmlspecialchars calls; useful when returning HTML to be entered via JS
*/
function fetch_quotable_posts($quote_postids, $threadid, &$unquoted_posts, &$quoted_post_ids, $limit_thread = 'only', $unhtmlspecialchars = false)
{
    global $vbulletin;
    $unquoted_posts = 0;
    $quoted_post_ids = array();
    $quote_postids = array_diff_assoc(array_unique(array_map('intval', $quote_postids)), array(0));
    // limit to X number of posts
    if ($vbulletin->options['mqlimit'] > 0) {
        $quote_postids = array_slice($quote_postids, 0, $vbulletin->options['mqlimit']);
    }
    if (empty($quote_postids)) {
        // nothing to quote
        return '';
    }
    $hook_query_fields = $hook_query_joins = '';
    ($hook = vBulletinHook::fetch_hook('quotable_posts_query')) ? eval($hook) : false;
    $quote_post_data = $vbulletin->db->query_read_slave("\n\t\tSELECT post.postid, post.title, post.pagetext, post.dateline, post.userid, post.visible AS postvisible,\n\t\t\tIF(user.username <> '', user.username, post.username) AS username,\n\t\t\tthread.threadid, thread.title AS threadtitle, thread.postuserid, thread.visible AS threadvisible,\n\t\t\tforum.forumid, forum.password\n\t\t\t{$hook_query_fields}\n\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)\n\t\tINNER JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)\n\t\tINNER JOIN " . TABLE_PREFIX . "forum AS forum ON (thread.forumid = forum.forumid)\n\t\t{$hook_query_joins}\n\t\tWHERE post.postid IN (" . implode(',', $quote_postids) . ")\n\t");
    $quote_posts = array();
    while ($quote_post = $vbulletin->db->fetch_array($quote_post_data)) {
        if ((!$quote_post['postvisible'] or $quote_post['postvisible'] == 2) and !can_moderate($quote_post['forumid']) or (!$quote_post['threadvisible'] or $quote_post['threadvisible'] == 2) and !can_moderate($quote_post['forumid'])) {
            // no permission to view this post
            continue;
        }
        $forumperms = fetch_permissions($quote_post['forumid']);
        if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($quote_post['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0) or !verify_forum_password($quote_post['forumid'], $quote_post['password'], false) or in_coventry($quote_post['postuserid']) and !can_moderate($quote_post['forumid']) or in_coventry($quote_post['userid']) and !can_moderate($quote_post['forumid'])) {
            // no permission to view this post
            continue;
        }
        if ($limit_thread == 'only' and $quote_post['threadid'] != $threadid or $limit_thread == 'other' and $quote_post['threadid'] == $threadid or $limit_thread == 'all') {
            $unquoted_posts++;
            continue;
        }
        $skip_post = false;
        ($hook = vBulletinHook::fetch_hook('quotable_posts_logic')) ? eval($hook) : false;
        if ($skip_post) {
            continue;
        }
        $quote_posts["{$quote_post['postid']}"] = $quote_post;
    }
    $message = '';
    foreach ($quote_postids as $quote_postid) {
        if (!isset($quote_posts["{$quote_postid}"])) {
            continue;
        }
        $quote_post =& $quote_posts["{$quote_postid}"];
        $originalposter = fetch_quote_username($quote_post['username'] . ";{$quote_post['postid']}");
        $postdate = vbdate($vbulletin->options['dateformat'], $quote_post['dateline']);
        $posttime = vbdate($vbulletin->options['timeformat'], $quote_post['dateline']);
        $pagetext = htmlspecialchars_uni($quote_post['pagetext']);
        $pagetext = trim(strip_quotes($pagetext));
        ($hook = vBulletinHook::fetch_hook('newreply_quote')) ? eval($hook) : false;
        eval('$message .= "' . fetch_template('newpost_quote', 0, false) . '\\n";');
        $quoted_post_ids[] = $quote_postid;
    }
    if ($unhtmlspecialchars) {
        $message = unhtmlspecialchars($message);
    }
    return $message;
}
开发者ID:holandacz,项目名称:nb4,代码行数:69,代码来源:functions_newpost.php

示例14: array

         // insert username(s) of specified recipients
         if ($vbulletin->GPC['userid']) {
             $recipients = array();
             if (is_array($vbulletin->GPC['userid'])) {
                 foreach ($vbulletin->GPC['userid'] as $recipient) {
                     $recipients[] = intval($recipient);
                 }
             } else {
                 $recipients[] = intval($vbulletin->GPC['userid']);
             }
             $users = $db->query_read_slave("\n\t\t\t\t\tSELECT usertextfield.*, user.*, userlist.type\n\t\t\t\t\tFROM " . TABLE_PREFIX . "user AS user\n\t\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid=user.userid)\n\t\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "userlist AS userlist ON(user.userid = userlist.userid AND userlist.relationid = " . $vbulletin->userinfo['userid'] . " AND userlist.type = 'buddy')\n\t\t\t\t\tWHERE user.userid IN(" . implode(', ', $recipients) . ")\n\t\t\t\t");
             $recipients = array();
             while ($user = $db->fetch_array($users)) {
                 $user = array_merge($user, convert_bits_to_array($user['options'], $vbulletin->bf_misc_useroptions));
                 cache_permissions($user, false);
                 if (!($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) and (!$user['receivepm'] or !$user['permissions']['pmquota'] or $user['receivepmbuddies'] and !can_moderate() and $user['type'] != 'buddy')) {
                     eval(standard_error(fetch_error('pmrecipturnedoff', $user['username'])));
                 }
                 $recipients[] = $user['username'];
             }
             if (empty($recipients)) {
                 $pm['recipients'] = '';
             } else {
                 $pm['recipients'] = implode(' ; ', $recipients);
             }
         }
         ($hook = vBulletinHook::fetch_hook('private_newpm_blank')) ? eval($hook) : false;
     }
     construct_checkboxes(array('savecopy' => true, 'parseurl' => true, 'signature' => iif($vbulletin->userinfo['signature'] !== '', true)));
     $show['bcclink'] = true;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:private.php

示例15: eval

    }
    ($hook = vBulletinHook::fetch_hook('misc_showattachments_start')) ? eval($hook) : false;
    $forumperms = fetch_permissions($threadinfo['forumid']);
    if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
        print_no_permission();
    }
    if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] or !$vbulletin->userinfo['userid'])) {
        print_no_permission();
    }
    $attachs = $db->query_read_slave("\n\t\tSELECT attachment.*\n\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\tINNER JOIN " . TABLE_PREFIX . "attachment AS attachment ON (attachment.postid=post.postid AND attachment.visible=1)\n\t\tWHERE threadid = {$threadinfo['threadid']}\n\t\t\tAND post.visible = 1\n\t\tORDER BY filename DESC\n\t");
    if ($db->num_rows($attachs)) {
        require_once DIR . '/includes/functions_bigthree.php';
        while ($attachment = $db->fetch_array($attachs)) {
            // hide users in Coventry
            $ast = '';
            if (in_coventry($attachment['userid']) and !can_moderate($threadinfo['forumid'])) {
                continue;
            }
            $attachment['filename'] = fetch_censored_text(htmlspecialchars_uni($attachment['filename']));
            $attachment['attachmentextension'] = strtolower(file_extension($attachment['filename']));
            $attachment['filesize'] = vb_number_format($attachment['filesize'], 1, true);
            exec_switch_bg();
            eval('$attachments .= "' . fetch_template('attachmentbit') . '";');
        }
        ($hook = vBulletinHook::fetch_hook('misc_showattachments_complete')) ? eval($hook) : false;
        eval('print_output("' . fetch_template('ATTACHMENTS') . '");');
    } else {
        eval(standard_error(fetch_error('noattachments')));
    }
}
// ############################### start show avatars ###############################
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:misc.php


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