本文整理汇总了PHP中print_textarea_row函数的典型用法代码示例。如果您正苦于以下问题:PHP print_textarea_row函数的具体用法?PHP print_textarea_row怎么用?PHP print_textarea_row使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_textarea_row函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: construct_hidden_code
$db->free_result($phrases);
construct_hidden_code('orig[script]', $helpdata['script']);
construct_hidden_code('orig[action]', $helpdata['action']);
construct_hidden_code('orig[optionname]', $helpdata['optionname']);
construct_hidden_code('orig[product]', $helpdata['product']);
construct_hidden_code('orig[title]', $helpphrase["{$titlephrase}"]);
construct_hidden_code('orig[text]', $helpphrase["{$textphrase}"]);
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['topic'], $helpdata['title'], $helpdata['adminhelpid']));
}
print_input_row($vbphrase['script'], 'help[script]', $helpdata['script']);
print_input_row($vbphrase['action_leave_blank'], 'help[action]', $helpdata['action']);
print_select_row($vbphrase['product'], 'help[product]', fetch_product_list(), $helpdata['product']);
print_input_row($vbphrase['option'], 'help[optionname]', $helpdata['optionname']);
print_input_row($vbphrase['display_order'], 'help[displayorder]', $helpdata['displayorder']);
print_input_row($vbphrase['title'], 'title', $helpphrase["{$titlephrase}"]);
print_textarea_row($vbphrase['text'], 'text', $helpphrase["{$textphrase}"], 10, '50" style="width:100%');
if ($vbulletin->debug) {
print_yes_no_row($vbphrase['vbulletin_default'], 'help[volatile]', $helpdata['volatile']);
} else {
construct_hidden_code('help[volatile]', $helpdata['volatile']);
}
construct_hidden_code('adminhelpid', $vbulletin->GPC['adminhelpid']);
print_submit_row($vbphrase['save']);
}
// ############################### start actually adding/editing help topics ##############
if ($_POST['do'] == 'doedit') {
$vbulletin->input->clean_array_gpc('r', array('adminhelpid' => TYPE_INT, 'help' => TYPE_ARRAY_STR, 'orig' => TYPE_ARRAY_STR, 'title' => TYPE_STR, 'text' => TYPE_STR));
if (!$vbulletin->GPC['help']['script']) {
print_stop_message('please_complete_required_fields');
}
$newphrasename = $db->escape_string(fetch_help_phrase_short_name($vbulletin->GPC['help']));
示例2: array_keys
$productcodes_versions["{$productcode['version']}"] = 1;
$productcodes_grouped["{$productcode['version']}"][] = $productcode;
}
$productcodes_versions = array_keys($productcodes_versions);
usort($productcodes_versions, 'version_sort');
foreach ($productcodes_versions as $version) {
foreach ($productcodes_grouped["{$version}"] as $productcode) {
print_cells_row(array("<input type=\"text\" name=\"productcode[{$productcode['productcodeid']}][version]\" value=\"" . htmlspecialchars_uni($productcode['version']) . "\" style=\"width:100%\" size=\"10\" />", "<textarea name=\"productcode[{$productcode['productcodeid']}][installcode]\" rows=\"5\" cols=\"40\" style=\"width:100%\" wrap=\"virtual\" tabindex=\"1\">" . htmlspecialchars($productcode['installcode']) . "</textarea>", "<textarea name=\"productcode[{$productcode['productcodeid']}][uninstallcode]\" rows=\"5\" cols=\"40\" style=\"width:100%\" wrap=\"virtual\" tabindex=\"1\">" . htmlspecialchars($productcode['uninstallcode']) . "</textarea>", "<input type=\"checkbox\" name=\"productcode[{$productcode['productcodeid']}][delete]\" value=\"1\" />"));
}
}
print_table_break();
}
print_table_header($vbphrase['add_new_install_uninstall_code']);
print_input_row($vbphrase['version'], 'version');
print_textarea_row($vbphrase['install_code'], 'installcode', '', 5, '70" style="width:100%');
print_textarea_row($vbphrase['uninstall_code'], 'uninstallcode', '', 5, '70" style="width:100%');
print_submit_row();
}
}
// #############################################################################
if ($_POST['do'] == 'productsave') {
// Check to see if it is a duplicate.
$vbulletin->input->clean_array_gpc('p', array('productid' => TYPE_STR, 'editing' => TYPE_BOOL, 'title' => TYPE_STR, 'version' => TYPE_STR, 'description' => TYPE_STR, 'url' => TYPE_STR, 'versioncheckurl' => TYPE_STR, 'confirm' => TYPE_BOOL));
if ($vbulletin->GPC['url'] and !preg_match('#^[a-z0-9]+:#i', $vbulletin->GPC['url'])) {
$vbulletin->GPC['url'] = 'http://' . $vbulletin->GPC['url'];
}
if ($vbulletin->GPC['versioncheckurl'] and !preg_match('#^[a-z0-9]+:#i', $vbulletin->GPC['versioncheckurl'])) {
$vbulletin->GPC['versioncheckurl'] = 'http://' . $vbulletin->GPC['versioncheckurl'];
}
if (!$vbulletin->GPC['productid'] or !$vbulletin->GPC['title'] or !$vbulletin->GPC['version']) {
print_stop_message('please_complete_required_fields');
示例3: microtime
$time_before = microtime();
$db->query_write($query);
$time_taken = fetch_microtime_difference($time_before);
print_form_header('queries', 'doquery');
print_table_header($vbphrase['vbulletin_message']);
if ($errornum = $db->errno()) {
print_description_row(construct_phrase($vbphrase['an_error_occured_while_attempting_to_run_your_query'], $errornum, nl2br(htmlspecialchars_uni($db->error()))));
} else {
print_description_row(construct_phrase($vbphrase['affected_rows'], vb_number_format($db->affected_rows()), vb_number_format($time_taken, 4)));
}
print_table_footer();
}
break;
}
}
// ##################### START MODIFY #####################
if ($_REQUEST['do'] == 'modify') {
print_form_header('queries', 'doquery');
print_table_header($vbphrase['execute_sql_query']);
print_select_row($vbphrase['auto_query'], 'autoquery', $queryoptions, -1);
print_textarea_row($vbphrase['manual_query'], 'query', '', 10, 55);
print_input_row($vbphrase['results_to_show_per_page'], 'perpage', 20);
print_submit_row($vbphrase['continue']);
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 37230 $
|| ####################################################################
\*======================================================================*/
示例4: construct_hidden_code
}
construct_hidden_code('extension', $type['extension']);
print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['attachment_type'], $type['extension'], $type['extension']));
}
} else {
$type = null;
}
if (!$type) {
$type = array('enabled' => 1);
print_table_header($vbphrase['add_new_extension']);
}
print_input_row($vbphrase['extension'], 'type[extension]', $type['extension']);
print_input_row(construct_phrase($vbphrase['maximum_filesize_dfn']), 'type[size]', $type['size']);
print_input_row($vbphrase['max_width_dfn'], 'type[width]', $type['width']);
print_input_row($vbphrase['max_height_dfn'], 'type[height]', $type['height']);
print_textarea_row($vbphrase['mime_type_dfn'], 'type[mimetype]', $type['mimetype']);
($hook = vBulletinHook::fetch_hook('admin_attachmenttype')) ? eval($hook) : false;
$existing = @unserialize($type['contenttypes']);
print_table_break();
print_table_header($vbphrase['content_type'], 4);
print_cells_row(array($vbphrase['product'], $vbphrase['location'], $vbphrase['new_window'], $vbphrase['enabled']), 1, 'tcat');
$indexed_types = array();
$collection = new vB_Collection_ContentType();
$collection->filterAttachable(true);
foreach ($collection as $type) {
$value['package'] = $type->getPackageClass();
$value['class'] = $type->getClass();
$indexed_types[$type->getID()] = $value;
}
foreach ($indexed_types as $contenttypeid => $content) {
if (!isset($existing["{$contenttypeid}"]['e'])) {
示例5: print_common_template_row
/**
* Prints a row containing a textarea for editing one of the 'common templates'
*
* @param string Template variable name
*/
function print_common_template_row($varname)
{
global $template_cache, $vbphrase, $vbulletin;
$template = $template_cache['template']["{$varname}"];
$description = $vbphrase["{$varname}_desc"];
$color = fetch_inherited_color($template['styleid'], $vbulletin->GPC['dostyleid']);
$revertcode = construct_revert_code($template['styleid'], 'template', $varname);
print_textarea_row("<b>{$varname}</b> <dfn>{$description}</dfn><span class=\"smallfont\"><br /><br />{$revertcode['info']}<br /><br />{$revertcode['revertcode']}</span>", "commontemplate[{$varname}]", $template['template_un'], 8, 70, 1, 0, 'ltr', "{$color}\" style=\"font: 9pt courier new");
}
示例6: print_input_row
$trans_link = "phrase.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&fieldname=cron&t=1&varname=";
// has varname appended
if (!$cron['volatile'] or $vb5_config['Misc']['debug']) {
// non volatile or in debug mode -- always editable (custom created)
print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['titlevarname'], 1) . '</dfn>', 'title', $cron['title']);
print_textarea_row($vbphrase['description_gcpglobal'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['descvarname'], 1) . '</dfn>', 'description', $cron['description']);
print_textarea_row($vbphrase['log_phrase'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['logvarname'], 1) . '</dfn>', 'logphrase', $cron['logphrase']);
} else {
print_label_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['titlevarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['title']));
print_label_row($vbphrase['description_gcpglobal'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['descvarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['description']));
print_label_row($vbphrase['log_phrase'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['logvarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['logphrase']));
}
} else {
print_input_row($vbphrase['title'], 'title');
print_textarea_row($vbphrase['description_gcpglobal'], 'description');
print_textarea_row($vbphrase['log_phrase'], 'logphrase');
}
print_select_row($vbphrase['day_of_week'], 'weekday', $weekdays, $cron['weekday']);
print_select_row($vbphrase['day_of_month'], 'day', $days, $cron['day']);
print_select_row($vbphrase['hour'], 'hour', $hours, $cron['hour']);
$selects = '';
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]);
示例7: unset
}
// PROFILE SECTION
unset($user['salt']);
construct_hidden_code('olduser', sign_client_string(serialize($user)));
//For consistent Edits
print_table_header($vbphrase['profile'] . ($haschangehistory ? '<span class="smallfont">' . construct_link_code($vbphrase['view_change_history'], 'user.php?' . $vbulletin->session->vars['sessionurl'] . 'do=changehistory&userid=' . $vbulletin->GPC['userid']) . '</span>' : ''));
print_input_row($vbphrase['username'], 'user[username]', $user['username'], 0);
print_input_row($vbphrase['password'], 'password');
print_input_row($vbphrase['email'], 'user[email]', $user['email']);
print_select_row($vbphrase['language'], 'user[languageid]', array('0' => $vbphrase['use_forum_default']) + fetch_language_titles_array('', 0), $user['languageid']);
print_input_row($vbphrase['user_title'], 'user[usertitle]', $user['usertitle']);
print_select_row($vbphrase['custom_user_title'], 'user[customtitle]', array(0 => $vbphrase['no'], 2 => $vbphrase['user_set'], 1 => $vbphrase['admin_set_html_allowed']), $user['customtitle']);
print_input_row($vbphrase['personal_home_page'], 'user[homepage]', $user['homepage'], 0);
print_time_row($vbphrase['birthday'], 'user[birthday]', $user['birthday'], 0, 1);
print_select_row($vbphrase['privacy'], 'user[showbirthday]', array(0 => $vbphrase['hide_age_and_dob'], 1 => $vbphrase['display_age'], 3 => $vbphrase['display_day_and_month'], 2 => $vbphrase['display_age_and_dob']), $user['showbirthday']);
print_textarea_row($vbphrase['signature'], 'user[signature]', $user['signature'], 8, 45);
print_input_row($vbphrase['icq_uin'], 'user[icq]', $user['icq'], 0);
print_input_row($vbphrase['aim_screen_name'], 'user[aim]', $user['aim'], 0);
print_input_row($vbphrase['yahoo_id'], 'user[yahoo]', $user['yahoo'], 0);
print_input_row($vbphrase['msn_id'], 'user[msn]', $user['msn'], 0);
print_input_row($vbphrase['skype_name'], 'user[skype]', $user['skype'], 0);
print_yes_no_row($vbphrase['coppa_user'], 'options[coppauser]', $user['coppauser']);
print_input_row($vbphrase['parent_email_address'], 'user[parentemail]', $user['parentemail'], 0);
if ($user['referrerid']) {
$referrername = $db->query_first("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = {$user['referrerid']}");
$user['referrer'] = $referrername['username'];
}
print_input_row($vbphrase['referrer'], 'user[referrerid]', $user['referrer'], 0);
print_input_row($vbphrase['ip_address'], 'user[ipaddress]', $user['ipaddress']);
print_input_row($vbphrase['post_count'], 'user[posts]', $user['posts'], 0, 7);
print_table_break('', $INNERTABLEWIDTH);
示例8: print_yes_no_row
print_yes_no_row($vbphrase['set_default_if_yes_first'], 'profilefield[def]', $profilefield['def']);
}
if ($vbulletin->GPC['type'] == 'checkbox') {
print_input_row($vbphrase['limit_selection'], 'profilefield[size]', $profilefield['limit']);
print_input_row($vbphrase['items_per_line'], 'profilefield[perline]', $profilefield['perline']);
if ($_REQUEST['do'] == 'add') {
print_textarea_row(construct_phrase($vbphrase['x_enter_the_options_that_the_user_can_choose_from'], $vbphrase['options']) . "<br /><dfn>{$vbphrase['note_max_31_options']}</dfn>", 'profilefield[data]', '', 10, 40, 0);
} else {
print_label_row($vbphrase['fields'], '<input type="image" src="../' . $vbulletin->options['cleargifurl'] . '"><input type="submit" class="button" value="' . $vbphrase['modify'] . '" tabindex="1" name="modifyfields">');
}
}
if ($vbulletin->GPC['type'] == 'select_multiple') {
print_input_row($vbphrase['limit_selection'], 'profilefield[size]', $profilefield['limit']);
print_input_row($vbphrase['box_height'], 'profilefield[height]', $profilefield['boxheight']);
if ($_REQUEST['do'] == 'add') {
print_textarea_row(construct_phrase($vbphrase['x_enter_the_options_that_the_user_can_choose_from'], $vbphrase['options']) . "<br /><dfn>{$vbphrase['note_max_31_options']}</dfn>", 'profilefield[data]', '', 10);
} else {
print_label_row($vbphrase['fields'], '<input type="image" src="../' . $vbulletin->options['cleargifurl'] . '"><input type="submit" class="button" value="' . $vbphrase['modify'] . '" tabindex="1" name="modifyfields">');
}
}
if ($_REQUEST['do'] == 'edit') {
if ($vbulletin->GPC['type'] == 'input' or $vbulletin->GPC['type'] == 'textarea') {
if ($vbulletin->GPC['type'] == 'input') {
$inputchecked = 'checked="checked"';
} else {
$textareachecked = 'checked="checked"';
}
print_label_row($vbphrase['profile_field_type'], "\n\t\t\t\t<label for=\"newtype_input\"><input type=\"radio\" name=\"newtype\" value=\"input\" id=\"newtype_input\" tabindex=\"1\" {$inputchecked}>" . $vbphrase['single_line_text_box'] . "</label><br />\n\t\t\t\t<label for=\"newtype_textarea\"><input type=\"radio\" name=\"newtype\" value=\"textarea\" id=\"newtype_textarea\" {$textareachecked}>" . $vbphrase['multiple_line_text_box'] . "</label>\n\t\t\t", '', 'top', 'newtype');
} else {
if ($vbulletin->GPC['type'] == 'checkbox' or $vbulletin->GPC['type'] == 'select_multiple') {
if ($vbulletin->GPC['type'] == 'checkbox') {
示例9: print_profilefield_row
function print_profilefield_row($basename, $profilefield, $userfield = '')
{
global $vbphrase;
$data = unserialize($profilefield['data']);
$fieldname = 'field' . $profilefield['profilefieldid'];
$profilefieldname = $basename . '[field' . $profilefield['profilefieldid'] . ']';
$optionalname = $basename . '[field' . $profilefield['profilefieldid'] . '_opt]';
$output = '';
$profilefield['title'] = htmlspecialchars_uni($vbphrase[$fieldname . '_title']);
if (!is_array($userfield)) {
$userfield = array($fieldname => '');
}
if ($profilefield['type'] == 'input') {
print_input_row($profilefield['title'], $profilefieldname, $userfield["{$fieldname}"], 0);
} else {
if ($profilefield['type'] == 'textarea') {
print_textarea_row($profilefield['title'], $profilefieldname, $userfield["{$fieldname}"], $profilefield['height'], 40, 0);
} else {
if ($profilefield['type'] == 'select') {
foreach ($data as $key => $val) {
$key++;
$selected = '';
if ($userfield["{$fieldname}"]) {
if (trim($val) == $userfield["{$fieldname}"]) {
$selected = 'selected="selected"';
$foundselect = 1;
}
} else {
if ($key == 0) {
$selected = 'selected="selected"';
$foundselect = 1;
}
}
$selectbits .= "<option value=\"{$key}\" {$selected}>{$val}</option>";
}
if ($profilefield['optional']) {
if (!$foundselect and $userfield["{$fieldname}"]) {
$optional = $userfield["{$fieldname}"];
}
$optionalfield = "<dfn>{$vbphrase['other_please_specify']}:</dfn><input type=\"text\" name=\"{$optionalname}\" class=\"bginput\" value=\"{$optional}\" size=\"{$profilefield['size']}\" maxlength=\"{$profilefield['maxlength']}\" tabindex=\"1\" />";
}
if (!$foundselect) {
$selected = 'selected="selected"';
} else {
$selected = '';
}
$output = "<select name=\"{$profilefieldname}\" tabindex=\"1\" class=\"bginput\">\n\t\t\t<option value=\"0\" {$selected}></option>\n\t\t\t{$selectbits}\n\t\t\t</select>\n\t\t\t{$optionalfield}";
print_label_row($profilefield['title'], $output);
} else {
if ($profilefield['type'] == 'radio') {
$radiobits = '';
$foundfield = 0;
$perline = 0;
foreach ($data as $key => $val) {
$key++;
$checked = '';
if (!$userfield["{$fieldname}"] and $key == 1 and $profilefield['def'] == 1) {
$checked = 'checked="checked"';
} else {
if (trim($val) == $userfield["{$fieldname}"]) {
$checked = 'checked="checked"';
$foundfield = 1;
}
}
$radiobits .= "<label for=\"rb_{$key}_{$profilefieldname}\"><input type=\"radio\" name=\"{$profilefieldname}\" value=\"{$key}\" id=\"rb_{$key}_{$profilefieldname}\" tabindex=\"1\" {$checked}>{$val}</label>";
$perline++;
if ($profilefield['perline'] > 0 and $perline >= $profilefield['perline']) {
$radiobits .= '<br />';
$perline = 0;
}
}
if ($profilefield['optional']) {
if (!$foundfield and $userfield["{$fieldname}"]) {
$optional = $userfield["{$fieldname}"];
}
$optionalfield = "<dfn>{$vbphrase['other_please_specify']}:</dfn><input type=\"text\" name=\"{$optionalname}\" class=\"bginput\" value=\"{$optional}\" size=\"{$profilefield['size']}\" maxlength=\"{$profilefield['maxlength']}\" tabindex=\"1\" />";
}
print_label_row($profilefield['title'], "{$radiobits}{$optionalfield}");
} else {
if ($profilefield['type'] == 'checkbox') {
$checkboxbits = '';
$perline = 0;
foreach ($data as $key => $val) {
if ($userfield["{$fieldname}"] & pow(2, $key)) {
$checked = 'checked="checked"';
} else {
$checked = '';
}
$key++;
$checkboxbits .= "<label for=\"cb_{$key}_{$profilefieldname}\"><input type=\"checkbox\" name=\"{$profilefieldname}[]\" value=\"{$key}\" id=\"cb_{$key}_{$profilefieldname}\" tabindex=\"1\" {$checked}>{$val}</label> ";
$perline++;
if ($profilefield['perline'] > 0 and $perline >= $profilefield['perline']) {
$checkboxbits .= '<br />';
$perline = 0;
}
}
print_label_row($profilefield['title'], $checkboxbits);
} else {
if ($profilefield['type'] == 'select_multiple') {
$selectbits = '';
//.........这里部分代码省略.........
示例10: print_form_header
}
</script>
<?php
if ($_REQUEST['do'] == 'start') {
print_form_header('email', 'dosendmail');
print_table_header($vbphrase['email_manager']);
print_yes_no_row($vbphrase['test_email_only'], 'test', 0);
print_input_row($vbphrase['email_to_send_at_once'], 'perpage', 500);
print_input_row($vbphrase['from'], 'from', $vbulletin->options['webmasteremail']);
print_input_row($vbphrase['subject'], 'subject');
print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50);
$text = $vbphrase['send'];
} else {
print_form_header('email', 'makelist');
print_table_header($vbphrase['generate_mailing_list']);
print_textarea_row($vbphrase['text_to_separate_addresses_by'], 'septext', ' ');
$text = $vbphrase['go'];
}
print_table_break();
print_table_header($vbphrase['search_criteria']);
print_user_search_rows(true);
print_table_break();
print_submit_row($text);
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
|| # CVS: $RCSfile$ - $Revision: 39862 $
|| ####################################################################
\*======================================================================*/
示例11: print_setting_row
/**
* Prints a setting row for use in options.php?do=options
*
* @param array Settings array
* @param array Phrases
*/
function print_setting_row($setting, $settingphrase)
{
global $vbulletin, $vbphrase, $bgcounter, $settingphrase, $stylevar;
$settingid = $setting['varname'];
echo '<tbody>';
print_description_row(iif($vbulletin->debug, '<div class="smallfont" style="float:' . $stylevar['right'] . '">' . construct_link_code($vbphrase['edit'], "options.php?" . $vbulletin->session->vars['sessionurl'] . "do=editsetting&varname={$setting['varname']}") . construct_link_code($vbphrase['delete'], "options.php?" . $vbulletin->session->vars['sessionurl'] . "do=removesetting&varname={$setting['varname']}") . '</div>') . '<div>' . $settingphrase["setting_{$setting['varname']}_title"] . "<a name=\"{$setting['varname']}\"></a></div>", 0, 2, 'optiontitle' . ($vbulletin->debug ? "\" title=\"\$vbulletin->options['" . $setting['varname'] . "']" : ''));
echo "</tbody><tbody id=\"tbody_{$settingid}\">\r\n";
// make sure all rows use the alt1 class
$bgcounter--;
$description = "<div class=\"smallfont\"" . ($vbulletin->debug ? "title=\"\$vbulletin->options['{$setting['varname']}']\"" : '') . ">" . $settingphrase["setting_{$setting['varname']}_desc"] . '</div>';
$name = "setting[{$setting['varname']}]";
$right = "<span class=\"smallfont\">{$vbphrase['error']}</span>";
$width = 40;
$rows = 8;
if (preg_match('#^input:?(\\d+)$#s', $setting['optioncode'], $matches)) {
$width = $matches[1];
$setting['optioncode'] = '';
} else {
if (preg_match('#^textarea:?(\\d+)(,(\\d+))?$#s', $setting['optioncode'], $matches)) {
$rows = $matches[1];
if ($matches[2]) {
$width = $matches[3];
}
$setting['optioncode'] = 'textarea';
} else {
if (preg_match('#^bitfield:(.*)$#siU', $setting['optioncode'], $matches)) {
$setting['optioncode'] = 'bitfield';
$setting['bitfield'] =& fetch_bitfield_definitions($matches[1]);
} else {
if (preg_match('#^(select|radio):(piped|eval)(\\r\\n|\\n|\\r)(.*)$#siU', $setting['optioncode'], $matches)) {
$setting['optioncode'] = "{$matches['1']}:{$matches['2']}";
$setting['optiondata'] = trim($matches[4]);
} else {
if (preg_match('#^usergroup:?(\\d+)$#s', $setting['optioncode'], $matches)) {
$size = intval($matches[1]);
$setting['optioncode'] = 'usergroup';
} else {
if (preg_match('#^(usergroupextra)(\\r\\n|\\n|\\r)(.*)$#siU', $setting['optioncode'], $matches)) {
$setting['optioncode'] = 'usergroupextra';
$setting['optiondata'] = trim($matches[3]);
}
}
}
}
}
}
switch ($setting['optioncode']) {
// input type="text"
case '':
print_input_row($description, $name, $setting['value'], 1, $width);
break;
// input type="radio"
// input type="radio"
case 'yesno':
print_yes_no_row($description, $name, $setting['value']);
break;
// textarea
// textarea
case 'textarea':
print_textarea_row($description, $name, $setting['value'], $rows, "{$width}\" style=\"width:90%");
break;
// bitfield
// bitfield
case 'bitfield':
$setting['value'] = intval($setting['value']);
$setting['html'] = '';
if ($setting['bitfield'] === NULL) {
print_label_row($description, construct_phrase("<strong>{$vbphrase['settings_bitfield_error']}</strong>", implode(',', vB_Bitfield_Builder::fetch_errors())), '', 'top', $name, 40);
} else {
#$setting['html'] .= "<fieldset><legend>$vbphrase[yes] / $vbphrase[no]</legend>";
$setting['html'] .= "<div id=\"ctrl_setting[{$setting['varname']}]\" class=\"smallfont\">\r\n";
$setting['html'] .= "<input type=\"hidden\" name=\"setting[{$setting['varname']}][0]\" value=\"0\" />\r\n";
foreach ($setting['bitfield'] as $key => $value) {
$value = intval($value);
$setting['html'] .= "<table style=\"width:175px; float:{$stylevar['left']}\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr valign=\"top\">\n\t\t\t\t\t<td><input type=\"checkbox\" name=\"setting[{$setting['varname']}][{$value}]\" id=\"setting[{$setting['varname']}]_{$key}\" value=\"{$value}\"" . ($setting['value'] & $value ? ' checked="checked"' : '') . " /></td>\n\t\t\t\t\t<td width=\"100%\" style=\"padding-top:4px\"><label for=\"setting[{$setting['varname']}]_{$key}\" class=\"smallfont\">" . fetch_phrase_from_key($key) . "</label></td>\r\n</tr></table>\r\n";
}
$setting['html'] .= "</div>\r\n";
#$setting['html'] .= "</fieldset>";
print_label_row($description, $setting['html'], '', 'top', $name, 40);
}
break;
// select:piped
// select:piped
case 'select:piped':
print_select_row($description, $name, fetch_piped_options($setting['optiondata']), $setting['value']);
break;
// radio:piped
// radio:piped
case 'radio:piped':
print_radio_row($description, $name, fetch_piped_options($setting['optiondata']), $setting['value'], 'smallfont');
break;
// select:eval
// select:eval
case 'select:eval':
//.........这里部分代码省略.........
示例12: print_stop_message
print_stop_message('no_threads_matched_your_query');
}
}
// ############### do unsubscribe threads ####################
if ($_POST['do'] == 'killsubscription') {
$idarray = unserialize(fetch_adminutil_text('subscribe'));
$threadids = trim($idarray['threadids']);
$db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "subscribethread\n\t\tWHERE threadid IN ({$threadids}) AND\n\t\t\temailupdate <> 0\n\t\t" . iif($idarray['userid'], " AND userid = {$idarray['userid']}") . "\n\t");
define('CP_REDIRECT', 'thread.php?do=unsubscribe');
print_stop_message('deleted_subscriptions_successfully');
}
// ############### unsubscribe threads ####################
if ($_REQUEST['do'] == 'unsubscribe') {
print_form_header('thread', 'dospecificunsubscribe');
print_table_header($vbphrase['unsubsribe_all_users_from_specific_threads']);
print_textarea_row($vbphrase['enter_the_threadids_of_the_threads'], 'ids');
print_submit_row($vbphrase['go']);
print_form_header('thread', 'domassunsubscribe');
print_table_header($vbphrase['unsubsribe_all_threads_from_specific_users']);
print_input_row($vbphrase['username_leave_blank_to_remove_all'], 'username');
print_input_row($vbphrase['find_all_threads_older_than_days'], 'daysprune', 30);
print_forum_chooser($vbphrase['forum'], 'forumid', -1, $vbphrase['all_forums']);
print_submit_row($vbphrase['go']);
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 09:39, Wed Nov 5th 2008
|| # CVS: $RCSfile$ - $Revision: 26900 $
|| ####################################################################
\*======================================================================*/
示例13: array
<option value="1"' . ($criteria_cache['is_date']['condition2'] == 1 ? ' selected="selected"' : '') . '>' . $vbphrase['utc_universal_time'] . '</option>
</select>'), 'is_time' => array('<input type="text" name="criteria[is_time][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['is_time']['condition1']) ? vbdate('H:i', TIMENOW, false, false) : $criteria_cache['is_time']['condition1']) . '" />', '<input type="text" name="criteria[is_time][condition2]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['is_time']['condition2']) ? intval(vbdate('H', TIMENOW, false, false)) + 1 . vbdate(':i', TIMENOW, false, false) : $criteria_cache['is_time']['condition2']) . '" />', '<select name="criteria[is_time][condition3]" tabindex="1">
<option value="0"' . (empty($criteria_cache['is_time']['condition3']) ? ' selected="selected"' : '') . '>' . $vbphrase['user_timezone'] . '</option>
<option value="1"' . ($criteria_cache['is_time']['condition3'] == 1 ? ' selected="selected"' : '') . '>' . $vbphrase['utc_universal_time'] . '</option>
</select>'));
if (!empty($notice_name_cache)) {
$criteria_options['notice_x_not_displayed'] = array('<select name="criteria[notice_x_not_displayed][condition1]" tabindex="1">' . construct_select_options($notice_name_cache, $criteria_cache['notice_x_not_displayed']['condition1']) . '</select>');
}
// hook to allow third-party additions of criteria
($hook = vBulletinHook::fetch_hook('notices_list_criteria')) ? eval($hook) : false;
// build the editor form
print_form_header('notice', 'update');
construct_hidden_code('noticeid', $vbulletin->GPC['noticeid']);
print_table_header($table_title);
print_input_row($vbphrase['title'] . '<dfn>' . $vbphrase['notice_title_description'] . '</dfn>', 'title', $notice['title'], 0, 60);
print_textarea_row($vbphrase['notice_html'] . '<dfn>' . $vbphrase['notice_html_description'] . '</dfn>' . ($vbulletin->GPC['noticeid'] ? '<div class="smallfont" style="margin-top:6px"><a href="phrase.php?do=edit&fieldname=global&phraseid=' . $notice['html_phraseid'] . '" target="translate">' . $vbphrase['translations'] . '</a></div>' : ''), 'html', $notice['html'], 8, 60, true, false);
print_input_row($vbphrase['display_order'], 'displayorder', $notice['displayorder'], 0, 10);
print_yes_no_row($vbphrase['active'] . '<dfn>' . $vbphrase['notice_active_description'] . '</dfn>', 'active', $notice['active']);
print_yes_no_row($vbphrase['persistent'] . '<dfn>' . $vbphrase['persistent_description'] . '</dfn>', 'persistent', $notice['persistent']);
print_yes_no_row($vbphrase['dismissible'], 'dismissible', $notice['dismissible']);
print_description_row('<strong>' . $vbphrase['display_notice_if_elipsis'] . '</strong>', false, 2, 'tcat', '', 'criteria');
if ($display_active_criteria_first) {
function print_notice_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_notice_criterion($id, $criteria_options, $criteria_cache);
示例14: construct_forumjump_css_row
for ($depth = 0; $depth < 5; $depth++) {
$jumpbits[] = construct_forumjump_css_row(construct_phrase($vbphrase['depth_x_items'], $depth), ".fjdpth{$depth}");
}
$i = 0;
while ($i < sizeof($jumpbits)) {
print_label_row($jumpbits[$i++], $jumpbits[$i++], 'alt2');
}
print_table_break(' ');
// additional css
print_table_header($vbphrase['additional_css']);
print_textarea_row($vbphrase['additional_css_description'], 'css[EXTRA][all]', $css['EXTRA']['all'], 10, 80, true, false, 'ltr', fetch_inherited_color($css_info['EXTRA'], $vbulletin->GPC['dostyleid']) . '" style="font:9pt \'courier new\', monospace');
$revertcode = construct_revert_code($css_info['EXTRA'], 'css', 'EXTRA');
if ($revertcode['info']) {
print_description_row("<span style=\"float:{$stylevar['right']}\">{$revertcode['revertcode']}</span>{$revertcode['info']}", 0, 2, 'tfoot" align="center');
}
print_textarea_row('', 'css[EXTRA2][all]', $css['EXTRA2']['all'], 10, 80, true, false, 'ltr', fetch_inherited_color($css_info['EXTRA2'], $vbulletin->GPC['dostyleid']) . '" style="font:9pt \'courier new\', monospace');
$revertcode = construct_revert_code($css_info['EXTRA2'], 'css', 'EXTRA2');
if ($revertcode['info']) {
print_description_row("<span style=\"float:{$stylevar['right']}\">{$revertcode['revertcode']}</span>{$revertcode['info']}", 0, 2, 'tfoot" align="center');
}
print_table_break(' ');
}
// #############################################################################
// POST EDITOR
if ($vbulletin->GPC['dowhat'] == 'posteditor' or $vbulletin->GPC['dowhat'] == 'all') {
construct_hidden_code('dowhat[posteditor]', 1);
print_table_header($vbphrase['text_editor_control_styles']);
print_description_row($vbphrase['text_editor_control_desc']);
$out = array();
foreach ($_query_special_templates as $varname) {
if (substr($varname, 0, 13) == 'editor_styles') {
示例15: unset
unset($photoplog_category_info);
if ($_REQUEST['do'] == 'edit') {
print_form_header('photoplog_category', 'doedit');
construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
construct_hidden_code('catid', $photoplog_catid);
print_table_header($vbphrase['photoplog_edit_this_category']);
} else {
if ($_REQUEST['do'] == 'review') {
print_form_header('photoplog_category', 'doadd');
construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
construct_hidden_code('suggestid', $photoplog_suggestid);
print_table_header($vbphrase['photoplog_add_new_category']);
}
}
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') {