本文整理汇总了PHP中convert_urlencoded_unicode函数的典型用法代码示例。如果您正苦于以下问题:PHP convert_urlencoded_unicode函数的具体用法?PHP convert_urlencoded_unicode怎么用?PHP convert_urlencoded_unicode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convert_urlencoded_unicode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getforumId
private function getforumId()
{
global $vbulletin, $db;
$arrayResponse = array();
$vbulletin->input->clean_array_gpc('r', array('threadid' => TYPE_STR));
$vbulletin->GPC['threadid'] = convert_urlencoded_unicode($vbulletin->GPC['threadid']);
$threadid = $vbulletin->GPC['threadid'];
$forumid = $db->query_first("\n\t\t\t\tSELECT thread.forumid\n\t\t\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\t\t\t\n\t\t\t\tWHERE thread.threadid = {$threadid}\n\t\t\t");
return $forumid['forumid'];
}
示例2: getBreadCrumbsBits
private function getBreadCrumbsBits()
{
global $vbulletin, $db;
$arrayResponse = array();
$vbulletin->input->clean_array_gpc('p', array('type' => TYPE_STR, 'conceptid' => TYPE_STR));
$vbulletin->GPC['type'] = convert_urlencoded_unicode($vbulletin->GPC['type']);
$vbulletin->GPC['conceptid'] = convert_urlencoded_unicode($vbulletin->GPC['conceptid']);
//error_log("facebookidList = " . $vbulletin->GPC['facebookidList'] . "\n", 3, "/var/www/html/facebook/error/error1.txt");
$conceptId = $vbulletin->GPC['conceptid'];
$type = $vbulletin->GPC['type'];
if ($type == 't') {
$threadInfo = $db->query_first("SELECT thread.forumid AS forumid FROM " . TABLE_PREFIX . "thread WHERE threadid={$conceptId}");
$conceptId = $threadInfo['forumid'];
$parents = $db->query_first("SELECT forum.parentlist AS parentlist FROM " . TABLE_PREFIX . "forum WHERE forumid={$conceptId}");
//$parent = $db->fetch_array($parents)
// error_log("parents = " . print_r($parents,true), 3, "/var/www/html/facebook/error/error2.txt");
$parentsArray = explode(",", $parents['parentlist']);
$parentsArray = array_reverse($parentsArray);
$parents = implode(",", $parentsArray);
}
if ($type == 'f') {
$parents = $db->query_first("SELECT forum.parentlist AS parentlist FROM " . TABLE_PREFIX . "forum WHERE forumid={$conceptId}");
//$parent = $db->fetch_array($parents)
// error_log("parents = " . print_r($parents,true), 3, "/var/www/html/facebook/error/error2.txt");
$parentsArray = explode(",", $parents['parentlist']);
array_shift($parentsArray);
$parentsArray = array_reverse($parentsArray);
$parents = implode(",", $parentsArray);
}
$forumInfo = $db->query_read_slave("SELECT forum.forumid AS forumid, forum.title AS title, forum.threadcount AS threadcount FROM forum WHERE forumid IN (" . $parents . ")");
$breadCrumbsBits = array();
while ($parentForumInfo = $db->fetch_array($forumInfo)) {
$separator = ",";
$breadCrumbsBits[$parentForumInfo['forumid']] = array('forumid' => $parentForumInfo['forumid'], 'title' => $parentForumInfo['title'], 'threadcount' => $parentForumInfo['threadcount']);
}
//error_log("parents = " . $parentsArray, 3, "/var/www/html/facebook/error/error2.txt");
$arrayResponse = array();
//$parentsArray = explode(",", $parentsArray);
foreach ($parentsArray as $parent) {
if (in_array($breadCrumbsBits[$parent], $breadCrumbsBits)) {
$arrayResponse[] = $breadCrumbsBits[$parent];
}
}
// $breadCrumbsBits = array_reverse($breadCrumbsBits);
return $arrayResponse;
}
示例3: output
public function output()
{
global $vbulletin, $db;
$vbulletin->input->clean_array_gpc('p', array('fragment' => TYPE_STR));
$vbulletin->GPC['fragment'] = convert_urlencoded_unicode($vbulletin->GPC['fragment']);
if ($vbulletin->GPC['fragment'] != '' and strlen($vbulletin->GPC['fragment']) >= 3) {
$fragment = htmlspecialchars_uni($vbulletin->GPC['fragment']);
} else {
$fragment = '';
}
if ($fragment != '') {
$users = $db->query_read_slave("\n\t\t\t\tSELECT user.userid, user.username FROM " . TABLE_PREFIX . "user\n\t\t\t\tAS user WHERE username LIKE('" . $db->escape_string_like($fragment) . "%')\n\t\t\t\tORDER BY username\n\t\t\t\tLIMIT 15\n\t\t\t");
while ($user = $db->fetch_array($users)) {
$data[$user['userid']] = $user['username'];
}
}
return $data;
}
示例4: output
public function output()
{
global $vbulletin, $db;
$vbulletin->input->clean_array_gpc('r', array('userids' => TYPE_STR, 'contenttypeids' => TYPE_STR));
$vbulletin->GPC['userids'] = convert_urlencoded_unicode($vbulletin->GPC['userids']);
$userids = $vbulletin->GPC['userids'];
$vbulletin->GPC['contenttypeids'] = convert_urlencoded_unicode($vbulletin->GPC['contenttypeids']);
$contenttypeids = $vbulletin->GPC['contenttypeids'];
require_once DIR . "/vb/search/core.php";
require_once DIR . "/vb/legacy/currentuser.php";
require_once DIR . "/vb/search/resultsview.php";
require_once DIR . "/vb/search/searchtools.php";
$search_core = vB_Search_Core::get_instance();
$current_user = new vB_Legacy_CurrentUser();
if (!$vbulletin->options['enablesearches']) {
return $this->error('searchdisabled');
}
$criteria = $search_core->create_criteria(vB_Search_Core::SEARCH_ADVANCED);
$userids_a = explode(',', $userids);
$contenttypeids_a = explode(',', $contenttypeids);
if (empty($userids_a)) {
return $this->error('invalidid');
}
$criteria->add_userid_filter($userids_a, vB_Search_Core::GROUP_NO);
if (!empty($contenttypeids_a)) {
$criteria->add_contenttype_filter($contenttypeids_a);
}
$results = null;
if (!($vbulletin->debug or $vbulletin->GPC_exists['nocache'] and $vbulletin->GPC['nocache'])) {
$results = vB_Search_Results::create_from_cache($current_user, $criteria);
}
if (!$results) {
$results = vB_Search_Results::create_from_criteria($current_user, $criteria);
}
return array("response" => array("errormessage" => "search"), "show" => array("searchid" => $results->get_searchid()));
}
示例5: init
/**
* Stuff to setup specific to Ajax upgrading - executes after upgrade has been established
*
*/
protected function init()
{
parent::init();
$this->registry->input->clean_array_gpc('p', array('ajax' => TYPE_BOOL, 'jsfail' => TYPE_BOOL));
if ($this->registry->GPC['jsfail']) {
$this->startup_errors[] = $this->phrase['core']['javascript_disabled'];
}
$this->htmloptions['finalversion'] = end($this->versions);
$this->htmloptions['setuptype'] = sprintf($this->phrase['core']['vb_' . $this->setuptype . '_system'], $this->htmloptions['finalversion']);
$this->htmloptions['setuptypetitle'] = sprintf($this->phrase['core']['vb_' . $this->setuptype . '_system_title'], $this->htmloptions['finalversion']);
$this->htmloptions['enter_system'] = $this->phrase['authenticate']['enter_' . $this->setuptype . '_system'];
if ($this->registry->GPC['ajax']) {
$this->registry->input->clean_array_gpc('p', array('step' => TYPE_UINT, 'startat' => TYPE_UINT, 'version' => TYPE_NOHTML, 'response' => TYPE_NOHTML, 'checktable' => TYPE_BOOL, 'status' => TYPE_BOOL, 'firstrun' => TYPE_BOOL, 'only' => TYPE_BOOL, 'htmlsubmit' => TYPE_BOOL, 'htmldata' => TYPE_ARRAY, 'options' => TYPE_ARRAY));
$this->registry->GPC['response'] = convert_urlencoded_unicode($this->registry->GPC['response']);
$this->registry->GPC['htmldata'] = convert_urlencoded_unicode($this->registry->GPC['htmldata']);
if ($this->registry->GPC['status']) {
$this->fetch_query_status();
}
$this->scriptinfo = array('version' => $this->fetch_short_version($this->registry->GPC['version']), 'startat' => $this->registry->GPC['startat'], 'step' => $this->registry->GPC['step'], 'only' => $this->registry->GPC['only']);
$script = $this->load_script($this->scriptinfo['version']);
$this->process_step($this->registry->GPC['version'], $this->registry->GPC['step'], $this->registry->GPC['startat'], $this->registry->GPC['checktable'], $this->registry->GPC_exists['response'] ? $this->registry->GPC['response'] : null, $this->registry->GPC['firstrun'], $this->registry->GPC['only'], $this->registry->GPC['htmlsubmit'], $this->registry->GPC['htmldata'], $this->registry->GPC['options']);
} else {
$this->registry->input->clean_array_gpc('r', array('version' => TYPE_NOHTML, 'startat' => TYPE_UINT, 'step' => TYPE_UINT, 'only' => TYPE_BOOL));
$proceed = true;
if ($proceed) {
if ($this->registry->GPC['version'] and $this->versions[$this->registry->GPC['version']]) {
$this->scriptinfo = array('version' => $this->registry->GPC['version'], 'startat' => $this->registry->GPC['startat'], 'step' => $this->registry->GPC['step']);
}
$this->begin_upgrade($this->scriptinfo['version'], $this->registry->GPC['only']);
}
$this->print_html();
// Begin processing
if ($this->htmloptions['processlog']) {
}
}
}
示例6: file_download
}
$xml->close_group();
}
$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();
}
示例7: do_post_edit
function do_post_edit()
{
global $vbulletin, $db, $foruminfo, $forumperms, $threadinfo;
global $postinfo, $vbphrase, $stylevar, $permissions;
$checked = array();
$edit = array();
$postattach = array();
$contenttype = 'vBForum_Post';
if (!$postinfo['postid'] or $postinfo['isdeleted'] or !$postinfo['visible'] and !can_moderate($threadinfo['forumid'], 'canmoderateposts')) {
json_error(ERR_INVALID_TOP, RV_POST_ERROR);
}
if (!$threadinfo['threadid'] or $threadinfo['isdeleted'] or !$threadinfo['visible'] and !can_moderate($threadinfo['forumid'], 'canmoderateposts')) {
json_error(ERR_INVALID_TOP, RV_POST_ERROR);
}
if ($vbulletin->options['wordwrap']) {
$threadinfo['title'] = fetch_word_wrapped_string($threadinfo['title']);
}
// get permissions info
$_permsgetter_ = 'edit post';
$forumperms = fetch_permissions($threadinfo['forumid']);
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0)) {
json_error(ERR_NO_PERMISSION, RV_POST_ERROR);
}
$foruminfo = fetch_foruminfo($threadinfo['forumid'], false);
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
// need to get last post-type information
cache_ordered_forums(1);
// determine if we are allowed to be updating the thread's info
$can_update_thread = ($threadinfo['firstpostid'] == $postinfo['postid'] and (can_moderate($threadinfo['forumid'], 'caneditthreads') or $postinfo['dateline'] + $vbulletin->options['editthreadtitlelimit'] * 60 > TIMENOW));
// otherwise, post is being edited
if (!can_moderate($threadinfo['forumid'], 'caneditposts')) {
// check for moderator
if (!$threadinfo['open']) {
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}";
json_error(fetch_error('threadclosed'), RV_POST_ERROR);
}
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['caneditpost'])) {
json_error(ERR_NO_PERMISSION, RV_POST_ERROR);
} else {
if ($vbulletin->userinfo['userid'] != $postinfo['userid']) {
// check user owns this post
json_error(ERR_NO_PERMISSION, RV_POST_ERROR);
} else {
// check for time limits
if ($postinfo['dateline'] < TIMENOW - $vbulletin->options['edittimelimit'] * 60 and $vbulletin->options['edittimelimit'] != 0) {
json_error(fetch_error('edittimelimit', $vbulletin->options['edittimelimit'], $vbulletin->options['contactuslink']), RV_POST_ERROR);
}
}
}
}
// Variables reused in templates
$poststarttime =& $vbulletin->input->clean_gpc('r', poststarttime, TYPE_UINT);
$posthash = md5($vbulletin->GPC['poststarttime'] . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']);
$vbulletin->input->clean_array_gpc('p', array('stickunstick' => TYPE_BOOL, 'openclose' => TYPE_BOOL, 'wysiwyg' => TYPE_BOOL, 'message' => TYPE_STR, 'title' => TYPE_STR, 'prefixid' => TYPE_NOHTML, 'iconid' => TYPE_UINT, 'parseurl' => TYPE_BOOL, 'signature' => TYPE_BOOL, 'disablesmilies' => TYPE_BOOL, 'reason' => TYPE_NOHTML, 'preview' => TYPE_STR, 'folderid' => TYPE_UINT, 'emailupdate' => TYPE_UINT, 'ajax' => TYPE_BOOL, 'advanced' => TYPE_BOOL, 'postcount' => TYPE_UINT, 'podcasturl' => TYPE_STR, 'podcastsize' => TYPE_UINT, 'podcastexplicit' => TYPE_BOOL, 'podcastkeywords' => TYPE_STR, 'podcastsubtitle' => TYPE_STR, 'podcastauthor' => TYPE_STR, 'quickeditnoajax' => TYPE_BOOL));
if ($vbulletin->GPC['message']) {
$vbulletin->GPC['message'] = prepare_remote_utf8_string($vbulletin->GPC['message']);
}
$vbulletin->GPC['signature'] = $vbulletin->GPC_exists['signature'] = true;
// Make sure the posthash is valid
($hook = vBulletinHook::fetch_hook('editpost_update_start')) ? eval($hook) : false;
if (md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']) != $posthash) {
$posthash = 'invalid posthash';
// don't phrase me
}
// ### PREP INPUT ###
if ($vbulletin->GPC['wysiwyg']) {
require_once DIR . '/includes/functions_wysiwyg.php';
$edit['message'] = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $foruminfo['allowhtml']);
} else {
$edit['message'] =& $vbulletin->GPC['message'];
}
$cansubscribe = true;
// Are we editing someone else's post? If so load that users subscription info for this thread.
if ($vbulletin->userinfo['userid'] != $postinfo['userid']) {
if ($postinfo['userid']) {
$userinfo = fetch_userinfo($postinfo['userid']);
cache_permissions($userinfo);
}
$cansubscribe = ($userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canview'] and $userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads'] and ($threadinfo['postuserid'] == $userinfo['userid'] or $userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewothers']));
if ($cansubscribe and $otherthreadinfo = $db->query_first_slave("\n\t\t\tSELECT emailupdate, folderid\n\t\t\tFROM " . TABLE_PREFIX . "subscribethread\n\t\t\tWHERE threadid = {$threadinfo['threadid']} AND\n\t\t\t\tuserid = {$postinfo['userid']} AND\n\t\t\t\tcanview = 1")) {
$threadinfo['issubscribed'] = true;
$threadinfo['emailupdate'] = $otherthreadinfo['emailupdate'];
$threadinfo['folderid'] = $otherthreadinfo['folderid'];
} else {
$threadinfo['issubscribed'] = false;
// use whatever emailupdate setting came through
}
}
if ($vbulletin->GPC['ajax'] or $vbulletin->GPC['quickeditnoajax']) {
// quick edit
$tmpmessage = $vbulletin->GPC['ajax'] ? convert_urlencoded_unicode($edit['message']) : $edit['message'];
$edit = $postinfo;
$edit['message'] =& $tmpmessage;
$edit['title'] = unhtmlspecialchars($edit['title']);
$edit['signature'] =& $edit['showsignature'];
$edit['enablesmilies'] =& $edit['allowsmilie'];
$edit['disablesmilies'] = $edit['enablesmilies'] ? 0 : 1;
$edit['parseurl'] = true;
$edit['prefixid'] = $threadinfo['prefixid'];
//.........这里部分代码省略.........
示例8: eval
}
($hook = vBulletinHook::fetch_hook('reputation_start')) ? eval($hook) : false;
if ($_POST['do'] == 'addreputation')
{ // adjust reputation ratings
$vbulletin->input->clean_array_gpc('p', array(
'reputation' => TYPE_NOHTML,
'reason' => TYPE_STR,
'ajax' => TYPE_BOOL,
));
if ($vbulletin->GPC['ajax'])
{
$vbulletin->GPC['reason'] = convert_urlencoded_unicode($vbulletin->GPC['reason']);
}
if ($userid == $vbulletin->userinfo['userid'])
{
eval(standard_error(fetch_error('reputationownpost')));
}
$score = fetch_reppower($vbulletin->userinfo, $permissions, $vbulletin->GPC['reputation']);
if ($score < 0 AND empty($vbulletin->GPC['reason']))
{
eval(standard_error(fetch_error('reputationreason')));
}
// Check if the user has already reputation this post
if ($repeat = $db->query_first("
示例9: array
if ($_POST['do'] == 'autosave') {
$vbulletin->input->clean_array_gpc('p', array('contenttypeid' => TYPE_NOHTML, 'contentid' => TYPE_UINT, 'parentcontentid' => TYPE_UINT, 'pagetext' => TYPE_STR, 'title' => TYPE_NOHTML, 'posthash' => TYPE_NOHTML, 'poststarttime' => TYPE_UINT, 'wysiwyg' => TYPE_BOOL, 'parsetype' => TYPE_STR));
if (!$vbulletin->userinfo['userid']) {
echo 'NO USERID';
exit;
}
if (!vB_Types::instance()->getContentTypeID($vbulletin->GPC['contenttypeid'])) {
echo 'INVALID CONTENTTYPEID';
exit;
}
if (!$vbulletin->GPC['pagetext']) {
echo 'NO PAGETEXT';
exit;
}
$vbulletin->GPC['pagetext'] = convert_urlencoded_unicode($vbulletin->GPC['pagetext']);
$vbulletin->GPC['title'] = convert_urlencoded_unicode($vbulletin->GPC['title']);
if ($vbulletin->GPC['wysiwyg']) {
require_once DIR . '/includes/class_wysiwygparser.php';
if ($vbulletin->GPC['parsetype'] == 'calendar') {
require_once DIR . '/includes/functions_calendar.php';
$vbulletin->input->clean_gpc('p', 'calendarid', TYPE_UINT);
$calendarinfo = verify_id('calendar', $vbulletin->GPC['calendarid'], 0, 1);
if ($calendarinfo) {
$getoptions = convert_bits_to_array($calendarinfo['options'], $_CALENDAROPTIONS);
$geteaster = convert_bits_to_array($calendarinfo['holidays'], $_CALENDARHOLIDAYS);
$calendarinfo = array_merge($calendarinfo, $getoptions, $geteaster);
}
}
if ($vbulletin->GPC['parsetype'] == 'announcement') {
// oh this is a kludge but there is no simple way to changing the bbcode parser from using global $post with announcements without changing function arguments
$post = array('announcementoptions' => $vbulletin->GPC['allowbbcode'] ? $vbulletin->bf_misc_announcementoptions['allowbbcode'] : 0);
示例10: getConfigView
/**
* Returns the config view for the widget.
*
* @return vBCms_View_Widget - The view result
*/
public function getConfigView($widget = false)
{
global $vbulletin, $messagearea, $vbphrase;
$this->assertWidget();
require_once DIR . '/includes/functions_editor.php';
require_once DIR . '/packages/vbcms/wysiwyghtmlparser.php';
require_once DIR . '/packages/vbcms/editor/override.php';
require_once DIR . '/packages/vbcms/bbcode/html.php';
require_once DIR . '/packages/vbcms/bbcode/wysiwyg.php';
require_once DIR . '/includes/functions_databuild.php';
fetch_phrase_group('posting');
vB::$vbulletin->input->clean_array_gpc('r', array(
'do' => vB_Input::TYPE_STR,
'message' => vB_Input::TYPE_STR,
'wysiwyg' => vB_Input::TYPE_BOOL,
'template_name' => vB_Input::TYPE_STR
));
$view = new vB_View_AJAXHTML('cms_widget_config');
$view->title = new vB_Phrase('vbcms', 'configuring_widget_x', $this->widget->getTitle());
$config = $this->widget->getConfig();
if ((vB::$vbulletin->GPC['do'] == 'config') AND $this->verifyPostId())
{
if (vB::$vbulletin->GPC['wysiwyg'])
{
$html_parser = new vBCms_WysiwygHtmlParser(vB::$vbulletin);
$message = $html_parser->parse(vB::$vbulletin->GPC['message']);
}
else
{
$message = convert_urlencoded_unicode(vB::$vbulletin->GPC['message']);
}
$widgetdm = new vBCms_DM_Widget($this->widget);
if (vB::$vbulletin->GPC_exists['template_name'])
{
$config['template_name'] = vB::$vbulletin->GPC['template_name'];
}
$widgetdm->set('config', $config);
if ($this->content)
{
$widgetdm->setConfigNode($this->content->getNodeId());
}
$widgetdm->save();
if (!$widgetdm->hasErrors())
{
if ($this->content)
{
$segments = array('node' => $this->content->getNodeURLSegment(),
'action' => vB_Router::getUserAction('vBCms_Controller_Content', 'EditPage'));
$view->setUrl(vB_View_AJAXHTML::URL_FINISHED, vBCms_Route_Content::getURL($segments));
}
$view->setStatus(vB_View_AJAXHTML::STATUS_FINISHED, new vB_Phrase('vbcms', 'configuration_saved'));
}
else
{
if (vB::$vbulletin->debug)
{
$view->addErrors($widgetdm->getErrors());
}
// only send a message
$view->setStatus(vB_View_AJAXHTML::STATUS_MESSAGE, new vB_Phrase('vbcms', 'configuration_failed'));
}
}
else
{
// add the config content
$configview = $this->createView('config');
if (!isset($config['template_name']) OR ($config['template_name'] == '') )
{
$config['template_name'] = 'vbcms_widget_staticbb_page';
}
// add the config content
$configview->template_name = $config['template_name'];
//make the editor
$configview->editorid = construct_edit_toolbar(
$pagetext,
false,
new vBCms_Editor_Override(vB::$vbulletin),
true,
true,
true,
//.........这里部分代码省略.........
示例11: convert_urlencoded_unicode
$threadinfo['issubscribed'] = false;
// use whatever emailupdate setting came through
}
}
if ($vbulletin->GPC['ajax'] or $vbulletin->GPC['quickeditnoajax']) {
// quick edit
$tmpmessage = $vbulletin->GPC['ajax'] ? convert_urlencoded_unicode($edit['message']) : $edit['message'];
$edit = $postinfo;
$edit['message'] =& $tmpmessage;
$edit['title'] = unhtmlspecialchars($edit['title']);
$edit['signature'] =& $edit['showsignature'];
$edit['enablesmilies'] =& $edit['allowsmilie'];
$edit['disablesmilies'] = $edit['enablesmilies'] ? 0 : 1;
$edit['parseurl'] = true;
$edit['prefixid'] = $threadinfo['prefixid'];
$edit['reason'] = fetch_censored_text($vbulletin->GPC['ajax'] ? convert_urlencoded_unicode($vbulletin->GPC['reason']) : $vbulletin->GPC['reason']);
} else {
$edit['iconid'] =& $vbulletin->GPC['iconid'];
$edit['title'] =& $vbulletin->GPC['title'];
$edit['prefixid'] = $vbulletin->GPC_exists['prefixid'] ? $vbulletin->GPC['prefixid'] : $threadinfo['prefixid'];
$edit['podcasturl'] =& $vbulletin->GPC['podcasturl'];
$edit['podcastsize'] =& $vbulletin->GPC['podcastsize'];
$edit['podcastexplicit'] =& $vbulletin->GPC['podcastexplicit'];
$edit['podcastkeywords'] =& $vbulletin->GPC['podcastkeywords'];
$edit['podcastsubtitle'] =& $vbulletin->GPC['podcastsubtitle'];
$edit['podcastauthor'] =& $vbulletin->GPC['podcastauthor'];
// Leave this off for quickedit->advanced so that a post with unparsed links doesn't get parsed just by going to Advanced Edit
if ($vbulletin->GPC['advanced']) {
$edit['parseurl'] = false;
} else {
$edit['parseurl'] =& $vbulletin->GPC['parseurl'];
示例12: intval
} else {
$photoplog_file_info['catid'] = $photoplog['fileid'] - 10864246810;
// catid
}
$do_html = 0;
$do_imgcode = 0;
if ($photoplog_file_info) {
$photoplog['catid'] = intval($photoplog_file_info['catid']);
if (in_array($photoplog['catid'], array_keys($photoplog_ds_catopts))) {
$photoplog_categorybit = $photoplog_ds_catopts[$photoplog['catid']]['options'];
$photoplog_catoptions = convert_bits_to_array($photoplog_categorybit, $photoplog_categoryoptions);
$do_html = $photoplog_catoptions['allowhtml'] ? 1 : 0;
$do_imgcode = $photoplog_catoptions['allowimgcode'] ? 1 : 0;
}
}
$vbulletin->GPC['message'] = convert_urlencoded_unicode($vbulletin->GPC['message']);
if ($photoplog_fileversion == 6) {
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
}
require_once DIR . '/includes/functions_wysiwyg.php';
if ($vbulletin->GPC['towysiwyg']) {
if ($do_imgcode) {
$vbulletin->GPC['message'] = preg_replace("/\\[img\\]/i", "photoplog_front_vb_bb_img_tag", $vbulletin->GPC['message']);
$vbulletin->GPC['message'] = preg_replace("/\\[\\/img\\]/i", "photoplog_back_vb_bb_img_tag", $vbulletin->GPC['message']);
}
ob_start();
echo parse_wysiwyg_html(htmlspecialchars_uni($vbulletin->GPC['message']), false, $vbulletin->GPC['parsetype'], $vbulletin->GPC['allowsmilie']);
$photoplog_html_output = ob_get_contents();
ob_end_clean();
if ($do_imgcode) {
$photoplog_html_output = str_replace(array('photoplog_front_vb_bb_img_tag', 'photoplog_back_vb_bb_img_tag'), array('<img src="', '">'), $photoplog_html_output);
示例13: convert_urlencoded_unicode
/**
* Converts Unicode entities of the format %uHHHH where each H is a hexadecimal
* character to &#DDDD; or the appropriate UTF-8 character based on current charset.
*
* @param Mixed array or text
*
* @return string Decoded text
*/
function convert_urlencoded_unicode($text)
{
if (is_array($text)) {
foreach ($text as $key => $value) {
$text["{$key}"] = convert_urlencoded_unicode($value);
}
return $text;
}
if (!($charset = vB_Template_Runtime::fetchStyleVar('charset'))) {
global $vbulletin;
$charset = $vbulletin->userinfo['lang_charset'];
}
$return = preg_replace('#%u([0-9A-F]{1,4})#ie', "convert_unicode_char_to_charset(hexdec('\\1'), \$charset)", $text);
$lower_charset = strtolower($charset);
if ($lower_charset != 'utf-8' and function_exists('html_entity_decode')) {
// this converts certain { entities to their actual character
// set values; don't do this if using UTF-8 as it's already done above.
// note: we don't want to convert >, etc as that undoes the effects of STR_NOHTML
$return = preg_replace('#&([a-z]+);#i', '&$1;', $return);
if ($lower_charset == 'windows-1251') {
// there's a bug in PHP5 html_entity_decode that decodes some entities that
// it shouldn't. So double encode them to ensure they don't get decoded.
$return = preg_replace('/&#(128|129|1[3-9][0-9]|2[0-4][0-9]|25[0-5]);/', '&#$1;', $return);
}
$return = @html_entity_decode($return, ENT_NOQUOTES, $charset);
}
return $return;
}
示例14: check_save_prefs
/**
* check_save_prefs()
* This function checks to see if we should save the search preferences,
* and takes appropriate action
* @param integer $typeid
* @return : no return
*/
function check_save_prefs($current_user, $typeid = vB_Search_Core::TYPE_COMMON)
{
global $vbulletin, $prefs;
if (is_array($typeid)) {
$typeid = vB_Search_Core::TYPE_COMMON;
}
if ($vbulletin->GPC_exists['saveprefs'] and $vbulletin->GPC['saveprefs']) {
$stored_prefs = $current_user->getSearchPrefs();
foreach ($prefs as $key => $value) {
if (isset($vbulletin->GPC[$key])) {
$prefs[$key] = convert_urlencoded_unicode($vbulletin->GPC[$key]);
}
}
$stored_prefs[$typeid] = $prefs;
} else {
if (isset($stored_prefs[$typeid])) {
unset($stored_prefs[$typeid]);
}
}
$current_user->saveSearchPrefs($stored_prefs);
}
示例15: getcwd
<?php
require '../../model/MensagemChat.php';
$curdir = getcwd();
chdir('/home/ccvteam/public_html/forum');
require_once '/home/ccvteam/public_html/forum/global.php';
require_once '/home/ccvteam/public_html/forum/includes/class_bbcode.php';
require_once '/home/ccvteam/public_html/forum/includes/functions_newpost.php';
chdir($curdir);
$userid = $vbulletin->userinfo['userid'];
if ($userid != '0') {
$shouter = utf8_encode($vbulletin->userinfo['musername']);
// clean input
$vbulletin->input->clean_array_gpc('p', array('message' => TYPE_STR));
$shout = $vbulletin->GPC['message'];
// trata aspas
$shout = addslashes($shout);
// trata ajax urlencoded
$shout = convert_urlencoded_unicode($shout);
// convert links
$shout = convert_url_to_bbcode($shout);
// parseador de bbCode
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
// do_parse($text, $do_html = false, $do_smilies = true, $do_bbcode = true , $do_imgcode = true, $do_nl2br = true, $cachable = false)
$shout = $parser->do_parse($shout, false, true, true, false, false, false);
$timestamp = date("Y-m-d H:i:s");
$msg = new MensagemChat($shout, $shouter, $timestamp, $userid);
$msg->Save();
}