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

PHP fetch_require_hvcheck函数代码示例

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

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



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

示例1: eval

        require_once DIR . '/includes/class_humanverify.php';
        $verification =& vB_HumanVerify::fetch_library($vbulletin);
        $human_verify = $verification->output_token();
    } else {
        $human_verify = '';
    }
    $url =& $vbulletin->url;
    eval('print_output("' . fetch_template('lostpw') . '");');
}
// ############################### start email password ###############################
if ($_POST['do'] == 'emailpassword') {
    $vbulletin->input->clean_array_gpc('p', array('email' => TYPE_STR, 'userid' => TYPE_UINT, 'humanverify' => TYPE_ARRAY));
    if ($vbulletin->GPC['email'] == '') {
        eval(standard_error(fetch_error('invalidemail', $vbulletin->options['contactuslink'])));
    }
    if (fetch_require_hvcheck('lostpw')) {
        require_once DIR . '/includes/class_humanverify.php';
        $verify =& vB_HumanVerify::fetch_library($vbulletin);
        if (!$verify->verify_token($vbulletin->GPC['humanverify'])) {
            standard_error(fetch_error($verify->fetch_error()));
        }
    }
    require_once DIR . '/includes/functions_user.php';
    $users = $db->query_read_slave("\n\t\tSELECT userid, username, email, languageid\n\t\tFROM " . TABLE_PREFIX . "user\n\t\tWHERE email = '" . $db->escape_string($vbulletin->GPC['email']) . "'\n\t");
    if ($db->num_rows($users)) {
        while ($user = $db->fetch_array($users)) {
            if ($vbulletin->GPC['userid'] and $vbulletin->GPC['userid'] != $user['userid']) {
                continue;
            }
            $user['username'] = unhtmlspecialchars($user['username']);
            $user['activationid'] = build_user_activation_id($user['userid'], 2, 1);
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:login.php


示例2: do_get_thread


//.........这里部分代码省略.........
                }
            }
            $counter++;
        }
        if ($pollinfo['multiple']) {
            $pollinfo['numbervotes'] = $pollinfo['voters'];
            $show['multiple'] = true;
        }
        if ($pollinfo['public']) {
            $show['publicwarning'] = true;
        } else {
            $show['publicwarning'] = false;
        }
        $displayed_dateline = $threadinfo['lastpost'];
        ($hook = vBulletinHook::fetch_hook('showthread_poll_complete')) ? eval($hook) : false;
        if ($showresults or $uservoted) {
            $templater = vB_Template::create('pollresults_table');
            $templater->register('pollbits', $pollbits);
            $templater->register('pollenddate', $pollenddate);
            $templater->register('pollendtime', $pollendtime);
            $templater->register('pollinfo', $pollinfo);
            $templater->register('pollstatus', $pollstatus);
            $poll = $templater->render();
        } else {
            $templater = vB_Template::create('polloptions_table');
            $templater->register('pollbits', $pollbits);
            $templater->register('pollenddate', $pollenddate);
            $templater->register('pollendtime', $pollendtime);
            $templater->register('pollinfo', $pollinfo);
            $poll = $templater->render();
        }
    }
    // work out if quickreply should be shown or not
    if ($vbulletin->options['quickreply'] and !$thread['isdeleted'] and !is_browser('netscape') and $vbulletin->userinfo['userid'] and ($vbulletin->userinfo['userid'] == $threadinfo['postuserid'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyown'] or $vbulletin->userinfo['userid'] != $threadinfo['postuserid'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyothers']) and ($thread['open'] or can_moderate($threadinfo['forumid'], 'canopenclose')) and !fetch_require_hvcheck('post')) {
        $show['quickreply'] = true;
    } else {
        $show['quickreply'] = false;
        $show['wysiwyg'] = 0;
        $quickreply = '';
    }
    $show['largereplybutton'] = (!$thread['isdeleted'] and !$show['threadedmode'] and $forum['allowposting'] and !$show['search_engine']);
    if (!$forum['allowposting']) {
        $show['quickreply'] = false;
    }
    $show['multiquote_global'] = ($vbulletin->options['multiquote'] and $vbulletin->userinfo['userid']);
    if ($show['multiquote_global']) {
        $vbulletin->input->clean_array_gpc('c', array('vbulletin_multiquote' => TYPE_STR));
        $vbulletin->GPC['vbulletin_multiquote'] = explode(',', $vbulletin->GPC['vbulletin_multiquote']);
    }
    // post is cachable if option is enabled, last post is newer than max age, and this user
    // isn't showing a sessionhash
    $post_cachable = ($vbulletin->options['cachemaxage'] > 0 and TIMENOW - $vbulletin->options['cachemaxage'] * 60 * 60 * 24 <= $thread['lastpost'] and $vbulletin->session->vars['sessionurl'] == '');
    $saveparsed = '';
    $save_parsed_sigs = '';
    ($hook = vBulletinHook::fetch_hook('showthread_post_start')) ? eval($hook) : false;
    ################################################################################
    ####################### SHOW THREAD IN LINEAR MODE #############################
    ################################################################################
    if ($threadedmode == 0) {
        // allow deleted posts to not be counted in number of posts displayed on the page;
        // prevents issue with page count on forum display being incorrect
        $ids = array();
        $lastpostid = 0;
        $hook_query_joins = $hook_query_where = '';
        ($hook = vBulletinHook::fetch_hook('showthread_query_postids')) ? eval($hook) : false;
        if (empty($deljoin) and !$show['approvepost']) {
开发者ID:0hyeah,项目名称:yurivn,代码行数:67,代码来源:get_thread.php


示例3: htmlspecialchars_uni

	// if search conditions are specified in the URI, use them
	foreach (array_keys($search_fields + $optional_fields) AS $varname)
	{
		if ($vbulletin->GPC_exists["$varname"] AND !is_array($vbulletin->GPC["$varname"]))
		{
			$$varname = htmlspecialchars_uni($vbulletin->GPC["$varname"]);
			$checkedvar = $varname . 'checked';
			$selectedvar = $varname . 'selected';
			$$checkedvar = array($vbulletin->GPC["$varname"] => 'checked="checked"');
			$$selectedvar = array($vbulletin->GPC["$varname"] => 'selected="selected"');
		}
	}

	// image verification
	$human_verify = '';
	if (fetch_require_hvcheck('search'))
	{
		require_once(DIR . '/includes/class_humanverify.php');
		$verification =& vB_HumanVerify::fetch_library($vbulletin);
		$human_verify = $verification->output_token();
	}

	$tag_cloud = '';
	if ($vbulletin->options['vbblog_tagging'] AND $vbulletin->options['vbblog_tagcloud_searchcloud'])
	{
		$show['searchcloud'] = true;
		if ($tag_cloud = fetch_blog_tagcloud('search'))
		{
			$show['tagcloud_css'] = true;
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:blog_search.php


示例4: build_new_post


//.........这里部分代码省略.........
        $post['visible'] = 1;
    }
    if ($type != 'thread') {
        if ($dp_flag) {
            $parentid = $post['parentid'];
        } else {
            if ($postinfo['postid']) {
                // get parentid of the new post
                // we're not posting a new thread, so make this post a child of the first post in the thread
                if (!empty($threadinfo['firstpostid'])) {
                    //we have the postid in the thread table (firstpostid)
                    $parentid = $threadinfo['firstpostid'];
                } else {
                    //for some reason it might not be available in the $threadinfo array, need to fetch it
                    $getfirstpost = $vbulletin->db->query_first("SELECT postid FROM " . TABLE_PREFIX . "post WHERE threadid={$threadinfo['threadid']} ORDER BY dateline LIMIT 1");
                    $parentid = $getfirstpost['postid'];
                }
            } else {
                $parentid = $postinfo['postid'];
            }
        }
        $dataman->setr('parentid', $parentid);
        $dataman->setr('threadid', $threadinfo['threadid']);
    } else {
        $dataman->setr('forumid', $foruminfo['forumid']);
    }
    $errors = array();
    // done!
    ($hook = vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false;
    if ($vbulletin->GPC['fromquickreply'] and $post['preview']) {
        $errors = array();
        return;
    }
    if (fetch_require_hvcheck('post') and !$post['preview']) {
        require_once DIR . '/includes/class_humanverify.php';
        $verify =& vB_HumanVerify::fetch_library($vbulletin);
        if (!$verify->verify_token($post['humanverify'])) {
            $dataman->error($verify->fetch_error());
        }
    }
    if ($dataman->info['podcastsize']) {
        $post['podcastsize'] = $dataman->info['podcastsize'];
    }
    // check if this forum requires a prefix
    if ($type == 'thread' and !$dataman->fetch_field('prefixid') and $foruminfo['options'] & $vbulletin->bf_misc_forumoptions['prefixrequired']) {
        // only require a prefix if we actually have options for this forum
        require_once DIR . '/includes/functions_prefix.php';
        if (fetch_prefix_array($foruminfo['forumid'])) {
            $dataman->error('thread_prefix_required');
        }
    }
    if ($type == 'thread' and $post['taglist']) {
        $threadinfo['postuserid'] = $vbulletin->userinfo['userid'];
        require_once DIR . '/includes/class_taggablecontent.php';
        $content = vB_Taggable_Content_Item::create($vbulletin, "vBForum_Thread", $dataman->thread['threadid'], $threadinfo);
        $limits = $content->fetch_tag_limits();
        $content->filter_tag_list_content_limits($post['taglist'], $limits, $tag_errors, true, false);
        if ($tag_errors) {
            foreach ($tag_errors as $error) {
                $dataman->error($error);
            }
        }
        $dataman->setr('taglist', $post['taglist']);
    }
    if ($type == 'reply' and $vbulletin->GPC['return_node']) {
        $dataman->set_info('nodeid', $vbulletin->GPC['return_node']);
开发者ID:0hyeah,项目名称:yurivn,代码行数:67,代码来源:functions_newpost.php


示例5:

     $templater->register('birthdate', $birthdate);
     $templater->register('dayselected', $dayselected);
     $templater->register('monthselected', $monthselected);
     $templater->register('sbselected', $sbselected);
     $templater->register('year', $year);
     $birthdayfields = $templater->render();
 } else {
     $show['birthday'] = false;
     $birthdayfields = '';
 }
 $htmlonoff = $vbulletin->options['allowhtml'] ? $vbphrase['on'] : $vbphrase['off'];
 $bbcodeonoff = $vbulletin->options['allowbbcode'] ? $vbphrase['on'] : $vbphrase['off'];
 $imgcodeonoff = $vbulletin->options['allowbbimagecode'] ? $vbphrase['on'] : $vbphrase['off'];
 $smiliesonoff = $vbulletin->options['allowsmilies'] ? $vbphrase['on'] : $vbphrase['off'];
 // human verification, which we can bypass if user has been verified on facebook
 if (fetch_require_hvcheck('register') and (!is_facebookenabled() or is_facebookenabled() and !vB_Facebook::instance()->userIsLoggedIn())) {
     require_once DIR . '/includes/class_humanverify.php';
     $verify =& vB_HumanVerify::fetch_library($vbulletin);
     $human_verify = $verify->output_token();
 }
 // Referrer
 if ($vbulletin->options['usereferrer'] and !$vbulletin->userinfo['userid']) {
     exec_switch_bg();
     if ($errorlist) {
         $referrername = $vbulletin->GPC['referrername'];
     } else {
         if ($vbulletin->GPC[COOKIE_PREFIX . 'referrerid']) {
             if ($referrername = $db->query_first_slave("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = " . $vbulletin->GPC[COOKIE_PREFIX . 'referrerid'])) {
                 $referrername = $referrername['username'];
             }
         }
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:register.php


示例6: create_full_url

}
// #############################################################################
// do cron stuff - goes into footer
if ($vbulletin->cron <= TIMENOW) {
    $cronimage = '<img src="' . create_full_url('cron.php?' . $vbulletin->session->vars['sessionurl'] . 'rand=' . TIMENOW) . '" alt="" width="1" height="1" border="0" />';
} else {
    $cronimage = '';
}
$show['rtl'] = $stylevar['textdirection'] == 'rtl';
$show['admincplink'] = iif($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'], true, false);
// This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
// $show['modcplink'] = iif(can_moderate(), true, false);
$show['modcplink'] = ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] or $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']);
$show['registerbutton'] = (!$show['search_engine'] and $vbulletin->options['allowregistration'] and (!$vbulletin->userinfo['userid'] or $vbulletin->options['allowmultiregs']));
$show['searchbuttons'] = (!$show['search_engine'] and $vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['cansearch'] and $vbulletin->options['enablesearches']);
$show['quicksearch'] = !fetch_require_hvcheck('search');
$show['memberslist'] = ($vbulletin->options['enablememberlist'] and $permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canviewmembers']);
$loggedout = false;
if (THIS_SCRIPT == 'login' and $_REQUEST['do'] == 'logout' and $vbulletin->userinfo['userid'] != 0) {
    $vbulletin->input->clean_gpc('r', 'logouthash', TYPE_STR);
    if (verify_security_token($vbulletin->GPC['logouthash'], $vbulletin->userinfo['securitytoken_raw'])) {
        $loggedout = true;
    }
}
if (!$vbulletin->userinfo['userid'] or $loggedout) {
    $show['guest'] = true;
    $show['member'] = false;
} else {
    $show['guest'] = false;
    $show['member'] = true;
}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:global.php


示例7: can_moderate

}
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['cangetattachment'])) {
    $vbulletin->options['viewattachedimages'] = ($vbulletin->options['viewattachedimages'] and $vbulletin->options['attachthumbs']) ? 1 : 0;
}
// needed for deleted post management
$show['managepost'] = (can_moderate($threadinfo['forumid'], 'candeleteposts') or can_moderate($threadinfo['forumid'], 'canremoveposts')) ? true : false;
$show['approvepost'] = can_moderate($threadinfo['forumid'], 'canmoderateposts') ? true : false;
$show['managethread'] = can_moderate($threadinfo['forumid'], 'canmanagethreads') ? true : false;
$show['inlinemod'] = ($show['managethread'] or $show['managepost'] or $show['approvepost']) ? true : false;
$show['multiquote_global'] = ($vbulletin->options['multiquote'] and $vbulletin->userinfo['userid']);
if ($show['multiquote_global']) {
    $vbulletin->input->clean_array_gpc('c', array('vbulletin_multiquote' => TYPE_STR));
    $vbulletin->GPC['vbulletin_multiquote'] = explode(',', $vbulletin->GPC['vbulletin_multiquote']);
}
// work out if quickreply should be shown or not
if ($vbulletin->options['quickreply'] and !$threadinfo['isdeleted'] and !is_browser('netscape') and $vbulletin->userinfo['userid'] and ($vbulletin->userinfo['userid'] == $threadinfo['postuserid'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyown'] or $vbulletin->userinfo['userid'] != $threadinfo['postuserid'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyothers']) and ($threadinfo['open'] or can_moderate($threadinfo['forumid'], 'canopenclose')) and !fetch_require_hvcheck('post')) {
    $show['quickreply'] = true;
} else {
    $show['quickreply'] = false;
}
$show['lightbox'] = ($vbulletin->options['lightboxenabled'] and $vbulletin->options['usepopups']);
$show['spacer'] = false;
$saveparsed = '';
// inialise
$post['postcount'] =& $vbulletin->GPC['postcount'];
$postbit_factory = new vB_Postbit_Factory();
$postbit_factory->registry =& $vbulletin;
$postbit_factory->forum =& $foruminfo;
$postbit_factory->thread =& $threadinfo;
$postbit_factory->cache = array();
$postbit_factory->bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showpost.php


示例8: build_new_post


//.........这里部分代码省略.........
    $dataman->setr('title', $post['title']);
    $dataman->setr('pagetext', $post['message']);
    $dataman->setr('iconid', $post['iconid']);
    // see if post has to be moderated or if poster in a mod
    if (($foruminfo['moderatenewthread'] and $type == 'thread' or $foruminfo['moderatenewpost'] and $type == 'reply' or !($forumperms & $vbulletin->bf_ugp_forumpermissions['followforummoderation'])) and !can_moderate($foruminfo['forumid']) or $type == 'reply' and ($postinfo['postid'] and !$postinfo['visible'] and !empty($postinfo['specifiedpost']) or !$threadinfo['visible'])) {
        // note: specified post comes from a variable passed into newreply.php
        $dataman->set('visible', 0);
        $post['visible'] = 0;
    } else {
        $dataman->set('visible', 1);
        $post['visible'] = 1;
    }
    if ($type != 'thread') {
        if ($postinfo['postid'] == 0) {
            // get parentid of the new post
            // we're not posting a new thread, so make this post a child of the first post in the thread
            $getfirstpost = $vbulletin->db->query_first("SELECT postid FROM " . TABLE_PREFIX . "post WHERE threadid={$threadinfo['threadid']} ORDER BY dateline LIMIT 1");
            $parentid = $getfirstpost['postid'];
        } else {
            $parentid = $postinfo['postid'];
        }
        $dataman->setr('parentid', $parentid);
        $dataman->setr('threadid', $threadinfo['threadid']);
    } else {
        $dataman->setr('forumid', $foruminfo['forumid']);
    }
    $errors = array();
    // done!
    ($hook = vBulletinHook::fetch_hook('newpost_process')) ? eval($hook) : false;
    if ($vbulletin->GPC['fromquickreply'] and $post['preview']) {
        $errors = array();
        return;
    }
    if (fetch_require_hvcheck('post') and !$post['preview']) {
        require_once DIR . '/includes/class_humanverify.php';
        $verify =& vB_HumanVerify::fetch_library($vbulletin);
        if (!$verify->verify_token($post['humanverify'])) {
            $dataman->error($verify->fetch_error());
        }
    }
    if ($dataman->info['podcastsize']) {
        $post['podcastsize'] = $dataman->info['podcastsize'];
    }
    // check if this forum requires a prefix
    if ($type == 'thread' and !$dataman->fetch_field('prefixid') and $foruminfo['options'] & $vbulletin->bf_misc_forumoptions['prefixrequired']) {
        // only require a prefix if we actually have options for this forum
        require_once DIR . '/includes/functions_prefix.php';
        if (fetch_prefix_array($foruminfo['forumid'])) {
            $dataman->error('thread_prefix_required');
        }
    }
    if ($type == 'thread' and $post['taglist']) {
        fetch_valid_tags($dataman->thread, $post['taglist'], $tag_errors, true, false);
        if ($tag_errors) {
            foreach ($tag_errors as $error) {
                $dataman->error($error);
            }
        }
    }
    $dataman->pre_save();
    $errors = array_merge($errors, $dataman->errors);
    if ($post['preview']) {
        return;
    }
    // ### DUPE CHECK ###
    $dupehash = md5($foruminfo['forumid'] . $post['title'] . $post['message'] . $vbulletin->userinfo['userid'] . $type);
开发者ID:benyamin20,项目名称:vbregistration,代码行数:67,代码来源:functions_newpost.php


示例9: eval

 if (can_moderate($foruminfo['forumid'], 'canmanagethreads')) {
     $threadinfo['sticky'] = 0;
     $show['stickunstick'] = true;
     $show['unstickthread'] = false;
 } else {
     $show['stickunstick'] = false;
 }
 if ($show['openclose'] or $show['stickunstick']) {
     ($hook = vBulletinHook::fetch_hook('newthread_form_threadmanage')) ? eval($hook) : false;
     $templater = vB_Template::create('newpost_threadmanage');
     $templater->register('checked', $checked);
     $threadmanagement = $templater->render();
 } else {
     $threadmanagement = '';
 }
 if (fetch_require_hvcheck('post')) {
     require_once DIR . '/includes/class_humanverify.php';
     $verification =& vB_HumanVerify::fetch_library($vbulletin);
     $human_verify = $verification->output_token();
 } else {
     $human_verify = '';
 }
 if ($show['tag_option']) {
     $tags_remain = null;
     if ($vbulletin->options['tagmaxthread']) {
         $tags_remain = $vbulletin->options['tagmaxthread'];
     }
     if ($vbulletin->options['tagmaxstarter'] and !can_moderate($threadinfo['forumid'], 'caneditthreads')) {
         $tags_remain = $tags_remain === null ? $vbulletin->options['tagmaxstarter'] : min($tags_remain, $vbulletin->options['tagmaxstarter']);
     }
     $show['tags_remain'] = $tags_remain !== null;
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:newthread.php


示例10: array

     }
     // Default Birthday Privacy option to show all
     if (empty($errorlist)) {
         $sbselected = array(2 => 'selected="selected"');
     }
     eval('$birthdayfields = "' . fetch_template('modifyprofile_birthday') . '";');
 } else {
     $show['birthday'] = false;
     $birthdayfields = '';
 }
 $htmlonoff = $vbulletin->options['allowhtml'] ? $vbphrase['on'] : $vbphrase['off'];
 $bbcodeonoff = $vbulletin->options['allowbbcode'] ? $vbphrase['on'] : $vbphrase['off'];
 $imgcodeonoff = $vbulletin->options['allowbbimagecode'] ? $vbphrase['on'] : $vbphrase['off'];
 $smiliesonoff = $vbulletin->options['allowsmilies'] ? $vbphrase['on'] : $vbphrase['off'];
 // human verification
 if (fetch_require_hvcheck('register')) {
     require_once DIR . '/includes/class_humanverify.php';
     $verify =& vB_HumanVerify::fetch_library($vbulletin);
     $human_verify = $verify->output_token();
 }
 // Referrer
 if ($vbulletin->options['usereferrer'] and !$vbulletin->userinfo['userid']) {
     exec_switch_bg();
     if ($errorlist) {
         $referrername = $vbulletin->GPC['referrername'];
     } else {
         if ($vbulletin->GPC[COOKIE_PREFIX . 'referrerid']) {
             if ($referrername = $db->query_first_slave("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = " . $vbulletin->GPC[COOKIE_PREFIX . 'referrerid'])) {
                 $referrername = $referrername['username'];
             }
         }
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:register.php


示例11: explode

		'vbulletin_multiquote' => TYPE_STR
	));
	$vbulletin->GPC['vbulletin_multiquote'] = explode(',', $vbulletin->GPC['vbulletin_multiquote']);
}
// work out if quickreply should be shown or not
if (
	$vbulletin->options['quickreply']
	AND
	!$threadinfo['isdeleted'] AND !is_browser('netscape') AND $vbulletin->userinfo['userid']
	AND (
		($vbulletin->userinfo['userid'] == $threadinfo['postuserid'] AND $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyown'])
		OR
		($vbulletin->userinfo['userid'] != $threadinfo['postuserid'] AND $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyothers'])
	)
	AND ($threadinfo['open'] OR can_moderate($threadinfo['forumid'], 'canopenclose'))
	AND (!fetch_require_hvcheck('post'))
)
{
	$show['quickreply'] = true;
}
else
{
	$show['quickreply'] = false;
}
$show['lightbox'] = ($vbulletin->options['lightboxenabled'] AND $vbulletin->options['usepopups']);
$show['spacer'] = false;

$saveparsed = ''; // inialise

$post['postcount'] =& $vbulletin->GPC['postcount'];
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:showpost.php


示例12: fetchRequireHvcheck

 /**
  * Returns whether or not the user requires a human verification test to complete the specified action
  *
  * @param string $action The name of the action to check. Possible values: register, post, search, contactus, lostpw
  * @return boolean Whether a hv check is required
  */
 public function fetchRequireHvcheck($action)
 {
     static $results = array();
     if (!empty($results[$action])) {
         return $results[$action];
     }
     $results[$action] = fetch_require_hvcheck($action);
     return $results[$action];
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:15,代码来源:hv.php


示例13: load_show_variables

	/**
	* Loads assorted show variables. Ideally, these would be used in templates,
	* but sometimes they're used within code.
	*/
	public function load_show_variables()
	{
		global $show, $vbulletin, $vbphrase;

		$show['old_explorer'] = (is_browser('ie') AND !is_browser('ie', 6));

		$show['rtl'] = (!($vbulletin->userinfo['lang_options'] & $vbulletin->bf_misc_languageoptions['direction']));

		$show['admincplink'] = ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] ? true : false);
		// This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
		// $show['modcplink'] = iif(can_moderate(), true, false);
		$show['modcplink'] = (
			$vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']
			OR $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']
		);

		$show['registerbutton'] = (
			!$show['search_engine']
			AND $vbulletin->options['allowregistration']
			AND (!$vbulletin->userinfo['userid'] OR $vbulletin->options['allowmultiregs'])
		);
		$show['searchbuttons'] = (
			!$show['search_engine']
			AND $vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['cansearch']
			AND $vbulletin->options['enablesearches']
		);
		$show['quicksearch'] = (!fetch_require_hvcheck('search'));
		$show['memberslist'] = (
			$vbulletin->options['enablememberlist']
			AND $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canviewmembers']
		);

		$loggedout = false;
		if (THIS_SCRIPT == 'login' AND $_REQUEST['do'] == 'logout' AND $vbulletin->userinfo['userid'] != 0)
		{
			$vbulletin->input->clean_gpc('r', 'logouthash', TYPE_STR);
			if (verify_security_token($vbulletin->GPC['logouthash'], $vbulletin->userinfo['securitytoken_raw']))
			{
				$loggedout = true;
			}
		}
		if (!$vbulletin->userinfo['userid'] OR $loggedout)
		{
			$show['guest'] = true;
			$show['member'] = false;
		}
		else
		{
			$show['guest'] = false;
			$show['member'] = true;
		}

		$show['detailedtime'] = ($vbulletin->options['yestoday'] == 2);

		$show['popups'] = (!$show['search_engine'] AND $vbulletin->options['usepopups'] AND !$vbulletin->GPC['nojs']);
		if ($show['popups'])
		{
			// this isn't what $show is for, but it's a variable that's available in many places
			$show['nojs_link'] = $vbulletin->scriptpath . (strpos($vbulletin->scriptpath, '?') ? '&amp;' : '?') . 'nojs=1';
		}
		else
		{
			$show['nojs_link'] = '';
		}

		if ($vbulletin->options['enablepms'] AND $vbulletin->userinfo['userid'] AND ($vbulletin->userinfo['pmunread'] OR ($vbulletin->userinfo['receivepm'] AND $vbulletin->userinfo['permissions']['pmquota'])))
		{
			if ($vbulletin->userinfo['pmtotal'] < $vbulletin->userinfo['permissions']['pmquota'])
			{
				if (($vbphrase['pmpercent_nav_compiled'] = number_format(floor($vbulletin->userinfo['pmtotal'] / $vbulletin->userinfo['permissions']['pmquota'] * 100), 0)) >= 90)
				{
					$show['pmwarning'] = true;
				}
				else
				{
					$show['pmwarning'] = false;
				}
			}
			else if ($vbulletin->userinfo['permissions']['pmquota'])
			{
				$show['pmwarning'] = true;
				$vbphrase['pmpercent_nav_compiled'] = '100';
			}
			else
			{
				$show['pmwarning'] = false;
			}
			$show['pmstats'] = true;
		}
		else
		{
			$show['pmstats'] = false;
			$show['pmwarning'] = false;
		}
		$show['pmmainlink'] = (
			$vbulletin->options['enablepms']
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:class_bootstrap.php


示例14: searchIntroRegisterHumanVerify

	/**
	 * vB_Search_Searchtools::searchIntroRegisterHumanVerify()
	 * Handle registration of the human verify components
	 *  If necesary, display the human verify form.
	 *
	 * @param mixed $template
	 * @return nothing
	 */
	public static function searchIntroRegisterHumanVerify($template)
	{
		global $vbulletin;
		// image verification
		$human_verify = '';

		if (fetch_require_hvcheck('search'))
		{
			require_once(DIR . '/includes/class_humanverify.php');
			$verification =& vB_HumanVerify::fetch_library($vbulletin);
			$human_verify = $verification->output_token();
		}
		$template->register('human_verify', $human_verify);
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:22,代码来源:searchtools.php


示例15: vB_FloodCheck

	{
		eval(standard_error(fetch_error('requiredfields')));
	}

	if ($perform_floodcheck)
	{
		require_once(DIR . '/includes/class_floodcheck.php');
		$floodcheck = new vB_FloodCheck($vbulletin, 'user', 'emailstamp');
		$floodcheck->commit_key($vbulletin->userinfo['userid'], TIMENOW, TIMENOW - $vbulletin->options['emailfloodtime']);
		if ($floodcheck->is_flooding())
		{
			eval(standard_error(fetch_error('emailfloodcheck', $vbulletin->options['emailfloodtime'], $floodcheck->flood_wait())));
		}
	}

	if (fetch_require_hvcheck('contactus'))
	{
		require_once(DIR . '/includes/class_humanverify.php');
		$verify =& vB_HumanVerify::fetch_library($vbulletin);
		if (!$verify->verify_token($vbulletin->GPC['humanverify']))
		{
	  		standard_error(fetch_error($verify->fetch_error()));
	  	}
	}

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

	if ($vbulletin->GPC['username'] != '')
	{
		if ($userinfo = $db->query_first_slave("
			SELECT user.*, userfield.*
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:sendmessage.php


示例16: getPageView

	/**
	 * Fetches the standard page view .
	 * @param integer $nodeid - node for which we are displaying comments
	 *
	 * @return vBCms_View				- The resolved view, or array of views
	 */
	public function getPageView($nodeid, $target_url)
	{
		global $vbphrase;

		require_once DIR . '/includes/functions_editor.php';

			vB::$vbulletin->input->clean_array_gpc('r', array(
			'nodeid'     => vB_Input::TYPE_INT,
			'page' => vB_Input::TYPE_INT,
			'direction' => vB_Input::TYPE_STR,
			'postid' => vB_Input::TYPE_UINT
		));

		if (! $row = vB::$vbulletin->db->query_first("SELECT node.comments_enabled, node.setpublish, node.publishdate,
		 nodeinfo.associatedthreadid,	thread.forumid FROM "
		. TABLE_PREFIX . "cms_node AS node LEFT JOIN "
		. TABLE_PREFIX . "cms_nodeinfo AS nodeinfo ON node.nodeid = nodeinfo.nodeid LEFT JOIN "
		. TABLE_PREFIX . "thread AS thread on thread.threadID = nodeinfo.associatedthreadid
			WHERE	nodeinfo.nodeid = $nodeid LIMIT 1;" ))
		{
			return false;
		}

		if (! $row['comments_enabled'] OR !$row['setpublish'] OR ($row['publishdate'] > TIMENOW))
		{
			return false;
		}

		if (! intval($row['forumid']))
		{
			$this->repairComments($row['associatedthreadid']);
		}

		if (!intval($row['associatedthreadid']))
		{
			return false;
		}

		$associatedthreadid = $row['associatedthreadid'];
		
		$base_url = empty($target_url) ? vB_Router::getCurrentURL() : $target_url;


		// Create view
		$view = new vB_View('vbcms_comments_page');
		$view->nodeid = $nodeid;
		$view->threadid = $row['associatedthreadid'];
		$view->this_url = str_replace('&amp;', '&', $base_url);

		// display publish to Facebook checkbox in quick editor?
		if (is_facebookenabled())
		{
			$view->fbpublishcheckbox = construct_fbpublishcheckbox();
		}

		$this_user = new vB_Legacy_CurrentUser();

		$pageno = vB::$vbulletin->GPC_exists['page'] ?
			vB::$vbulletin->GPC['page'] : 1;
		$view->pageno = $pageno;
		$view->node_comments = self::showComments($view->nodeid,
			$this_user, $pageno, 20, $target_url, $associatedthreadid);

		// make sure user has permission to post comment before displaying comment editor
		if (self::canPostComment($view->threadid, $this_user))
		{
			// prepare the wyswiwig editor for comments
			$view->show_comment_editor = true;
			global $messagearea;
			$editor_name = construct_edit_toolbar('');
			$view->messagearea = $messagearea;//
			$view->editor_name = $editor_name;

			// include captcha validation and guest username field
			if (fetch_require_hvcheck('post'))
			{
				require_once(DIR . '/includes/class_humanverify.php');
				$reg = vB::$vbulletin;
				$verification =& vB_HumanVerify::fetch_library($reg);
				$human_verify = $verification->output_token();
			}
			else
			{
				$human_verify = '';
			}
			$view->human_verify = $human_verify;
			$view->usernamecode = new vB_View('newpost_usernamecode');
		}
		else
		{
			$view->show_comment_editor = false;
		}

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


示例17: array

// #############################################################################
// draw navbar
$navbits = array();
$navbits[fetch_seo_url('forumhome', array())] = $vbphrase['forum'];
$parentlist = array_reverse(explode(',', substr($forum['parentlist'], 0, -3)));
foreach ($parentlist as $forumID) {
    $forumTitle = $vbulletin->forumcache["{$forumID}"]['title'];
    $navbits[fetch_seo_url('forum', array('forumid' => $forumID, 'title' => $forumTitle))] = $forumTitle;
}
$navbits[''] = $thread['prefix_rich'] . ' ' . $thread['title'];
$navbits = construct_navbits($navbits);
$navbar = render_navbar_template($navbits);
// #############################################################################
// setup $show variables
$show['lightbox'] = ($vbulletin->options['lightboxenabled'] and $vbulletin->options['usepopups'] and !empty($postattach) and $forumperms & $vbulletin->bf_ugp_forumpermissions['cangetattachment']);
$show['search'] = (!$show['search_engine'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['cansearch'] and $vbulletin->options['enablesearches'] and !fetch_require_hvcheck('search'));
$show['subscribed'] = iif($threadinfo['issubscribed'], true, false);
$show['threadrating'] = iif($forum['allowratings'] and ($threadinfo['open'] or can_moderate($threadinfo['forumid'], 'canopenclose')) and $forumperms & $vbulletin->bf_ugp_forumpermissions['canthreadrate'], true, false);
$show['ratethread'] = iif($show['threadrating'] and (!$threadinfo['vote'] or $vbulletin->options['votechange']), true, false);
$show['closethread'] = iif($threadinfo['open'], true, false);
$show['approvethread'] = $threadinfo['visible'] == 0 ? true : false;
$show['unstick'] = iif($threadinfo['sticky'], true, false);
$show['reputation'] = ($vbulletin->options['reputationenable'] and $vbulletin->userinfo['userid'] and $vbulletin->userinfo['permissions']['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isnotbannedgroup']);
$show['sendtofriend'] = $forumperms & $vbulletin->bf_ugp_forumpermissions['canemail'];
// next/prev links don't work for search engines or non-lastpost sort orders
// Anyone remember why we hide these links from search engines?
$show['next_prev_links'] = (!$show['search_engine'] and ($foruminfo['defaultsortfield'] == 'lastpost' or !$foruminfo['defaultsortfield']));
if ($show['next_prev_links'] and $vbulletin->options['nextprevlinks']) {
    $nextthreadinfo = goto_nextthread($thread['threadid'], false);
    $prevthreadinfo = goto_prevthread($thread['threadid'], false);
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showthread.php


示例18: if

		$birthdayfields = $templater->render();
	}
	else
	{
		$show['birthday'] = false;

		$birthdayfields = '';
	}

	$htmlonoff = ($vbulletin->options['allowhtml'] ? $vbphrase['on'] : $vbphrase['off']);
	$bbcodeonoff = ($vbulletin->options['allowbbcode'] ? $vbphrase['on'] : $vbphrase['off']);
	$imgcodeonoff = ($vbulletin->options['allowbbimagecode'] ? $vbphrase['on'] : $vbphrase['off']);
	$smiliesonoff = ($vbulletin->options['allowsmilies'] ? $vbphrase['on'] : $vbphrase['off']);

	// human verification, which we can bypass if user has been verified on facebook
	if (fetch_require_hvcheck('register') AND (!is_facebookenabled() OR (is_facebookenabled() AND !vB_Facebook::instance()->userIsLoggedIn())))
	{
		require_once(DIR . '/includes/class_humanverify.php');
		$verify =& vB_HumanVerify::fetch_library($vbulletin);
		$human_verify = $verify->output_token();
	}

	// Referrer
	if ($vbulletin->options['usereferrer'] AND !$vbulletin->userinfo['userid'])
	{
		exec_switch_bg();
		if ($errorlist)
		{
			$referrername = $vbulletin->GPC['referrername'];
		}
		else if ($vbulletin->GPC[COOKIE_PREFIX . 'referrerid'])
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:register.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fetch_row_bgclass函数代码示例发布时间:2022-05-15
下一篇:
PHP fetch_requested_object函数代码示例发布时间: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