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

PHP exec_header_redirect函数代码示例

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

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



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

示例1: exec_postvar_call_back

function exec_postvar_call_back()
{
    global $vbulletin;
    $vbulletin->input->clean_array_gpc('r', array('forumid' => TYPE_STR));
    $goto = '';
    $url = '';
    // jump from forumjump
    switch ($vbulletin->GPC['forumid']) {
        case 'search':
            $goto = 'search';
            break;
        case 'pm':
            $goto = 'private';
            break;
        case 'wol':
            $goto = 'online';
            break;
        case 'cp':
            $goto = 'usercp';
            break;
        case 'subs':
            $goto = 'subscription';
            break;
        case 'home':
        case '-1':
            $url = fetch_seo_url('forumhome|js', array());
            break;
    }
    // intval() forumid since having text in it is not expected anywhere else and it can't be "cleaned" a second time
    $vbulletin->GPC['forumid'] = intval($vbulletin->GPC['forumid']);
    if ($goto != '') {
        $url = "{$goto}.php?";
        if (!empty($vbulletin->session->vars['sessionurl_js'])) {
            $url .= $vbulletin->session->vars['sessionurl_js'];
        }
    }
    if ($url != '') {
        exec_header_redirect($url);
    }
    // end forumjump redirects
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:41,代码来源:forumdisplay.php


示例2: assertFriendlyUrl

 /**
  * Verify Friendly URL
  * Ensures the requested URL was in the correct format according to the
  * friendlyurl option.  If not, throw a 301 to the correct route.
  */
 public function assertFriendlyUrl()
 {
     // API don't need to redirect
     if (defined('VB_API') and VB_API === true) {
         return;
     }
     // Only redirect on GET
     if ('GET' != $_SERVER['REQUEST_METHOD']) {
         return;
     }
     // If this route isn't valid then we'll be 404'ing anyway
     if (!$this->isValid()) {
         return;
     }
     // If we don't have an entry path then there's nothing to do
     if (!($request_path = vB_Router::getEntryPath())) {
         return;
     }
     // Allow hooks to handle non canonical urls
     ($hook = vBulletinHook::fetch_hook('friendlyurl_redirect_canonical_route')) ? eval($hook) : false;
     // Check if we should be enforcing the canonical url
     if (vB_Friendly_Url::CANON_OFF == vB::$vbulletin->options['friendlyurl_canonical']) {
         return;
     }
     // Only redirect guests and search engines
     if (vB::$vbulletin->userinfo['userid'] and !vB::$vbulletin->options['friendlyurl_canonical_registered']) {
         return;
     }
     // Get the canonical path
     if (!isset($canonical_path)) {
         $canonical_path = $this->getRoutePath(false, vB_Friendly_Url::CANON_STRICT == vB::$vbulletin->options['friendlyurl_canonical'], true);
     }
     // Whether the request was canonical
     $canonical = true;
     // If no route path is specified then only rewrite can differ
     if ($request_path == VB_ROUTER_SEGMENT) {
         //This looks like a bug.  The second "==" should be an "AND".  This is based on the fact that how its written doesn't
         //make a lot of sense and the behavior with the change is more consistant.  However its a bug with senority at this
         //point and fixing it will change how urls behave.  For the time being leaving it alone is better than the risk of
         //changing it.
         if ((FRIENDLY_URL == FRIENDLY_URL_REWRITE) == (vB::$vbulletin->options['friendlyurl'] == FRIENDLY_URL_REWRITE)) {
             return;
         }
     }
     // Check the Friendly URL method
     if (FRIENDLY_URL !== intval(vB::$vbulletin->options['friendlyurl'])) {
         $canonical = false;
     }
     // Check URI
     if ($canonical and vB_Friendly_URL::CANON_STRICT == vB::$vbulletin->options['friendlyurl_canonical']) {
         if ($request_path != $canonical_path) {
             // request may have been in the current charset, try utf-8
             $request_path = to_utf8($request_path, vB::$vbulletin->userinfo['lang_charset']);
             if ($request_path != $canonical_path) {
                 $canonical = false;
             }
         }
     }
     // Redirect if incorrect
     if (!$canonical) {
         // Get the raw redirect url
         $url = $this->getCurrentURL(null, null, '', false, true);
         // add any query vars
         $vars = $_GET;
         unset($vars[vB::$vbulletin->options['route_requestvar']]);
         unset($vars['pagenumber']);
         // Remove duplicate created by shortvar code
         if (!empty($vars)) {
             $url .= (strpos($url, '?') ? '&' : '?') . urlimplode($vars, false, true);
         }
         //do a quick check to ensure that we aren't trying to redirect to the url
         //we came in on.  This is needed primarily because of a special case where the
         //friendly url logic doesn't correctly detect the rewrite URL version of the
         //incoming link and will attempt to redirect because they don't match.
         $url = create_full_url($url);
         $cleaned_url = vB::$vbulletin->input->xss_clean(vB::$vbulletin->input->strip_sessionhash($url));
         $cleaned_url = $this->domain_to_lower($cleaned_url);
         //if ($url != VB_URL_CLEAN)
         if (urldecode($cleaned_url) != urldecode($this->domain_to_lower(VB_URL_CLEAN))) {
             // redirect to the canonical url
             exec_header_redirect($url, 301);
         }
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:89,代码来源:route.php


示例3: eval

        $userdata->verify_useremail($vbulletin->userinfo['email']);
    }
    ($hook = vBulletinHook::fetch_hook('profile_updatepassword_complete')) ? eval($hook) : false;
    // save the data
    $userdata->save();
    if ($activate) {
        $vbulletin->url = 'usercp.php' . $vbulletin->session->vars['sessionurl_q'];
        eval(print_standard_redirect('redirect_updatethanks_newemail', true, true));
    } else {
        $vbulletin->url = 'usercp.php' . $vbulletin->session->vars['sessionurl_q'];
        eval(print_standard_redirect('redirect_updatethanks'));
    }
} else {
    if ($_GET['do'] == 'updatepassword') {
        // add consistency with previous behavior
        exec_header_redirect('profile.php?do=editpassword');
    }
}
// ############################################################################
// ######################### EDIT BUDDY/IGNORE LISTS ##########################
// ############################################################################
if ($_REQUEST['do'] == 'addlist') {
    $vbulletin->input->clean_array_gpc('r', array('userid' => TYPE_UINT, 'userlist' => TYPE_NOHTML));
    if ($vbulletin->GPC['userlist'] == 'friend' and (!($vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_friends']) or !($vbulletin->userinfo['permissions']['genericpermissions2'] & $vbulletin->bf_ugp_genericpermissions2['canusefriends']))) {
        $vbulletin->GPC['userlist'] = 'buddy';
    }
    $show['friend_checkbox'] = false;
    $userinfo = verify_id('user', $vbulletin->GPC['userid'], true, true, FETCH_USERINFO_ISFRIEND);
    cache_permissions($userinfo);
    if ($vbulletin->GPC['userlist'] == 'buddy' or $vbulletin->GPC['userlist'] == 'friend') {
        // No slave here
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:profile.php


示例4: array

// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array('buddylist' => array('BUDDYLIST', 'buddylistbit'), 'whoposted' => array('WHOPOSTED', 'whopostedbit'), 'showattachments' => array('ATTACHMENTS', 'attachmentbit'), 'showavatars' => array('help_avatars', 'help_avatars_avatar', 'help_avatars_category', 'help_avatars_row'), 'bbcode' => array('help_bbcodes', 'help_bbcodes_bbcode', 'help_bbcodes_link', 'bbcode_code', 'bbcode_html', 'bbcode_php', 'bbcode_quote'), 'getsmilies' => array('smiliepopup', 'smiliepopup_category', 'smiliepopup_row', 'smiliepopup_smilie', 'smiliepopup_straggler'), 'showsmilies' => array('help_smilies', 'help_smilies_smilie', 'help_smilies_category'));
$actiontemplates['none'] =& $actiontemplates['showsmilies'];
// allows proper template caching for the default action (showsmilies) if no valid action is specified
if (!empty($_REQUEST['do']) and !isset($actiontemplates["{$_REQUEST['do']}"])) {
    $actiontemplates["{$_REQUEST['do']}"] =& $actiontemplates['showsmilies'];
}
// ######################### REQUIRE BACK-END ############################
require_once './global.php';
// redirect in case anyone has linked to it
if ($_REQUEST['do'] == 'attachments') {
    exec_header_redirect('profile.php?' . $vbulletin->session->vars['sessionurl_js'] . 'do=editattachments');
}
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
($hook = vBulletinHook::fetch_hook('misc_start')) ? eval($hook) : false;
// ############################### start buddylist ###############################
if ($_REQUEST['do'] == 'buddylist') {
    if (!$vbulletin->userinfo['userid']) {
        print_no_permission();
    }
    ($hook = vBulletinHook::fetch_hook('misc_buddylist_start')) ? eval($hook) : false;
    $buddies =& $vbulletin->input->clean_gpc('r', 'buddies', TYPE_STR);
    $datecut = TIMENOW - $vbulletin->options['cookietimeout'];
    $buddys = $db->query_read_slave("\n\t\tSELECT\n\t\tuser.username, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.userid, session.lastactivity\n\t\tFROM " . TABLE_PREFIX . "userlist AS userlist\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = userlist.relationid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "session AS session ON(session.userid = user.userid)\n\t\tWHERE userlist.userid = {$vbulletin->userinfo['userid']} AND userlist.relationid = user.userid AND type = 'buddy'\n\t\tORDER BY username ASC, session.lastactivity DESC\n\t");
    $onlineusers = '';
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:misc.php


示例5: unset

         if ($displayed_dateline <= $threadview) {
             $updatethreadcookie = true;
         }
     }
 }
 $db->free_result($posts);
 unset($post);
 if ($postbits == '' and $vbulletin->GPC['pagenumber'] > 1) {
     $pageinfo = array('page' => $vbulletin->GPC['pagenumber'] - 1);
     if (!empty($vbulletin->GPC['perpage'])) {
         $pageinfo['pp'] = $perpage;
     }
     if (!empty($vbulletin->GPC['highlight'])) {
         $pageinfo['highlight'] = urlencode($vbulletin->GPC['highlight']);
     }
     exec_header_redirect(fetch_seo_url('thread|js', $threadinfo, $pageinfo));
 }
 DEVDEBUG("First Post: {$FIRSTPOSTID}; Last Post: {$LASTPOSTID}");
 $pageinfo = array();
 if ($vbulletin->GPC['highlight']) {
     $pageinfo['highlight'] = urlencode($vbulletin->GPC['highlight']);
 }
 if (!empty($vbulletin->GPC['perpage'])) {
     $pageinfo['pp'] = $perpage;
 }
 $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $perpage, $totalposts, '', '', '', 'thread', $threadinfo, $pageinfo);
 if ($thread['lastpost'] > $threadview) {
     if ($firstnew) {
         $firstunread = fetch_seo_url('thread', $threadinfo, array('page' => $vbulletin->GPC['pagenumber'])) . '#post' . $firstnew;
         $show['firstunreadlink'] = true;
     } else {
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showthread.php


示例6: vB_AJAX_XML_Builder

			(attachmentid, settings)
		VALUES (" . $vbulletin->GPC['attachmentid'] . ", '" . $db->escape_string(serialize($settings)) . "')
		ON DUPLICATE KEY UPDATE settings = '" . $db->escape_string(serialize($settings)) . "'

	");

	$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
	$xml->add_tag('ok', 1);
	$xml->print_xml();
}

if ($_REQUEST['do'] == 'rss')
{
	//we just replace "ajax.php" with "external.php"
	$redirect_url = 'external.php?' . $_SERVER['QUERY_STRING'];
	exec_header_redirect($redirect_url , 301);
}

if ($_REQUEST['do'] == 'get_comments')
{
	$current_user = new vB_Legacy_CurrentUser();
	$vbulletin->input->clean_array_gpc('r', array(
		'per_page' => TYPE_UINT,
		'page' => TYPE_UINT,
		'comments_previous' => TYPE_STR,
		'comments_next' => TYPE_STR,
		'nodeid' => TYPE_UINT,
		'this_url' => TYPE_STR));

	if (! $vbulletin->GPC_exists['page'])
	{
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:ajax.php


示例7: while

    }
    ++$versionkey;
    // to handle the case when we are running the version before a wildcard version
    while (strpos($_versions["{$versionkey}"], '*') !== false) {
        ++$versionkey;
    }
    if ($versionkey !== false and isset($_versions[$versionkey])) {
        // we know what script this version needs to go to
        $link = 'upgrade_' . $_versions[$versionkey] . '.php';
    } else {
        if (intval($vbulletin->versionnumber) == 3) {
            // assume we are finished
            $link = 'finalupgrade.php';
        } else {
            // no log and invalid version, so assume it's 2.x
            $link = 'upgrade_300b3.php';
        }
    }
}
if ($vbulletin->GPC['show']) {
    echo "<p><a href=\"{$link}\">{$link}</a></p>";
    echo "<p><a href=\"upgrade.php\">[{$vbphrase['refresh']}]</a></p>";
} else {
    exec_header_redirect($link);
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 09:39, Wed Nov 5th 2008
|| # CVS: $RCSfile$ - $Revision: 28279 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:upgrade.php


示例8: error_reporting

|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
chdir('./../');
// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('VB_AREA', 'Install');
define('TIMENOW', time());
header('Expires: ' . gmdate("D, d M Y H:i:s", TIMENOW) . ' GMT');
header("Last-Modified: " . gmdate("D, d M Y H:i:s", TIMENOW) . ' GMT');
// ########################## REQUIRE BACK-END ############################
require_once './install/includes/class_upgrade.php';
require_once './install/init.php';
require_once DIR . '/includes/functions.php';
require_once DIR . '/includes/functions_misc.php';
$db->hide_errors();
$db->query_first("SELECT * FROM " . TABLE_PREFIX . "datastore");
if ($db->errno()) {
    exec_header_redirect('install.php');
} else {
    exec_header_redirect('upgrade.php');
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 32287 $
|| ####################################################################
\*======================================================================*/
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:index.php


示例9: array_keys

    }
    $phraseids = array_keys($vbulletin->GPC['replace']);
    $phrases = $db->query_read("\n\t\tSELECT *\n\t\tFROM " . TABLE_PREFIX . "phrase\n\t\tWHERE phraseid IN (" . implode(',', $phraseids) . ")\n\t");
    while ($phrase = $db->fetch_array($phrases)) {
        $phrase['product'] = empty($phrase['product']) ? 'vbulletin' : $phrase['product'];
        $phrase['text'] = str_replace($vbulletin->GPC['searchstring'], $vbulletin->GPC['replacestring'], $phrase['text']);
        if ($phrase['languageid'] == $vbulletin->GPC['languageid']) {
            // update
            $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "phrase SET\n\t\t\t\t\ttext = '" . $db->escape_string($phrase['text']) . "',\n\t\t\t\t\tusername = '" . $db->escape_string($vbulletin->userinfo['username']) . "',\n\t\t\t\t\tdateline = " . TIMENOW . ",\n\t\t\t\t\tversion = '" . $db->escape_string($full_product_info["{$phrase['product']}"]['version']) . "'\n\t\t\t\tWHERE phraseid = {$phrase['phraseid']}\n\t\t\t");
        } else {
            // insert
            /*insert query*/
            $db->query_write("\n\t\t\t\tREPLACE INTO " . TABLE_PREFIX . "phrase\n\t\t\t\t\t(languageid, varname, text, fieldname, product, username, dateline, version)\n\t\t\t\tVALUES\n\t\t\t\t\t(" . $vbulletin->GPC['languageid'] . ",\n\t\t\t\t\t'" . $db->escape_string($phrase['varname']) . "',\n\t\t\t\t\t'" . $db->escape_string($phrase['text']) . "',\n\t\t\t\t\t'" . $db->escape_string($phrase['fieldname']) . "',\n\t\t\t\t\t'" . $db->escape_string($phrase['product']) . "',\n\t\t\t\t\t'" . $db->escape_string($vbulletin->userinfo['username']) . "',\n\t\t\t\t\t" . TIMENOW . ",\n\t\t\t\t\t'" . $db->escape_string($full_product_info["{$phrase['product']}"]['version']) . "')\n\t\t\t");
        }
    }
    exec_header_redirect("language.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&goto=" . urlencode("phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=search"));
}
// #############################################################################
if ($_POST['do'] == 'replace') {
    $vbulletin->input->clean_array_gpc('p', array('searchstring' => TYPE_STR, 'replacestring' => TYPE_STR, 'languageid' => TYPE_INT));
    if (empty($vbulletin->GPC['searchstring']) or empty($vbulletin->GPC['replacestring'])) {
        print_stop_message('please_complete_required_fields');
    }
    // do a rather clever query to find what phrases to display
    $phraseids = '0';
    $phrases = $db->query_read("\n\t\tSELECT\n\t\t\tIF(pcust.phraseid IS NULL, pmast.phraseid, pcust.phraseid) AS phraseid,\n\t\t\tIF(pcust.phraseid IS NULL, pmast.text, pcust.text) AS xtext\n\t\tFROM " . TABLE_PREFIX . "phrase AS pmast\n\t\tLEFT JOIN " . TABLE_PREFIX . "phrase AS pcust ON (\n\t\t\tpcust.varname = pmast.varname AND\n\t\t\tpcust.fieldname = pmast.fieldname AND\n\t\t\tpcust.languageid = " . $vbulletin->GPC['languageid'] . "\n\t\t)\n\t\tWHERE pmast.languageid = -1\n\t\tHAVING " . fetch_field_like_sql($vbulletin->GPC['searchstring'], 'xtext', false, true) . "\n\t");
    while ($phrase = $db->fetch_array($phrases)) {
        $phraseids .= ",{$phrase['phraseid']}";
    }
    $db->free_result($phrases);
    // now do a simple query to actually fetch the data
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:phrase.php


示例10: while

}
// #############################################################################
if ($_POST['do'] == 'updatestatus') {
    $vbulletin->input->clean_gpc('p', 'enabled', TYPE_ARRAY_UINT);
    $feeds_result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "rssfeed ORDER BY title");
    while ($feed = $db->fetch_array($feeds_result)) {
        $old = $feed['options'] & $vbulletin->bf_misc_feedoptions['enabled'] ? 1 : 0;
        $new = $vbulletin->GPC['enabled']["{$feed['rssfeedid']}"] ? 1 : 0;
        if ($old != $new) {
            $feeddata =& datamanager_init('RSSFeed', $vbulletin, ERRTYPE_ARRAY);
            $feeddata->set_existing($feed);
            $feeddata->set_bitfield('options', 'enabled', $new);
            $feeddata->save();
        }
    }
    exec_header_redirect('rssposter.php');
}
print_cp_header($vbphrase['rss_feed_manager']);
// #############################################################################
if ($_POST['do'] == 'kill') {
    $vbulletin->input->clean_gpc('p', 'rssfeedid', TYPE_UINT);
    if ($vbulletin->GPC['rssfeedid'] and $feed = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "rssfeed WHERE rssfeedid = " . $vbulletin->GPC['rssfeedid'])) {
        $feeddata =& datamanager_init('RSSFeed', $vbulletin, ERRTYPE_ARRAY);
        $feeddata->set_existing($feed);
        $feeddata->delete();
        define('CP_REDIRECT', 'rssposter.php');
        print_stop_message('deleted_rssfeed_x_successfully', $feeddata->fetch_field('title'));
    } else {
        echo "Kill oops";
    }
}
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:rssposter.php


示例11: fetch_permissions

	eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
}

$forumperms = fetch_permissions($threadinfo['forumid']);
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
{
	print_no_permission();
}
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0))
{
	print_no_permission();
}

if ($threadinfo['open'] == 10)
{
	exec_header_redirect('printthread.php?' . $vbulletin->session->vars['sessionurl_js'] . "t=$threadinfo[pollid]");
}

// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

// split thread over pages if necessary
$countposts = $db->query_first_slave("
	SELECT COUNT(*) AS total
	FROM " . TABLE_PREFIX . "post AS post
	WHERE threadid=$threadinfo[threadid] AND visible=1
");
$totalposts = $countposts['total'];

$vbulletin->GPC['perpage'] = sanitize_maxposts($vbulletin->GPC['perpage']);
$maxperpage = sanitize_maxposts(-1);
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:printthread.php


示例12: standard_redirect

/**
* Halts execution and redirects to the address specified
*
* If the 'useheaderredirect' option is on, the system will attempt to redirect invisibly using header('Location...
* However, 'useheaderredirect' is overridden by setting $forceredirect to a true value.
*
* @param	string	Redirect message
* @param	string	URL to which to redirect the browser
*/
function standard_redirect($message = '', $forceredirect = false)
{
	global $header, $footer, $headinclude, $headinclude_bottom, $forumjump;
	global $timezone, $vbulletin, $vbphrase;

	static
		$str_find     = array('"',      '<',    '>'),
		$str_replace  = array('&quot;', '&lt;', '&gt;');

	if ($vbulletin->db->explain)
	{
		$totaltime = microtime(true) - TIMESTART;

		$vartext .= "<!-- Page generated in " . vb_number_format($totaltime, 5) . " seconds with " . $vbulletin->db->querycount . " queries -->";

		$querytime = $vbulletin->db->time_total;
		echo "\n<b>Page generated in $totaltime seconds with " . $vbulletin->db->querycount . " queries,\nspending $querytime doing MySQL queries and " . ($totaltime - $querytime) . " doing PHP things.\n\n<hr />Shutdown Queries:</b>" . (defined('NOSHUTDOWNFUNC') ? " <b>DISABLED</b>" : '') . "<hr />\n\n";
		exit;
	}

	if ($vbulletin->options['useheaderredirect'] AND !$forceredirect AND !headers_sent() AND !$vbulletin->GPC['postvars'])
	{
		exec_header_redirect(unhtmlspecialchars($vbulletin->url, true));
	}

	$title = $vbulletin->options['bbtitle'];

	$pagetitle = $title;
	$errormessage = $message;

	$url = unhtmlspecialchars($vbulletin->url, true);
	$url = str_replace(chr(0), '', $url);
	$url = create_full_url($url);
	$url = str_replace($str_find, $str_replace, $url);
	$js_url = addslashes_js($url, '"'); // " has been replaced by &quot;

	$url = preg_replace(
		array('/&#0*59;?/', '/&#x0*3B;?/i', '#;#'),
		'%3B',
		$url
	);
	$url = preg_replace('#&amp%3B#i', '&amp;', $url);

	define('NOPMPOPUP', 1); // No footer here

	require_once(DIR . '/includes/functions_misc.php');
	$postvars = construct_hidden_var_fields(verify_client_string($vbulletin->GPC['postvars']));
	$formfile =& $url;

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

	$templater = vB_Template::create('STANDARD_REDIRECT');
		$templater->register('errormessage', $errormessage);
		$templater->register('formfile', $formfile);
		$templater->register('headinclude', $headinclude);
		$templater->register('headinclude_bottom', $headinclude_bottom);
		$templater->register('js_url', $js_url);
		$templater->register('pagetitle', $pagetitle);
		$templater->register('postvars', $postvars);
		$templater->register('url', $url);
	print_output($templater->render());
	exit;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:72,代码来源:functions.php


示例13: unset

     // get first and last post ids for this page (for big reply buttons)
     if (!isset($FIRSTPOSTID)) {
         $FIRSTPOSTID = $post['postid'];
     }
     $LASTPOSTID = $post['postid'];
     if ($post['dateline'] > $displayed_dateline) {
         $displayed_dateline = $post['dateline'];
         if ($displayed_dateline <= $threadview) {
             $updatethreadcookie = true;
         }
     }
 }
 $db->free_result($posts);
 unset($post);
 if ($postbits == '' and $vbulletin->GPC['pagenumber'] > 1) {
     exec_header_redirect('showthread.php?' . $vbulletin->session->vars['sessionurl_js'] . "t={$threadid}&page=" . ($vbulletin->GPC['pagenumber'] - 1) . (!empty($vbulletin->GPC['perpage']) ? "&pp={$perpage}" : "") . "{$highlightwords}");
 }
 DEVDEBUG("First Post: {$FIRSTPOSTID}; Last Post: {$LASTPOSTID}");
 $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $perpage, $totalposts, "showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t={$threadid}", "" . (!empty($vbulletin->GPC['perpage']) ? "&amp;pp={$perpage}" : "") . "{$highlightwords}");
 if ($thread['lastpost'] > $threadview) {
     if ($firstnew) {
         $firstunread = '#post' . $firstnew;
         $show['firstunreadlink'] = true;
     } else {
         $firstunread = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . 't=' . $threadid . '&amp;goto=newpost';
         $show['firstunreadlink'] = true;
     }
 } else {
     $firstunread = '';
     $show['firstunreadlink'] = false;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:showthread.php


示例14: eval

}
if ((!$threadinfo['visible'] or $threadinfo['isdeleted']) and !can_moderate($threadinfo['forumid'])) {
    eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
}
$forumperms = fetch_permissions($threadinfo['forumid']);
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
    print_no_permission();
}
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0)) {
    print_no_permission();
}
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
if ($_SERVER['REQUEST_METHOD'] != 'POST' or !$vbulletin->GPC['ajax']) {
    // redirect to showthread with a 301
    exec_header_redirect(fetch_seo_url('thread|js', $threadinfo, array('p' => $postinfo['postid'])) . "#post{$postinfo['postid']}", 301);
}
$hook_query_fields = $hook_query_joins = '';
($hook = vBulletinHook::fetch_hook('showpost_start')) ? eval($hook) : false;
$post = $db->query_first_slave("\n\tSELECT\n\t\tpost.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,\n\t\tuser.*, userfield.*, usertextfield.*,\n\t\t" . iif($foruminfo['allowicons'], 'icon.title as icontitle, icon.iconpath,') . "\n\t\tIF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid,\n\t\t" . iif($vbulletin->options['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,') . "\n\t\t" . ((can_moderate($threadinfo['forumid'], 'canmoderateposts') or can_moderate($threadinfo['forumid'], 'candeleteposts')) ? 'spamlog.postid AS spamlog_postid,' : '') . "\n\t\teditlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline, editlog.reason AS edit_reason, editlog.hashistory,\n\t\tpostparsed.pagetext_html, postparsed.hasimages,\n\t\tsigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,\n\t\tsigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight\n\t\t" . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), $vbulletin->profilefield['hidden']) . "\n\t\t{$hook_query_fields}\n\tFROM " . TABLE_PREFIX . "post AS post\n\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)\n\tLEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)\n\tLEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid = user.userid)\n\t" . iif($foruminfo['allowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = post.iconid)") . "\n\t" . iif($vbulletin->options['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") . "\n\t" . ((can_moderate($threadinfo['forumid'], 'canmoderateposts') or can_moderate($threadinfo['forumid'], 'candeleteposts')) ? "LEFT JOIN " . TABLE_PREFIX . "spamlog AS spamlog ON(spamlog.postid = post.postid)" : '') . "\n\tLEFT JOIN " . TABLE_PREFIX . "editlog AS editlog ON(editlog.postid = post.postid)\n\tLEFT JOIN " . TABLE_PREFIX . "postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = " . intval(STYLEID) . " AND postparsed.languageid = " . intval(LANGUAGEID) . ")\n\tLEFT JOIN " . TABLE_PREFIX . "sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = " . intval(STYLEID) . " AND sigparsed.languageid = " . intval(LANGUAGEID) . ")\n\tLEFT JOIN " . TABLE_PREFIX . "sigpic AS sigpic ON(sigpic.userid = post.userid)\n\t{$hook_query_joins}\n\tWHERE post.postid = {$postid}\n");
// Tachy goes to coventry
if (in_coventry($threadinfo['postuserid']) and !can_moderate($threadinfo['forumid'])) {
    // do not show post if part of a thread from a user in Coventry and bbuser is not mod
    eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
}
if (in_coventry($post['userid']) and !can_moderate($threadinfo['forumid'])) {
    // do not show post if posted by a user in Coventry and bbuser is not mod
    eval(standard_error(fetch_error('invalidid', $vbphrase['post'], $vbulletin->options['contactuslink'])));
}
// check for attachments
if ($post['attach']) {
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showpost.php


示例15: cache_ordered_forums

            }
            cache_ordered_forums(1);
            $datecutoff = $vbulletin->forumcache["{$foruminfo['forumid']}"]['lastpost'] - 30;
            $thread = $db->query_first_slave("\n\t\tSELECT thread.threadid\n\t\t\t" . ($tachyjoin ? ', IF(tachythreadpost.lastpost > thread.lastpost, tachythreadpost.lastpost, thread.lastpost) AS lastpost' : '') . "\n\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\t{$tachyjoin}\n\t\tWHERE thread.forumid IN ({$forumslist})\n\t\t\tAND thread.visible = 1\n\t\t\tAND thread.sticky IN (0,1)\n\t\t\tAND thread.open <> 10\n\t\t\t" . (!$tachyjoin ? "AND lastpost > {$datecutoff}" : '') . "\n\t\t\t{$globalignore_thread}\n\t\tORDER BY lastpost DESC\n\t\tLIMIT 1\n\t");
            if (!$thread) {
                eval(standard_error(fetch_error('invalidid', $vbphrase['user'], $vbulletin->options['contactuslink'])));
            }
            $getuserid = $db->query_first_slave("\n\t\tSELECT post.userid\n\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\tWHERE threadid = {$thread['threadid']}\n\t\t\tAND visible = 1\n\t\t\t{$globalignore_post}\n\t\tORDER BY dateline DESC\n\t\tLIMIT 1\n\t");
            if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($getuserid['userid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0)) {
                print_no_permission();
            }
            exec_header_redirect('member.php?' . $vbulletin->session->vars['sessionurl_js'] . "u={$getuserid['userid']}");
        } else {
            if ($vbulletin->GPC['find'] == 'moderator' and $vbulletin->GPC['moderatorid']) {
                $moderatorinfo = verify_id('moderator', $vbulletin->GPC['moderatorid'], 1, 1);
                exec_header_redirect('member.php?' . $vbulletin->session->vars['sessionurl_js'] . "u={$moderatorinfo['userid']}");
            } else {
                if ($vbulletin->GPC['username'] != '' and !$vbulletin->GPC['userid']) {
                    $user = $db->query_first_slave("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username = '" . $db->escape_string($vbulletin->GPC['username']) . "'");
                    $vbulletin->GPC['userid'] = $user['userid'];
                }
            }
        }
    }
}
if (!$vbulletin->GPC['userid']) {
    eval(standard_error(fetch_error('unregistereduser')));
}
$fetch_userinfo_options = FETCH_USERINFO_AVATAR | FETCH_USERINFO_LOCATION | FETCH_USERINFO_PROFILEPIC | FETCH_USERINFO_SIGPIC | FETCH_USERINFO_USERCSS | FETCH_USERINFO_ISFRIEND;
($hook = vBulletinHook::fetch_hook('member_start_fetch_user')) ? eval($hook) : false;
$userinfo = verify_id('user', $vbulletin->GPC['userid'], 1, 1, $fetch_userinfo_options);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:member.php


示例16: cache_permissions

// #############################################################################
// ### CACHE PERMISSIONS AND GRAB $permissions
// get the combined permissions for the current user
// this also creates the $fpermscache containing the user's forum permissions
$permissions = cache_permissions($vbulletin->userinfo);
$vbulletin->userinfo['permissions'] =& $permissions;
// #############################################################################
// check that board is active - if not admin, then display error
if (!$vbulletin->options['bbactive'] and !($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) or !($permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'])) {
    exec_header_redirect($vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php');
}
// if password is expired, deny access
if ($vbulletin->userinfo['userid'] and $permissions['passwordexpires']) {
    $passworddaysold = floor((TIMENOW - $vbulletin->userinfo['passworddate']) / 86400);
    if ($passworddaysold >= $permissions['passwordexpires']) {
        exec_header_redirect($vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php');
    }
}
verify_ip_ban();
$cache_templates = array('ad_archive_above_content1', 'ad_archive_above_content2', 'ad_archive_below_content');
($hook = vBulletinHook::fetch_hook('archive_global')) ? eval($hook) : false;
cache_templates($cache_templates, $style['templatelist']);
unset($cache_templates);
// #########################################################################################
// ###################### ARCHIVE FUNCTIONS ################################################
// function to list forums in their correct order and nesting
function print_archive_forum_list($parentid = -1, $indent = '')
{
    global $vbulletin;
    $output = '';
    if (empty($vbulletin->iforumcache)) {
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:global.php


示例17:

if ($vbulletin->bf_ugp === null)
{
	echo '<div>vBulletin datastore error caused by one or more of the following:
		<ol>
			' . (function_exists('mmcache_get') ? '<li>Turck MMCache has been detected on your server, first try disabling Turck MMCache or replacing it with eAccelerator</li>' : '') . '
			<li>You may have uploaded vBulletin files without also running the vBulletin upgrade script. If you have not run the upgrade script, do so now.</li>
			<li>The datastore cache may have been corrupted. Run <em>Rebuild Bitfields</em> from <em>tools.php</em>, which you can upload from the <em>do_not_upload</em> folder of the vBulletin package.</li>
		</ol>
	</div>';

	trigger_error('vBulletin datastore cache incomplete or corrupt', E_USER_ERROR);
}

if (defined('VB_PRODUCT') AND (!isset($vbulletin->products[VB_PRODUCT]) OR !($vbulletin->products[VB_PRODUCT])))
{
	exec_header_redirect(trim($vbulletin->options['bburl'], '/') . '/' . $vbulletin->options['forumhome'] . '.php', 302);
}

if (!empty($db->explain))
{
	$db->timer_stop(false);
}

if ($vbulletin->options['cookietimeout'] < 60)
{
	// values less than 60 will probably break things, so prevent that
	$vbulletin->options['cookietimeout'] = 60;
}

// #############################################################################
/**
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:init.php


示例18: fetch_permissions

    $_permsgetter_ = 'forumdisplay';
    $forumperms = fetch_permissions($forumid);
    if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview'])) {
        print_no_permission();
    }
    // add session hash to local links if necessary
    if (preg_match('#^([a-z0-9_]+\\.php)(\\?.*$)?#i', $foruminfo['link'], $match)) {
        if ($match[2]) {
            // we have a ?xyz part, put session url at beginning if necessary
            $query_string = preg_replace('/([^a-z0-9])(s|sessionhash)=[a-z0-9]{32}(&amp;|&)?/', '\\1', $match[2]);
            $foruminfo['link'] = $match[1] . '?' . $vbulletin->session->vars['sessionurl_js'] . substr($query_string, 1);
        } else {
            $foruminfo['link'] .= $vbulletin->session->vars['sessionurl_q'];
        }
    }
    exec_header_redirect($foruminfo['link'], true);
}
// #############################################################################
// Check for pm popup
if ($shownewpm) {
    if ($vbulletin->userinfo['pmunread'] == 1) {
        $pmpopupurl = 'private.php?' . $vbulletin->session->vars['sessionurl_js'] . "do=showpm&pmid={$newpm['pmid']}";
    } else {
        if (!empty($vbulletin->session->vars['sessionurl_js'])) {
            $pmpopupurl = 'private.php?' . $vbulletin->session->vars['sessionurl_js'];
        } else {
            $pmpopupurl = 'private.php';
        }
    }
    eval('$footer .= "' . fetch_template('pm_popup_script') . '";');
}
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:global.php


示例19: eval


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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