本文整理汇总了PHP中print_input_row函数的典型用法代码示例。如果您正苦于以下问题:PHP print_input_row函数的具体用法?PHP print_input_row怎么用?PHP print_input_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_input_row函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_move_prune_rows
function print_move_prune_rows($permcheck = '')
{
global $vbphrase;
print_description_row($vbphrase['date_options'], 0, 2, 'thead', 'center');
print_input_row($vbphrase['original_post_date_is_at_least_xx_days_ago'], 'thread[originaldaysolder]', 0, 1, 5);
print_input_row($vbphrase['original_post_date_is_at_most_xx_days_ago'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '0') . '</dfn>', 'thread[originaldaysnewer]', 0, 1, 5);
print_input_row($vbphrase['last_post_date_is_at_least_xx_days_ago'], 'thread[lastdaysolder]', 0, 1, 5);
print_input_row($vbphrase['last_post_date_is_at_most_xx_days_ago'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '0') . '</dfn>', 'thread[lastdaysnewer]', 0, 1, 5);
print_description_row($vbphrase['view_options'], 0, 2, 'thead', 'center');
print_input_row($vbphrase['thread_has_at_least_xx_replies'], 'thread[repliesleast]', 0, 1, 5);
print_input_row($vbphrase['thread_has_at_most_xx_replies'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '-1') . '</dfn>', 'thread[repliesmost]', -1, 1, 5);
print_input_row($vbphrase['thread_has_at_least_xx_views'], 'thread[viewsleast]', 0, 1, 5);
print_input_row($vbphrase['thread_has_at_most_xx_views'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '-1') . '</dfn>', 'thread[viewsmost]', -1, 1, 5);
print_description_row($vbphrase['status_options'], 0, 2, 'thead', 'center');
print_yes_no_other_row($vbphrase['thread_is_sticky'], 'thread[issticky]', $vbphrase['either'], 0);
$state = array('visible' => $vbphrase['visible'], 'moderation' => $vbphrase['awaiting_moderation'], 'deleted' => $vbphrase['deleted'], 'any' => $vbphrase['any']);
print_radio_row($vbphrase['thread_state'], 'thread[state]', $state, 'any');
$status = array('open' => $vbphrase['open'], 'closed' => $vbphrase['closed'], 'redirect' => $vbphrase['redirect'], 'not_redirect' => $vbphrase['not_redirect'], 'any' => $vbphrase['any']);
print_radio_row($vbphrase['thread_status'], 'thread[status]', $status, 'not_redirect');
print_description_row($vbphrase['other_options'], 0, 2, 'thead', 'center');
print_input_row($vbphrase['username'], 'thread[posteduser]');
print_input_row($vbphrase['title'], 'thread[titlecontains]');
print_moderator_forum_chooser('thread[forumid]', -1, $vbphrase['all_forums'], $vbphrase['forum'], true, false, true, $permcheck);
print_yes_no_row($vbphrase['include_child_forums'], 'thread[subforums]');
if ($prefix_options = construct_prefix_options(0, '', true, true)) {
print_label_row($vbphrase['prefix'], '<select name="thread[prefixid]" class="bginput">' . $prefix_options . '</select>', '', 'top', 'prefixid');
}
}
示例2: print_channel_permission_rows
function print_channel_permission_rows($customword, $channelpermission = array(), $extra = '')
{
global $vbphrase;
print_label_row("<b>{$customword}</b>", '
<input type="button" class="button" value="' . $vbphrase['all_yes'] . '" onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 1);' . iif($extra != '', ' }') . '" class="button" />
<input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 0);' . iif($extra != '', ' }') . '" class="button" />
<!--<input type="submit" class="button" value="Okay" class="button" />-->
', 'tcat', 'middle');
// Load permissions
require_once DIR . '/includes/class_bitfield_builder.php';
$bitvalues = array('forumpermissions', 'forumpermissions2', 'moderatorpermissions', 'createpermissions');
$permFields = vB_ChannelPermission::fetchPermFields();
$permPhrases = vB_ChannelPermission::fetchPermPhrases();
if (empty($channelpermission)) {
// we need the defaults to be displayed
$channelpermission = vB_ChannelPermission::instance()->fetchPermissions(1);
$channelpermission = current($channelpermission);
}
foreach ($permFields as $permField => $type) {
//Do the non-bitmap fields first.
switch ($type) {
case vB_ChannelPermission::TYPE_HOURS:
case vB_ChannelPermission::TYPE_COUNT:
$permvalue = $channelpermission[$permField];
print_input_row($vbphrase[$permPhrases[$permField]], $permField, $permvalue, true, 35, 0, '', false, 'channelPerm_' . $permField);
break;
case vB_ChannelPermission::TYPE_BOOL:
$permvalue =& $channelpermission[$permField];
print_yes_no_row($vbphrase[$permPhrases[$permField]], $permField, $permvalue, $extra);
break;
}
}
//now do the bitmaps
foreach ($permFields as $permField => $type) {
if ($type == vB_ChannelPermission::TYPE_BITMAP) {
if ($permField !== 'forumpermissions2') {
print_table_header($vbphrase[$permPhrases[$permField]]);
}
foreach ($channelpermission['bitfields'][$permField] as $permBit) {
if ($permBit['used']) {
if (empty($permBit['phrase']) and $permField == 'moderatorpermissions') {
$permBit['phrase'] = "moderator_add_edit_" . $permBit['name'] . "_title";
}
if ($permField == 'moderatorpermissions' and $permBit['name'] == 'canopenclose') {
$helpOptions = array('prefix' => $permField);
} else {
$helpOptions = array();
}
print_yes_no_row(isset($vbphrase[$permBit['phrase']]) ? $vbphrase[$permBit['phrase']] : $permBit['phrase'], $permField . '[' . $permBit['name'] . ']', $permBit['set'], $extra, $helpOptions);
}
}
}
}
// Legacy Hook 'admin_nperms_form' Removed //
}
示例3: define
}
echo "Overall Repair complete<br />";
define('SCRIPT_REDIRECT', true);
}
break;
}
} else {
if ($_REQUEST['do'] == 'user') {
$vbulletin->input->clean_array_gpc('p', array('user' => TYPE_STR));
switch ($vbulletin->GPC['type']) {
case 'access':
if (empty($vbulletin->GPC['user'])) {
print_form_header('tools', 'user');
construct_hidden_code('type', 'access');
print_table_header('Enter username to restore access to');
print_input_row('User Name', 'user', '');
print_submit_row('Submit', '');
} else {
$userid = $db->query_first("SELECT userid, usergroupid FROM " . TABLE_PREFIX . "user WHERE username = '" . $db->escape_string(htmlspecialchars_uni($vbulletin->GPC['user'])) . "'");
if (empty($userid['userid'])) {
echo '<p align="center">Invalid username</p>';
} else {
// lets check that usergroupid 6 is still admin
$ugroup = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid = 6 AND (adminpermissions & " . $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] . ")");
if (empty($ugroup['usergroupid'])) {
// lets give them admin permissions again
$db->query_write("UPDATE " . TABLE_PREFIX . "usergroup SET adminpermissions = 3 WHERE usergroupid = 6");
build_forum_permissions();
}
/*insert query*/
$db->query_write("REPLACE INTO " . TABLE_PREFIX . "administrator\n\t\t\t\t\t(userid, adminpermissions)\n\t\t\t\tVALUES\n\t\t\t\t\t({$userid['userid']}, " . (array_sum($vbulletin->bf_ugp_adminpermissions) - 3) . ")\n\t\t\t\t");
示例4: array
}
if (!($oldban = $db->query_first("SELECT user.userid, user.username, userban.reason FROM " . TABLE_PREFIX . "userban AS userban INNER JOIN " . TABLE_PREFIX . "user AS user ON(user.userid=userban.userid) WHERE user.userid = " . $vbulletin->GPC['userid'])))
{
print_stop_message('invalid_user_specified');
}
$vbulletin->GPC['username'] = $oldban['username'];
print_form_header('banning', 'updatereason');
print_table_header($vbphrase['ban_user']);
construct_hidden_code('userid', $oldban['userid']);
print_label_row($vbphrase['username'], $vbulletin->GPC['username']);
print_input_row($vbphrase['user_ban_reason'], 'reason', $oldban['reason'], false, 50, 250);
print_submit_row($vbphrase['ban_user']);
}
// #############################################################################
// display users from 'banned' usergroups
if ($_REQUEST['do'] == 'modify')
{
$vbulletin->input->clean_array_gpc('r', array(
'pagenumber' => TYPE_UINT,
));
$perpage = 100;
if (!$vbulletin->GPC['pagenumber'])
{
示例5: array
$vbulletin->input->clean_array_gpc('p', array('title' => vB_Cleaner::TYPE_STR, 'minposts' => vB_Cleaner::TYPE_UINT));
if (empty($vbulletin->GPC['title'])) {
print_stop_message2('invalid_user_title_specified');
}
/*insert query*/
$assertor->insert('usertitle', array('title' => $vbulletin->GPC['title'], 'minposts' => $vbulletin->GPC['minposts']));
print_stop_message2(array('saved_user_title_x_successfully', $vbulletin->GPC['title']), 'usertitle', array('do' => 'modify'));
}
// ###################### Start edit #######################
if ($_REQUEST['do'] == 'edit') {
$usertitle = $assertor->getRow('usertitle', array('usertitleid' => $vbulletin->GPC['usertitleid']));
print_form_header('usertitle', 'doupdate');
construct_hidden_code('usertitleid', $vbulletin->GPC['usertitleid']);
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['user_title_guser'], $usertitle['title'], $vbulletin->GPC['usertitleid']), 2, 0);
print_input_row($vbphrase['title'], 'title', $usertitle['title']);
print_input_row($vbphrase['minimum_posts'], 'minposts', $usertitle['minposts']);
print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'doupdate') {
$vbulletin->input->clean_array_gpc('p', array('title' => vB_Cleaner::TYPE_STR, 'minposts' => vB_Cleaner::TYPE_UINT));
if (empty($vbulletin->GPC['title'])) {
print_stop_message2('invalid_user_title_specified');
}
$assertor->update('usertitle', array('title' => $vbulletin->GPC['title'], 'minposts' => $vbulletin->GPC['minposts']), array('usertitleid' => $vbulletin->GPC['usertitleid']));
print_stop_message2(array('saved_user_title_x_successfully', $vbulletin->GPC['title']), 'usertitle', array('do' => 'modify'));
}
// ###################### Start Remove #######################
if ($_REQUEST['do'] == 'remove') {
print_form_header('usertitle', 'kill');
construct_hidden_code('usertitleid', $vbulletin->GPC['usertitleid']);
示例6: preg_replace
$db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "product SET\r\n\t\t\t\ttitle = '" . $db->escape_string($vbulletin->GPC['title']) . "',\r\n\t\t\t\tdescription = '" . $db->escape_string($vbulletin->GPC['description']) . "',\r\n\t\t\t\tversion = '" . $db->escape_string($vbulletin->GPC['version']) . "',\r\n\t\t\t\turl = '" . $db->escape_string($vbulletin->GPC['url']) . "',\r\n\t\t\t\tversioncheckurl = '" . $db->escape_string($vbulletin->GPC['versioncheckurl']) . "'\r\n\t\t\tWHERE productid = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t\t");
} else {
// product IDs must match #^[a-z0-9_]+$# and must be max 25 chars
if (!preg_match('#^[a-z0-9_]+$#s', $vbulletin->GPC['productid']) or strlen($vbulletin->GPC['productid']) > 25) {
$sugg = preg_replace('#\\s+#s', '_', strtolower($vbulletin->GPC['productid']));
$sugg = preg_replace('#[^\\w]#s', '', $sugg);
$sugg = str_replace('__', '_', $sugg);
$sugg = substr($sugg, 0, 25);
print_stop_message('product_id_invalid', htmlspecialchars_uni($vbulletin->GPC['productid']), $sugg);
}
// reserve 'vb' prefix for official vBulletin products
if (!$vbulletin->GPC['confirm'] and strtolower(substr($vbulletin->GPC['productid'], 0, 2)) == 'vb') {
print_form_header('plugin', 'productsave');
print_table_header($vbphrase['vbulletin_message']);
print_description_row(htmlspecialchars_uni($vbulletin->GPC['title']) . ' ' . htmlspecialchars_uni($vbulletin->GPC['version']) . '<dfn>' . htmlspecialchars_uni($vbulletin->GPC['description']) . '</dfn>');
print_input_row($vbphrase['vb_prefix_reserved'], 'productid', $vbulletin->GPC['productid'], true, 35, 25);
construct_hidden_code('title', $vbulletin->GPC['title']);
construct_hidden_code('description', $vbulletin->GPC['description']);
construct_hidden_code('version', $vbulletin->GPC['version']);
construct_hidden_code('confirm', 1);
print_submit_row();
print_cp_footer();
// execution terminates here
}
/* insert query */
$db->query_write("\r\n\t\t\tINSERT INTO " . TABLE_PREFIX . "product\r\n\t\t\t\t(productid, title, description, version, active, url, versioncheckurl)\r\n\t\t\tVALUES\r\n\t\t\t\t('" . $db->escape_string($vbulletin->GPC['productid']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['title']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['description']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['version']) . "',\r\n\t\t\t\t1,\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['url']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['versioncheckurl']) . "')\r\n\t\t");
}
// update the products datastore
build_product_datastore();
// reload block types
$blockmanager = vB_BlockManager::create($vbulletin);
示例7: print_form_header
print_form_header('moderator', 'remove');
construct_hidden_code('moderatorid', $vbulletin->GPC['moderatorid']);
print_table_header($vbphrase['if_you_would_like_to_remove_this_moderator'] . ' <input type="submit" class="button" value="' . $vbphrase['remove'] . '" tabindex="1" />');
print_table_footer();
print_form_header('moderator', 'update');
construct_hidden_code('moderatorid', $vbulletin->GPC['moderatorid']);
print_table_header(construct_phrase($vbphrase['edit_moderator_x_for_forum_y'], $moderator['username'], $moderator['forumtitle']));
}
}
if ($_REQUEST['do'] != 'editglobal') {
print_forum_chooser($vbphrase['forum_and_children'], 'forumid', $moderator['forumid']);
if ($_REQUEST['do'] == 'add') {
print_input_row($vbphrase['moderator_usernames'] . "<dfn>{$vbphrase['separate_usernames_semicolon']}</dfn>", 'modusername', $moderator['username'], 0);
} else {
if ($_REQUEST['do'] == 'edit') {
print_input_row($vbphrase['moderator_username'], 'modusername', $moderator['username'], 0);
}
}
construct_hidden_code('redir', $vbulletin->GPC['redir']);
}
// usergroup membership options
if ($_REQUEST['do'] == 'add' and can_administer('canadminusers')) {
$usergroups = array(0 => $vbphrase['do_not_change_usergroup']);
foreach ($vbulletin->usergroupcache as $usergroupid => $usergroup) {
$usergroups["{$usergroupid}"] = $usergroup['title'];
}
print_table_header($vbphrase['usergroup_options']);
print_select_row($vbphrase['change_moderator_primary_usergroup_to'], 'usergroupid', $usergroups, 0);
print_membergroup_row($vbphrase['make_moderator_a_member_of'], 'membergroupids', 2);
}
// post permissions
示例8: construct_hidden_code
construct_hidden_code('group', $vbulletin->GPC['group']);
construct_hidden_code('searchstring', $vbulletin->GPC['searchstring']);
construct_hidden_code('dostyleid', $template['styleid']);
construct_hidden_code('expandset', $vbulletin->GPC['expandset']);
construct_hidden_code('oldtitle', $template['title']);
construct_hidden_code('lastedit', $template['dateline']);
$backlink = "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&expandset={$template['styleid']}&group=" . $vbulletin->GPC['group'] . "&templateid=" . $vbulletin->GPC['templateid'] . "&searchstring=" . urlencode($vbulletin->GPC['searchstring']);
$products = fetch_product_list();
if ($template['styleid'] == -1) {
print_select_row($vbphrase['product'], 'product', $products, $template['product']);
} else {
print_label_row($vbphrase['product'], $products[$template['product'] ? $template['product'] : 'vbulletin']);
construct_hidden_code('product', $template['product'] ? $template['product'] : 'vbulletin');
}
print_label_row($vbphrase['style'], "<a href=\"{$backlink}\" title=\"" . $vbphrase['edit_templates'] . "\"><b>{$template['style']}</b></a>");
print_input_row($vbphrase['title'] . ($template['styleid'] != -1 ? '<dfn>' . construct_link_code($vbphrase['view_history'], 'template.php?do=history&dostyleid=' . $template['styleid'] . '&title=' . urlencode($template['title']), 1) . '</dfn>' : ''), 'title', $template['title']);
print_textarea_row($vbphrase['template'] . '
<br /><br />
<span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&title={$template['title']}", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />-->
</span>', 'template', $template['template_un'], 22, '75" style="width:100%', true, true, 'ltr', 'code');
print_template_javascript();
print_label_row($vbphrase['save_in_template_history'], '<label for="savehistory"><input type="checkbox" name="savehistory" id="savehistory" value="1" tabindex="1" />' . $vbphrase['yes'] . '</label><br /><span class="smallfont">' . $vbphrase['comment'] . '</span> <input type="text" name="histcomment" value="" tabindex="1" class="bginput" size="50" />');
print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
?>
<script type="text/javascript">
<!--
var initial_crc32 = crc32(YAHOO.util.Dom.get(textarea_id).value);
var confirmUnload = true;
YAHOO.util.Event.addListener('cpform', 'submit', function(e) { confirmUnload = false; });
YAHOO.util.Event.addListener(window, 'beforeunload', function(e) {
if (initial_crc32 != crc32(YAHOO.util.Dom.get(textarea_id).value) && confirmUnload) {
示例9: while
$tables = $db->query_write("SHOW TABLES");
while ($table = $db->fetch_array($tables, DBARRAY_NUM)) {
$sqltable["{$table['0']}"] = $table[0];
}
print_form_header('upgrade_300b3', 'sqltable');
print_table_header($upgradecore_phrases['dump_data_to_sql']);
construct_hidden_code('step', 'backup');
print_label_row($upgradecore_phrases['choose_table_to_dump'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>');
print_submit_row($upgradecore_phrases['dump_tables'], 0);
unset($sqltable['all tables']);
print_form_header('upgrade_300b3', 'csvtable');
print_table_header($upgradecore_phrases['dump_data_to_csv']);
construct_hidden_code('step', 'backup');
print_label_row($upgradecore_phrases['backup_individual_table'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>');
print_input_row($upgradecore_phrases['field_seperator'], 'separator', ',', 0, 15);
print_input_row($upgradecore_phrases['quote_character'], 'quotes', "'", 0, 15);
print_yes_no_row($upgradecore_phrases['show_column_names'], 'showhead', 1);
print_submit_row($upgradecore_phrases['dump_table'], 0);
define('NO_LOG', true);
$vbulletin->GPC['step'] = 0;
print_next_step();
}
}
// ***************************************************************************************************************************
// #########################################################################
// ############# GENERIC UPGRADE / INSTALL FUNCTIONS PROTOTYPES ############
// #########################################################################
// #########################################################################
// checks the environment for vB3 conditions
function verify_vb3_enviroment()
{
示例10: construct_hidden_code
$promotion['reputationtype'] = 1;
$promotion['strategy'] -= 8;
} else {
$promotion['reputationtype'] = 0;
}
if ($vbulletin->GPC['returnug']) {
construct_hidden_code('returnug', 1);
}
construct_hidden_code('userpromotionid', $vbulletin->GPC['userpromotionid']);
construct_hidden_code('usergroupid', $promotion['usergroupid']);
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['promotion'], $promotion['title'], $promotion['userpromotionid']));
}
$promotionarray = array(17 => $vbphrase['posts'], 18 => $vbphrase['join_date'], 16 => $vbphrase['reputation'], 0 => $vbphrase['promotion_strategy1'], 1 => $vbphrase['promotion_strategy2'], 2 => $vbphrase['promotion_strategy3'], 3 => $vbphrase['promotion_strategy4'], 4 => $vbphrase['promotion_strategy5'], 5 => $vbphrase['promotion_strategy6'], 6 => $vbphrase['promotion_strategy7'], 7 => $vbphrase['promotion_strategy8']);
print_input_row($vbphrase['reputation_level'], 'promotion[reputation]', $promotion['reputation']);
print_input_row($vbphrase['days_registered'], 'promotion[date]', $promotion['date']);
print_input_row($vbphrase['posts'], 'promotion[posts]', $promotion['posts']);
print_select_row($vbphrase['promotion_strategy'] . " <dfn> {$vbphrase['promotion_strategy_description']}</dfn>", 'promotion[strategy]', $promotionarray, $promotion['strategy']);
print_select_row($vbphrase['promotion_type'] . ' <dfn>' . $vbphrase['promotion_type_description_primary_additional'] . '</dfn>', 'promotion[type]', array(1 => $vbphrase['primary_usergroup'], 2 => $vbphrase['additional_usergroups']), $promotion['type']);
print_select_row($vbphrase['reputation_comparison_type'] . '<dfn>' . $vbphrase['reputation_comparison_type_desc'] . '</dfn>', 'promotion[reputationtype]', array($vbphrase['greater_or_equal_to'], $vbphrase['less_than']), $promotion['reputationtype']);
print_chooser_row($vbphrase['move_user_to_usergroup'] . " <dfn>{$vbphrase['move_user_to_usergroup_description']}</dfn>", 'promotion[joinusergroupid]', 'usergroup', $promotion['joinusergroupid'], ' ');
print_submit_row(iif(empty($vbulletin->GPC['userpromotionid']), $vbphrase['save'], '_default_'));
}
// ###################### Start do edit/insert promotions #######################
if ($_POST['do'] == 'doupdatepromotion') {
$vbulletin->input->clean_array_gpc('p', array('promotion' => TYPE_ARRAY, 'userpromotionid' => TYPE_INT, 'returnug' => TYPE_BOOL));
if ($vbulletin->GPC['promotion']['joinusergroupid'] == -1) {
print_stop_message('invalid_usergroup_specified');
}
if ($vbulletin->GPC['promotion']['reputationtype'] and $vbulletin->GPC['promotion']['strategy'] <= 16) {
$vbulletin->GPC['promotion']['strategy'] += 8;
}
示例11: print_description_row
$tablename = "usertextfield";
break;
default:
$tablename = "post";
}
print_description_row(construct_phrase($vbphrase["ame_convert_warning_x"], $tablename));
print_table_break();
print_table_header(construct_phrase($vbphrase['ame_rebuild_xs'], $vbphrase['ame_' . $zone]));
print_yes_no_row($vbphrase['ame_test_mode'], 'test', $settings['test']);
print_yes_no_row($vbphrase['ame_verbose_mode'], 'verbose', $settings['verbose']);
print_yes_no_row($vbphrase['ame_upgrade_only'], 'ameup', $settings['ameup']);
if ($zone != "sig") {
print_select_row($vbphrase['ame_length'], 'length', $lengths, $settings['length']);
}
print_input_row($vbphrase['ame_perpage'], 'perpage', $settings['perpage']);
print_input_row($vbphrase['ame_seconds_perpage'], 'seconds', $settings['seconds']);
construct_hidden_code('zone', $zone);
print_submit_row();
}
/**
* DO REBUILD
*/
if ($do == 'dorebuild') {
$vbulletin->input->clean_array_gpc('r', array('length' => TYPE_UINT, 'perpage' => TYPE_UINT, 'seconds' => TYPE_UINT, 'cont' => TYPE_UINT, 'test' => TYPE_BOOL, 'verbose' => TYPE_BOOL, 'start' => TYPE_UINT, 'zone' => TYPE_STR, 'ameup' => TYPE_BOOL));
$length = $vbulletin->GPC['length'];
$start = $vbulletin->GPC['start'];
$perpage = $vbulletin->GPC['perpage'];
$seconds = $vbulletin->GPC['seconds'];
$cont = $vbulletin->GPC['cont'];
$test = $vbulletin->GPC['test'];
$verbose = $vbulletin->GPC['verbose'];
示例12: import_generated_style
/**
* Prints out the save options for the style generator
*/
function import_generated_style() {
global $vbphrase, $stylecache;
cache_styles();
echo "
<script type=\"text/javascript\">
<!--
function js_confirm_upload(tform, filefield)
{
if (filefield.value == \"\")
{
return confirm(\"".construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], " + tform.serverfile.value + ")."\");
}
return true;
}
function js_fetch_style_title()
{
styleid = document.forms.downloadform.dostyleid.options[document.forms.downloadform.dostyleid.selectedIndex].value;
document.forms.downloadform.title.value = style[styleid];
}
var style = new Array();
style['-1'] = \"" . $vbphrase['master_style'] . "\"";
foreach($stylecache AS $styleid => $style)
{
echo "\n\tstyle['$styleid'] = \"" . addslashes_js($style['title'], '"') . "\";";
$styleoptions["$styleid"] = construct_depth_mark($style['depth'], '--', iif($vbulletin->debug, '--', '')) . ' ' . $style['title'];
}
echo "
// -->
</script>";
echo '<div id="styleform">';
echo '<form id="form">';
construct_hidden_code('adid', $vbulletin->GPC['adid']);
echo '<input id="form-data" type="hidden" name="data">';
echo '<div class="styledetails"><div id="title-generated-style" class="help title-generated-style">';
print_input_row($vbphrase['title_generated_style'], 'name', null, null, null, null, null, null, 'form-name');
echo '</div><div id="parent-id" class="help parent-id">';
print_style_chooser_row('parentid', -1, $vbphrase['no_parent_style'], $vbphrase['parent_style'], 1);
echo '</div></div><div class="styleoptions"><div id="display-order" class="help display-order">';
print_input_row($vbphrase['display_order'], 'displayorder', 1, null, null, null, null, null, 'form-displayorder');
echo '</div><div id="allow-user-selection" class="help allow-user-selection">';
print_yes_no_row($vbphrase['allow_user_selection'], 'userselect', 1, null, null, null, null, null, 'form-userselect');
echo '</div></div></form></div>';
}
示例13: array
for ($x = 0; $x < 6; $x++) {
if ($x == 1) {
$minutes = array(-2 => '-') + $minutes;
unset($minutes[-1]);
}
if (!isset($cron['minute'][$x])) {
$cron['minute'][$x] = -2;
}
$selects .= "<select name=\"minute[{$x}]\" tabindex=\"1\" class=\"bginput\">\n";
$selects .= construct_select_options($minutes, $cron['minute'][$x]);
$selects .= "</select>\n";
}
print_label_row($vbphrase['minute'], $selects, '', 'top', 'minute');
print_yes_no_row($vbphrase['active_gcron'], 'active', $cron['active']);
print_yes_no_row($vbphrase['log_entries'], 'loglevel', $cron['loglevel']);
print_input_row($vbphrase['filename_gcpglobal'], 'filename', $cron['filename'], true, 35, 0, 'ltr');
print_select_row($vbphrase['product'], 'product', fetch_product_list(), $cron['product']);
if ($vb5_config['Misc']['debug']) {
print_yes_no_row($vbphrase['vbulletin_default'], 'volatile', $cron['volatile']);
} else {
construct_hidden_code('volatile', $cron['volatile']);
}
print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'update') {
$vbulletin->input->clean_array_gpc('p', array('cronid' => vB_Cleaner::TYPE_INT, 'varname' => vB_Cleaner::TYPE_STR, 'filename' => vB_Cleaner::TYPE_STR, 'title' => vB_Cleaner::TYPE_STR, 'description' => vB_Cleaner::TYPE_STR, 'logphrase' => vB_Cleaner::TYPE_STR, 'weekday' => vB_Cleaner::TYPE_STR, 'day' => vB_Cleaner::TYPE_STR, 'hour' => vB_Cleaner::TYPE_STR, 'minute' => vB_Cleaner::TYPE_ARRAY, 'active' => vB_Cleaner::TYPE_INT, 'loglevel' => vB_Cleaner::TYPE_INT, 'filename' => vB_Cleaner::TYPE_STR, 'product' => vB_Cleaner::TYPE_STR, 'volatile' => vB_Cleaner::TYPE_INT));
try {
vB_Api::instanceInternal('cron')->save($vbulletin->GPC, $vbulletin->GPC['cronid']);
} catch (vB_Exception_Api $e) {
$errors = $e->get_errors();
示例14: str_replace
$_bbcode['bbcodereplacement'] = str_replace('%1$s', '{param}', $_bbcode['bbcodereplacement']);
$_bbcode['bbcodereplacement'] = str_replace('%2$s', '{option}', $_bbcode['bbcodereplacement']);
} else {
$_bbcode['bbcodereplacement'] = str_replace('%1$s', '{param}', $_bbcode['bbcodereplacement']);
}
$_bbcode['bbcodereplacement'] = str_replace('%%', '%', $_bbcode['bbcodereplacement']);
print_form_header('bbcode', 'doupdate');
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['bb_code'], $_bbcode['bbcodetag'], $_bbcode['bbcodeid']), 2, 0);
construct_hidden_code('bbcodeid', $vbulletin->GPC['bbcodeid']);
print_input_row($vbphrase['title'], 'title', $_bbcode['title']);
print_input_row($vbphrase['bb_code_tag_name'], 'bbcodetag', $_bbcode['bbcodetag']);
print_textarea_row($vbphrase['replacement'], 'bbcodereplacement', $_bbcode['bbcodereplacement'], 5, 60);
print_input_row($vbphrase['example'], 'bbcodeexample', $_bbcode['bbcodeexample']);
print_textarea_row($vbphrase['description'], 'bbcodeexplanation', $_bbcode['bbcodeexplanation'], 10, 60);
print_yes_no_row($vbphrase['use_option'], 'twoparams', $_bbcode['twoparams']);
print_input_row($vbphrase['button_image_desc'], 'buttonimage', $_bbcode['buttonimage']);
print_yes_no_row($vbphrase['remove_tag_if_empty'], 'options[strip_empty]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['strip_empty'] ? 1 : 0);
print_yes_no_row($vbphrase['disable_bbcode_in_bbcode'], 'options[stop_parse]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['stop_parse'] ? 1 : 0);
print_yes_no_row($vbphrase['disable_smilies_in_bbcode'], 'options[disable_smilies]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['disable_smilies'] ? 1 : 0);
print_yes_no_row($vbphrase['disable_wordwrap_in_bbcode'], 'options[disable_wordwrap]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['disable_wordwrap'] ? 1 : 0);
print_yes_no_row($vbphrase['disable_urlconversion_in_bbcode'], 'options[disable_urlconversion]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['disable_urlconversion'] ? 1 : 0);
print_submit_row($vbphrase['save']);
print_form_header('', '');
print_description_row('<span class="smallfont">' . $vbphrase['bb_code_explanations'] . '</span>');
print_table_footer();
}
// ##################################### UPDATE ####################################
if ($_POST['do'] == 'doupdate') {
$vbulletin->input->clean_array_gpc('p', array('bbcodeid' => TYPE_INT, 'title' => TYPE_STR, 'bbcodetag' => TYPE_STR, 'bbcodereplacement' => TYPE_STR, 'bbcodeexample' => TYPE_STR, 'bbcodeexplanation' => TYPE_STR, 'twoparams' => TYPE_BOOL, 'buttonimage' => TYPE_STR, 'options' => TYPE_ARRAY_BOOL));
if (!$vbulletin->GPC['bbcodetag'] or !$vbulletin->GPC['bbcodereplacement']) {
print_stop_message('please_complete_required_fields');
示例15: print_select_row
if ($field_names['border_width']) {
print_select_row($vbphrase['usercss_border_width'], $field_names['border_width'], $allowedborderwidths, $selector['border_width']);
}
if ($field_names['padding']) {
print_select_row($vbphrase['usercss_padding'], $field_names['padding'], $allowedpaddings, $selector['padding']);
}
if ($field_names['background_color']) {
print_color_input_row($vbphrase['usercss_background_color'], $field_names['background_color'], $selector['background_color'], true, 10);
}
if ($field_names['background_image']) {
if (preg_match("/^([0-9]+),([0-9]+)\$/", $selector['background_image'], $picture)) {
$selector['background_image'] = "attachment.php?albumid=" . $picture[1] . "&attachmentid=" . $picture[2];
} else {
$selector['background_image'] = '';
}
print_input_row($vbphrase['usercss_background_image'], $field_names['background_image'], $selector['background_image']);
}
if ($field_names['background_repeat']) {
print_select_row($vbphrase['usercss_background_repeat'], $field_names['background_repeat'], $allowedbackgroundrepeats, $selector['background_repeat']);
}
}
if ($have_output == false) {
print_description_row($vbphrase['user_no_permission_customize_profile']);
print_table_footer();
} else {
print_submit_row();
echo $colorPicker;
?>
<script type="text/javascript">
<!--