本文整理汇总了PHP中fetch_require_hvcheck函数的典型用法代码示例。如果您正苦于以下问题:PHP fetch_require_hvcheck函数的具体用法?PHP fetch_require_hvcheck怎么用?PHP fetch_require_hvcheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fetch_require_hvcheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
示例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']) {
示例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;
}
}
示例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']);
示例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'];
}
}
示例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;
}
示例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());
示例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);
示例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;
示例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'];
}
}
示例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'];
示例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];
}
示例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, '?') ? '&' : '?') . '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']
//.........这里部分代码省略.........
示例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);
}
示例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.*