本文整理汇总了PHP中construct_select_options函数的典型用法代码示例。如果您正苦于以下问题:PHP construct_select_options函数的具体用法?PHP construct_select_options怎么用?PHP construct_select_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了construct_select_options函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_grid_row
/**
* Prints a grid row for use in cms_admin.php?do=grid
*
* @param array Grid array containing gridid, title
*/
function print_grid_row($grid)
{
global $vbulletin, $typeoptions, $vbphrase;
$gridid = $grid['gridid'];
if ($grid['flattened'])
{
$options = array(
'grid_doflatten' => $vbphrase['edit'],
'grid_unflatten' => $vbphrase['unflatten_grid'],
'modifylayout' => $vbphrase['create_layout'],
'grid_delete' => $vbphrase['delete'],
);
}
else
{
$options = array(
'grid_modify' => $vbphrase['edit'],
'grid_flatten' => $vbphrase['flatten_grid'],
'modifylayout' => $vbphrase['create_layout'],
'grid_delete' => $vbphrase['delete'],
);
}
$cell = array();
$cell[] = $grid['title'];
$cell[] = "<span style=\"white-space:nowrap\">
<select name=\"g$grid[gridid]\" onchange=\"js_jump($grid[gridid], this);\" class=\"bginput\">" . construct_select_options($options) . "</select>
<input type=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_jump($grid[gridid], this.form.g$grid[gridid]);\" class=\"button\" />
</span>";
print_cells_row($cell);
}
示例2: form_group_control
function form_group_control($group)
{
global $vbphrase;
$options = array('edit' => $vbphrase['edit'], 'clean' => $vbphrase['clean'], 'kill' => $vbphrase['delete']);
$controls = "\n\t<select\n name=\"g" . $group['group_id'] . "\"\n onchange=\"js_nntpgroup_jump(" . $group['group_id'] . ",\n '" . $group['plugin_id'] . "',\n this);\"\n class=\"bginput\">\n" . construct_select_options($options) . "\t\n </select>\n\t\n <input\n type=\"button\"\n value=\"" . $vbphrase['go'] . "\"\n onclick=\"js_nntpgroup_jump(" . $group['group_id'] . ",\n '" . $group['plugin_id'] . "',\n this.form.g" . $group['group_id'] . ");\"\n />\n\t";
return $controls;
}
示例3: buildActionCell
public static function buildActionCell($name, $options, $jsfunction = '', $button = 'Go', $onclick = false, $onchange = false)
{
$cell = '<select name="' . $name . '"';
$cell .= ($onchange ? ' onchange="' . $jsfunction . ';"' : '') . ' >';
$cell .= construct_select_options($options) . '</select>';
$cell .= "\t" . '<input type="button" class="button" value="' . $button . '"';
$cell .= ($onclick ? ' onclick="' . $jsfunction . ';"' : '') . ' />';
return $cell;
}
示例4: construct_prefix_options
/**
* Construct a set of option tags for a <select> box consisting of prefixes.
* Note: if you only use one of the no- and any-prefix options, they will each have
* a value of ''; if you use both, any will be '' and none will be '-1'.
*
* @param integer if specified, only include prefixes available in a specific forum
* @param string The selected value
* @param boolean Whether to show a "no prefix" option
* @param boolean Whether to show an "any prefix" option
* @param boolean Whether to return the no/any options if there are no prefixes available
*
* @return string HTML for options
*/
function construct_prefix_options($forumid = 0, $selectedid = '', $show_no_prefix = true, $show_any_prefix = false, $show_if_empty = false)
{
global $vbulletin, $vbphrase;
static $prefix_option_cache = array();
$forumid = intval($forumid);
if (!isset($prefix_option_cache["{$forumid}"])) {
$prefixsets = array();
$prefixsets_sql = $vbulletin->db->query_read("\n\t\t\tSELECT prefixset.*\n\t\t\tFROM " . TABLE_PREFIX . "prefixset AS prefixset\n\t\t\t" . ($forumid ? "INNER JOIN " . TABLE_PREFIX . "forumprefixset AS forumprefixset ON\n\t\t\t\t\t(forumprefixset.prefixsetid = prefixset.prefixsetid AND forumprefixset.forumid = {$forumid})\n\t\t\t\t" : '') . "\n\t\t\tORDER BY prefixset.displayorder\n\t\t");
while ($prefixset = $vbulletin->db->fetch_array($prefixsets_sql)) {
$phrased_set = htmlspecialchars_uni($vbphrase["prefixset_{$prefixset['prefixsetid']}_title"]);
if ($phrased_set) {
$prefixsets["{$phrased_set}"] = array();
}
}
$prefixes_sql = $vbulletin->db->query_read("\n\t\t\tSELECT *\n\t\t\tFROM " . TABLE_PREFIX . "prefix\n\t\t\tORDER BY displayorder\n\t\t");
while ($prefix = $vbulletin->db->fetch_array($prefixes_sql)) {
$phrased_set = htmlspecialchars_uni($vbphrase["prefixset_{$prefix['prefixsetid']}_title"]);
if (isset($prefixsets["{$phrased_set}"])) {
$prefixsets["{$phrased_set}"]["{$prefix['prefixid']}"] = htmlspecialchars_uni($vbphrase["prefix_{$prefix['prefixid']}_title_plain"]);
}
}
$prefix_option_cache["{$forumid}"] = $prefixsets;
}
$construct = $prefix_option_cache["{$forumid}"];
if (!$show_if_empty and !$construct) {
return '';
}
$beginning = array();
if ($show_no_prefix and $show_any_prefix) {
$beginning[''] = $vbphrase['any_prefix_meta'];
$beginning['-1'] = $vbphrase['no_prefix_meta'];
} else {
if ($show_no_prefix or $show_any_prefix) {
$beginning[''] = $show_no_prefix ? $vbphrase['no_prefix_meta'] : $vbphrase['any_prefix_meta'];
}
}
if (sizeof($beginning) > 0) {
// don't use array merge -- it will renumber
$construct = $beginning + $construct;
}
return construct_select_options($construct, $selectedid);
}
示例5: print_table_footer
print_table_footer();
$sqltable = array('all tables' => $upgradecore_phrases['dump_all_tables']);
$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
示例6: print_usergroup_row
function print_usergroup_row($usergroup, $options)
{
global $usergroupleaders, $vbphrase, $promotions, $vbulletin;
if ($promotions["{$usergroup['usergroupid']}"]) {
$options['promote'] .= " ({$promotions[$usergroup[usergroupid]]})";
}
$cell = array();
$cell[] = "<b>{$usergroup['title']}" . iif($usergroup['canoverride'], '*') . "</b>" . iif($usergroup['ispublicgroup'], '<br /><span class="smallfont">' . $usergroup['description'] . '</span>');
$cell[] = iif($usergroup['count'], vb_number_format($usergroup['count']), '-');
$cell[] = iif($usergroup['secondarycount'], vb_number_format($usergroup['secondarycount']), '-');
if ($usergroup['ispublicgroup']) {
$cell[] = iif($usergroup['requests'], vb_number_format($usergroup['requests']), '0');
}
if ($usergroup['ispublicgroup']) {
$cell_out = '<span class="smallfont">';
if (is_array($usergroupleaders["{$usergroup['usergroupid']}"])) {
foreach ($usergroupleaders["{$usergroup['usergroupid']}"] as $usergroupleader) {
$cell_out .= "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$usergroupleader['userid']}\"><b>{$usergroupleader['username']}</b></a>" . construct_link_code($vbphrase['delete'], "usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "do=removeleader&usergroupleaderid={$usergroupleader['usergroupleaderid']}") . '<br />';
}
}
$cell[] = $cell_out . '</span>';
}
$options['edit'] .= " (id: {$usergroup['usergroupid']})";
$cell[] = "\n\t<select name=\"u{$usergroup['usergroupid']}\" onchange=\"js_usergroup_jump({$usergroup['usergroupid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$usergroup['usergroupid']});\" />\n\t";
print_cells_row($cell);
}
示例7: construct_phrase
case 'M_6':
$period = construct_phrase($vbphrase['x_months'], 6);
break;
case 'Y_1':
$period = construct_phrase($vbphrase['x_years'], 1);
break;
case 'Y_2':
$period = construct_phrase($vbphrase['x_years'], 2);
break;
case 'PERMA':
$period = $vbphrase['permanent'];
break;
default:
$period = '';
}
print_cells_row(array($infraction['usergroupid'] == -1 ? $vbphrase['all_usergroups'] : "<a href=\"usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&usergroupid={$infraction['usergroupid']}\" />" . $vbulletin->usergroupcache["{$infraction['usergroupid']}"]['title'] . "</a>", "<a href=\"usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&usergroupid={$infraction['banusergroupid']}\" />" . $vbulletin->usergroupcache["{$infraction['banusergroupid']}"]['title'] . "</a>", $infraction['amount'], $vbphrase["{$infraction['method']}"], $period, "\n\t<select name=\"i{$infraction['infractionbanid']}\" onchange=\"js_usergroup_jump({$infraction['infractionbanid']}, this);\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$infraction['infractionbanid']}, this.form.i{$infraction['infractionbanid']});\" />\n\t"));
}
print_submit_row($vbphrase['add_new_automatic_ban'], 0, 6);
}
// ###################### Start Delete #######################
if ($_POST['do'] == 'killinfraction') {
$vbulletin->input->clean_array_gpc('p', array('infractionid' => TYPE_UINT, 'pagenumber' => TYPE_UINT, 'orderby' => TYPE_NOHTML, 'perpage' => TYPE_UINT, 'status' => TYPE_NOHTML, 'userid' => TYPE_UINT, 'whoadded' => TYPE_UINT, 'startstamp' => TYPE_UINT, 'endstamp' => TYPE_UINT));
if ($infractioninfo = verify_id('infraction', $vbulletin->GPC['infractionid'], 0, 1)) {
$infdata =& datamanager_init('Infraction', $vbulletin, ERRTYPE_STANDARD);
$infdata->set_existing($infractioninfo);
$infdata->setr_info('postinfo', $postinfo);
$infdata->setr_info('userinfo', $userinfo);
$infdata->delete();
unset($infdata);
}
$args = '&status=' . $vbulletin->GPC['status'] . '&u=' . $vbulletin->GPC['userid'] . '&whoadded=' . $vbulletin->GPC['whoadded'] . '&startstamp=' . $vbulletin->GPC['startstamp'] . '&endstamp=' . $vbulletin->GPC['endstamp'] . '&pp=' . $vbulletin->GPC['perpage'] . '&page=' . $vbulletin->GPC['pagenumber'] . '&orderby=' . $vbulletin->GPC['orderby'] . '&infractionlevelid=' . $vbulletin->GPC['infractionlevelid'];
示例8:
<br />
<fieldset>
<legend>' . $install_phrases['custom_setting'] . '</legend>
<div style="padding:4px">
<label for="cookiepatho"><input type="checkbox" id="cookiepatho" name="cookiepath_other" tabindex="1" value="1" />' . $install_phrases['use_custom_setting'] . '
</label><br />
<input type="text" class="bginput" size="25" name="cookiepath_value" value="" />
</div>
</fieldset>
');
print_label_row($install_phrases['cookiedomain'], '
<fieldset>
<legend>' . $install_phrases['suggested_settings'] . '</legend>
<div style="padding:4px">
<select name="vboptions[cookiedomain]" tabindex="1" class="bginput">' .
construct_select_options(fetch_valid_cookiedomains($_SERVER['HTTP_HOST'], $install_phrases['blank']), '') . '
</select>
</div>
</fieldset>
<br />
<fieldset>
<legend>' . $install_phrases['custom_setting'] . '</legend>
<div style="padding:4px">
<label for="cookiedomaino"><input type="checkbox" id="cookiedomaino" name="cookiedomain_other" tabindex="1" value="1" />' . $install_phrases['use_custom_setting'] . '
</label><br />
<input type="text" class="bginput" size="25" name="cookiedomain_value" value="" />
</div>
</fieldset>
');
print_submit_row($vbphrase['proceed'], $vbphrase['reset']);
示例9: print_form_header
<?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();
}
// ########################################################################
if ($_POST['do'] == 'savepermissions') {
$vbulletin->input->clean_array_gpc('p', array('prefixids' => TYPE_NOCLEAN, 'conflict' => TYPE_ARRAY_INT));
$prefixids_raw = unserialize(verify_client_string($vbulletin->GPC['prefixids']));
$prefixids = array();
foreach ($prefixids_raw as $prefixid) {
$prefixids[] = $vbulletin->input->do_clean($prefixid, TYPE_STR);
}
if (empty($prefixids)) {
示例10: print_yes_no_row
print_yes_no_row($vbphrase['receive_private_messages'], 'options[receivepm]', $user['receivepm']);
print_yes_no_row($vbphrase['send_notification_email_when_a_private_message_is_received'], 'options[emailonpm]', $user['emailonpm']);
print_yes_no_row($vbphrase['pop_up_notification_box_when_a_private_message_is_received'], 'user[pmpopup]', $user['pmpopup']);
print_yes_no_row($vbphrase['display_signature'], 'options[showsignatures]', $user['showsignatures']);
print_yes_no_row($vbphrase['display_avatars'], 'options[showavatars]', $user['showavatars']);
print_yes_no_row($vbphrase['display_images'], 'options[showimages]', $user['showimages']);
//print_yes_no_row($vbphrase['use_email_notification_by_default'], 'options[emailnotification]', $user['emailnotification']);
print_radio_row($vbphrase['auto_subscription_mode'], 'user[autosubscribe]', array(-1 => $vbphrase['subscribe_choice_none'], 0 => $vbphrase['subscribe_choice_0'], 1 => $vbphrase['subscribe_choice_1'], 2 => $vbphrase['subscribe_choice_2'], 3 => $vbphrase['subscribe_choice_3']), $user['autosubscribe'], 'smallfont');
print_radio_row($vbphrase['thread_display_mode'], 'threaddisplaymode', array(0 => "{$vbphrase['linear']} - {$vbphrase['oldest_first']}", 3 => "{$vbphrase['linear']} - {$vbphrase['newest_first']}", 2 => $vbphrase['hybrid'], 1 => $vbphrase['threaded']), $threaddisplaymode, 'smallfont');
print_radio_row($vbphrase['message_editor_interface'], 'user[showvbcode]', array(0 => $vbphrase['do_not_show_editor_toolbar'], 1 => $vbphrase['show_standard_editor_toolbar'], 2 => $vbphrase['show_enhanced_editor_toolbar']), $user['showvbcode'], 'smallfont');
construct_style_chooser($vbphrase['style'], 'user[styleid]', $user['styleid']);
print_table_break('', $INNERTABLEWIDTH);
// TIME FIELDS SECTION
print_table_header($vbphrase['time_options']);
print_description_row($vbphrase['timezone'] . ' <select name="user[timezoneoffset]" class="bginput" tabindex="1">' . construct_select_options(fetch_timezones_array(), $user['timezoneoffset']) . '</select>');
print_label_row($vbphrase['default_view_age'], '<select name="user[daysprune]" class="bginput" tabindex="1">' . construct_select_options($pruneoptions, $user['daysprune']) . '</select>');
print_time_row($vbphrase['join_date'], 'joindate', $user['joindate'], 0);
print_time_row($vbphrase['last_visit'], 'lastvisit', $user['lastvisit']);
print_time_row($vbphrase['last_activity'], 'lastactivity', $user['lastactivity']);
print_time_row($vbphrase['last_post'], 'lastpost', $user['lastpost']);
($hook = vBulletinHook::fetch_hook('useradmin_edit_column2')) ? eval($hook) : false;
?>
</table>
</tr>
<?php
print_table_break('', $OUTERTABLEWIDTH);
$tableadded = 1;
print_table_footer();
}
// ###################### Start editsig #######################
if ($_REQUEST['do'] == 'editsig') {
示例11: iif
case 'psd':
case 'tiff':
case 'tif':
$type['width'] = iif($type['width'], $type['width'], $vbphrase['none']);
$type['height'] = iif($type['height'], $type['height'], $vbphrase['none']);
break;
default:
$type['width'] = ' ';
$type['height'] = ' ';
}
$cell = array();
$cell[] = "<b>{$type['extension']}</b>";
$cell[] = $type['size'];
$cell[] = $type['width'];
$cell[] = $type['height'];
$cell[] = "\n\t<select name=\"a{$type['extension']}\" onchange=\"js_attachment_jump('{$type['extension']}');\" class=\"bginput\">\n" . construct_select_options($attachoptions) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_attachment_jump('{$type['extension']}');\" />\n\t";
print_cells_row($cell);
}
print_submit_row($vbphrase['add_new_extension'], 0, 5);
}
// ###################### File Types ####################
if ($_REQUEST['do'] == 'updatetype') {
$vbulletin->input->clean_array_gpc('r', array('extension' => TYPE_STR));
print_form_header('attachment', 'doupdatetype');
if ($vbulletin->GPC['extension']) {
// This is an edit
$type = $db->query_first("\n\t\t\tSELECT * FROM " . TABLE_PREFIX . "attachmenttype\n\t\t\tWHERE extension = '" . $db->escape_string($vbulletin->GPC['extension']) . "'\n\t\t");
if ($type) {
if ($type['mimetype']) {
$type['mimetype'] = implode("\n", unserialize($type['mimetype']));
}
示例12: foreach
foreach ($phrasetypes as $fieldname => $type) {
$phraseoptions["{$fieldname}"] = $type['title'];
}
print_form_header('phrase', 'modify', false, true, 'navform', '90%', '', true, 'get');
echo '
<colgroup span="5">
<col style="white-space:nowrap"></col>
<col></col>
<col width="100%" align="center"></col>
<col style="white-space:nowrap"></col>
<col></col>
</colgroup>
<tr>
<td class="thead">' . $vbphrase['phrase_type'] . ':</td>
<td class="thead"><select name="fieldname" class="bginput" tabindex="1" onchange="this.form.page.selectedIndex = 0; this.form.submit()">' . construct_select_options($phraseoptions, $vbulletin->GPC['fieldname']) . '</select></td>
<td class="thead">' . '<input type="button"' . iif(!$showprev, ' disabled="disabled"') . ' class="button" value="« ' . $vbphrase['prev'] . '" tabindex="1" onclick="this.form.page.selectedIndex -= 1; this.form.submit()" />' . '<select name="page" tabindex="1" onchange="this.form.submit()" class="bginput">' . construct_select_options($pageoptions, $vbulletin->GPC['pagenumber']) . '</select>' . '<input type="button"' . iif(!$shownext, ' disabled="disabled"') . ' class="button" value="' . $vbphrase['next'] . ' »" tabindex="1" onclick="this.form.page.selectedIndex += 1; this.form.submit()" />
</td>
<td class="thead">' . $vbphrase['phrases_to_show_per_page'] . ':</td>
<td class="thead"><input type="text" class="bginput" name="perpage" value="' . $vbulletin->GPC['perpage'] . '" tabindex="1" size="5" /></td>
<td class="thead"><input type="submit" class="button" value=" ' . $vbphrase['go'] . ' " tabindex="1" accesskey="s" /></td>
</tr>';
print_table_footer();
/*print_form_header('phrase', 'modify');
print_table_header($vbphrase['controls'], 3);
echo '
<tr>
<td class="tfoot">
<select name="fieldname" class="bginput" tabindex="1" onchange="this.form.page.selectedIndex = 0; this.form.submit()">' . construct_select_options($phraseoptions, $vbulletin->GPC['fieldname']) . '</select><br />
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><b>Show Master Phrases?</b> </td>
示例13: print_label_row
<input type="text" class="bginput" name="function" size="30" tabindex="1" />
<input type="submit" value=" ' . $vbphrase['find'] . ' " class="button" tabindex="1" />
</form>
', '', 'top', NULL, false);
print_label_row($vbphrase['mysql_language_lookup'], '
<form action="http://www.mysql.com/search/" method="get" style="display:inline">
<input type="hidden" name="doc" value="1" />
<input type="hidden" name="m" value="o" />
<input type="text" class="bginput" name="q" size="30" tabindex="1" />
<input type="submit" value=" ' . $vbphrase['find'] . ' " class="button" tabindex="1" />
</form>
', '', 'top', NULL, false);
print_label_row($vbphrase['useful_links'], '
<form style="display:inline">
<select onchange="if (this.options[this.selectedIndex].value != \'\') { window.open(this.options[this.selectedIndex].value); } return false;" tabindex="1" class="bginput">
<option value="">-- ' . $vbphrase['useful_links'] . ' --</option>' . construct_select_options(array('vBulletin' => array('http://www.vbulletin.com/' => $vbphrase['home_page'] . ' (vBulletin.com)', 'http://members.vbulletin.com/' => $vbphrase['members_area'], 'http://www.vbulletin.com/forum/' => $vbphrase['community_forums'], 'http://www.vbulletin.com/manual/' => $vbphrase['reference_manual']), 'PHP' => array('http://www.ph' . 'p.net/' => $vbphrase['home_page'] . ' (PHP.net)', 'http://www.ph' . 'p.net/manual/' => $vbphrase['reference_manual'], 'http://www.ph' . 'p.net/downloads.ph' . 'p' => $vbphrase['download_latest_version']), 'MySQL' => array('http://www.mysql.com/' => $vbphrase['home_page'] . ' (MySQL.com)', 'http://www.mysql.com/documentation/' => $vbphrase['reference_manual'], 'http://www.mysql.com/downloads/' => $vbphrase['download_latest_version']))) . '</select>
</form>
', '', 'top', NULL, false);
print_table_footer(2, '', '', false);
// *************************************
// vBULLETIN CREDITS
require_once DIR . '/includes/vbulletin_credits.php';
print_cp_footer();
}
if ($_REQUEST['do'] == 'nav') {
require_once DIR . '/includes/adminfunctions_navpanel.php';
print_cp_header();
?>
<script type="text/javascript">
<!--
function nobub()
示例14: fetch_event_criteria
} else {
if ($eventinfo['dateline_from'] != $eventinfo['dateline_to']) {
$recurcriteria = fetch_event_criteria($eventinfo);
$date1 = vbdate($vbulletin->options['dateformat'], $eventinfo['dateline_from']);
$date2 = vbdate($vbulletin->options['dateformat'], $eventinfo['dateline_to']);
if (!$recurcriteria) {
$recurcriteria = $vbcalendar['word6'];
// What is word6?
}
print_label_row('<b>' . $vbphrase['time'] . '</b>', construct_phrase($vbphrase['x_to_y'], $time1, $time2));
print_label_row('<b>' . $vbphrase['timezone'] . '</b>', "<select name=\"eventtimezone[{$eventinfo['eventid']}]\" tabindex=\"1\" class=\"bginput\">" . construct_select_options(fetch_timezones_array(), $eventinfo['utc']) . '</select>');
print_label_row('<b>' . $vbphrase['date_range'] . '</b>', $recurcriteria . ' | ' . construct_phrase($vbphrase['x_to_y'], $date1, $date2));
} else {
$date = vbdate($vbulletin->options['dateformat'], $eventinfo['from_date']);
print_label_row('<b>' . $vbphrase['time'] . '</b>', construct_phrase($vbphrase['x_to_y'], $time1, $time2));
print_label_row('<b>' . $vbphrase['timezone'] . '</b>', "<select name=\"eventtimezone[{$eventinfo['eventid']}]\" tabindex=\"1\" class=\"bginput\">" . construct_select_options(fetch_timezones_array(), $eventinfo['utc']) . '</select>');
print_label_row('<b>' . $vbphrase['date_range'] . '</b>', $date);
}
}
if (can_moderate_calendar($eventinfo['calendarid'], 'caneditevents')) {
print_textarea_row('<b>' . $vbphrase['event'] . '</b>', "eventtext[{$eventinfo['eventid']}]", $eventinfo['event'], 15, 70);
} else {
print_label_row('<b>' . $vbphrase['event'] . '</b>', nl2br(htmlspecialchars_uni($eventinfo['event'])));
construct_hidden_code("eventtext[{$eventinfo['eventid']}]", $eventinfo['event']);
}
print_label_row($vbphrase['action'], "\n\t\t\t\t<label for=\"val_{$eventinfo['eventid']}\"><input type=\"radio\" name=\"eventaction[{$eventinfo['eventid']}]\" value=\"1\" id=\"val_{$eventinfo['eventid']}\" tabindex=\"1\" />" . $vbphrase['validate'] . "</label>\n\t\t\t\t" . (can_moderate_calendar($eventinfo['calendarid'], 'candeleteevents') ? "<label for=\"del_{$eventinfo['eventid']}\"><input type=\"radio\" name=\"eventaction[{$eventinfo['eventid']}]\" value=\"-1\" id=\"del_{$eventinfo['eventid']}\" tabindex=\"1\" />" . $vbphrase['delete'] . "</label>" : '') . "\n\t\t\t\t<label for=\"ign_{$eventinfo['eventid']}\"><input type=\"radio\" name=\"eventaction[{$eventinfo['eventid']}]\" value=\"0\" id=\"ign_{$eventinfo['eventid']}\" tabindex=\"1\" checked=\"checked\" /> " . $vbphrase['ignore'] . "</label>\n\t\t\t", '', 'top', 'eventaction');
$done = true;
}
}
if (!$done) {
print_description_row($vbphrase['no_events_awaiting_moderation']);
示例15: define
if ($vbulletin->GPC['modifyfields']) {
define('CP_REDIRECT', "profilefield.php?do=modifycheckbox&profilefieldid=" . $vbulletin->GPC['profilefieldid']);
} else {
define('CP_REDIRECT', 'profilefield.php?do=modify');
}
print_stop_message('saved_x_successfully', htmlspecialchars_uni($vbulletin->GPC['title']));
}
// ###################### Start add #######################
if ($_REQUEST['do'] == 'add' or $_REQUEST['do'] == 'edit') {
$vbulletin->input->clean_array_gpc('r', array('type' => TYPE_STR));
if ($_REQUEST['do'] == 'add') {
if (empty($vbulletin->GPC['type'])) {
echo "<p> </p><p> </p>\n";
print_form_header('profilefield', 'add');
print_table_header($vbphrase['add_new_user_profile_field']);
print_label_row($vbphrase['profile_field_type'], '<select name="type" tabindex="1" class="bginput">' . construct_select_options($types) . '</select>', '', 'top', 'profilefieldtype');
print_submit_row($vbphrase['continue'], 0);
print_cp_footer();
exit;
}
$maxprofile = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "profilefield");
$profilefield = array('maxlength' => 100, 'size' => 25, 'height' => 4, 'def' => 1, 'memberlist' => 1, 'searchable' => 1, 'limit' => 0, 'perline' => 0, 'displayorder' => $maxprofile['count'] + 1, 'boxheight' => 0, 'editable' => 1);
print_form_header('profilefield', 'update');
construct_hidden_code('type', $vbulletin->GPC['type']);
print_table_header($vbphrase['add_new_user_profile_field'] . " <span class=\"normal\">" . $types["{$vbulletin->GPC['type']}"] . "</span>", 2, 0);
} else {
$profilefield = $db->query_first("\n\t\t\tSELECT *\n\t\t\tFROM " . TABLE_PREFIX . "profilefield\n\t\t\tWHERE profilefieldid = " . $vbulletin->GPC['profilefieldid'] . "\n\t\t");
$vbulletin->GPC['type'] =& $profilefield['type'];
if ($vbulletin->GPC['type'] == 'select' or $vbulletin->GPC['type'] == 'radio') {
$profilefield['data'] = implode("\n", unserialize($profilefield['data']));
}