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

PHP vB_AJAX_XML_Builder类代码示例

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

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



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

示例1: checkUrlAvailable

	public static function checkUrlAvailable()
	{
		global $vbulletin;
		global $vbphrase;
		require_once DIR . '/includes/functions_databuild.php';
		require_once DIR . '/includes/functions_misc.php';
		fetch_phrase_group('cpcms');
		$vbulletin->input->clean_array_gpc('r', array(
			'url' => TYPE_STR,
			'nodeid' => TYPE_INT));

		$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
		$xml->add_group('root');
		$url_conflict = '';

		if (strlen($vbulletin->GPC['url'])
			and $row = $vbulletin->db->query_first($sql="SELECT nodeid FROM " . TABLE_PREFIX .
			"cms_node WHERE new != 1 AND lower(url)='" . $vbulletin->db->escape_string(strtolower($vbulletin->GPC['url'])) ."'"
			. ($vbulletin->GPC_exists['nodeid'] ? " and nodeid <> " . $vbulletin->GPC['nodeid'] : "" ) )
			and intval($row['nodeid']))
		{
			$url_conflict = $vbphrase['url_in_use'];
		}

		$xml->add_tag('html', $url_conflict);
		$xml->close_group();
		$xml->print_xml();
		return '';
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:29,代码来源:contentmanager.php


示例2: standard_error

/**
* Halts execution and shows the specified error message
*
* @param	string	Error message
* @param	string	Optional HTML code to insert in the <head> of the error page
* @param	boolean	If true, set the visitor's status on WOL to error page
* @param	string	Optional template to force the display to use. Ignored if showing a lite error
*/
function standard_error($error = '', $headinsert = '', $savebadlocation = true, $override_template = '')
{
    global $header, $footer, $headinclude, $forumjump, $timezone, $gobutton;
    global $vbulletin, $vbphrase, $stylevar, $template_hook;
    global $pmbox, $show, $ad_location, $notifications_menubits, $notifications_total;
    $show['notices'] = false;
    construct_forum_jump();
    $title = $vbulletin->options['bbtitle'];
    $pagetitle =& $title;
    $errormessage = $error;
    if (!$vbulletin->userinfo['badlocation'] and $savebadlocation) {
        $vbulletin->userinfo['badlocation'] = 3;
    }
    require_once DIR . '/includes/functions_misc.php';
    $postvars = construct_post_vars_html();
    if (defined('VB_ERROR_PERMISSION') and VB_ERROR_PERMISSION == true) {
        $show['permission_error'] = true;
    } else {
        $show['permission_error'] = false;
    }
    $show['search_noindex'] = (bool) ($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']);
    $navbits = $navbar = '';
    if (defined('VB_ERROR_LITE') and VB_ERROR_LITE == true) {
        $templatename = 'STANDARD_ERROR_LITE';
        define('NOPMPOPUP', 1);
        // No Footer here
    } else {
        if ($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']) {
            $show['forumdesc'] = false;
            $navbits = construct_navbits(array('' => $vbphrase['vbulletin_message']));
            eval('$navbar = "' . fetch_template('navbar') . '";');
        }
        $templatename = $override_template ? preg_replace('#[^a-z0-9_]#i', '', $override_template) : 'STANDARD_ERROR';
    }
    ($hook = vBulletinHook::fetch_hook('error_generic')) ? eval($hook) : false;
    if ($vbulletin->GPC['ajax']) {
        require_once DIR . '/includes/class_xml.php';
        $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
        $xml->add_tag('error', $errormessage);
        $xml->print_xml();
        exit;
    } else {
        if ($vbulletin->noheader) {
            @header('Content-Type: text/html' . ($vbulletin->userinfo['lang_charset'] != '' ? '; charset=' . $vbulletin->userinfo['lang_charset'] : ''));
        }
        eval('print_output("' . fetch_template($templatename) . '");');
        exit;
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:57,代码来源:functions.php


示例3: verify_visitormessage

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

	$vminfo = verify_visitormessage($vbulletin->GPC['vmid']);

	$editorid = construct_edit_toolbar(
		htmlspecialchars_uni($vminfo['pagetext']),
		false,
		'visitormessage',
		true,
		true,
		false,
		'qenr',
		$vbulletin->GPC['editorid']
	);

	$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');

	$xml->add_group('quickedit');
	$xml->add_tag('editor', process_replacement_vars($messagearea), array(
		'reason'       => '',
		'parsetype'    => 'visitormessage',
		'parsesmilies' => true,
		'mode'         => $show['is_wysiwyg_editor']
	));
	$xml->close_group();

	$xml->print_xml();
}

($hook = vBulletinHook::fetch_hook('visitor_message_complete')) ? eval($hook) : false;
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:visitormessage.php


示例4: vB_AJAX_XML_Builder

		'width'   => TYPE_UINT,
		'height'  => TYPE_UINT,
		'first'   => TYPE_BOOL,
	  'last'    => TYPE_BOOL,
		'current' => TYPE_UINT,
	  'total'   => TYPE_UINT
	));
	$width = $vbulletin->GPC['width'];
	$height = $vbulletin->GPC['height'];
	$first = $vbulletin->GPC['first'];
	$last = $vbulletin->GPC['last'];
	$current = $vbulletin->GPC['current'];
	$total = $vbulletin->GPC['total'];

	require_once(DIR . '/includes/class_xml.php');
	$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');

	if (in_array(strtolower($attachmentinfo['extension']), array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp')))
	{
		$uniqueid = $vbulletin->GPC['uniqueid'];
		$imagelink = 'attachment.php?' . $vbulletin->session->vars['sessionurl'] . 'attachmentid=' . $attachmentinfo['attachmentid'] . '&d=' . $attachmentinfo['dateline'];
		$attachmentinfo['date_string'] = vbdate($vbulletin->options['dateformat'], $attachmentinfo['dateline']);
		$attachmentinfo['time_string'] = vbdate($vbulletin->options['timeformat'], $attachmentinfo['dateline']);
		$show['newwindow'] = ($attachmentinfo['newwindow'] ? true : false);

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

		$templater = vB_Template::create('lightbox');
			$templater->register('attachmentinfo', $attachmentinfo);
			$templater->register('current', $current);
			$templater->register('first', $first);
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:attachment.php


示例5: getUiXml

	/**
	 * vB_Search_Type::getUiXml()
	 * This gets the xml which will be passed to the ajax function. It just wraps
	 * get_ui in html
	 *
	 * @param array $prefs : the stored prefs for this contenttype
	 * @return the appropriate user interface wrapped in XML
	 */
	public function getUiXml($prefs)
	{
		global $vbulletin;
		$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
		$xml->add_group('root');

		$xml->add_tag('html', $this->listUi($prefs));

		$xml->close_group();
		$xml->print_xml();
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:19,代码来源:type.php


示例6: array

	//and that page will do all the work.
}

//This is for the calendar widget paging;
if ($_REQUEST['do'] == 'calwidget' )
{
	$vbulletin->input->clean_array_gpc('r', array(
		'year' => TYPE_UINT,
		'month' => TYPE_UINT));

	if ( $vbulletin->GPC_exists['year'] AND $vbulletin->GPC_exists['month'])
	{
		$view = vBCms_Widget_Calendar::getCalendar($vbulletin->GPC['year'], $vbulletin->GPC['month']);
		$view->registerTemplater(vB_View::OT_XHTML, new vB_Templater_vB());
		$html = $view->render();
		$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
		$xml->add_tag('html', $html);
		$xml->print_xml();
	}


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


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


示例7: render

 /**
  * Renders the view to a string and returns it.
  *
  * @return string
  */
 public function render($send_content_headers = false)
 {
     require_once DIR . '/includes/class_xml.php';
     $xml = new vB_AJAX_XML_Builder(vB::$vbulletin, 'text/xml');
     $xml->add_group('container');
     $xml->add_tag('success', 1);
     if ($this->content) {
         $xml->add_tag('html', $this->content->render());
     }
     $xml->add_tag('title', $this->title);
     $xml->add_tag('status', $this->status);
     $xml->add_tag('message', $this->feedback);
     if (sizeof($this->errors)) {
         $xml->add_group('errors');
         foreach ($this->errors as $error) {
             $xml->add_tag('error', $error['message'], array('errcode' => $error['code']));
         }
         $xml->close_group();
     }
     if (sizeof($this->urls)) {
         $xml->add_group('urls');
         foreach ($this->urls as $type => $url) {
             $xml->add_tag('url', $url, array('type' => $type));
         }
         $xml->close_group();
     }
     $xml->close_group();
     if ($send_content_headers and !vB::contentHeadersSent()) {
         $xml->send_content_type_header();
         $xml->send_content_length_header();
         vB::contentHeadersSent(true);
     }
     return $xml->fetch_xml();
 }
开发者ID:Kheros,项目名称:MMOver,代码行数:39,代码来源:ajaxhtml.php


示例8: array

$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());
$postbit_obj =& $postbit_factory->fetch_postbit('post');
$postbit_obj->highlight =& $replacewords;
$postbit_obj->cachable = (!$post['pagetext_html'] and $vbulletin->options['cachemaxage'] > 0 and TIMENOW - $vbulletin->options['cachemaxage'] * 60 * 60 * 24 <= $threadinfo['lastpost']);
($hook = vBulletinHook::fetch_hook('showpost_post')) ? eval($hook) : false;
$postbits = $postbit_obj->construct_postbit($post);
// save post to cache if relevant
if ($postbit_obj->cachable) {
    /*insert query*/
    $db->shutdown_query("\n\t\tREPLACE INTO " . TABLE_PREFIX . "postparsed (postid, dateline, hasimages, pagetext_html, styleid, languageid)\n\t\tVALUES (\n\t\t\t{$post['postid']}, " . intval($threadinfo['lastpost']) . ", " . intval($postbit_obj->post_cache['has_images']) . ", '" . $db->escape_string($postbit_obj->post_cache['text']) . "', " . intval(STYLEID) . ", " . intval(LANGUAGEID) . "\n\t\t\t)\n\t");
}
($hook = vBulletinHook::fetch_hook('showpost_complete')) ? eval($hook) : false;
//if ($_SERVER['REQUEST_METHOD'] == 'POST' AND
if ($vbulletin->GPC['ajax']) {
    require_once DIR . '/includes/class_xml.php';
    $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
    $xml->add_tag('postbit', process_replacement_vars($postbits));
    $xml->print_xml();
} else {
    eval('print_output("' . fetch_template('SHOWTHREAD_SHOWPOST') . '");');
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 08:19, Wed Nov 5th 2008
|| # CVS: $RCSfile$ - $Revision: 26399 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:showpost.php


示例9: file_download

    }
    $xml->close_group();
    $doc = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n\r\n";
    $doc .= $xml->output();
    $xml = null;
    require_once DIR . '/includes/functions_file.php';
    file_download($doc, 'vbulletin-settings.xml', 'text/xml');
}
// #############################################################################
// ajax setting value validation
if ($_POST['do'] == 'validate') {
    $vbulletin->input->clean_array_gpc('p', array('varname' => TYPE_STR, 'setting' => TYPE_ARRAY));
    $varname = convert_urlencoded_unicode($vbulletin->GPC['varname']);
    $value = convert_urlencoded_unicode($vbulletin->GPC['setting']["{$varname}"]);
    require_once DIR . '/includes/class_xml.php';
    $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
    $xml->add_group('setting');
    $xml->add_tag('varname', $varname);
    if ($setting = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "setting WHERE varname = '" . $db->escape_string($varname) . "'")) {
        $raw_value = $value;
        $value = validate_setting_value($value, $setting['datatype']);
        $valid = exec_setting_validation_code($setting['varname'], $value, $setting['validationcode'], $raw_value);
    } else {
        $valid = 1;
    }
    $xml->add_tag('valid', $valid);
    $xml->close_group();
    $xml->print_xml();
}
// ***********************************************************************
print_cp_header($vbphrase['vbulletin_options']);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:options.php


示例10: print_cp_no_permission

}
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!($vbulletin->userinfo['permissions']['cms']['admin'] & 2)) {
    print_cp_no_permission();
}
fetch_phrase_group('cpcms');
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
//If we get an ajax request, we return the XML and exit
if ($_REQUEST['do'] == 'perms_section') {
    require_once DIR . '/includes/functions_misc.php';
    require_once DIR . '/includes/adminfunctions_misc.php';
    $vbulletin->input->clean_array_gpc('r', array('sectionid' => TYPE_UINT));
    if ($vbulletin->GPC_exists['sectionid']) {
        $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
        $xml->add_group('root');
        $xml->add_tag('html', $vbulletin->GPC['sectionid'] ? getSectionTable($vbulletin->GPC['sectionid']) : showDefault());
        $xml->close_group();
        $xml->print_xml();
        return;
    }
} else {
    if ($_REQUEST['do'] == 'save') {
        saveData();
    } else {
        if ($_REQUEST['do'] == 'remove_perms') {
            removePerms();
        }
    }
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:cms_permissions.php


示例11: halt

 /**
  * Halts execution of the entire system and displays an error message
  *
  * @param	string	Text of the error message. Leave blank to use $this->sql as error text.
  *
  * @return	integer
  */
 function halt($errortext = '')
 {
     global $vbulletin;
     if ($this->connection_recent) {
         $this->error = $this->error($this->connection_recent);
         $this->errno = $this->errno($this->connection_recent);
     }
     if ($this->reporterror) {
         if ($errortext == '') {
             $this->sql = "Invalid SQL:\r\n" . chop($this->sql) . ';';
             $errortext =& $this->sql;
         }
         // Try and stop e-mail flooding.
         if (!$vbulletin->options['disableerroremail']) {
             if (!$vbulletin->options['safeupload']) {
                 $tempdir = ini_get('upload_tmp_dir');
             } else {
                 $tempdir = $vbulletin->options['tmppath'] . '/';
             }
             $unique = md5(COOKIE_SALT);
             $tempfile = $tempdir . "zdberr{$unique}.dat";
             /* If its less than a minute since the last e-mail
             			and the error code is the same as last time, disable e-mail */
             if ($data = @file_get_contents($tempfile)) {
                 $errc = intval(substr($data, 10));
                 $time = intval(substr($data, 0, 10));
                 if ($time and TIMENOW - $time < 60 and intval($this->errno) == $errc) {
                     $vbulletin->options['disableerroremail'] = true;
                 } else {
                     $data = TIMENOW . intval($this->errno);
                     @file_put_contents($tempfile, $data);
                 }
             } else {
                 $data = TIMENOW . intval($this->errno);
                 @file_put_contents($tempfile, $data);
             }
         }
         $vboptions =& $vbulletin->options;
         $technicalemail =& $vbulletin->config['Database']['technicalemail'];
         $bbuserinfo =& $vbulletin->userinfo;
         $requestdate = date('l, F jS Y @ h:i:s A', TIMENOW);
         $date = date('l, F jS Y @ h:i:s A');
         $scriptpath = str_replace('&amp;', '&', $vbulletin->scriptpath);
         $referer = REFERRER;
         $ipaddress = IPADDRESS;
         $classname = get_class($this);
         if ($this->connection_recent) {
             $this->hide_errors();
             list($mysqlversion) = $this->query_first("SELECT VERSION() AS version", DBARRAY_NUM);
             $this->show_errors();
         }
         $display_db_error = (VB_AREA == 'Upgrade' or VB_AREA == 'Install' or $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']);
         // Hide the MySQL Version if its going in the source
         if (!$display_db_error) {
             $mysqlversion = '';
         }
         eval('$message = "' . str_replace('"', '\\"', file_get_contents(DIR . '/includes/database_error_message.html')) . '";');
         // add a backtrace to the message
         if ($vbulletin->debug) {
             $trace = debug_backtrace();
             $trace_output = "\n";
             foreach ($trace as $index => $trace_item) {
                 $param = in_array($trace_item['function'], array('require', 'require_once', 'include', 'include_once')) ? $trace_item['args'][0] : '';
                 // remove path
                 $param = str_replace(DIR, '[path]', $param);
                 $trace_item['file'] = str_replace(DIR, '[path]', $trace_item['file']);
                 $trace_output .= "#{$index} {$trace_item['class']}{$trace_item['type']}{$trace_item['function']}({$param}) called in {$trace_item['file']} on line {$trace_item['line']}\n";
             }
             $message .= "\n\nStack Trace:\n{$trace_output}\n";
         }
         require_once DIR . '/includes/functions_log_error.php';
         if (function_exists('log_vbulletin_error')) {
             log_vbulletin_error($message, 'database');
         }
         if ($technicalemail != '' and !$vbulletin->options['disableerroremail'] and verify_email_vbulletin_error($this->errno, 'database')) {
             // If vBulletinHook is defined then we know that options are loaded, so we can then use vbmail
             if (class_exists('vBulletinHook', false)) {
                 @vbmail($technicalemail, $this->appshortname . ' Database Error!', $message, true, $technicalemail);
             } else {
                 @mail($technicalemail, $this->appshortname . ' Database Error!', preg_replace("#(\r\n|\r|\n)#s", @ini_get('sendmail_path') === '' ? "\r\n" : "\n", $message), "From: {$technicalemail}");
             }
         }
         if (defined('STDIN')) {
             echo $message;
             exit;
         }
         // send ajax reponse after sending error email
         if ($vbulletin->GPC['ajax']) {
             require_once DIR . '/includes/class_xml.php';
             $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
             $error = '<p>Database Error</p>';
             if ($vbulletin->debug or VB_AREA == 'Upgrade') {
                 $error .= "\r\n\r\n{$errortext}";
//.........这里部分代码省略.........
开发者ID:0hyeah,项目名称:yurivn,代码行数:101,代码来源:class_core.php


示例12: eval

            $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 = fetch_seo_url('thread', $threadinfo, array('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("\r\n\t\tSELECT votetotal, votenum\r\n\t\tFROM " . TABLE_PREFIX . "thread\r\n\t\tWHERE threadid = {$threadinfo['threadid']}\r\n\t");
    $average = $thread['votetotal'] / $thread['votenum'];
    $rating = round($average);
    $xml->add_tag('rating_full', vb_number_format($average, 2));
    $xml->add_tag('rating', $rating);
    $xml->add_tag('vote_threshold_met', intval($thread['votenum'] >= $vbulletin->options['showvotes']));
    /*
    //I don't think we need this any longer.
    	if ($thread['votenum'] >= $vbulletin->options['showvotes'])
    	{	// Show Voteavg
    		$thread['voteavg'] = vb_number_format($average, 2);
    //		$thread['rating'] = round($thread['votetotal'] / $thread['votenum']);
    
开发者ID:Kheros,项目名称:MMOver,代码行数:30,代码来源:threadrate.php


示例13: print_cp_message

/**
* Halts execution and shows the specified message
*
* @param	string	Message to display
* @param	mixed	If specified, a redirect will be performed to the URL in this parameter
* @param	integer	If redirect is specified, this is the time in seconds to delay before redirect
* @param	string	If specified, will provide a specific URL for "Go Back". If empty, no button will be displayed!
* @param bool		If true along with redirect, 'CONTINUE' button will be used instead of automatic redirect
*/
function print_cp_message($text = '', $redirect = NULL, $delay = 1, $backurl = NULL, $continue = false)
{
    global $vbulletin, $vbphrase;
    if ($vbulletin->GPC['ajax']) {
        require_once DIR . '/includes/class_xml.php';
        $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
        $xml->add_tag('error', $text);
        $xml->print_xml();
        exit;
    }
    if ($redirect and $vbulletin->session->vars['sessionurl']) {
        if (strpos($redirect, '?') === false) {
            $redirect .= '?';
        }
        $redirect .= '&' . $vbulletin->session->vars['sessionurl'];
    }
    if (!defined('DONE_CPHEADER')) {
        print_cp_header($vbphrase['vbulletin_message']);
    }
    echo '<p>&nbsp;</p><p>&nbsp;</p>';
    print_form_header('', '', 0, 1, 'messageform', '65%');
    print_table_header($vbphrase['vbulletin_message']);
    print_description_row("<blockquote><br />{$text}<br /><br /></blockquote>");
    if ($redirect and $redirect !== NULL) {
        // redirect to the new page
        if ($continue) {
            $continueurl = str_replace('&amp;', '&', $redirect);
            print_table_footer(2, construct_button_code($vbphrase['continue'], create_full_url($continueurl)));
        } else {
            print_table_footer();
            $redirect_click = create_full_url($redirect);
            $redirect_click = str_replace('"', '', $redirect_click);
            echo '<p align="center" class="smallfont">' . construct_phrase($vbphrase['if_you_are_not_automatically_redirected_click_here_x'], $redirect_click) . "</p>\n";
            print_cp_redirect($redirect, $delay);
        }
    } else {
        // end the table and halt
        if ($backurl === NULL) {
            $backurl = 'javascript:history.back(1)';
        }
        if (strpos($backurl, 'history.back(') !== false) {
            //if we are attempting to run a history.back(1), check we have a history to go back to, otherwise attempt to close the window.
            $back_button = '&nbsp;
				<input type="button" id="backbutton" class="button" value="' . $vbphrase['go_back'] . '" title="" tabindex="1" onclick="if (history.length) { history.back(1); } else { self.close(); }"/>
				&nbsp;
				<script type="text/javascript">
				<!--
				if (history.length < 1 || ((is_saf || is_moz) && history.length <= 1)) // safari + gecko start at 1
				{
					document.getElementById("backbutton").parentNode.removeChild(document.getElementById("backbutton"));
				}
				//-->
				</script>';
            // remove the back button if it leads back to the login redirect page
            if (strpos($vbulletin->url, 'login.php?do=login') !== false) {
                $back_button = '';
            }
        } else {
            if ($backurl !== '') {
                // regular window.location=url call
                $backurl = create_full_url($backurl);
                $backurl = str_replace(array('"', "'"), '', $backurl);
                $back_button = '<input type="button" class="button" value="' . $vbphrase['go_back'] . '" title="" tabindex="1" onclick="window.location=\'' . $backurl . '\';"/>';
            } else {
                $back_button = '';
            }
        }
        print_table_footer(2, $back_button);
    }
    // and now terminate the script
    print_cp_footer();
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:81,代码来源:adminfunctions.php


示例14: vB_AJAX_XML_Builder

		$url = $vbulletin->url;
		$templater = vB_Template::create('reputationbit');
			$templater->register('postid', $postid);
			$templater->register('url', $url);
			$templater->register('userinfo', $userinfo);
		$reputationbit = $templater->render();
	}

	if ($vbulletin->GPC['ajax'])
	{
		$templater = vB_Template::create('reputation_ajax');
			$templater->register('reputationbit', $reputationbit);
		$reputation = $templater->render();

		require_once(DIR . '/includes/class_xml.php');
		$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
		$xml->add_tag('reputationbit', process_replacement_vars($reputation));
		$xml->print_xml();
	}

	// draw nav bar
	$navbits = array();
	$parentlist = array_reverse(explode(',', $foruminfo['parentlist']));
	foreach ($parentlist AS $forumID)
	{
		$forumTitle = $vbulletin->forumcache["$forumID"]['title'];
		$navbits[fetch_seo_url('forum', array('forumid' => $forumID, 'title' => $forumTitle))] = $forumTitle;
	}
	$navbits[fetch_seo_url('thread', $threadinfo, array('p' => $postid)) . "#post$postid"] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
	$navbits[''] = $vbphrase['reputation'];
	$navbits = construct_navbits($navbits);
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:reputation.php


示例15: init_table_info

 /**
  * Private
  * Verifies that fetch_table_info() has been called for a valid table and sets current error condition to none
  * .. in other words verify that fetchTableInfo returns true before proceeding on
  *
  * @param	void
  *
  * @return	void
  */
 function init_table_info()
 {
     global $vbulletin;
     // need registry!
     if (!$this->init) {
         $this->fetch_table_info();
     }
     if (!$this->init) {
         $message = '<strong>vB_Database_Alter</strong>: fetch_table_info() has not been called successfully.<br />' . $this->fetch_error_message();
         if ($vbulletin->GPC['ajax']) {
             require_once DIR . '/includes/class_xml.php';
             $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
             $xml->add_tag('error', $message);
             $xml->print_xml();
         } else {
             echo $message;
             exit;
         }
     }
     $this->set_error();
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:30,代码来源:class_dbalter.php


示例16: showCommentsXml

	public static function showCommentsXml($nodeid, $userinfo, $pageno = 1,
		$perpage = 20, $target_url = '')
	{
		require_once DIR . '/includes/functions_misc.php';
		global $show;


		$xml = new vB_AJAX_XML_Builder( vB::$vbulletin, 'text/xml');
		$xml->add_group('root');

		//todo handle prefs for xml types
		$xml->add_tag('html', $check_val = self::showComments($nodeid, $userinfo,  $pageno,
		$perpage, $target_url));

		$xml->close_group();
		$xml->print_xml();
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:17,代码来源:comments.php


示例17: standard_error

/**
* Halts execution and shows the specified error message
*
* @param	string	Error message
* @param	string	Optional HTML code to insert in the <head> of the error page
* @param	boolean	If true, set the visitor's status on WOL to error page
* @param	string	Optional template to force the display to use. Ignored if showing a lite error
*/
function standard_error($error = '', $headinsert = '', $savebadlocation = true, $override_template = '')
{
	global $header, $footer, $headinclude, $forumjump, $timezone, $gobutton;
	global $vbulletin, $vbphrase, $template_hook;
	global $pmbox, $show, $ad_location, $notifications_menubits, $notifications_total;

	$show['notices'] = false;

	construct_quick_nav(array(), -1, true, true);

	$title = $vbulletin->options['bbtitle'];
	$pagetitle =& $title;
	$errormessage = $error;

	if (!$vbulletin->userinfo['badlocation'] AND $savebadlocation)
	{
		$vbulletin->userinfo['badlocation'] = 3;
	}
	require_once(DIR . '/includes/functions_misc.php');
	if ($_POST['securitytoken'] OR $vbulletin->GPC['postvars'])
	{
		$postvars = construct_post_vars_html();
		if ($vbulletin->GPC['postvars'])
		{
			$_postvars = @unserialize(verify_client_string($vbulletin->GPC['postvars']));
			if ($_postvars['securitytoken'] = 'guest')
			{
				unset($$postvars);
			}
		}
		else if ($_POST['securitytoken'] == 'guest')
		{
			unset($postvars);
		}
	}
	else
	{
		$postvars = '';
	}

	if (defined('VB_ERROR_PERMISSION') AND VB_ERROR_PERMISSION == true)
	{
		$show['permission_error'] = true;
	}
	else
	{
		$show['permission_error'] = false;
	}

	$show['search_noindex'] = (bool)($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']);

	$navbits = $navbar = '';
	if (defined('VB_ERROR_LITE') AND VB_ERROR_LITE == true)
	{
		$templatename = 'STANDARD_ERROR_LITE';
		define('NOPMPOPUP', 1); // No Footer here
	}
	else
	{
		// bug 33454: we used to not register the navbar when users did not have general forum permissions (banned)
		// but that was causing display issues with the vb4 style, so now we always render navbar
		$navbits = construct_navbits(array('' => $vbphrase['vbulletin_message']));
		$navbar = render_navbar_template($navbits);

		$templatename = ($override_template ? preg_replace('#[^a-z0-9_]#i', '', $override_template) : 'STANDARD_ERROR');
	}

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

	if ($vbulletin->GPC['ajax'])
	{
		require_once(DIR . '/includes/class_xml.php');
		$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
		$xml->add_tag('error', $errormessage);
		$xml->print_xml();
		exit;
	}
	else
	{
		if ($vbulletin->noheader)
		{
			@header('Content-Type: text/html' . ($vbulletin->userinfo['lang_charset'] != '' ? '; charset=' . $vbulletin->userinfo['lang_charset'] : ''));
		}

		$templater = vB_Template::create($templatename);
			$templater->register_page_templates();
			$templater->register('errormessage', $errormessage);
			$templater->register('forumjump', $forumjump);
			$templater->register('headinsert', $headinsert);
			$templater->register('navbar', $navbar);
			$templater->register('pagetitle', $pagetitle);
			$templater->register('postvars', $postvars);
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:functions.php


示例18: min

     if ($tags_remain !== null) {
         if ($user_tags_remain == null) {
             $user_tags_remain = $tags_remain;
         } else {
             $user_tags_remain = min($tags_remain, $user_tags_remain);
         }
     }
 }
 ($hook = vBulletinHook::fetch_hook('threadtag_manage_tagsremain')) ? eval($hook) : false;
 $show['tag_limit_phrase'] = $user_tags_remain !== null;
 $tags_remain = vb_number_format($user_tags_remain);
 $tag_delimiters = addslashes_js($vbulletin->options['tagdelimiter']);
 if ($vbulletin->GPC['ajax']) {
     eval('$html = "' . fetch_template('tag_edit_ajax') . '";');
     require_once DIR . '/includes/class_xml.php';
     $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
     $xml->add_group('tag');
     $xml->add_tag('html', process_replacement_vars($html));
     $xml->add_tag('delimiters', $vbulletin->options['tagdelimiter']);
     $xml->close_group();
     $xml->print_xml();
 }
 // navbar and output
 $navbits = array();
 $parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
 foreach ($parentlist as $forumid) {
     $forum_title = $vbulletin->forumcache["{$forumid}"]['title'];
     $navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}"] = $forum_title;
 }
 $navbits['showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}"] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
 $navbits[''] = $vbphrase['tag_management'];
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:threadtag.php


示例19: define

 if ($vbulletin->GPC['preview']) {
     define('MESSAGEPREVIEW', true);
     $preview = process_group_message_preview($message);
     $_GET['do'] = 'message';
 } else {
     $gmid = $dataman->save();
     if ($messageinfo) {
         $gmid = $messageinfo['gmid'];
     }
     if ($messageinfo and !$group['is_owner'] and can_moderate(0, 'caneditgroupmessages')) {
         require_once DIR . '/includes/functions_log_error.php';
         log_moderator_action($messageinfo, 'gm_by_x_for_y_edited', array($messageinfo['postusername'], $group['name']));
     }
     if ($vbulletin->GPC['ajax']) {
         require_once DIR . '/includes/class_xml.php';
         $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
         $xml->add_group('commentbits');
         $state = array('visible');
         if (fetch_socialgroup_modperm('canmoderategroupmessages', $group)) {
             $state[] = 'moderation';
         }
         if (fetch_socialgroup_modperm('canviewdeleted', $group)) {
             $state[] = 'deleted';
             $deljoinsql = "LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON (gm.gmid = deletionlog.primaryid AND deletionlog.type = 'gmid')";
         } else {
             $deljoinsql = '';
         }
         $state_or = array("gm.state IN ('" . implode("','", $state) . "')");
         // Get the viewing user's moderated posts
         if ($vbulletin->userinfo['userid'] and !fetch_socialgroup_modperm('canmoderategroupmessages', $group)) {
             $state_or[] = "(gm.postuserid = " . $vbulletin->userinfo['userid'] . " AND state = 'moderation')";
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:group.php


示例20: vbseo_complete_sec


//.........这里部分代码省略.........
                    if ($_POST['action'] == 'mod') {
                        $vbulletin->db->query_write("\nUPDATE " . vbseo_tbl_prefix('vbseo_linkback') . "\nSET t_approve=IF(t_approve,0,1)\nWHERE t_id='{$linkid}'");
                        if (!$ilink['t_approve']) {
                            vbseo_send_notification_pingback($ilink['t_threadid'], $ilink['t_postid'], $ilink['t_src_url'], $ilink['t_title'], $ilink['t_text'], 1, 0);
                        }
                    }
                    if ($_POST['action'] == 'ban') {
                        $purl = parse_url($ilink['t_src_url']);
                        if ($purl['host']) {
                            $bdom = str_replace('www.', '', $purl['host']);
                            vbseo_linkback_bandomain($bdom, 1);
                            $vbulletin->db->query_write("\nUPDATE " . vbseo_tbl_prefix('vbseo_linkback') . "\nSET t_deleted = 1\nWHERE t_src_url LIKE 'http%" . addslashes($bdom) . "/%'");
                        }
                    }
                    if ($_POST['action'] == 'del') {
                        $vbulletin->db->query_write("\nUPDATE " . vbseo_tbl_prefix('vbseo_linkback') . "\nSET t_deleted = 1\nWHERE t_id = '{$linkid}'");
                    }
                    vbseo_linkback_approve($linkid);
                    header('Content-Type: text/plain;');
                    header('Connection: Close');
                    echo $ilink['t_approve'] ? '0' : '1';
                }
                exit;
            }
            if ($_POST['do'] == 'updatelinkback') {
                $vbulletin->input->clean_array_gpc('p', array('linkid' => TYPE_UINT, 'title' => TYPE_STR));
                $linkid = $vbulletin->GPC['linkid'];
                $ilink = $vbulletin->db->query_first("\nSELECT *\nFROM " . vbseo_tbl_prefix('vbseo_linkback') . " l\nWHERE t_id='" . addslashes($linkid) . "'");
                $ismod = can_moderate($ilink['forumid'], 'vbseo_linkbacks') || $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'];
                if ($ismod) {
                    $ltitle = convert_urlencoded_unicode($vbulletin->GPC['title']);
                    $vbulletin->db- 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP vB_Api类代码示例发布时间:2022-05-23
下一篇:
PHP vB类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap