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


PHP verify_id函数代码示例

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


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

示例1: member_login

 function member_login($user_login)
 {
     $wp_user_data = get_user_by('login', $user_login);
     $vb_user_id = get_user_meta($wp_user_data->ID, 'vbulletin_user_id', true);
     if (empty($vb_user_id)) {
         return;
     }
     include VBULLETIN_PATH . '/includes/functions_login.php';
     $GLOBALS['vbulletin']->userinfo = verify_id('user', $vb_user_id, true, true, 0);
     process_new_login(null, 0, null);
     $GLOBALS['vbulletin']->session->save();
 }
开发者ID:hscale,项目名称:webento,代码行数:12,代码来源:class-vbulletinbridge.php

示例2: create_from_id

 /**
  * Load object from an id
  *
  * @param int $id
  * @return vB_Legacy_Calendar
  */
 public static function create_from_id($id)
 {
     global $_CALENDAROPTIONS, $_CALENDARHOLIDAYS;
     $calendarinfo = verify_id('calendar', intval($id), false, true);
     $getoptions = convert_bits_to_array($calendarinfo['options'], $_CALENDAROPTIONS);
     $calendarinfo = array_merge($calendarinfo, $getoptions);
     $geteaster = convert_bits_to_array($calendarinfo['holidays'], $_CALENDARHOLIDAYS);
     $calendarinfo = array_merge($calendarinfo, $geteaster);
     if ($calendarinfo) {
         return self::create_from_record($calendarinfo);
     } else {
         return null;
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:20,代码来源:calendar.php

示例3: process

 public function process()
 {
     vB::$vbulletin->input->clean_array_gpc('p', array('userid' => TYPE_UINT, 'tab' => TYPE_NOHTML, 'mindateline' => TYPE_UNIXTIME, 'maxdateline' => TYPE_UNIXTIME, 'minscore' => TYPE_NUM, 'minid' => TYPE_STR, 'maxid' => TYPE_STR, 'pagenumber' => TYPE_UINT, 'perpage' => TYPE_UINT));
     vB::$vbulletin->GPC['ajax'] = 1;
     vB_dB_Assertor::init(vB::$vbulletin->db, vB::$vbulletin->userinfo);
     vB_ProfileCustomize::getUserTheme(vB::$vbulletin->GPC['userid']);
     $userhastheme = vB_ProfileCustomize::getUserThemeType(vB::$vbulletin->GPC['userid']) == 1 ? 1 : 0;
     $showusercss = vB::$vbulletin->userinfo['options'] & vB::$vbulletin->bf_misc_useroptions['showusercss'] ? 1 : 0;
     if ($userhastheme and $showusercss) {
         define('AS_PROFILE', true);
     }
     $userinfo = verify_id('user', vB::$vbulletin->GPC['userid'], 1, 1);
     $this->fetchMemberStreamSql(vB::$vbulletin->GPC['tab'], $userinfo['userid']);
     $this->processExclusions();
     $this->setPage(1, vB::$vbulletin->GPC['perpage']);
     $result = $this->fetchStream();
     $this->processAjax($result);
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:18,代码来源:membertabajax.php

示例4: output

 public function output()
 {
     global $vbulletin, $threadid, $postid, $db, $VB_API_WHITELIST;
     require_once DIR . '/includes/functions_bigthree.php';
     $threadinfo = verify_id('thread', $threadid, 1, 1);
     if ($vbulletin->options['threadmarking'] and $vbulletin->userinfo['userid']) {
         $vbulletin->userinfo['lastvisit'] = max($threadinfo['threadread'], $threadinfo['forumread'], TIMENOW - $vbulletin->options['markinglimit'] * 86400);
     }
     $coventry = fetch_coventry('string');
     $posts = $db->query_first("\n\t\t\tSELECT MIN(postid) AS postid\n\t\t\tFROM " . TABLE_PREFIX . "post\n\t\t\tWHERE threadid = {$threadinfo['threadid']}\n\t\t\t\tAND visible = 1\n\t\t\t\tAND dateline > " . intval($vbulletin->userinfo['lastvisit']) . "\n\t\t\t\t" . ($coventry ? "AND userid NOT IN ({$coventry})" : "") . "\n\t\t\tLIMIT 1\n\t\t");
     if ($posts['postid']) {
         $postid = $posts['postid'];
     } else {
         $postid = $threadinfo['lastpostid'];
     }
     loadAPI('showthread');
     include DIR . '/showthread.php';
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:18,代码来源:api_gotonewpost.php

示例5: create_new_thread

/**
* Creates new thread or gives error and then redirects user
*
* @param	string	Title of thread
* @param	string	Message of post
* @param	integer ForumID for thread
* @param	boolean Allow guest posts
*/
function create_new_thread($title = 'Defauglt Title', $message = 'Defagult Message', $id = 3, $guest = false)
{
    // set some globals
    global $forumperms, $vbulletin, $vbphrase;
    // init some variables
    $fail = 0;
    $errors = array();
    $newpost = array();
    // init post information
    if ($guest and $vbulletin->userinfo['userid'] == 0) {
        $newpost['username'] = $vbphrase['guest'];
    }
    $newpost['title'] = $title;
    $newpost['message'] = $message;
    $newpost['signature'] = '0';
    if ($vbulletin->userinfo['signature'] != '') {
        $newpost['signature'] = '1';
    }
    $newpost['parseurl'] = '1';
    $newpost['emailupdate'] = '9999';
    // attempt thread create
    $foruminfo = verify_id('forum', $id, 0, 1);
    if (!$foruminfo['forumid']) {
        $fail = 1;
    }
    $forumperms = fetch_permissions($foruminfo['forumid']);
    if (!function_exists('build_new_post')) {
        require_once DIR . '/includes/functions_newpost.php';
    }
    build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);
    if (sizeof($errors) > 0) {
        $fail = 1;
    }
    // do redirection
    if (!$fail) {
        $vbulletin->url = $vbulletin->options['bburl'] . '/showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=" . $newpost['postid'] . "#post" . $newpost['postid'];
        eval(print_standard_redirect('redirect_postthanks'));
    } else {
        $vbulletin->url = $vbulletin->options['bburl'];
        eval(print_standard_redirect($vbphrase['error'] . ': ' . $vbphrase['redirecting'], 0, 1));
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:50,代码来源:functions_goldbrick.php

示例6: verify_infractionlevelid

 /**
  * Verifies that the infractionlevelid is valid and set points and expires if user hasn't explicitly set them
  *
  * @param	integer	infractionleveid key
  *
  * @return	boolean
  */
 function verify_infractionlevelid(&$infractionlevelid)
 {
     if ($infractionlevelid != $this->existing['infractionlevelid']) {
         if (!($infractionlevel = $this->info['infractionlevel']) and !($infractionlevel = verify_id('infractionlevel', $infractionlevelid, 0, 1))) {
             $this->error('invalidid');
             return false;
         } else {
             if (!$this->setfields['points']) {
                 $points = intval($infractionlevel['points']);
                 if ($infractionlevel['warning'] and $this->info['warning']) {
                     $points = 0;
                 }
                 $this->set('points', $points);
             }
             if (!$this->setfields['expires']) {
                 switch ($infractionlevel['period']) {
                     case 'H':
                         $expires = TIMENOW + $infractionlevel['expires'] * 3600;
                         break;
                         # HOURS
                     # HOURS
                     case 'D':
                         $expires = TIMENOW + $infractionlevel['expires'] * 86400;
                         break;
                         # DAYS
                     # DAYS
                     case 'M':
                         $expires = TIMENOW + $infractionlevel['expires'] * 2592000;
                         break;
                         # MONTHS
                     # MONTHS
                     case 'N':
                         $expires = 0;
                         break;
                         # NEVER
                 }
                 $this->set('expires', $expires);
             }
         }
     }
     return true;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:49,代码来源:class_dm_infraction.php

示例7: verify_blog_customblock

/**
* Fetches information about the selected custompage with permission checks
*
* @param	integer	The custompage we want info about
* @param	string	The type of customblock that we are working with (page or block)
* @param	bool		Should an error be displayed when block is not found
* @param	bool		Should a permission check be performed as well
*
* @return	array	Array of information about the custom page or prints an error if it doesn't exist / permission problems
*/
function verify_blog_customblock($customblockid, $type = null, $alert = true, $perm_check = true)
{
	global $vbulletin, $vbphrase;

	if (!($blockinfo = fetch_customblock_info($customblockid)))
	{
		if ($alert)
		{
			standard_error(fetch_error('invalidid', $vbphrase['custom_block'], $vbulletin->options['contactuslink']));
		}
		else
		{
			return 0;
		}
	}
	else if ($type AND $blockinfo['type'] != $type)
	{
		standard_error(fetch_error('invalidid', $vbphrase['custom_block'], $vbulletin->options['contactuslink']));
	}

	$blockinfo['userinfo'] = verify_id('user', $blockinfo['userid'], 1, 1, 10);

	if ($perm_check)
	{
		if ($vbulletin->userinfo['userid'] != $blockinfo['userinfo']['userid'] AND empty($blockinfo['userinfo']['bloguserid']))
		{
			standard_error(fetch_error('blog_noblog', $blockinfo['userinfo']['username']));
		}

		if (!$blockinfo['userinfo']['canviewmyblog'])
		{
			print_no_permission();
		}
		if (in_coventry($blockinfo['userinfo']['userid']) AND !can_moderate_blog())
		{
			standard_error(fetch_error('invalidid', $vbphrase['custom_block'], $vbulletin->options['contactuslink']));
		}

		if ($vbulletin->userinfo['userid'] == $blockinfo['userinfo']['userid'] AND !($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewown']))
		{
			print_no_permission();
		}

		if ($vbulletin->userinfo['userid'] != $blockinfo['userinfo']['userid'] AND !($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewothers']))
		{
			// Can't view other's entries so off you go to your own blog.
			exec_header_redirect("blog.php?$session[sessionurl]u=" . $vbulletin->userinfo['userid']);
		}
	}

	return $blockinfo;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:62,代码来源:blog_functions_usercp.php

示例8: user_name_cell

function user_name_cell($user_name, $user_id = 0)
{
    global $vbulletin, $usermenus, $vbphrase, $user_name_tags;
    static $users;
    if (empty($users) or is_array($users) and !array_key_exists($user_name, $users)) {
        $users[$user_name] = verify_id('user', $user_id, false);
    }
    // show linked username only for existing users
    if (!$users[$user_name] or 0 > $user_id) {
        return "&nbsp;<b>" . $user_name . "</b>";
    }
    $elid = rand() . '_' . rand() . '_' . $user_id;
    $out = "<span id=\"usermenu_uid_" . $elid . "\" class=\"vbmenu_control\">" . "<script type=\"text/javascript\">vbmenu_register(\"usermenu_uid_" . $elid . "\" ); </script>" . "</span>&nbsp;" . "<a target=\"_blank\" href=\"" . $vbulletin->options['bburl'] . "/member.php?" . $vbulletin->session->vars['sessionurl'] . "u=" . $user_id . "\"><b>" . $user_name_tags[$user_id]['opentag'] . $user_name . $user_name_tags[$user_id]['closetag'] . "</b></a>";
    $usermenus[$elid] = "<div class=\"vbmenu_popup\" id=\"usermenu_uid_" . $elid . "_menu\" style=\"display:none\">" . "<table cellpadding=\"4\" cellspacing=\"1\" border=\"0\">" . "<tr>" . "  <td class=\"vbmenu_option\"><a href=\"?" . $vbulletin->session->vars['sessionurl'] . "userid=" . urlencode($user_id) . "\">" . $vbphrase['private_messages'] . " " . $user_name . "</a></td>" . "</tr>" . "<tr>" . "  <td class=\"vbmenu_option\"><a target=\"_blank\" href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u=" . $user_id . "\">" . $vbphrase['edit_user_profile'] . "</a></td>" . "</tr>" . "</table>" . "</div>";
    return $out;
}
开发者ID:rcdesign-cemetery,项目名称:vb-pm_log,代码行数:16,代码来源:rcd_pm_log.php

示例9: print_no_permission

if (!($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']) or !($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canviewmembers'])) {
    print_no_permission();
}
if (!($vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_visitor_messaging'])) {
    print_no_permission();
}
$vbulletin->input->clean_array_gpc('r', array('u' => TYPE_UINT, 'u2' => TYPE_UINT, 'perpage' => TYPE_UINT, 'pagenumber' => TYPE_UINT, 'showignored' => TYPE_BOOL, 'vmid' => TYPE_UINT));
($hook = vBulletinHook::fetch_hook('converse_start')) ? eval($hook) : false;
if ($vbulletin->GPC['vmid']) {
    $vminfo = verify_visitormessage($vbulletin->GPC['vmid']);
    if (($vminfo['postuserid'] != $vbulletin->GPC['u'] or $vminfo['userid'] != $vbulletin->GPC['u2']) and ($vminfo['userid'] != $vbulletin->GPC['u'] or $vminfo['postuserid'] != $vbulletin->GPC['u2'])) {
        standard_error(fetch_error('invalidid', $vbphrase['visitor_message'], $vbulletin->options['contactuslink']));
    }
}
$userinfo = verify_id('user', $vbulletin->GPC['u'], true, true, FETCH_USERINFO_USERCSS | FETCH_USERINFO_ISFRIEND);
$userinfo2 = verify_id('user', $vbulletin->GPC['u2'], true, true, FETCH_USERINFO_USERCSS | FETCH_USERINFO_ISFRIEND);
// $userinfo will never be vbulletin->userinfo
// $userinfo2 may be vbulletin->userinfo
if ($userinfo2['userid'] == $vbulletin->userinfo['userid']) {
    $viewself = true;
}
cache_permissions($userinfo, false);
if (!$userinfo['vm_enable'] and !can_moderate(0, 'canmoderatevisitormessages') or $userinfo['vm_contactonly'] and !$userinfo['bbuser_iscontact_of_user'] and !can_moderate(0, 'canmoderatevisitormessages')) {
    print_no_permission();
}
if (!$userinfo2['vm_enable'] and (!can_moderate(0, 'canmoderatevisitormessages') or $viewself) or $userinfo2['vm_contactonly'] and !$userinfo2['bbuser_iscontact_of_user'] and !can_moderate(0, 'canmoderatevisitormessages') and !$viewself) {
    print_no_permission();
}
require_once DIR . '/includes/functions_user.php';
if (!can_view_profile_section($userinfo['userid'], 'visitor_messaging') or !can_view_profile_section($userinfo2['userid'], 'visitor_messaging')) {
    print_no_permission();
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:converse.php

示例10: get_article_comments

function get_article_comments($article, $associated_thread_id, $userinfo, &$pageno, &$perpage, &$total)
{
    require_once DIR . '/includes/functions_misc.php';
    require_once DIR . '/includes/functions.php';
    require_once DIR . '/includes/functions_databuild.php';
    require_once DIR . '/includes/functions_bigthree.php';
    $posts_out = array();
    fetch_phrase_group('posting');
    $threadinfo = verify_id('thread', $associated_thread_id, 0, 1);
    $foruminfo = verify_id('forum', $threadinfo['forumid'], 0, 1);
    //First let's see if we have forum/thread view permissions. If not,
    // we're done
    if (!($permissions = can_view_thread($article->getNodeId(), $userinfo))) {
        return array();
    }
    $forumperms = fetch_permissions($threadinfo['forumid']);
    //Normally this thread will be wide open, so let's get the list first
    // without checking. We'll verify each post anyway.
    //get our results
    $results = get_comments($permissions, $associated_thread_id);
    $record_count = count($results);
    if (!$results or !count($results)) {
        return array();
    }
    //we accept the parameter "last" for pageno.
    if ($pageno == FR_LAST_POST) {
        $pageno = intval(($record_count + $perpage - 1) / $perpage);
        $first = ($pageno - 1) * $perpage;
    } else {
        $pageno = max(1, intval($pageno));
        $first = $perpage * ($pageno - 1);
    }
    //Let's trim off the results we need.
    //This also tells us if we should show the "next" button.
    $post_array = array_slice($results, $first, $perpage, true);
    if (!$post_array) {
        return array();
    }
    $firstpostid = false;
    $displayed_dateline = 0;
    if (vB::$vbulletin->options['threadmarking'] and vB::$vbulletin->userinfo['userid']) {
        $threadview = max($threadinfo['threadread'], $threadinfo['forumread'], TIMENOW - vB::$vbulletin->options['markinglimit'] * 86400);
    } else {
        $threadview = intval(fetch_bbarray_cookie('thread_lastview', $thread['threadid']));
        if (!$threadview) {
            $threadview = vB::$vbulletin->userinfo['lastvisit'];
        }
    }
    require_once DIR . '/includes/functions_user.php';
    $show['inlinemod'] = false;
    $postids = array();
    $postids = ' post.postid in (' . implode(', ', $post_array) . ')';
    $posts = vB::$vbulletin->db->query_read($sql = "\n\tSELECT\n\tpost.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,\n\t    user.*, userfield.*, usertextfield.*,\n\t    " . iif($forum['allowicons'], 'icon.title as icontitle, icon.iconpath,') . "\n\t    " . iif(vB::$vbulletin->options['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,') . "\n\t    " . ((can_moderate($thread['forumid'], 'canmoderateposts') or can_moderate($thread['forumid'], 'candeleteposts')) ? 'spamlog.postid AS spamlog_postid,' : '') . "\n\t    " . iif($deljoin, 'deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,') . "\n\t    editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,\n\t    editlog.reason AS edit_reason, editlog.hashistory,\n\t    postparsed.pagetext_html, postparsed.hasimages,\n\t    sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,\n\t    sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,\n\t    IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid,\n\t    customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight\n\t    " . iif(!($permissions['genericpermissions'] & vB::$vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), vB::$vbulletin->profilefield['hidden']) . "\n\t    {$hook_query_fields}\n\t    FROM " . TABLE_PREFIX . "post AS post\n\t    LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)\n\t    LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)\n\t    LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid = user.userid)\n\t    " . iif($forum['allowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = post.iconid)") . "\n\t    " . iif(vB::$vbulletin->options['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") . "\n\t    " . ((can_moderate($thread['forumid'], 'canmoderateposts') or can_moderate($thread['forumid'], 'candeleteposts')) ? "LEFT JOIN " . TABLE_PREFIX . "spamlog AS spamlog ON(spamlog.postid = post.postid)" : '') . "\n\t    {$deljoin}\n\t    LEFT JOIN " . TABLE_PREFIX . "editlog AS editlog ON(editlog.postid = post.postid)\n\t    LEFT JOIN " . TABLE_PREFIX . "postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = " . intval(STYLEID) . " AND postparsed.languageid = " . intval(LANGUAGEID) . ")\n\t    LEFT JOIN " . TABLE_PREFIX . "sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = " . intval(STYLEID) . " AND sigparsed.languageid = " . intval(LANGUAGEID) . ")\n\t    LEFT JOIN " . TABLE_PREFIX . "sigpic AS sigpic ON(sigpic.userid = post.userid)\n\t    LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)\n\t    {$hook_query_joins}\n\t    WHERE {$postids}\n\t    ORDER BY post.dateline\n\t    ");
    if (!($forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canseethumbnails']) and !($forumperms & vB::$vbulletin->bf_ugp_forumpermissions['cangetattachment'])) {
        vB::$vbulletin->options['attachthumbs'] = 0;
    }
    if (!($forumperms & vB::$vbulletin->bf_ugp_forumpermissions['cangetattachment'])) {
        vB::$vbulletin->options['viewattachedimages'] = 0;
    }
    $postcount = count($postid_array);
    $counter = 0;
    $postbits = '';
    vB::$vbulletin->noheader = true;
    while ($post = vB::$vbulletin->db->fetch_array($posts)) {
        if (!$privileges['can_moderate_forums']) {
            if ($privileges['is_coventry'] or $post['visible'] == 2) {
                continue;
            }
        }
        // post/thread is deleted by moderator and we don't have permission to see it
        if (!($post['visible'] or $privileges['can_moderate_posts'])) {
            continue;
        }
        if (!intval($post['userid'])) {
            $post['avatarid'] = false;
        } else {
            if (!$post['hascustomavatar']) {
                if ($post['profilepic']) {
                    $post['hascustomavatar'] = 1;
                    $post['avatarid'] = true;
                    $post['avatarpath'] = "./image.php?u=" . $post['userid'] . "&amp;dateline=" . $post['profilepicdateline'] . "&amp;type=profile";
                    $post['avwidth'] = $post['ppwidth'];
                    $post['avheight'] = $post['ppheight'];
                } else {
                    $post['hascustomavatar'] = 1;
                    $post['avatarid'] = true;
                    // explicity setting avatarurl to allow guests comments to show unknown avatar
                    $post['avatarurl'] = $post['avatarpath'] = vB_Template_Runtime::fetchStyleVar('imgdir_misc') . '/unknown.gif';
                    $post['avwidth'] = 60;
                    $post['avheight'] = 60;
                }
            }
        }
        if ($tachyuser = in_coventry($post['userid']) and !can_moderate($thread['forumid'])) {
            continue;
        }
        if ($post['visible'] == 1 and !$tachyuser) {
            ++$counter;
            if ($postorder) {
                $post['postcount'] = --$postcount;
//.........这里部分代码省略.........
开发者ID:0hyeah,项目名称:yurivn,代码行数:101,代码来源:cms.php

示例11: eval

            eval(standard_error(fetch_error('invalidid', $vbphrase['forum'], $vbulletin->options['contactuslink'])));
        } else {
            exec_header_redirect($vbulletin->config['Misc']['admincpdir'] . '/index.php?' . $vbulletin->session->vars['sessionurl_js'] . 'loc=' . urlencode('moderator.php?' . $vbulletin->session->vars['sessionurl_js'] . "do=add&f={$foruminfo['forumid']}"));
        }
    } else {
        print_no_permission();
    }
}
// #############################################################################
if ($_REQUEST['do'] == 'postannouncement') {
    $vbulletin->input->clean_gpc('r', 'formumid', TYPE_INT);
    exec_header_redirect('announcement.php?' . $vbulletin->session->vars['sessionurl_js'] . 'do=edit&f=' . $vbulletin->GPC['forumid']);
}
if ($_REQUEST['do'] == 'useroptions') {
    $vbulletin->input->clean_gpc('r', 'userid', TYPE_UINT);
    $userid = verify_id('user', $vbulletin->GPC['userid']);
    if (can_administer('canadminusers')) {
        exec_header_redirect($vbulletin->config['Misc']['admincpdir'] . '/index.php?' . $vbulletin->session->vars['sessionurl_js'] . 'loc=' . urlencode('user.php?' . $vbulletin->session->vars['sessionurl_js'] . "do=edit&u={$userid}"));
    } else {
        if (can_moderate(0, 'canviewprofile')) {
            exec_header_redirect($vbulletin->config['Misc']['modcpdir'] . '/index.php?' . $vbulletin->session->vars['sessionurl_js'] . 'loc=' . urlencode('user.php?' . $vbulletin->session->vars['sessionurl_js'] . "do=viewuser&u={$userid}"));
        } else {
            print_no_permission();
        }
    }
}
// #############################################################################
if ($_REQUEST['do'] == 'move') {
    if (!$foruminfo['forumid']) {
        eval(standard_error(fetch_error('invalidid', $vbphrase['forum'], $vbulletin->options['contactuslink'])));
    }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:moderator.php

示例12: can_moderate

$show['approvepost'] = can_moderate($threadinfo['forumid'], 'canmoderateposts') ? true : false;
$show['managethread'] = can_moderate($threadinfo['forumid'], 'canmanagethreads') ? true : false;
$show['approveattachment'] = can_moderate($threadinfo['forumid'], 'canmoderateattachments') ? true : false;
$show['inlinemod'] = (!$show['threadedmode'] and ($show['managethread'] or $show['managepost'] or $show['approvepost'])) ? true : false;
$show['spamctrls'] = ($show['inlinemod'] and $show['managepost']);
$url = $show['inlinemod'] ? SCRIPTPATH : '';
// build inline moderation popup
if ($show['popups'] and $show['inlinemod']) {
    eval('$threadadmin_imod_menu_post = "' . fetch_template('threadadmin_imod_menu_post') . '";');
} else {
    $threadadmin_imod_menu_post = '';
}
// *********************************************************************************
// find the page that we should be on to display this post
if (!empty($postid) and $threadedmode == 0) {
    $postinfo = verify_id('post', $postid, 1, 1);
    $threadid = $postinfo['threadid'];
    $getpagenum = $db->query_first("\n\t\tSELECT COUNT(*) AS posts\n\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\tWHERE threadid = {$threadid} AND visible = 1\n\t\tAND dateline " . iif(!$postorder, '<=', '>=') . " {$postinfo['dateline']}\n\t");
    $vbulletin->GPC['pagenumber'] = ceil($getpagenum['posts'] / $perpage);
}
// *********************************************************************************
// update views counter
if ($vbulletin->options['threadviewslive']) {
    // doing it as they happen; for optimization purposes, this cannot use a DM!
    $db->shutdown_query("\n\t\tUPDATE " . TABLE_PREFIX . "thread\n\t\tSET views = views + 1\n\t\tWHERE threadid = " . intval($threadinfo['threadid']));
} else {
    // or doing it once an hour
    $db->shutdown_query("\n\t\tINSERT INTO " . TABLE_PREFIX . "threadviews (threadid)\n\t\tVALUES (" . intval($threadinfo['threadid']) . ')');
}
// *********************************************************************************
// display ratings if enabled
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:showthread.php

示例13: renderResult

	private static function renderResult($userinfo, $post_array, $permissions,
		$forumperms, $target_url, $nodeid)
	{

		if (!count($post_array))
		{
			return '';
		}
		require_once DIR . '/includes/functions_bigthree.php' ;
		require_once DIR . '/includes/class_postbit.php' ;

		fetch_phrase_group('showthread');
		fetch_phrase_group('postbit');

		global $vbphrase;
		global $template_hook;
		global $show;
		global $thread;
		$thread = $thread->get_record();
		$threadinfo = verify_id('thread', $thread['threadid'], 1, 1);
		$foruminfo = verify_id('forum', $threadinfo['forumid'], 1, 1);
		$firstpostid = false;

		$displayed_dateline = 0;
		if (vB::$vbulletin->options['threadmarking'] AND vB::$vbulletin->userinfo['userid'])
		{
			$threadview = max($threadinfo['threadread'], $threadinfo['forumread'], TIMENOW - (vB::$vbulletin->options['markinglimit'] * 86400));
		}
		else
		{
			$threadview = intval(fetch_bbarray_cookie('thread_lastview', $thread['threadid']));
			if (!$threadview)
			{
				$threadview = vB::$vbulletin->userinfo['lastvisit'];
			}
		}
		require_once DIR . '/includes/functions_user.php';
		$show['inlinemod'] = false;
		$postids = array();

		if (! isset(vB::$vbulletin->userinfo['permissions']['cms']))
		{
			vBCMS_Permissions::getUserPerms();
		}



		$postids = ' post.postid in ('
 			. implode(', ', $post_array) .')';


		$posts =  vB::$vbulletin->db->query_read($sql = "
			SELECT
			post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
			user.*, userfield.*, usertextfield.*,
			" . iif($forum['allowicons'], 'icon.title as icontitle, icon.iconpath,') . "
			" . iif( vB::$vbulletin->options['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,') . "
			" . ((can_moderate($thread['forumid'], 'canmoderateposts') OR can_moderate($thread['forumid'], 'candeleteposts')) ? 'spamlog.postid AS spamlog_postid,' : '') . "
				" . iif($deljoin, 'deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,') . "
				editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
				editlog.reason AS edit_reason, editlog.hashistory,
				postparsed.pagetext_html, postparsed.hasimages,
				sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,
				sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,
				IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid,
			 	customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight
				" . iif(!($permissions['genericpermissions'] &  vB::$vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']),  vB::$vbulletin->profilefield['hidden']) . "
				$hook_query_fields
			FROM " . TABLE_PREFIX . "post AS post
			LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)
			LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)
			LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
			" . iif($forum['allowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = post.iconid)") . "
			" . iif( vB::$vbulletin->options['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") . "
			" . ((can_moderate($thread['forumid'], 'canmoderateposts') OR can_moderate($thread['forumid'], 'candeleteposts')) ? "LEFT JOIN " . TABLE_PREFIX . "spamlog AS spamlog ON(spamlog.postid = post.postid)" : '') . "
				$deljoin
			LEFT JOIN " . TABLE_PREFIX . "editlog AS editlog ON(editlog.postid = post.postid)
			LEFT JOIN " . TABLE_PREFIX . "postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = " . intval(STYLEID) . " AND postparsed.languageid = " . intval(LANGUAGEID) . ")
			LEFT JOIN " . TABLE_PREFIX . "sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = " . intval(STYLEID) . " AND sigparsed.languageid = " . intval(LANGUAGEID) . ")
			LEFT JOIN " . TABLE_PREFIX . "sigpic AS sigpic ON(sigpic.userid = post.userid)
			LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)
				$hook_query_joins
			WHERE $postids
			ORDER BY post.dateline
		");

		if (!($forumperms &  vB::$vbulletin->bf_ugp_forumpermissions['canseethumbnails']) AND !($forumperms &  vB::$vbulletin->bf_ugp_forumpermissions['cangetattachment']))
		{
			 vB::$vbulletin->options['attachthumbs'] = 0;
		}

		if (!($forumperms &  vB::$vbulletin->bf_ugp_forumpermissions['cangetattachment']))
		{
			 vB::$vbulletin->options['viewattachedimages'] = 0;
		}

		$postcount = count($postid_array);

		$counter = 0;
		$postbits = '';
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:comments.php

示例14: array_merge

 if ($vbulletin->userinfo['searchprefs'] != '') {
     $prefs = array_merge($prefs, unserialize($vbulletin->userinfo['searchprefs']));
 }
 // if $forumid is specified, use it
 if ($foruminfo['forumid']) {
     $vbulletin->GPC['forumchoice'][] = $foruminfo['forumid'];
 }
 // if search conditions are specified in the URI, use them
 foreach (array_keys($globals) as $varname) {
     if ($vbulletin->GPC_exists["{$varname}"] and $varname != 'forumchoice' and $varname != 'prefixchoice' and $varname != 'humanverify') {
         $prefs["{$varname}"] = $vbulletin->GPC["{$varname}"];
     }
 }
 if ($vbulletin->GPC['searchthreadid']) {
     $show['searchthread'] = true;
     $threadinfo = verify_id('thread', $vbulletin->GPC['searchthreadid'], true, true);
     $searchid = $threadinfo['threadid'];
     // check for visible / deleted thread
     if (in_coventry($threadinfo['postuserid']) and !can_moderate($threadinfo['forumid']) or $threadinfo['open'] == 10 or !$threadinfo['visible'] and !can_moderate($threadinfo['forumid'], 'canmoderateposts') or $threadinfo['isdeleted'] and !can_moderate($threadinfo['forumid'])) {
         eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
     }
     $foruminfo = fetch_foruminfo($threadinfo['forumid']);
     // *********************************************************************************
     // check forum permissions
     $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'] == 0)) {
         print_no_permission();
     }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:search.php

示例15: verify_id

        }
    }
    if ($vbulletin->GPC['pollid']) {
        $pollinfo = verify_id('poll', $vbulletin->GPC['pollid'], 0, 1);
        $pollid =& $pollinfo['pollid'];
    }
} else {
    if ($vbulletin->GPC['forumid']) {
        $foruminfo = verify_id('forum', $vbulletin->GPC['forumid'], 0, 1);
        $forumid =& $foruminfo['forumid'];
        if (($foruminfo['styleoverride'] == 1 or $vbulletin->userinfo['styleid'] == 0) and !defined('BYPASS_STYLE_OVERRIDE')) {
            $codestyleid =& $foruminfo['styleid'];
        }
    } else {
        if ($vbulletin->GPC['pollid'] and THIS_SCRIPT == 'poll') {
            $pollinfo = verify_id('poll', $vbulletin->GPC['pollid'], 0, 1);
            $pollid =& $pollinfo['pollid'];
            $threadinfo = $db->query_first("\n\t\tSELECT thread.*\n\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\tWHERE thread.pollid = " . $vbulletin->GPC['pollid'] . "\n\t\t\tAND open <> 10\n\t");
            $threadid =& $threadinfo['threadid'];
            $foruminfo = fetch_foruminfo($threadinfo['forumid']);
            $forumid =& $foruminfo['forumid'];
            if (($foruminfo['styleoverride'] == 1 or $vbulletin->userinfo['styleid'] == 0) and !defined('BYPASS_STYLE_OVERRIDE')) {
                $codestyleid = $foruminfo['styleid'];
            }
        }
    }
}
// #############################################################################
// ######################## START TEMPLATES & STYLES ###########################
// #############################################################################
$userselect = false;
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:global.php


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