本文整理汇总了PHP中print_stop_message2函数的典型用法代码示例。如果您正苦于以下问题:PHP print_stop_message2函数的具体用法?PHP print_stop_message2怎么用?PHP print_stop_message2使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_stop_message2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verify_upload_folder
function verify_upload_folder($attachpath)
{
if ($attachpath == '') {
print_stop_message2('please_complete_required_fields');
}
// Get realpath.
$test = realpath($attachpath);
if (!$test) {
// If above fails, try relative path instead.
$test = realpath(DIR . DIRECTORY_SEPARATOR . $attachpath);
}
if (!is_dir($test) or !is_writable($test)) {
print_stop_message2(array('test_file_write_failed', $attachpath));
}
if (!is_dir($test . '/test')) {
@umask(0);
if (!@mkdir($test . '/test', 0777)) {
print_stop_message2(array('test_file_write_failed', $attachpath));
}
}
@chmod($test . '/test', 0777);
if ($fp = @fopen($test . '/test/test.attach', 'wb')) {
fclose($fp);
if (!@unlink($test . '/test/test.attach')) {
print_stop_message2(array('test_file_write_failed', $attachpath));
}
@rmdir($test . '/test');
} else {
print_stop_message2(array('test_file_write_failed', $attachpath));
}
}
示例2: verify_upload_folder
function verify_upload_folder($imagepath)
{
if ($imagepath == '') {
print_stop_message2('please_complete_required_fields');
}
// Get realpath.
$test = realpath($imagepath);
if (!$test) {
// If above fails, try relative path instead.
$test = realpath(DIR . DIRECTORY_SEPARATOR . $imagepath);
}
if ($fp = @fopen($test . '/test.image', 'wb')) {
fclose($fp);
if (!@unlink($test . '/test.image')) {
print_stop_message2(array('test_file_write_failed', $imagepath));
}
return true;
} else {
print_stop_message2(array('test_file_write_failed', $imagepath));
}
}
示例3: print_form_header
if (can_access_logs($vb5_config['SpecialUsers']['canpruneadminlog'], 1)) {
print_form_header('apilog', 'prunelog');
print_table_header($vbphrase['prune_api_log']);
print_input_row($vbphrase['remove_entries_logged_by_apiclientid'], 'apiclientid');
print_input_row($vbphrase['remove_entries_older_than_days'], 'daysprune', 30);
print_submit_row($vbphrase['prune_api_log'], 0);
} else {
echo '<p>' . $vbphrase['control_panel_log_pruning_permission_restricted'] . '</p>';
}
}
}
// ###################### Start view client #######################
if ($_REQUEST['do'] == 'viewclient') {
$vbulletin->input->clean_array_gpc('r', array('apiclientid' => vB_Cleaner::TYPE_UINT));
if (!$vbulletin->GPC['apiclientid'] or !($client = vB::getDbAssertor()->getRow('api_fetchclientbyid', array('apiclientid' => $vbulletin->GPC['apiclientid'])))) {
print_stop_message2(array('invalidid', 'apiclientid'));
}
print_form_header('api', 'viewclient');
print_table_header($vbphrase['apiclient']);
print_label_row($vbphrase['apiclientid'], $client['apiclientid']);
print_label_row($vbphrase['apiclientname'], vB_String::htmlSpecialCharsUni($client['clientname']));
print_label_row($vbphrase['apiclientversion'], vB_String::htmlSpecialCharsUni($client['clientversion']));
print_label_row($vbphrase['apiclient_platformname'], vB_String::htmlSpecialCharsUni($client['platformname']));
print_label_row($vbphrase['apiclient_platformversion'], vB_String::htmlSpecialCharsUni($client['platformversion']));
print_label_row($vbphrase['apiclient_uniqueid'], vB_String::htmlSpecialCharsUni($client['uniqueid']));
print_label_row($vbphrase['apiclient_initialipaddress'], iif(!empty($client['initialipaddress']), "<a href=\"usertools.php?" . vB::getCurrentSession()->get('sessionurl') . "do=doips&depth=2&ipaddress={$client['initialipaddress']}&hash=" . CP_SESSIONHASH . "\">{$client['initialipaddress']}</a>", " "));
print_label_row($vbphrase['apiclient_initialtime'], vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $client['dateline']));
print_label_row($vbphrase['apiclient_lastactivity'], vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $client['lastactivity']));
print_label_row($vbphrase['apiclient_clienthash'], $client['clienthash']);
print_label_row($vbphrase['apiclient_secret'], $client['secret']);
print_label_row($vbphrase['apiclient_apiaccesstoken'], $client['apiaccesstoken']);
示例4: array
$options = array();
foreach ($optionfields as $fieldname => $optionname) {
if ($profilefield["{$fieldname}"]) {
$options[] = $optionname;
}
}
$options = implode(', ', $options) . ' ';
echo "\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"{$bgclass}\"><strong>{$profilefield['title']} <dfn>{$types["{$profilefield['type']}"]}</dfn></strong></td>\n\t\t\t\t\t\t\t\t\t<td class=\"{$bgclass}\">{$options}</td>\n\t\t\t\t\t\t\t\t\t<td class=\"{$bgclass}\">field{$_profilefieldid}</td>\n\t\t\t\t\t\t\t\t\t<td class=\"{$bgclass}\"><input type=\"text\" class=\"bginput\" name=\"order[{$_profilefieldid}]\" value=\"{$profilefield['displayorder']}\" size=\"5\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"{$bgclass}\">" . construct_link_code($vbphrase['edit'], "profilefield.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&profilefieldid={$_profilefieldid}") . construct_link_code($vbphrase['delete'], "profilefield.php?" . vB::getCurrentSession()->get('sessionurl') . "do=remove&profilefieldid={$_profilefieldid}") . "</td>\n\t\t\t\t\t\t\t\t</tr>";
}
}
}
}
print_description_row("<input type=\"submit\" class=\"button\" value=\"{$vbphrase['save_display_order']}\" accesskey=\"s\" />", 0, 5, 'tfoot', vB_Template_Runtime::fetchStyleVar('right'));
if (++$areacount < $numareas) {
print_table_break('');
}
}
}
print_table_footer();
} else {
print_stop_message2('no_profile_fields_defined');
}
}
// #############################################################################
print_cp_footer();
/*=========================================================================*\
|| #######################################################################
|| # Downloaded: 15:45, Tue Sep 8th 2015
|| # CVS: $RCSfile$ - $Revision: 83432 $
|| #######################################################################
\*=========================================================================*/
示例5: print_submit_row
print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #######################
if ($_POST['do'] == 'kill') {
$rankapi->delete($rankId);
print_stop_message2('deleted_user_rank_successfully', 'ranks', array('do' => 'modify'));
}
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'modify') {
$ranks = $rankapi->fetchAll();
print_form_header('', '');
print_table_header($vbphrase['user_rank_manager_gcprank']);
print_description_row($vbphrase['user_ranks_desc'] . '<br /><br />' . construct_phrase($vbphrase['it_is_recommended_that_you_update_user_titles'], vB::getCurrentSession()->get('sessionurl')), '', 0);
print_table_footer();
if (!$ranks or count($ranks) == 0) {
print_stop_message2('no_user_ranks_defined');
}
print_form_header('', '');
// the $tempgroup check in the foreach below relies on the first pass of $tempgroup not being 0,
// which it will be if it is init to false.
$tempgroup = null;
foreach ($ranks as $rank) {
if ($tempgroup != $rank['usergroupid']) {
if (!empty($tempgroup)) {
print_table_break();
}
$tempgroup = $rank['usergroupid'];
print_table_header($rank['usergroupid'] == 0 ? $vbphrase['all_usergroups'] : $rank['title'], 5, 1);
print_cells_row(array($vbphrase['user_rank'], $vbphrase['minimum_posts'], $vbphrase['display_type'], $vbphrase['stack_rank'], $vbphrase['controls']), 1, '', -1);
}
$count = 0;
示例6: print_cp_message
$usercss->invalid["{$selectorname}"]["{$property}"] = ' usercsserror ';
continue;
}
}
$usercss->parse($selectorname, $property, $value);
}
}
if (!empty($usercss->error)) {
print_cp_message(implode("<br />", $usercss->error));
} else {
if (!empty($usercss->invalid)) {
print_stop_message2('invalid_values_customize_profile');
}
}
$usercss->save();
print_stop_message2('saved_profile_customizations_successfully', 'user', array('do' => 'edit', 'u' => $userinfo['userid']));
}
// ########################################################################
if ($_REQUEST['do'] == 'usercss') {
require_once DIR . '/includes/adminfunctions_template.php';
?>
<script type="text/javascript" src="<?php
echo $vbulletin->options['bburl'];
?>
/clientscript/vbulletin_cpcolorpicker.js?v=<?php
echo SIMPLE_VERSION;
?>
"></script>
<?php
$colorPicker = construct_color_picker(11);
$allowedfonts = $usercss->build_admin_select_option($vbulletin->options['usercss_allowed_fonts'], 'usercss_font_');
示例7: foreach
}
break;
case 'deny':
$usergroupcache =& vB::getDatastore()->getValue('usergroupcache');
foreach ($usergroupcache as $group) {
/*insert query*/
vB::getDbAssertor()->assertQuery('replacePermissions', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_STORED, 'nodeid' => $vbulletin->GPC['nodeid'], 'usergroupid' => $group['usergroupid'], 'forumpermissions' => 0, 'moderatorpermissions' => 0, 'createpermissions' => 0, 'forumpermissions2' => 0, 'edit_time' => 2, 'require_moderate' => 1, 'maxtags' => 0, 'maxstartertags' => 0, 'maxothertags' => 0, 'maxattachments' => 0, 'maxchannels' => 0, 'channeliconmaxsize' => 0));
}
break;
default:
print_stop_message2('invalid_quick_set_action');
}
build_channel_permissions();
vB_Cache::instance()->event('perms_changed');
vB::getUserContext()->rebuildGroupAccess();
print_stop_message2('saved_channel_permissions_successfully', 'forumpermission', array('do' => 'modify', 'n' => $vbulletin->GPC['nodeid']));
}
// ###################### Start fpgetstyle #######################
function fetch_forumpermission_style($permissions)
{
global $vbulletin;
if (!($permissions & $vbulletin->bf_ugp_forumpermissions['canview'])) {
return " style=\"list-style-type:circle;\"";
} else {
return '';
}
}
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'modify') {
print_form_header('', '');
print_table_header($vbphrase['additional_functions_gcppermission']);
示例8: array
$criteria_sql[] = array('noticeid' => $noticeid, 'criteriaid' => $criteriaid, 'condition1' => trim($criteria['condition1']), 'condition2' => trim($criteria['condition2']), 'condition3' => trim($criteria['condition3']));
}
}
// insert criteria
$assertor->insertMultiple('vBForum:noticecriteria', array('noticeid', 'criteriaid', 'condition1', 'condition2', 'condition3'), $criteria_sql);
}
// insert / update phrase
$userInfo = vB_User::fetchUserInfo();
$options = vB::getDatastore()->getValue('options');
$assertor->assertQuery('replaceIntoPhrases', array('languageid' => 0, 'varname' => 'notice_' . $noticeid . '_html', 'text' => $vbulletin->GPC['html'], 'product' => 'vbulletin', 'fieldname' => 'global', 'enteredBy' => $userInfo['username'], 'dateline' => vB::getRequest()->getTimeNow(), 'version' => $options['templateversion']));
// update the datastore notice cache
build_notice_datastore();
// rebuild languages
require_once DIR . '/includes/adminfunctions_language.php';
build_language(-1);
print_stop_message2(array('saved_notice_x_successfully', $vbulletin->GPC['title']), 'notice', array('do' => 'modify'));
}
// #############################################################################
// edit a notice
if ($_REQUEST['do'] == 'edit' or $_REQUEST['do'] == 'add') {
$vbulletin->input->clean_array_gpc('r', array('noticeid' => vB_Cleaner::TYPE_UINT));
// initialize some data storage
$notice_cache = array();
$notice_name_cache = array();
$criteria_cache = array();
// cache all notices
$notice_result = $assertor->getRows('vBForum:notice', array(), 'displayorder');
$max_displayorder = 0;
foreach ($notice_result as $notice) {
$notice_cache["{$notice['noticeid']}"] = $notice;
if ($notice['noticeid'] != $vbulletin->GPC['noticeid']) {
示例9: autoexport_write_faq
autoexport_write_faq($product['product']);
}
}
}
vb_Cache::instance()->event('vB_FAQ_chg');
print_stop_message2('saved_display_order_successfully', 'faq', array('faq' => $vbulletin->GPC['faqparent']));
}
// #############################################################################
if ($_REQUEST['do'] == 'modify') {
$vbulletin->input->clean_array_gpc('r', array('faq' => vB_Cleaner::TYPE_STR));
$faqparent = iif(empty($vbulletin->GPC['faq']), 'faqroot', $vbulletin->GPC['faq']);
cache_ordered_faq();
if (!is_array($ifaqcache["{$faqparent}"])) {
$faqparent = $faqcache["{$faqparent}"]['faqparent'];
if (!is_array($ifaqcache["{$faqparent}"])) {
print_stop_message2('invalid_faq_item_specified');
}
}
global $parents;
$parents = array();
fetch_faq_parents($faqcache["{$faqparent}"]['faqname']);
$parents = array_reverse($parents);
$nav = "<a href=\"faq.php?" . vB::getCurrentSession()->get('sessionurl') . "\">{$vbphrase['faq']}</a>";
if (!empty($parents)) {
$i = 1;
foreach ($parents as $link => $name) {
$nav .= '<br />' . str_repeat(' ', $i) . iif(empty($link), $name, "<a href=\"{$link}\">{$name}</a>");
$i++;
}
$nav .= '
<span class="smallfont">' . construct_link_code($vbphrase['edit'], "faq.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&faq=" . urlencode($faqparent)) . construct_link_code($vbphrase['add_child_faq_item'], "faq.php?" . vB::getCurrentSession()->get('sessionurl') . "do=add&faq=" . urlencode($faqparent)) . construct_link_code($vbphrase['delete'], "faq.php?" . vB::getCurrentSession()->get('sessionurl') . "do=delete&faq=" . urlencode($faqparent)) . '</span>';
示例10: print_description_row
print_description_row(construct_phrase($vbphrase['are_you_sure_you_want_to_prune_x_log_entries_from_scheduled_task_log'], vb_number_format($logs['count'])));
print_submit_row($vbphrase['yes'], 0, 0, $vbphrase['no']);
} else {
print_stop_message2('no_matches_found_gerror');
}
}
// ###################### Start do prune log #######################
if ($_POST['do'] == 'doprunelog') {
$vbulletin->input->clean_array_gpc('p', array('varname' => vB_Cleaner::TYPE_STR, 'datecut' => vB_Cleaner::TYPE_INT));
$conditions = array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE);
if (!empty($vbulletin->GPC['varname'])) {
$conditions[vB_dB_Query::CONDITIONS_KEY][] = array('field' => 'varname', 'value' => $vbulletin->GPC['varname'], vB_dB_Query::OPERATOR_KEY => vB_dB_Query::OPERATOR_EQ);
}
$conditions[vB_dB_Query::CONDITIONS_KEY][] = array('field' => 'dateline', 'value' => $vbulletin->GPC['datecut'], vB_dB_Query::OPERATOR_KEY => vB_dB_Query::OPERATOR_LT);
$logs = $assertor->assertQuery('vBForum:cronlog', $conditions);
print_stop_message2('pruned_scheduled_task_log_successfully', 'cronlog', array('do' => 'choose'));
}
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'choose') {
$cronjobs = $assertor->getRows('cron', array(), 'varname');
$filelist = array();
$filelist[0] = $vbphrase['all_scheduled_tasks'];
foreach ($cronjobs as $file) {
$filelist["{$file['varname']}"] = isset($vbphrase['task_' . $file['varname'] . '_title']) ? htmlspecialchars_uni($vbphrase['task_' . $file['varname'] . '_title']) : $file['varname'];
}
$perpage = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 40 => 40, 50 => 50, 100 => 100);
$orderby = array('date' => $vbphrase['date'], 'action' => $vbphrase['action']);
print_form_header('cronlog', 'view');
print_table_header($vbphrase['scheduled_task_log_viewer']);
print_select_row($vbphrase['log_entries_to_show_per_page'], 'perpage', $perpage, 15);
print_select_row($vbphrase['show_only_entries_generated_by'], 'varname', $filelist);
示例11: preg_replace
}
$vbulletin->GPC['navprefs'] = preg_replace('#[^a-z0-9_,]#i', '', $vbulletin->GPC['navprefs']);
$_REQUEST['do'] = 'savenavprefs';
}
if ($_REQUEST['do'] == 'buildbitfields') {
require_once DIR . '/includes/class_bitfield_builder.php';
vB_Bitfield_Builder::save();
build_channel_permissions();
print_stop_message2('rebuilt_bitfields_successfully', 'index');
}
if ($_REQUEST['do'] == 'buildvideo' and (vB::getUserContext()->hasAdminPermission('canadminstyles') or vB::getUserContext()->hasAdminPermission('canadmintemplates'))) {
require_once DIR . '/includes/functions_databuild.php';
build_bbcode_video();
print_cp_header();
vB_Library::instance('style')->buildAllStyles();
print_stop_message2('rebuilt_video_bbcodes_successfully', 'index');
}
if ($_REQUEST['do'] == 'buildnavprefs') {
$vbulletin->input->clean_array_gpc('r', array('prefs' => vB_Cleaner::TYPE_STR, 'dowhat' => vB_Cleaner::TYPE_STR, 'id' => vB_Cleaner::TYPE_INT));
$vbulletin->GPC['prefs'] = preg_replace('#[^a-z0-9_,]#i', '', $vbulletin->GPC['prefs']);
$_tmp = preg_split('#,#', $vbulletin->GPC['prefs'], -1, PREG_SPLIT_NO_EMPTY);
$_navprefs = array();
foreach ($_tmp as $_val) {
$_navprefs["{$_val}"] = $_val;
}
unset($_tmp);
if ($vbulletin->GPC['dowhat'] == 'collapse') {
// remove an item from the list
unset($_navprefs[$vbulletin->GPC['id']]);
} else {
// add an item to the list
示例12: print_stop_message2
print_stop_message2('invalid_hook');
}
if (!$vbulletin->GPC['hookname'] or !$vbulletin->GPC['title'] or !$vbulletin->GPC['template']) {
print_stop_message2('please_complete_required_fields');
}
$hookdata = array('hookid' => $vbulletin->GPC['hookid'], 'hookname' => $vbulletin->GPC['hookname'], 'title' => $vbulletin->GPC['title'], 'arguments' => $hook_api->encodeArguments($vbulletin->GPC['arguments']), 'product' => $vbulletin->GPC['product'], 'active' => $vbulletin->GPC['active'], 'template' => $vbulletin->GPC['template'], 'hookorder' => $vbulletin->GPC['hookorder']);
$hookid = $hook_api->saveHook($vbulletin->GPC['hookid'], $hookdata);
// stuff to handle the redirect
$args = array();
if ($vbulletin->GPC['return']) {
$args = array('do' => 'edit', 'hookid' => $hookid);
}
if ($vbulletin->GPC['hookid']) {
print_stop_message2('updated_hook_successfully', 'hook', $args);
} else {
print_stop_message2('added_hook_successfully', 'hook', $args);
}
}
// #############################################################################
if ($_REQUEST['do'] == 'edit' or $_REQUEST['do'] == 'add') {
$products = fetch_product_list();
$hooklocations = $hook_api->getXmlHooks();
$hook = $hook_api->getHookInfo($vbulletin->GPC['hookid']);
if (!$hook) {
$hook = array('active' => 1, 'arguments' => '', 'hookorder' => 10);
}
$hook['arguments'] = $hook_api->decodeArguments($hook['arguments']);
print_form_header('hook', 'update');
construct_hidden_code('hookid', $hook['hookid']);
if ($_REQUEST['do'] == 'add') {
$heading = $vbphrase['add_new_hook'];
示例13: dirname
require_once dirname(__FILE__) . '/global.php';
// ############################# LOG ACTION ###############################
if (empty($_REQUEST['do'])) {
log_admin_action();
}
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$vbulletin->input->clean_array_gpc('r', array('redirect' => vB_Cleaner::TYPE_NOHTML));
# Not sure where this comes from
if (!empty($vbulletin->GPC['redirect'])) {
$redirect = vB_String::parseUrl($vbulletin->GPC['redirect']);
$pathinfo = pathinfo($redirect['path']);
$file = $pathinfo['filename'];
parse_str($redirect['query'], $args);
print_stop_message2('redirecting_please_wait', $file, $args);
}
// #############################################################################
// ############################### LOG OUT OF CP ###############################
// #############################################################################
if ($_REQUEST['do'] == 'cplogout') {
vbsetcookie('cpsession', '', false, true, true);
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "cpsession WHERE userid = " . $vbulletin->userinfo['userid'] . " AND hash = '" . $vbulletin->db->escape_string($vbulletin->GPC[COOKIE_PREFIX . 'cpsession']) . "'");
$sessionurl_js = vB::getCurrentSession()->get('sessionurl_js');
if (!empty($sessionurl_js)) {
exec_header_redirect('index.php?' . $sessionurl_js);
} else {
exec_header_redirect('index.php');
}
}
if (empty($_REQUEST['do'])) {
示例14: xml_import_language
/**
* Imports a language from a language XML file
*
* @param string XML language string
* @param integer Language to overwrite
* @param string Override title for imported language
* @param boolean Allow import of language from mismatched vBulletin version
* @param boolean Allow user-select of imported language
* @param boolean Echo output..
* @param boolean Read charset from XML header
*
* @return Returns false if the custom language was not imported (used in final_upgrade) OR
* returns the languageid if, if the custom language import was successful (also used in final_upgrade)
*/
function xml_import_language($xml = false, $languageid = -1, $title = '', $anyversion = false, $userselect = true, $output = true, $readcharset = false)
{
global $vbulletin, $vbphrase;
print_dots_start('<b>' . $vbphrase['importing_language'] . "</b>, {$vbphrase['please_wait']}", ':', 'dspan');
require_once DIR . '/includes/class_xml.php';
require_once DIR . '/includes/functions_misc.php';
$xmlobj = new vB_XML_Parser($xml, $GLOBALS['path'], $readcharset);
if ($xmlobj->error_no() == 1) {
print_dots_stop();
print_stop_message2('no_xml_and_no_path');
} else {
if ($xmlobj->error_no() == 2) {
print_dots_stop();
print_stop_message('please_ensure_x_file_is_located_at_y', 'vbulletin-language.xml', $GLOBALS['path']);
}
}
if (!($arr =& $xmlobj->parse())) {
print_dots_stop();
print_stop_message('xml_error_x_at_line_y', $xmlobj->error_string(), $xmlobj->error_line());
}
if (!$arr['phrasetype']) {
print_dots_stop();
print_stop_message2('invalid_file_specified');
}
$title = empty($title) ? $arr['name'] : $title;
$version = $arr['vbversion'];
$master = $arr['type'] == 'master' ? 1 : 0;
$just_phrases = $arr['type'] == 'phrases' ? 1 : 0;
if (!empty($arr['settings'])) {
$langinfo = $arr['settings'];
}
$officialcustom = false;
//Check custom language revision. See also VBV-9215.
if (!$master and $arr['product'] == 'vbulletin' and !empty($arr['revision']) and !empty($arr['vblangcode'])) {
$test = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "language WHERE vblangcode = '" . $vbulletin->db->escape_string($arr['vblangcode']) . "'");
if ($test['languageid']) {
if (intval($test['revision']) >= intval($arr['revision'])) {
// Same or newer language revision has been installed
// We shouldn't print_stop_message() as the upgrader may continue processing other custom languages
return false;
}
$languageid = $test['languageid'];
}
$langinfo['revision'] = intval($arr['revision']);
$langinfo['vblangcode'] = trim($arr['vblangcode']);
$officialcustom = true;
} else {
$langinfo['revision'] = 0;
$langinfo['vblangcode'] = '';
}
$langinfo['product'] = empty($arr['product']) ? 'vbulletin' : $arr['product'];
// look for skipped groups
$skipped_groups = array();
if (!empty($arr['skippedgroups'])) {
$skippedgroups =& $arr['skippedgroups']['skippedgroup'];
if (!is_array($skippedgroups)) {
$skippedgroups = array($skippedgroups);
}
foreach ($skippedgroups as $skipped) {
if (is_array($skipped)) {
$skipped_groups[] = $vbulletin->db->escape_string($skipped['value']);
} else {
$skipped_groups[] = $vbulletin->db->escape_string($skipped);
}
}
}
if ($skipped_groups) {
$sql_skipped = "AND " . TABLE_PREFIX . "phrase.fieldname NOT IN ('" . implode("', '", $skipped_groups) . "')";
} else {
$sql_skipped = '';
}
foreach ($langinfo as $key => $val) {
$langinfo["{$key}"] = $vbulletin->db->escape_string(trim($val));
}
$langinfo['options'] = intval($langinfo['options']);
$langinfo['revision'] = intval($langinfo['revision']);
if ($version != $vbulletin->options['templateversion'] and !$master) {
if (strtok($version, '.') != strtok($vbulletin->options['templateversion'], '.')) {
print_dots_stop();
print_stop_message('upload_file_created_with_different_major_version', $vbulletin->options['templateversion'], $version);
}
if (!$anyversion) {
print_dots_stop();
print_stop_message('upload_file_created_with_different_version', $vbulletin->options['templateversion'], $version);
}
}
//.........这里部分代码省略.........
示例15: print_description_row
print_description_row('<label for="rb_itemtype_announcement"><input type="radio" name="itemtype" value="announcement" id="rb_itemtype_announcement"' . $checked['itemtype']['announcement'] . " />{$vbphrase['post_items_as_announcements']}</label>", false, 2, 'thead', 'left', 'itemtype');
print_yes_no_row($vbphrase['allow_html_in_announcements'], 'options[allowhtml]', $feed['options']['allowhtml']);
print_input_row($vbphrase['days_for_announcement_to_remain_active'], 'endannouncement', $feed['endannouncement']);
construct_hidden_code('rssfeedid', $feed['rssfeedid']);
print_submit_row('', $vbphrase['reset'], 2, '', "<input type=\"submit\" class=\"button\" name=\"preview\" tabindex=\"1\" accesskey=\"p\" value=\"{$vbphrase['preview_feed']}\" />");
}
if ($_REQUEST['do'] == 'modify') {
$feeds = array();
$feeds_result = $assertor->getRows('vBForum:getRssFeedsDetailed');
if (count($feeds_result)) {
foreach ($feeds_result as $feed) {
$feeds["{$feed['rssfeedid']}"] = $feed;
}
}
if (empty($feeds)) {
print_stop_message2(array('no_feeds_defined', vB::getCurrentSession()->get('sessionurl')));
} else {
?>
<script type="text/javascript">
$(document).ready(function() {
function verifyAllChecked() {
// Search if any check boxes are already checked.
if ($('.rssenabled:checked').length == $('.rssenabled').length)
{
$('[name="allbox"]').prop('checked', true);
}
else
{
$('[name="allbox"]').prop('checked', false);
}
}