本文整理匯總了PHP中print_yes_no_row函數的典型用法代碼示例。如果您正苦於以下問題:PHP print_yes_no_row函數的具體用法?PHP print_yes_no_row怎麽用?PHP print_yes_no_row使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了print_yes_no_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_statistic_code
function print_statistic_code($title, $name, $start, $end, $nullvalue = true, $scope = 'daily', $sort = 'date_desc')
{
global $vbphrase;
print_form_header('stats', $name);
print_table_header($title);
print_time_row($vbphrase['start_date'], 'start', $start, false);
print_time_row($vbphrase['end_date'], 'end', $end, false);
if ($name != 'activity')
{
print_select_row($vbphrase['scope'], 'scope', array('daily' => $vbphrase['daily'], 'weekly' => $vbphrase['weekly'], 'monthly' => $vbphrase['monthly']), $scope);
}
else
{
construct_hidden_code('scope', 'daily');
}
print_select_row($vbphrase['order_by'], 'sort', array(
'date_asc' => $vbphrase['date_ascending'],
'date_desc' => $vbphrase['date_descending'],
'total_asc' => $vbphrase['total_ascending'],
'total_desc' => $vbphrase['total_descending'],
), $sort);
print_yes_no_row($vbphrase['include_empty_results'], 'nullvalue', $nullvalue);
print_submit_row($vbphrase['go']);
}
示例3: 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 //
}
示例4: print_form_header
}
// ###################### Start add #######################
if ($_REQUEST['do'] == 'editgroup') {
print_form_header('admininfraction', 'updategroup');
if (!empty($vbulletin->GPC['infractiongroupid'])) {
$infraction = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "infractiongroup WHERE infractiongroupid = " . $vbulletin->GPC['infractiongroupid']);
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['infraction_group'], '', $vbulletin->GPC['infractiongroupid']), 2, 0);
construct_hidden_code('infractiongroupid', $vbulletin->GPC['infractiongroupid']);
} else {
$infraction = array('override' => 1);
print_table_header($vbphrase['add_new_user_infraction_group']);
}
print_input_row($vbphrase['points'], 'pointlevel', $infraction['pointlevel'], true, 5);
print_chooser_row($vbphrase['primary_usergroup'], 'usergroupid', 'usergroup', $infraction['usergroupid'], '-- ' . $vbphrase['all_usergroups'] . ' --');
print_chooser_row($vbphrase['override_with_permissions'], 'orusergroupid', 'usergroup', $infraction['orusergroupid']);
print_yes_no_row($vbphrase['override_display'], 'override', $infraction['override']);
print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'updategroup') {
$vbulletin->input->clean_array_gpc('p', array('pointlevel' => TYPE_UINT, 'usergroupid' => TYPE_INT, 'orusergroupid' => TYPE_UINT, 'override' => TYPE_BOOL));
if (empty($vbulletin->GPC['pointlevel'])) {
print_stop_message('please_complete_required_fields');
}
if ($db->query_first("\n\t\tSELECT infractiongroupid\n\t\tFROM " . TABLE_PREFIX . "infractiongroup\n\t\tWHERE\n\t\t\t" . ($vbulletin->GPC['usergroupid'] == -1 ? "" : "usergroupid IN (-1," . $vbulletin->GPC['usergroupid'] . ") AND") . "\n\t\t\tpointlevel = " . $vbulletin->GPC['pointlevel'] . "\n\t\t\t" . ($vbulletin->GPC['infractiongroupid'] ? "AND infractiongroupid <> " . $vbulletin->GPC['infractiongroupid'] : ""))) {
print_stop_message('invalid_infraction_usergroup');
}
if (empty($vbulletin->GPC['infractiongroupid'])) {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "infractiongroup (pointlevel) VALUES (0)");
$vbulletin->GPC['infractiongroupid'] = $db->insert_id();
}
示例5: print_form_header
for (var i = 0; i < els.length; i++)
{
els[i].checked = toggle.checked;
}
}
// -->
</script>
<?php
print_form_header('prefix', 'savepermissions');
print_table_header($vbphrase['edit_thread_prefix_permissions']);
construct_hidden_code('prefixids', sign_client_string(serialize($prefixids)));
construct_hidden_code('shownusergroups', sign_client_string(serialize(array_keys($vbulletin->usergroupcache))));
print_description_row(construct_phrase($vbphrase['editing_permissions_for_x'], implode(', ', $prefix_html)));
if (count(array_unique($prefixdefaults)) <= 1) {
print_yes_no_row($vbphrase['allow_new_groups_to_use_selected_prefixes'], 'default', $prefixdefaults[0]);
} else {
$conflict_options_default = array('-1' => $vbphrase['leave_default_permissions_unchanged'], '0' => $vbphrase['new_groups_may_use_selected_prefixes'], '1' => $vbphrase['new_groups_may_not_use_selected_prefixes']);
print_label_row($vbphrase['allow_new_groups_to_use_selected_prefixes'], "<label for=\"sel_ug{$usergroupid}\" class=\"smallfont\">" . $vbphrase['set_default_permissions'] . ": <select name=\"conflict[{$usergroupid}]\" id=\"sel_ug{$usergroupid}\">" . construct_select_options($conflict_options_default, '-1') . "</select>");
}
print_description_row('<label for="cb_allbox"><input type="checkbox" name="allbox" id="cb_allbox" onclick="check_all_checkable(this)"' . (empty($usergroupperms) ? ' checked="checked"' : '') . " />{$vbphrase['check_uncheck_all']}</label>", false, 2, 'thead');
foreach ($vbulletin->usergroupcache as $usergroupid => $usergroup) {
if (in_array($usergroupid, $conflicts)) {
print_label_row("<label for=\"cb_ug{$usergroupid}\"><input type=\"checkbox\" disabled=\"disabled\" id=\"cb_ug{$usergroupid}\" />{$usergroup['title']}</label>", "<label for=\"sel_ug{$usergroupid}\" class=\"smallfont\">" . $vbphrase['resolve_permission_conflict'] . ": <select name=\"conflict[{$usergroupid}]\" id=\"sel_ug{$usergroupid}\">" . construct_select_options($conflict_options, 0) . "</select>");
} else {
print_description_row("<label for=\"cb_ug{$usergroupid}\"><input type=\"checkbox\" name=\"usergroup[{$usergroupid}]\" id=\"cb_ug{$usergroupid}\" class=\"checkable\"" . (empty($usergroupperms["{$usergroupid}"]) ? ' checked="checked"' : '') . " />{$usergroup['title']}</label>");
}
}
print_submit_row();
}
// ########################################################################
示例6: define
$admindm->set('cssprefs', $vbulletin->GPC['cssprefs']);
$admindm->set('dismissednews', $vbulletin->GPC['dismissednews']);
$admindm->save();
define('CP_REDIRECT', "adminpermissions.php?" . $vbulletin->session->vars['sessionurl'] . "#user{$user['userid']}");
print_stop_message('saved_administrator_permissions_successfully');
}
// #############################################################################
if ($_REQUEST['do'] == 'edit') {
echo "<p align=\"center\">{$vbphrase['give_admin_access_arbitrary_html']}</p>";
print_form_header('adminpermissions', 'update');
construct_hidden_code('userid', $vbulletin->GPC['userid']);
construct_hidden_code('oldpermissions', $user['adminpermissions']);
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['administrator_permissions'], $user['username'], $user['userid']));
print_label_row("{$vbphrase['administrator']}: <a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u=" . $vbulletin->GPC['userid'] . "\">{$user['username']}</a>", '<div align="' . $stylevar['right'] . '"><input type="button" class="button" value=" ' . $vbphrase['all_yes'] . ' " onclick="js_check_all_option(this.form, 1);" /> <input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="js_check_all_option(this.form, 0);" /></div>', 'thead');
foreach (convert_bits_to_array($user['adminpermissions'], $ADMINPERMISSIONS) as $field => $value) {
print_yes_no_row($permsphrase["{$field}"] == '' ? $vbphrase['n_a'] : $permsphrase["{$field}"], "adminpermissions[{$field}]", $value);
}
($hook = vBulletinHook::fetch_hook('admin_permissions_form')) ? eval($hook) : false;
print_select_row($vbphrase['control_panel_style_choice'], 'cssprefs', array_merge(array('' => "({$vbphrase['default']})"), fetch_cpcss_options()), $user['cssprefs']);
print_input_row($vbphrase['dismissed_news_item_ids'], 'dismissednews', $user['dismissednews']);
print_submit_row();
}
// #############################################################################
if ($_REQUEST['do'] == 'modify') {
print_form_header('adminpermissions', 'edit');
print_table_header($vbphrase['administrator_permissions'], 3);
$users = $db->query_read("\n\t\tSELECT user.username, usergroupid, membergroupids, infractiongroupids, administrator.*\n\t\tFROM " . TABLE_PREFIX . "administrator AS administrator\n\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\tORDER BY user.username\n\t");
while ($user = $db->fetch_array($users)) {
$perms = fetch_permissions(0, $user['userid'], $user);
if ($perms['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) {
print_cells_row(array("<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}\" name=\"user{$user['userid']}\"><b>{$user['username']}</b></a>", '-', construct_link_code($vbphrase['view_control_panel_log'], "adminlog.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&script=&u={$user['userid']}") . construct_link_code($vbphrase['edit_permissions'], "adminpermissions.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}")), 0, '', 0);
示例7: array
$criteria_options['ad_x_not_displayed'] = array('<select name="criteria[ad_x_not_displayed][condition1]" tabindex="1">' . construct_select_options($ad_name_cache, $criteria_cache['ad_x_not_displayed']['condition1']) . '</select>');
}
// hook to allow third-party additions of criteria
($hook = vBulletinHook::fetch_hook('ads_list_criteria')) ? eval($hook) : false;
// build the editor form
print_form_header('ad', 'update');
construct_hidden_code('adid', $vbulletin->GPC['adid']);
if ($vbulletin->GPC['ad_location_orig']) {
construct_hidden_code('ad_location_orig', $vbulletin->GPC['ad_location_orig']);
}
print_table_header($table_title);
print_input_row($vbphrase['title'] . '<dfn>' . $vbphrase['ad_title_description'] . '</dfn>', 'title', $ad['title'], 0, 60);
print_select_row($vbphrase['ad_location'] . '<dfn>' . $vbphrase['ad_location_description'] . '</dfn>', 'ad_location', $location_options, $vbulletin->GPC['ad_location'] ? $vbulletin->GPC['ad_location'] : $ad['adlocation']);
print_textarea_row($vbphrase['ad_html'] . '<dfn>' . $vbphrase['ad_html_description'] . '</dfn>', 'ad_html', $ad['html'] ? $ad['html'] : $ad['snippet'], 8, 60, true, false);
print_input_row($vbphrase['display_order'], 'displayorder', $ad['displayorder'], 0, 10);
print_yes_no_row($vbphrase['active'] . '<dfn>' . $vbphrase['ad_active_description'] . '</dfn>', 'active', $ad['active']);
print_description_row('<strong>' . $vbphrase['display_ad_if_elipsis'] . '</strong>', false, 2, 'tcat', '', 'criteria');
if ($display_active_criteria_first) {
function print_ad_criterion($criteria_option_id, &$criteria_options, $criteria_cache)
{
global $vbphrase;
$criteria_option = $criteria_options["{$criteria_option_id}"];
print_description_row("<label><input type=\"checkbox\" id=\"cb_{$criteria_option_id}\" tabindex=\"1\" name=\"criteria[{$criteria_option_id}][active]\" title=\"{$vbphrase['criterion_is_active']}\" value=\"1\"" . (empty($criteria_cache["{$criteria_option_id}"]) ? '' : ' checked="checked"') . " />" . "<span id=\"span_{$criteria_option_id}\">" . construct_phrase($vbphrase[$criteria_option_id . '_criteria'], $criteria_option[0], $criteria_option[1], $criteria_option[2]) . '</span></label>');
unset($criteria_options["{$criteria_option_id}"]);
}
foreach (array_keys($criteria_cache) as $id) {
print_ad_criterion($id, $criteria_options, $criteria_cache);
}
foreach ($criteria_options as $id => $criteria_option) {
print_ad_criterion($id, $criteria_options, $criteria_cache);
}
示例8: print_stop_message
print_stop_message('invalid_nntp_plugin_specified');
}
// load existing group
$group_id = $vbulletin->GPC['group_id'];
$nntp_group->get_group($group_id);
print_form_header($this_script, 'set_group_settings');
construct_hidden_code('plugin', $vbulletin->GPC['plugin']);
construct_hidden_code('group_id', $nntp_group->get_group_id());
print_table_header($vbphrase['nntp_set_group'], 2);
print_input_row($vbphrase['nntp_group_name'], 'group_name', $nntp_group->get_group_name());
($hook = vBulletinHook::fetch_hook('nntp_gate_group_settings')) ? eval($hook) : false;
$is_active = $nntp_group->get_is_active();
if (is_null($is_active) || $is_active) {
$is_active = 'yes';
}
print_yes_no_row($vbphrase['nntp_group_is_active'], 'is_active', 'yes' == $is_active);
print_submit_row($vbphrase['save'], '', 2, $vbphrase['no']);
}
// ###################### Start Remove ###################################
if ($_REQUEST['do'] == 'remove_group') {
// check for there is no groups mapped to this one
// admincp_check_for_mapped_groups( $vbulletin->GPC['group_id'] );
print_form_header($this_script, 'kill_group');
construct_hidden_code('group_id', $vbulletin->GPC['group_id']);
print_table_header($vbphrase['confirm_deletion']);
print_description_row($vbphrase['nntp_are_you_sure_you_want_to_delete_this_group']);
print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #####################################
if ($_REQUEST['do'] == 'kill_group') {
$group_id = $vbulletin->GPC['group_id'];
示例9: print_table_footer
print_table_footer(7);
}
}
}
// ###################### Edit an attachment ####################
if ($_REQUEST['do'] == 'edit') {
$vbulletin->input->clean_array_gpc('r', array('attachmentid' => TYPE_UINT));
if (!($attachment = $db->query_first("\n\t\tSELECT\n\t\t\tattachmentid, filename, state, counter\n\t\tFROM " . TABLE_PREFIX . "attachment AS attachment\n\t\tWHERE\n\t\t\tattachment.attachmentid = " . $vbulletin->GPC['attachmentid'] . "\n\t"))) {
print_stop_message('no_matches_found');
}
print_form_header('attachment', 'doedit', true);
construct_hidden_code('attachmentid', $vbulletin->GPC['attachmentid']);
print_table_header($vbphrase['edit_attachment']);
print_input_row($vbphrase['filename'], 'a_filename', htmlspecialchars_uni($attachment['filename'], false), false);
print_input_row($vbphrase['views'], 'a_counter', $attachment['counter']);
print_yes_no_row($vbphrase['visible'], 'a_visible', $attachment['state'] == 'visible' ? 1 : 0);
print_submit_row($vbphrase['save']);
/*
print_table_break();
print_table_header($vbphrase['replace_attachment']);
print_upload_row($vbphrase['please_select_a_file_to_attach'], 'upload', 99999999);
print_input_row($vbphrase['or_enter_a_full_url_to_a_file'], 'url');
print_yes_no_row($vbphrase['visible'], 'newvisible', true);
print_submit_row($vbphrase['save']);
*/
}
// ###################### Edit an attachment ####################
if ($_POST['do'] == 'doedit') {
$vbulletin->input->clean_array_gpc('p', array('attachmentid' => TYPE_UINT, 'a_filename' => TYPE_STR, 'a_counter' => TYPE_UINT, 'a_visible' => TYPE_BOOL, 'newvisible' => TYPE_BOOL, 'url' => TYPE_STR));
if (!($attachment = $db->query_first("\n\t\tSELECT\n\t\t\tattachmentid, attachment.userid\n\t\tFROM " . TABLE_PREFIX . "attachment AS attachment\n\t\tWHERE\n\t\t\tattachment.attachmentid = " . $vbulletin->GPC['attachmentid'] . "\n\t"))) {
print_stop_message('no_matches_found');
示例10: str_replace
$_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');
}
if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "bbcode WHERE (bbcodetag = '" . $db->escape_string($vbulletin->GPC['bbcodetag']) . "' AND twoparams = " . $vbulletin->GPC['twoparams'] . ") AND bbcodeid <> " . $vbulletin->GPC['bbcodeid'])) {
print_stop_message('there_is_already_bb_code_named_x', htmlspecialchars_uni($vbulletin->GPC['bbcodetag']));
} else {
// fetch all tags, and make sure we can't redefine an existing, built-in code
示例11: array
// ###################### Start modify Signature Pic ###########
if ($_REQUEST['do'] == 'sigpic') {
$userinfo = vB_User::fetchUserinfo($vbulletin->GPC['userid'], array(vB_Api_User::USERINFO_SIGNPIC));
if (!$userinfo) {
print_stop_message2('invalid_user_specified');
}
if ($userinfo['sigpicwidth'] and $userinfo['sigpicheight']) {
$size = " width=\"{$userinfo['sigpicwidth']}\" height=\"{$userinfo['sigpicheight']}\" ";
}
print_form_header('usertools', 'updatesigpic', 1);
construct_hidden_code('userid', $userinfo['userid']);
print_table_header($vbphrase['change_signature_picture'] . ": <span class=\"normal\">{$userinfo['username']}</span>");
if ($userinfo['sigpic']) {
$userinfo['sigpicurl'] = vB::getDatastore()->getOption('frontendurl') . '/filedata/fetch?filedataid=' . $userinfo['sigpicfiledataid'] . '&sigpic=1';
print_description_row("<div align=\"center\"><img src=\"{$userinfo['sigpicurl']}\" {$size} alt=\"\" title=\"" . construct_phrase($vbphrase['xs_picture'], $userinfo['username']) . "\" /></div>");
print_yes_no_row($vbphrase['use_signature_picture'], 'usesigpic', 1);
} else {
construct_hidden_code('usesigpic', 1);
}
// TODO: Doesn't work yet for vB5
// cache_permissions($userinfo, false);
// if ($userinfo['permissions']['signaturepermissions'] & $vbulletin->bf_ugp_signaturepermissions['cansigpic'] AND ($userinfo['permissions']['sigpicmaxwidth'] > 0 OR $userinfo['permissions']['sigpicmaxheight'] > 0))
// {
// print_yes_no_row($vbphrase['resize_image_to_users_maximum_allowed_size'], 'resize');
// }
print_input_row($vbphrase['enter_image_url_gcpuser'], 'sigpicurl', 'http://www.');
print_upload_row($vbphrase['upload_image_from_computer'], 'upload');
print_submit_row($vbphrase['save']);
}
// ###################### Start Update Profile Pic ################
if ($_POST['do'] == 'updatesigpic') {
示例12: array
} else {
$ranks = array('ranklevel' => 1, 'usergroupid' => -1, 'minposts' => 10, 'rankimg' => 'images/');
print_form_header('ranks', 'insert');
}
if ($ranks['type']) {
$ranktext = $ranks['rankimg'];
} else {
$rankimg = $ranks['rankimg'];
}
$displaytype = array($vbphrase['always'], $vbphrase['if_displaygroup_equals_this_group']);
construct_hidden_code('rankid', $vbulletin->GPC['rankid']);
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['user_rank'], '', $vbulletin->GPC['rankid']));
print_input_row($vbphrase['times_to_repeat_rank'], 'ranklevel', $ranks['ranklevel']);
print_chooser_row($vbphrase['usergroup'], 'usergroupid', 'usergroup', $ranks['usergroupid'], $vbphrase['all_usergroups']);
print_input_row($vbphrase['minimum_posts'], 'minposts', $ranks['minposts']);
print_yes_no_row($vbphrase['stack_rank'], 'stack', $ranks['stack']);
print_select_row($vbphrase['display_type'], 'display', $displaytype, $ranks['display']);
print_table_header($vbphrase['rank_type']);
print_input_row($vbphrase['user_rank_file_path'], 'rankimg', $rankimg);
print_input_row($vbphrase['or_you_may_enter_text'], 'rankhtml', $ranktext);
print_submit_row();
}
// ###################### Start do update #######################
if ($_POST['do'] == 'doupdate') {
$vbulletin->input->clean_array_gpc('p', array('ranklevel' => TYPE_UINT, 'minposts' => TYPE_UINT, 'rankimg' => TYPE_STR, 'usergroupid' => TYPE_INT, 'rankhtml' => TYPE_NOTRIM, 'stack' => TYPE_UINT, 'display' => TYPE_UINT));
if (!$vbulletin->GPC['ranklevel'] or !$vbulletin->GPC['rankimg'] and !$vbulletin->GPC['rankhtml']) {
print_stop_message('please_complete_required_fields');
}
if ($vbulletin->GPC['rankhtml']) {
$type = 1;
$vbulletin->GPC['rankimg'] = $vbulletin->GPC['rankhtml'];
示例13: print_input_row
print_input_row($vbphrase['photoplog_title'], 'photoplog_category[title]', $photoplog_category['title']);
print_textarea_row($vbphrase['photoplog_description'], 'photoplog_category[description]', $photoplog_category['description']);
print_input_row("{$vbphrase['photoplog_display_order']}<dfn>{$vbphrase['photoplog_zero_equals_no_display']}</dfn>", 'photoplog_category[displayorder]', $photoplog_category['displayorder']);
print_select_row($vbphrase['photoplog_parent_category'], 'photoplog_category[parentid]', $photoplog_list_categories, $photoplog_category['parentid'], true, 0, false);
print_table_header($vbphrase['photoplog_enable_disable_features']);
print_yes_no_row($vbphrase['photoplog_allow_html'], 'photoplog_category[options][allowhtml]', $photoplog_category_options['allowhtml']);
print_yes_no_row($vbphrase['photoplog_allow_smilies'], 'photoplog_category[options][allowsmilies]', $photoplog_category_options['allowsmilies']);
print_yes_no_row($vbphrase['photoplog_allow_bbcode'], 'photoplog_category[options][allowbbcode]', $photoplog_category_options['allowbbcode']);
print_yes_no_row($vbphrase['photoplog_allow_img_code'], 'photoplog_category[options][allowimgcode]', $photoplog_category_options['allowimgcode']);
print_yes_no_row($vbphrase['photoplog_allow_parse_url'], 'photoplog_category[options][allowparseurl]', $photoplog_category_options['allowparseurl']);
print_yes_no_row($vbphrase['photoplog_allow_comments'], 'photoplog_category[options][allowcomments]', $photoplog_category_options['allowcomments']);
print_yes_no_row($vbphrase['photoplog_is_searchable'], 'photoplog_category[options][issearchable]', $photoplog_category_options['issearchable']);
print_yes_no_row($vbphrase['photoplog_is_members_folder'], 'photoplog_category[options][ismembersfolder]', $photoplog_category_options['ismembersfolder']);
print_yes_no_row($vbphrase['photoplog_act_as_divider'], 'photoplog_category[options][actasdivider]', $photoplog_category_options['actasdivider']);
print_yes_no_row($vbphrase['photoplog_allow_desc_html'], 'photoplog_category[options][allowdeschtml]', $photoplog_category_options['allowdeschtml']);
print_yes_no_row($vbphrase['photoplog_open_for_subcats'], 'photoplog_category[options][openforsubcats]', $photoplog_category_options['openforsubcats']);
if ($_REQUEST['do'] == 'edit') {
print_submit_row($vbphrase['photoplog_save']);
} else {
if ($_REQUEST['do'] == 'review') {
print_submit_row($vbphrase['photoplog_approve'], '', 2, $vbphrase['photoplog_go_back']);
}
}
}
}
if ($_REQUEST['do'] == 'doedit') {
$vbulletin->input->clean_array_gpc('p', array('catid' => TYPE_UINT, 'photoplog_category' => TYPE_ARRAY));
$photoplog_catid = $vbulletin->GPC['catid'];
$photoplog_category = $vbulletin->GPC['photoplog_category'];
$photoplog_category_parentid = intval(trim(strval($photoplog_category['parentid'])));
$photoplog_list_children = array();
示例14: print_form_header
// ###################### Start edit #######################
if ($_REQUEST['do'] == 'edit') {
print_form_header('subscriptionpermission', 'doupdate');
if (empty($subobj->subscriptioncache[$vbulletin->GPC['subscriptionid']])) {
print_stop_message('invalid_x_specified', $vbphrase['subscription']);
}
if (empty($vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']])) {
print_stop_message('invalid_x_specified', $vbphrase['usergroup']);
}
$getperms = $db->query_first("\n\t\tSELECT subscriptionpermission.*\n\t\tFROM " . TABLE_PREFIX . "subscriptionpermission AS subscriptionpermission\n\t\tINNER JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (usergroup.usergroupid = subscriptionpermission.usergroupid)\n\t\tWHERE subscriptionid = " . $vbulletin->GPC['subscriptionid'] . " AND subscriptionpermission.usergroupid = " . $vbulletin->GPC['usergroupid']);
$usergroup = $vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']];
$subtitle = $vbphrase['sub' . $vbulletin->GPC['subscriptionid'] . '_title'];
construct_hidden_code('subscriptionid', $vbulletin->GPC['subscriptionid']);
construct_hidden_code('usergroupid', $vbulletin->GPC['usergroupid']);
print_table_header(construct_phrase($vbphrase['edit_usergroup_permissions_for_usergroup_x_in_subscription_y'], $usergroup['title'], $subtitle));
print_yes_no_row($vbphrase['can_use_subscription'], 'usesub', !$getperms);
print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'doupdate') {
$vbulletin->input->clean_array_gpc('p', array('usesub' => TYPE_BOOL, 'subscriptionpermissionid' => TYPE_INT, 'subscriptionid' => TYPE_INT, 'usergroupid' => TYPE_INT));
if (empty($subobj->subscriptioncache[$vbulletin->GPC['subscriptionid']])) {
print_stop_message('invalid_x_specified', $vbphrase['subscription']);
}
if (empty($vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']])) {
print_stop_message('invalid_x_specified', $vbphrase['usergroup']);
}
define('CP_REDIRECT', "subscriptionpermission.php?do=modify#subscription" . $vbulletin->GPC['subscriptionid']);
if ($vbulletin->GPC['usesub']) {
$db->query_write("\n\t\t\tDELETE FROM " . TABLE_PREFIX . "subscriptionpermission\n\t\t\tWHERE subscriptionid = " . $vbulletin->GPC['subscriptionid'] . " AND usergroupid = " . $vbulletin->GPC['usergroupid']);
if ($db->affected_rows()) {
示例15: array
$checked = array(6 => 'checked="checked"');
print_table_header($vbphrase['add_new_holiday']);
}
if ($holidayinfo['title']) {
print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=holiday&varname={$title}&t=1", 1) . '</dfn>', 'title', $holidayinfo['title']);
} else {
print_input_row($vbphrase['title'], 'title');
}
if ($holidayinfo['description']) {
print_textarea_row($vbphrase['description'] . '<dfn>' . construct_link_code($vbphrase['translations'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=holiday&varname={$desc}&t=1", 1) . '</dfn>', 'description', $holidayinfo['description']);
} else {
print_textarea_row($vbphrase['description'], 'description');
}
print_label_row($vbphrase['recurring_option'], '<input type="radio" name="holidayinfo[recurring]" value="6" tabindex="1" ' . $checked[6] . '/>' . construct_phrase($vbphrase['every_x_y'], construct_month_select_html($options[0], 'month1'), construct_day_select_html($options[1], 'day1')) . '
<br /><input type="radio" name="holidayinfo[recurring]" value="7" tabindex="1" ' . $checked[7] . '/>' . construct_phrase($vbphrase['the_x_y_of_z'], '<select name="period" tabindex="1" class="bginput">' . construct_select_options($periodarray, $options[0]) . '</select>', '<select name="day2" tabindex="1" class="bginput">' . construct_select_options($daysarray, $options[1]) . '</select>', construct_month_select_html($options[2], 'month2')), '', 'top', 'recurring');
print_yes_no_row($vbphrase['allow_smilies'], 'holidayinfo[allowsmilies]', $holidayinfo['allowsmilies']);
print_submit_row($vbphrase['save']);
}
// ################# Save or Create a Holiday ###################
if ($_POST['do'] == 'saveholiday') {
$vbulletin->input->clean_array_gpc('p', array('holidayid' => TYPE_INT, 'holidayinfo' => TYPE_ARRAY, 'month1' => TYPE_INT, 'day1' => TYPE_INT, 'month2' => TYPE_INT, 'day2' => TYPE_INT, 'period' => TYPE_INT, 'title' => TYPE_STR, 'description' => TYPE_STR));
if (empty($vbulletin->GPC['title'])) {
print_stop_message('please_complete_required_fields');
}
if ($vbulletin->GPC['holidayinfo']['recurring'] == 6) {
$vbulletin->GPC['holidayinfo']['recuroption'] = $vbulletin->GPC['month1'] . '|' . $vbulletin->GPC['day1'];
} else {
$vbulletin->GPC['holidayinfo']['recuroption'] = $vbulletin->GPC['period'] . '|' . $vbulletin->GPC['day2'] . '|' . $vbulletin->GPC['month2'];
}
if (empty($vbulletin->GPC['holidayid'])) {
/*insert query*/