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

PHP print_standard_redirect函数代码示例

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

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



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

示例1: kbank_print_stop_message

function kbank_print_stop_message()
{
    global $vbulletin;
    $args = func_get_args();
    if (VB_AREA == 'AdminCP') {
        //back-end
        call_user_func_array('print_stop_message', $args);
    } else {
        //font-end
        $message = call_user_func_array('fetch_error', $args);
        if (defined('CP_REDIRECT')) {
            $vbulletin->url = CP_REDIRECT;
            eval(print_standard_redirect($message, false, true));
        } else {
            eval(standard_error($message));
        }
    }
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:18,代码来源:functions_interface.php


示例2: 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


示例3: eval

                    eval(standard_error(fetch_error('threadratevoted')));
                }
            }
        } else {
            $threadrate =& datamanager_init('ThreadRate', $vbulletin, ERRTYPE_STANDARD);
            $threadrate->set_info('thread', $threadinfo);
            $threadrate->set('threadid', $threadinfo['threadid']);
            $threadrate->set('userid', 0);
            $threadrate->set('vote', $vbulletin->GPC['vote']);
            $threadrate->set('ipaddress', IPADDRESS);
            ($hook = vBulletinHook::fetch_hook('threadrate_add')) ? eval($hook) : false;
            $threadrate->save();
            $update = true;
            if (!$vbulletin->GPC['ajax']) {
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}&page=" . $vbulletin->GPC['pagenumber'] . "&pp=" . $vbulletin->GPC['perpage'];
                eval(print_standard_redirect('redirect_threadrate_add'));
            }
        }
    }
}
require_once DIR . '/includes/class_xml.php';
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_group('threadrating');
if ($update) {
    $thread = $db->query_first_slave("\n\t\tSELECT votetotal, votenum\n\t\tFROM " . TABLE_PREFIX . "thread\n\t\tWHERE threadid = {$threadinfo['threadid']}\n\t");
    if ($thread['votenum'] >= $vbulletin->options['showvotes']) {
        // Show Voteavg
        $thread['voteavg'] = vb_number_format($thread['votetotal'] / $thread['votenum'], 2);
        $thread['rating'] = round($thread['votetotal'] / $thread['votenum']);
        $xml->add_tag('voteavg', process_replacement_vars("{$vbphrase['rating']}: <img class=\"inlineimg\" src=\"{$stylevar['imgdir_rating']}/rating_{$thread['rating']}.gif\" alt=\"" . construct_phrase($vbphrase['thread_rating_x_votes_y_average'], $thread['votenum'], $thread['voteavg']) . "\" border=\"0\" />"));
    } else {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:threadrate.php


示例4: array

		));

		if ($vbulletin->GPC['reason'] == '')
		{
			eval(standard_error(fetch_error('noreason')));
		}

		if ($perform_floodcheck)
		{
			$reportobj->perform_floodcheck_commit();
		}

		$reportobj->do_report($vbulletin->GPC['reason'], $messageinfo);

		$url =& $vbulletin->url;
		eval(print_standard_redirect('redirect_reportthanks'));
	}

}

if ($_REQUEST['do'] == 'quickedit')
{
	$vbulletin->input->clean_array_gpc('p', array(
		'editorid' => TYPE_NOHTML,
	));

	require_once(DIR . '/includes/class_xml.php');
	require_once(DIR . '/includes/functions_editor.php');

	$vminfo = verify_visitormessage($vbulletin->GPC['vmid']);
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:visitormessage.php


示例5: build_new_post


//.........这里部分代码省略.........
        // 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);
    $prevpostfound = false;
    $prevpostthreadid = 0;
    if ($prevpost = $vbulletin->db->query_first("\n\t\tSELECT posthash.threadid\n\t\tFROM " . TABLE_PREFIX . "posthash AS posthash\n\t\tWHERE posthash.userid = " . $vbulletin->userinfo['userid'] . " AND\n\t\t\tposthash.dupehash = '" . $vbulletin->db->escape_string($dupehash) . "' AND\n\t\t\tposthash.dateline > " . (TIMENOW - 300) . "\n\t")) {
        if ($type == 'thread' and $prevpost['threadid'] == 0 or $type == 'reply' and $prevpost['threadid'] == $threadinfo['threadid']) {
            $prevpostfound = true;
            $prevpostthreadid = $prevpost['threadid'];
        }
    }
    // Redirect user to forumdisplay since this is a duplicate post
    if ($prevpostfound) {
        if ($type == 'thread') {
            $vbulletin->url = 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$foruminfo['forumid']}";
            eval(print_standard_redirect('redirect_duplicatethread', true, true));
        } else {
            // with ajax quick reply we need to use the error system
            if ($vbulletin->GPC['ajax']) {
                $dataman->error('duplicate_post');
                $errors = $dataman->errors;
                return;
            } else {
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$prevpostthreadid}&goto=newpost";
                if ($post['ajaxqrfailed']) {
                    // ajax qr failed. While this is a dupe, most likely the user didn't
                    // see the initial post, so act like it went through.
                    eval(print_standard_redirect('redirect_postthanks', true, true));
                } else {
                    eval(print_standard_redirect('redirect_duplicatepost', true, true));
                }
            }
        }
    }
    if (sizeof($errors) > 0) {
        return;
    }
    $id = $dataman->save();
    if ($type == 'thread') {
        $post['threadid'] = $id;
        $threadinfo =& $dataman->thread;
        $post['postid'] = $dataman->fetch_field('firstpostid');
    } else {
        $post['postid'] = $id;
    }
    $post['visible'] = $dataman->fetch_field('visible');
    $set_open_status = false;
    $set_sticky_status = false;
开发者ID:holandacz,项目名称:nb4,代码行数:67,代码来源:functions_newpost.php


示例6: array

// ############################################################################
// ######################### ADD EVENT REMINDER ###############################
// ############################################################################
if ($_POST['do'] == 'doaddreminder') {
    $vbulletin->input->clean_array_gpc('p', array('reminder' => TYPE_UINT));
    if (!$vbulletin->userinfo['userid']) {
        print_no_permission();
    }
    if (!$eventinfo['eventid']) {
        eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink'])));
    }
    ($hook = vBulletinHook::fetch_hook('calendar_doaddreminder')) ? eval($hook) : false;
    /*insert query*/
    $db->query_write("\n\t\tREPLACE INTO " . TABLE_PREFIX . "subscribeevent (userid, eventid, reminder)\n\t\tVALUES (" . $vbulletin->userinfo['userid'] . ", {$eventinfo['eventid']}, " . (!empty($reminders["{$vbulletin->GPC['reminder']}"]) ? $vbulletin->GPC['reminder'] : 3600) . ")\n\t");
    $vbulletin->url = 'calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=getinfo&amp;e={$eventinfo['eventid']}";
    print_standard_redirect('redirect_subsadd_event');
}
// ############################### start add subscription ###############################
if ($_REQUEST['do'] == 'addreminder') {
    if (!$vbulletin->userinfo['userid']) {
        print_no_permission();
    }
    if (!$eventinfo['eventid']) {
        eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink'])));
    }
    $navbits['calendar.php?' . $vbulletin->session->vars['sessionurl'] . "do=viewreminder"] = $vbphrase['event_reminders'];
    $navbits[''] = $vbphrase['add_reminder'];
    $navbits = construct_navbits($navbits);
    require_once DIR . '/includes/functions_user.php';
    construct_usercp_nav('event_reminders');
    $navbar = render_navbar_template($navbits);
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:calendar.php


示例7: IF

                $denyusers[$user['userid']] = $user['usergrouprequestid'];
            }
        }
    }
    // check that we STILL have some valid requests
    if (!empty($authusers)) {
        $updateQuery = "\n\t\t\tUPDATE " . TABLE_PREFIX . "user SET\n\t\t\tmembergroupids = IF(membergroupids = '', " . $vbulletin->GPC['usergroupid'] . ", CONCAT(membergroupids, '," . $vbulletin->GPC['usergroupid'] . "'))\n\t\t\tWHERE userid IN(" . implode(', ', array_keys($authusers)) . ")\n\t\t";
        $db->query_write($updateQuery);
    }
    ($hook = vBulletinHook::fetch_hook('joinrequest_process_complete')) ? eval($hook) : false;
    // delete processed join requests
    if (!empty($delete)) {
        $deleteQuery = "\n\t\t\tDELETE FROM " . TABLE_PREFIX . "usergrouprequest\n\t\t\tWHERE usergrouprequestid IN(" . implode(', ', $delete) . ")\n\t\t";
        $db->query_write($deleteQuery);
    }
    print_standard_redirect('join_requests_processed', true, true);
}
// #############################################################################
// view join requests
if ($_REQUEST['do'] == 'viewjoinrequests') {
    $vbulletin->input->clean_array_gpc('r', array('usergroupid' => TYPE_UINT, 'pagenumber' => TYPE_UINT, 'perpage' => TYPE_UINT));
    $usergroupid = $vbulletin->GPC['usergroupid'];
    ($hook = vBulletinHook::fetch_hook('joinrequest_view_start')) ? eval($hook) : false;
    if (!$vbulletin->GPC['usergroupid'] or !isset($vbulletin->usergroupcache["{$vbulletin->GPC['usergroupid']}"])) {
        eval(standard_error(fetch_error('invalidid', $vbphrase['usergroup'], $vbulletin->options['contactuslink'])));
    }
    $usergroups = array();
    // query usergroups of which bbuser is a leader
    $joinrequests = $db->query_read_slave("\n\t\tSELECT usergroupleader.usergroupid, COUNT(usergrouprequestid) AS requests\n\t\tFROM " . TABLE_PREFIX . "usergroupleader AS usergroupleader\n\t\tLEFT JOIN " . TABLE_PREFIX . "usergrouprequest AS usergrouprequest USING(usergroupid)\n\t\tWHERE usergroupleader.userid = " . $vbulletin->userinfo['userid'] . "\n\t\tGROUP BY usergroupleader.usergroupid\n\t");
    while ($joinrequest = $db->fetch_array($joinrequests)) {
        $usergroups["{$joinrequest['usergroupid']}"] = intval($joinrequest['requests']);
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:joinrequests.php


示例8: vB_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())));
			}
		}

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

		$message = fetch_censored_text($vbulletin->GPC['message']);

		eval(fetch_email_phrases('usermessage', $userinfo['languageid']));

		vbmail($userinfo['email'], fetch_censored_text($vbulletin->GPC['emailsubject']), $message , false, $vbulletin->userinfo['email'], '', $vbulletin->userinfo['username']);

		// parse this next line with eval:
		$sendtoname = $userinfo['username'];

		eval(print_standard_redirect('redirect_sentemail'));
	}
}

/*======================================================================*\
|| ####################################################################
|| # 
|| # CVS: $RCSfile$ - $Revision: 35508 $
|| ####################################################################
\*======================================================================*/
?>
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:sendmessage.php


示例9: datamanager_init

	$templater = vB_Template::create('moderation_deleteattachments');
		$templater->register_page_templates();
		$templater->register('navbar', $navbar);
		$templater->register('attachmentcount', $attachmentcount);
		$templater->register('attachmentids', $attachmentids);
		$templater->register('url', $url);
	print_output($templater->render());
}

if ($_POST['do'] == 'doattachmentdelete')
{
	// Permissions are verified within the attachment dm
	$attachdata =& datamanager_init('Attachment', $vbulletin, ERRTYPE_STANDARD);
	$attachdata->condition = "attachmentid IN (" . implode(", ", $attachmentids) . ")";
	$attachdata->delete();

	// empty cookie
	setcookie('vbulletin_inlineattachment', '', TIMENOW - 3600, '/');

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

	eval(print_standard_redirect('redirect_inline_deletedattachments', true, $forceredirect));

}

/*======================================================================*\
|| ####################################################################
|| # 
|| # SVN: $Revision: 30287 $
|| ####################################################################
\*======================================================================*/
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:attachment_inlinemod.php


示例10: do_login_redirect

function do_login_redirect()
{
    global $vbulletin, $vbphrase;
    if ($vbulletin->url == 'login.php' or $vbulletin->url == $vbulletin->options['forumhome'] . '.php' or strpos($vbulletin->url, 'do=logout') !== false) {
        $vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
    } else {
        $vbulletin->url = fetch_replaced_session_url($vbulletin->url);
        $vbulletin->url = preg_replace('#^/+#', '/', $vbulletin->url);
        // bug 3654 don't ask why
    }
    $temp = strpos($vbulletin->url, '?');
    if ($temp) {
        $formfile = substr($vbulletin->url, 0, $temp);
    } else {
        $formfile =& $vbulletin->url;
    }
    $postvars = $vbulletin->GPC['postvars'];
    ($hook = vBulletinHook::fetch_hook('login_redirect')) ? eval($hook) : false;
    // recache the global group to get the stuff from the new language
    $globalgroup = $vbulletin->db->query_first_slave("\n\t\tSELECT phrasegroup_global, languagecode, charset\n\t\tFROM " . TABLE_PREFIX . "language\n\t\tWHERE languageid = " . intval($vbulletin->userinfo['languageid'] ? $vbulletin->userinfo['languageid'] : $vbulletin->options['languageid']));
    if ($globalgroup) {
        $vbphrase = array_merge($vbphrase, unserialize($globalgroup['phrasegroup_global']));
        global $stylevar;
        if ($stylevar['charset'] != $globalgroup['charset']) {
            // change the character set in a bunch of places - a total hack
            global $headinclude;
            $headinclude = str_replace("content=\"text/html; charset={$stylevar['charset']}\"", "content=\"text/html; charset={$globalgroup['charset']}\"", $headinclude);
            $stylevar['charset'] = $globalgroup['charset'];
            $vbulletin->userinfo['lang_charset'] = $globalgroup['charset'];
            exec_headers();
        }
        $stylevar['languagecode'] = $globalgroup['languagecode'];
    }
    eval(print_standard_redirect('redirect_login', true, true, $vbulletin->userinfo['languageid']));
}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:35,代码来源:functions_login.php


示例11: intval

            $folderid = intval($folderid);
            if (empty($title)) {
                if ($folders["{$folderid}"]) {
                    $deletefolders .= iif($deletefolders, ',', '') . $folderid;
                }
                unset($folders["{$folderid}"]);
            } else {
                $folders["{$folderid}"] = $title;
            }
        }
        if ($deletefolders) {
            $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "subscribethread\n\t\t\t\tSET folderid = 0\n\t\t\t\tWHERE folderid IN ({$deletefolders}) AND\n\t\t\t\t\tuserid = " . $vbulletin->userinfo['userid']);
        }
        if (!empty($folders)) {
            natcasesort($folders);
        }
        require_once DIR . '/includes/functions_databuild.php';
        build_usertextfields('subfolders', iif(empty($folders), '', serialize($folders)));
    }
    $itemtype = $vbphrase['subscription'];
    $itemtypes = $vbphrase['subscriptions'];
    $vbulletin->url = 'subscription.php?' . $vbulletin->session->vars['sessionurl'] . 'do=viewsubscription';
    eval(print_standard_redirect('foldersedited'));
}
#end doeditfolders
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 27136 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:subscription.php


示例12: eval

                     eval(print_standard_redirect('payment_complete', true, true));
                 }
             } else {
                 if ($apiobj->type == 2) {
                     $subobj->delete_user_subscription($apiobj->paymentinfo['subscriptionid'], $apiobj->paymentinfo['userid'], $apiobj->paymentinfo['subscriptionsubid']);
                 }
             }
         } else {
             if ($apiobj->type == 2) {
                 // transaction is a reversal / refund
                 $subobj->delete_user_subscription($apiobj->paymentinfo['subscriptionid'], $apiobj->paymentinfo['userid'], $apiobj->paymentinfo['subscriptionsubid']);
             } else {
                 // its most likely a re-post of a payment, if we've already dealt with it serve up a redirect
                 if ($apiobj->display_feedback) {
                     $vbulletin->url = $vbulletin->options['bburl'] . '/payments.php';
                     eval(print_standard_redirect('payment_complete', true, true));
                 }
             }
         }
     } else {
         // something went horribly wrong, get $apiobj->error
         $trans = array('state' => 0, 'dateline' => TIMENOW, 'paymentapiid' => $api['paymentapiid'], 'request' => serialize(array('vb_error_code' => $apiobj->error_code, 'GET' => serialize($_GET), 'POST' => serialize($_POST))));
         $db->query_write(fetch_query_sql($trans, 'paymenttransaction'));
         if ($apiobj->display_feedback and !empty($apiobj->error)) {
             //die("<p>{$apiobj->error}</p>");
             // we dont load header / footer, so just show the LITE template
             define('VB_ERROR_LITE', true);
             standard_error($apiobj->error);
         }
     }
 }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:payment_gateway.php


示例13: construct_navbits

    $navbits = construct_navbits(array('' => $vbphrase['user_control_panel']));
    eval('$navbar = "' . fetch_template('navbar') . '";');
    eval('print_output("' . fetch_template('USERCP_SHELL') . '");');
}
// ###########################################################################
// ########################### UPDATE SUBSCRIPTIONS ##########################
// ###########################################################################
if ($_REQUEST['action'] == "updatesubs") {
    if (!$vbulletin->userinfo['userid']) {
        print_no_permission();
    }
    //get a list of all the forum ID's
    $tables = $db->query_read("\r\n\t\tSELECT forumid\r\n\t\tFROM " . TABLE_PREFIX . "forum\r\n\t");
    //scan through the list to perform the subscription action
    while ($curr_forum = $db->fetch_array($tables)) {
        //get full forum info
        $curr_forum = fetch_foruminfo($curr_forum['forumid'], false);
        //if the user has permission to view the given forum, and if forum is postable...
        if ($perms = fetch_permissions($curr_forum["forumid"]) and $perms & $vbulletin->bf_ugp_forumpermissions['canview'] and $curr_forum["cancontainthreads"]) {
            $vbulletin->input->clean_gpc('r', 'forumid' . $curr_forum['forumid'], TYPE_UINT);
            $new_sublevel = $vbulletin->GPC["forumid" . $curr_forum["forumid"]];
            if ($new_sublevel == 0) {
                $db->query_write("\r\n\t\t\t\tDELETE FROM " . TABLE_PREFIX . "subscribeforum\r\n\t\t\t\tWHERE userid = '" . $vbulletin->userinfo['userid'] . "'\r\n\t\t\t\tAND forumid = '" . $curr_forum['forumid'] . "'");
            } else {
                $db->query_write("\r\n\t\t\t\t\tREPLACE INTO " . TABLE_PREFIX . "subscribeforum (userid, emailupdate, forumid)\r\n\t\t\t\t\tVALUES ('" . $vbulletin->userinfo['userid'] . "', '" . $new_sublevel . "', '" . $curr_forum['forumid'] . "')\r\n\t\t\t\t");
            }
        }
    }
    $vbulletin->url = "subscribeforums.php";
    eval(print_standard_redirect('ei_sub_forums_updated', true, true));
}
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:subscribeforums.php


示例14: unhtmlspecialchars

            $url = unhtmlspecialchars($vbulletin->url);
            if (preg_match('/\\?([^#]*)(#.*)?$/s', $url, $match)) {
                parse_str($match[1], $parts);
                if ($parts['postid'] == $postinfo['postid'] or $parts['p'] == $postinfo['postid']) {
                    // we've deleted the post that we came into this thread from
                    // blank the redirect as it will be set below
                    $vbulletin->url = '';
                }
            } else {
                if ($removaltype or !can_moderate($threadinfo['forumid'], 'candeleteposts')) {
                    // hard deleted or not moderating -> redirect back to the thread
                    $vbulletin->url = '';
                }
            }
            if (!stristr($vbulletin->url, 'showthread.php')) {
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . 't=' . $threadinfo['threadid'];
            }
            eval(print_standard_redirect('redirect_deletepost'));
        }
    } else {
        ($hook = vBulletinHook::fetch_hook('editpost_delete_complete')) ? eval($hook) : false;
        $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p={$postinfo['postid']}#post{$postinfo['postid']}";
        eval(print_standard_redirect('redirect_nodelete'));
    }
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26636 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:editpost.php


示例15: unserialize

			{
				$temp = unserialize($check);
				if ($temp['do'] == 'doenterpwd')
				{
					$vbulletin->GPC['postvars'] = '';
				}
			}
			else
			{
				$vbulletin->GPC['postvars'] = '';
			}
		}

		// workaround IIS cookie+location header bug
		$forceredirect = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false);
		eval(print_standard_redirect('forumpasswordcorrect', true, $forceredirect));
	}
	else
	{
		require_once(DIR . '/includes/functions_misc.php');

		$vbulletin->GPC['url'] = str_replace('&amp;', '&', $vbulletin->GPC['url']);
		$postvars = construct_post_vars_html()
			. '<input type="hidden" name="securitytoken" value="' . $vbulletin->userinfo['securitytoken'] . '" />';

		// TODO; Convert 'forumpasswordincorrect' to vB4 style
		eval(standard_error(fetch_error('forumpasswordincorrect',
			$vbulletin->session->vars['sessionhash'],
			htmlspecialchars_uni($vbulletin->GPC['url']),
			$foruminfo['forumid'],
			$postvars,
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:forumdisplay.php


示例16: build_new_post


//.........这里部分代码省略.........
        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']);
    }
    $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);
    $prevpostfound = false;
    $prevpostthreadid = 0;
    if ($prevpost = $vbulletin->db->query_first("\n\t\tSELECT posthash.threadid, thread.title\n\t\tFROM " . TABLE_PREFIX . "posthash AS posthash\n\t\tLEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = posthash.threadid)\n\t\tWHERE posthash.userid = " . $vbulletin->userinfo['userid'] . " AND\n\t\t\tposthash.dupehash = '" . $vbulletin->db->escape_string($dupehash) . "' AND\n\t\t\tposthash.dateline > " . (TIMENOW - 300) . "\n\t")) {
        if ($type == 'thread' and $prevpost['threadid'] == 0 or $type == 'reply' and $prevpost['threadid'] == $threadinfo['threadid']) {
            $prevpostfound = true;
            $prevpostthreadid = $prevpost['threadid'];
        }
    }
    // Redirect user to forumdisplay since this is a duplicate post
    if ($prevpostfound) {
        if ($type == 'thread') {
            $vbulletin->url = fetch_seo_url('forum', $foruminfo);
            print_standard_redirect('redirect_duplicatethread', true, true);
        } else {
            // with ajax quick reply we need to use the error system
            if ($vbulletin->GPC['ajax']) {
                $dataman->error('duplicate_post');
                $errors = $dataman->errors;
                return;
            } else {
                $vbulletin->url = fetch_seo_url('thread', $prevpost, array('goto' => 'newpost'));
                if ($post['ajaxqrfailed']) {
                    // ajax qr failed. While this is a dupe, most likely the user didn't
                    // see the initial post, so act like it went through.
                    print_standard_redirect('redirect_postthanks');
                } else {
                    print_standard_redirect('redirect_duplicatepost', true, true);
                }
            }
        }
    }
    if (sizeof($errors) > 0) {
        return;
    }
    if ($post['doublepost']) {
        $dataman->save();
    } else {
        $id = $dataman->save();
    }
    if ($type == 'thread') {
        $post['threadid'] = $id;
        $threadinfo =& $dataman->thread;
        $post['postid'] = $dataman->fetch_field('firstpostid');
        clear_autosave_text('vBForum_Thread', 0, 0, $vbulletin->userinfo['userid']);
    } else {
开发者ID:0hyeah,项目名称:yurivn,代码行数:67,代码来源:functions_newpost.php


示例17: while

        }
    }
    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);
            eval(fetch_email_phrases('lostpw', $user['languageid']));
            vbmail($user['email'], $subject, $message, true);
        }
        $vbulletin->url = str_replace('"', '', $vbulletin->url);
        eval(print_standard_redirect('redirect_lostpw', true, true));
    } else {
        eval(standard_error(fetch_error('invalidemail', $vbulletin->options['contactuslink'])));
    }
}
// ############################### start reset password ###############################
if ($vbulletin->GPC['a'] == 'pwd' or $_REQUEST['do'] == 'resetpassword') {
    $vbulletin->input->clean_array_gpc('r', array('userid' => TYPE_UINT, 'u' => TYPE_UINT, 'activationid' => TYPE_STR, 'i' => TYPE_STR));
    if (!$vbulletin->GPC['userid']) {
        $vbulletin->GPC['userid'] = $vbulletin->GPC['u'];
    }
    if (!$vbulletin->GPC['activationid']) {
        $vbulletin->GPC['activationid'] = $vbulletin->GPC['i'];
    }
    $userinfo = verify_id('user', $vbulletin->GPC['userid'], 1, 1);
    $user = $db->query_first("\n\t\tSELECT activationid, dateline\n\t\tFROM " . TABLE_PREFIX . "useractivation\n\t\tWHERE type = 1\n\t\t\tAND userid = {$userinfo['userid']}\n\t");
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:login.php


示例18: eval

        eval(standard_error(fetch_error('tooshort', $vbulletin->options['postminchars'])));
    }
    ($hook = vBulletinHook::fetch_hook('usernote_donote')) ? eval($hook) : false;
    if ($vbulletin->GPC['usernoteid']) {
        // Edited note.
        $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "usernote\r\n\t\t\tSET message = '" . $db->escape_string($vbulletin->GPC['message']) . "',\r\n\t\t\t\ttitle = '" . $db->escape_string($vbulletin->GPC['title']) . "',\r\n\t\t\t\tallowsmilies = {$allowsmilies}\r\n\t\t\tWHERE usernoteid = " . $vbulletin->GPC['usernoteid'] . "\r\n\t\t");
    } else {
        /*insert query*/
        $db->query_write("\r\n\t\t\tINSERT INTO " . TABLE_PREFIX . "usernote (message, dateline, userid, posterid, title, allowsmilies)\r\n\t\t\tVALUES ('" . $db->escape_string($vbulletin->GPC['message']) . "', " . TIMENOW . ", {$userinfo['userid']}, " . $vbulletin->userinfo['userid'] . ", '" . $db->escape_string($vbulletin->GPC['title']) . "', {$allowsmilies})\r\n\t\t");
    }
    if (!$canview) {
        $vbulletin->url = fetch_seo_url('member', $userinfo);
    } else {
        $vbulletin->url = 'usernote.php?' . $vbulletin->session->vars['sessionurl'] . "do=viewuser&amp;u={$userinfo['userid']}";
    }
    eval(print_standard_redirect('redirect_usernoteaddevent'));
}
// ############################### Start Add User Note ##########################
if ($_REQUEST['do'] == 'newnote') {
    if (!$canpost) {
        print_no_permission();
    }
    if (empty($checked['parseurl'])) {
        $checked['parseurl'] = 'checked="checked"';
    }
    if ($vbulletin->options['unallowsmilies'] == 1) {
        $templater = vB_Template::create('newpost_disablesmiliesoption');
        $templater->register('checked', $checked);
        $disablesmiliesoption = $templater->render();
    }
    $show['editnote'] = false;
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:usernote.php


示例19: do_login_redirect

function do_login_redirect()
{
	global $vbulletin, $vbphrase;

	$vbulletin->input->fetch_basepath();

	if (
		$vbulletin->url == 'login.php'
		OR $vbulletin->url == $vbulletin->options['forumhome'] . '.php'
		OR strpos($vbulletin->url, 'do=logout') !== false
		OR (!$vbulletin->options['allowmultiregs'] AND strpos($vbulletin->url, $vbulletin->basepath . 'register.php') === 0)
	)
	{
		$vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
	}
	else
	{
		$vbulletin->url = fetch_replaced_session_url($vbulletin->url);
		$vbulletin->url = preg_replace('#^/+#', '/', $vbulletin->url); // bug 3654 don't ask why
	}

	$temp = strpos($vbulletin->url, '?');
	if ($temp)
	{
		$formfile = substr($vbulletin->url, 0, $temp);
	}
	else
	{
		$formfile =& $vbulletin->url;
	}

	$postvars = $vbulletin->GPC['postvars'];

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

	// recache the global group to get the stuff from the new language
	$globalgroup = $vbulletin->db->query_first_slave("
		SELECT phrasegroup_global, languagecode, charset
		FROM " . TABLE_PREFIX . "language
		WHERE languageid = " . intval($vbulletin->userinfo['languageid'] ? $vbulletin->userinfo['languageid'] : $vbulletin->options['languageid'])
	);
	if ($globalgroup)
	{
		$vbphrase = array_merge($vbphrase, unserialize($globalgroup['phrasegroup_global']));

		if (vB_Template_Runtime::fetchStyleVar('charset') != $globalgroup['charset'])
		{
			// change the character set in a bunch of places - a total hack
			global $headinclude;

			$headinclude = str_replace(
				"content=\"text/html; charset=" . vB_Template_Runtime::fetchStyleVar('charset') . "\"",
				"content=\"text/html; charset=$globalgroup[charset]\"",
				$headinclude
			);

			vB_Template_Runtime::addStyleVar('charset', $globalgroup['charset'], 'imgdir');
			$vbulletin->userinfo['lang_charset'] = $globalgroup['charset'];

			exec_headers();
		}
		if ($vbulletin->GPC['postvars'])
		{
			$postvars = @unserialize(verify_client_string($vbulletin->GPC['postvars']));
			if ($postvars['securitytoken'] = 'guest')
			{
				$vbulletin->userinfo['securitytoken_raw'] = sha1($vbulletin->userinfo['userid'] . sha1($vbulletin->userinfo['salt']) . sha1(COOKIE_SALT));
				$vbulletin->userinfo['securitytoken'] = TIMENOW . '-' . sha1(TIMENOW . $vbulletin->userinfo['securitytoken_raw']);
				$postvars['securitytoken'] = $vbulletin->userinfo['securitytoken'];
				$vbulletin->GPC['postvars'] = sign_client_string(serialize($postvars));
			}
		}

		vB_Template_Runtime::addStyleVar('languagecode', $globalgroup['languagecode']);
	}

	eval(print_standard_redirect('redirect_login', true, true, $vbulletin->userinfo['languageid']));
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:78,代码来源:functions_login.php


示例20: build_user_activation_id

                if (empty($user['activationid'])) {
                    //none exists so create one
                    $user['activationid'] = build_user_activation_id($user['userid'], 2, 0);
                } else {
                    $user['activationid'] = fetch_random_string(40);
                    $db->query_write("\r\n\t\t\t\t\t\tUPDATE " . TABLE_PREFIX . "useractivation SET\r\n\t\t\t\t\t\t\tdateline = " . TIMENOW . ",\r\n\t\t\t\t\t\t\tactivationid = '{$user['activatio 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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