/** * 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); }
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; }
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; }
/** * 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); }
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
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); }
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'];
<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']);
<?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)) {
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') {
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'])); }
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>
<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()
} 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']);
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'])); }
/** * 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': $options = null; eval($setting['optiondata']); if (is_array($options) and !empty($options)) { print_select_row($description, $name, $options, $setting['value']); } else { print_input_row($description, $name, $setting['value']); } break; // radio:eval // radio:eval case 'radio:eval': $options = null; eval($setting['optiondata']); if (is_array($options) and !empty($options)) { print_radio_row($description, $name, $options, $setting['value'], 'smallfont'); } else { print_input_row($description, $name, $setting['value']); } break; case 'username': if (intval($setting['value']) and $userinfo = $vbulletin->db->query_first("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = " . intval($setting['value']))) { print_input_row($description, $name, $userinfo['username'], false); } else { print_input_row($description, $name); } break; case 'usergroup': $usergrouplist = array(); foreach ($vbulletin->usergroupcache as $usergroup) { $usergrouplist["{$usergroup['usergroupid']}"] = $usergroup['title']; } if ($size > 1) { print_select_row($description, $name . '[]', array(0 => '') + $usergrouplist, unserialize($setting['value']), false, $size, true); } else { print_select_row($description, $name, $usergrouplist, $setting['value']); } break; case 'usergroupextra': $usergrouplist = fetch_piped_options($setting['optiondata']); foreach ($vbulletin->usergroupcache as $usergroup) { $usergrouplist["{$usergroup['usergroupid']}"] = $usergroup['title']; } print_select_row($description, $name, $usergrouplist, $setting['value']); break; // arbitrary number of <input type="text" /> // arbitrary number of <input type="text" /> case 'multiinput': $setting['html'] = "<div id=\"ctrl_{$setting['varname']}\"><fieldset id=\"multi_input_fieldset_{$setting['varname']}\" style=\"padding:4px\">"; $setting['values'] = unserialize($setting['value']); $setting['values'] = is_array($setting['values']) ? $setting['values'] : array(); $setting['values'][] = ''; foreach ($setting['values'] as $key => $value) { $setting['html'] .= "<div id=\"multi_input_container_{$setting['varname']}_{$key}\">" . ($key + 1) . " <input type=\"text\" class=\"bginput\" name=\"setting[{$setting['varname']}][{$key}]\" id=\"multi_input_{$setting['varname']}_{$key}\" size=\"40\" value=\"" . htmlspecialchars_uni($value) . "\" tabindex=\"1\" /></div>"; } $i = sizeof($setting['values']); if ($i == 0) { $setting['html'] .= "<div><input type=\"text\" class=\"bginput\" name=\"setting[{$setting['varname']}][{$i}]\" size=\"40\" tabindex=\"1\" /></div>"; } $setting['html'] .= "\n\t\t\t\t</fieldset>\n\t\t\t\t<div class=\"smallfont\"><a href=\"#\" onclick=\"return multi_input['{$setting['varname']}'].add()\">Add Another Option</a></div>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t<!--\n\t\t\t\tmulti_input['{$setting['varname']}'] = new vB_Multi_Input('{$setting['varname']}', {$i}, '" . $vbulletin->options['cpstylefolder'] . "');\n\t\t\t\t//-->\n\t\t\t\t</script>\n\t\t\t"; print_label_row($description, $setting['html']); break; // default registration options // default registration options case 'defaultregoptions': $setting['value'] = intval($setting['value']); $checkbox_options = array('receiveemail' => 'display_email', 'adminemail' => 'receive_admin_emails', 'invisiblemode' => 'invisible_mode', 'vcard' => 'allow_vcard_download', 'signature' => 'display_signatures', 'avatar' => 'display_avatars', 'image' => 'display_images', 'showreputation' => 'display_reputation', 'enablepm' => 'receive_private_messages', 'emailonpm' => 'send_notification_email_when_a_private_message_is_received', 'pmpopup' => 'pop_up_notification_box_when_a_private_message_is_received'); $setting['value'] = intval($setting['value']); $setting['html'] = ''; #$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 ($checkbox_options as $key => $phrase) { $value = $vbulletin->bf_misc_regoptions["{$key}"]; $setting['html'] .= "<table style=\"width:175px; float:{$stylevar['left']}\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr valign=\"top\">\n\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<td width=\"100%\" style=\"padding-top:4px\"><label for=\"setting[{$setting['varname']}]_{$key}\" class=\"smallfont\">" . fetch_phrase_from_key($phrase) . "</label></td>\r\n</tr></table>\r\n"; } #$setting['html'] .= "</fieldset>"; print_label_row($description, $setting['html'], '', 'top', $name, 40); break; // cp folder options // cp folder options case 'cpstylefolder': if ($folders = fetch_cpcss_options() and !empty($folders)) { print_select_row($description, $name, $folders, $setting['value'], 1, 6); } else { print_input_row($description, $name, $setting['value'], 1, 40); } break; // cookiepath / cookiedomain options // cookiepath / cookiedomain options case 'cookiepath': case 'cookiedomain': $func = 'fetch_valid_' . $setting['optioncode'] . 's'; $cookiesettings = $func($setting['optioncode'] == 'cookiepath' ? $vbulletin->script : $_SERVER['HTTP_HOST'], $vbphrase['blank']); $setting['found'] = in_array($setting['value'], array_keys($cookiesettings)); $setting['html'] = "\n\t\t\t<div id=\"ctrl_{$setting['varname']}\">\n\t\t\t<fieldset>\n\t\t\t\t<legend>{$vbphrase['suggested_settings']}</legend>\n\t\t\t\t<div style=\"padding:4px\">\n\t\t\t\t\t<select name=\"setting[{$setting['varname']}]\" tabindex=\"1\" class=\"bginput\">" . construct_select_options($cookiesettings, $setting['value']) . "\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t\t<br />\n\t\t\t<fieldset>\n\t\t\t\t<legend>{$vbphrase['custom_setting']}</legend>\n\t\t\t\t<div style=\"padding:4px\">\n\t\t\t\t\t<label for=\"{$settingid}o\"><input type=\"checkbox\" id=\"{$settingid}o\" name=\"setting[{$settingid}_other]\" tabindex=\"1\" value=\"1\"" . ($setting['found'] ? '' : ' checked="checked"') . " />{$vbphrase['use_custom_setting']}\n\t\t\t\t\t</label><br />\n\t\t\t\t\t<input type=\"text\" class=\"bginput\" size=\"25\" name=\"setting[{$settingid}_value]\" value=\"" . ($setting['found'] ? '' : $setting['value']) . "\" />\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t\t</div>"; print_label_row($description, $setting['html'], '', 'top', $name, 50); break; // just a label // just a label default: $handled = false; ($hook = vBulletinHook::fetch_hook('admin_options_print')) ? eval($hook) : false; if (!$handled) { eval("\$right = \"<div id=\\\"ctrl_setting[{$setting['varname']}]\\\">{$setting['optioncode']}</div>\";"); print_label_row($description, $right, '', 'top', $name, 50); } break; } echo "</tbody>\r\n"; $valid = exec_setting_validation_code($setting['varname'], $setting['value'], $setting['validationcode']); echo "<tbody id=\"tbody_error_{$settingid}\" style=\"display:" . (($valid === 1 or $valid === true) ? 'none' : '') . "\"><tr><td class=\"alt1 smallfont\" colspan=\"2\"><div style=\"padding:4px; border:solid 1px red; background-color:white; color:black\"><strong>{$vbphrase['error']}</strong>:<div id=\"span_error_{$settingid}\">{$valid}</div></div></td></tr></tbody>"; }
print_form_header('user', 'update', 0, 0); ?> <table cellpadding="0" cellspacing="0" border="0" width="<?php echo $OUTERTABLEWIDTH; ?> " align="center"><tr valign="top"><td> <table cellpadding="4" cellspacing="0" border="0" align="center" width="100%" class="tborder"> <?php construct_hidden_code('userid', $vbulletin->GPC['userid']); construct_hidden_code('ousergroupid', $user['usergroupid']); construct_hidden_code('odisplaygroupid', $user['displaygroupid']); $haschangehistory = false; if ($vbulletin->GPC['userid']) { // QUICK LINKS SECTION print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['user'], $user['username'], $vbulletin->GPC['userid'])); print_label_row($vbphrase['quick_user_links'], '<select name="quicklinks" onchange="javascript:pick_a_window(this.options[this.selectedIndex].value);" tabindex="1" class="bginput">' . construct_select_options($quicklinks) . '</select><input type="button" class="button" value="' . $vbphrase['go'] . '" onclick="javascript:pick_a_window(this.form.quicklinks.options[this.form.quicklinks.selectedIndex].value);" tabindex="2" />'); print_table_break('', $INNERTABLEWIDTH); require_once DIR . '/includes/class_userchangelog.php'; $userchangelog = new vb_UserChangeLog($vbulletin); $userchangelog->set_execute(true); // get the user change list $userchange_list = $userchangelog->sql_select_by_userid($vbulletin->GPC['userid']); $haschangehistory = $db->num_rows($userchange_list) ? true : false; } // 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');
/** * Returns a list of <option> tags representing the list of forums * * @param integer Selected forum ID * @param boolean Whether or not to display the 'Select Forum' option * @param string If specified, name for the optional top element - no name, no display * @param string Text to be used in sprintf() to indicate a 'category' forum, eg: '%s (Category)'. Leave blank for no category indicator * * @return string List of <option> tags */ function construct_forum_chooser($selectedid = -1, $displayselectforum = false, $topname = null, $category_phrase = null) { return construct_select_options(construct_forum_chooser_options($displayselectforum, $topname, $category_phrase), $selectedid); }
<col align="center" width="50%"></col> </colgroup> <tr> <td class="thead">' . $vbphrase['language'] . ':</td> <td class="thead"><select name="dolanguageid" onchange="this.form.submit()" class="bginput">' . construct_select_options($langoptions, $vbulletin->GPC['dolanguageid']) . '</select></td> <td class="thead" rowspan="2"><input type="submit" class="button" style="height:40px" value=" ' . $vbphrase['go'] . ' " /></td> <td class="thead" rowspan="2"><!--' . $vbphrase['page'] . ':--> <select name="page" onchange="this.form.submit()" class="bginput">' . construct_select_options($pageoptions, $vbulletin->GPC['pagenumber']) . '</select><br /> ' . iif($showprev, ' <input type="submit" class="button" name="prev" value="« ' . $vbphrase['prev'] . '" />') . ' ' . iif($shownext, ' <input type="submit" class="button" name="next" value="' . $vbphrase['next'] . ' »" />') . ' </td> <td class="thead" rowspan="2">' . "\n\t\t\t\t<input type=\"button\" class=\"button\" value=\"" . $vbphrase['view_quickref'] . "\" onclick=\"js_open_phrase_ref({$vbulletin->GPC['dolanguageid']}, '{$vbulletin->GPC['fieldname']}');\" />\n\t\t\t\t<!--<input type=\"button\" class=\"button\" value=\"" . $vbphrase['view_summary'] . "\" onclick=\"window.location='language.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&dolanguageid=" . $vbulletin->GPC['dolanguageid'] . "';\" />-->\n\t\t\t\t<input type=\"button\" class=\"button\" value=\"{$vbphrase['set_default']}\" " . iif($vbulletin->GPC['dolanguageid'] == -1 or $vbulletin->GPC['dolanguageid'] == $vbulletin->options['languageid'], 'disabled="disabled"', "title=\"" . construct_phrase($vbphrase['set_language_as_default_x'], $language['title']) . "\" onclick=\"window.location='language.php?" . $vbulletin->session->vars['sessionurl'] . "do=setdefault&dolanguageid=" . $vbulletin->GPC['dolanguageid'] . "';\"") . " />\n\t\t\t" . '</td> </tr> <tr> <td class="thead">' . $vbphrase['phrase_type'] . ':</td> <td class="thead"><select name="fieldname" onchange="this.form.page.selectedIndex = 0; this.form.submit()" class="bginput">' . construct_select_options($phrasetypeoptions, $vbulletin->GPC['fieldname']) . '</select></td> </tr> '; print_table_footer(); $printers = array(); $i = 0; if ($startat < $numcustom) { for ($i = $startat; $i < $endat and $i < $numcustom; $i++) { $printers["{$i}"] =& $custom_phrases["{$i}"]; } } if ($i < $endat) { if ($i == 0) { $i = $startat; } for ($i; $i < $endat and $i < $totalphrases; $i++) {
/** * Returns a row containing a <select> for use in selecting text alignment * * @param string Item title * @param array Item info array * * @return string */ function construct_text_align_code($title, $item) { global $css, $color, $vbphrase; // this is currently disabled return false; $alignoptions = array('' => '(' . $vbphrase['inherit'] . ')', 'left' => $vbphrase['align_left'], 'center' => $vbphrase['align_center'], 'right' => $vbphrase['align_right'], 'justify' => $vbphrase['justified']); eval("\$value = \$css" . $item . ";"); return "\t\t<tr><td>{$title}</td><td>\n\t<select class=\"{$color}\" name=\"css" . str_replace("['", "[", str_replace("']", "]", $item)) . "\" tabindex=\"1\">\n" . construct_select_options($alignoptions, $value) . "\t</select>\n\t</td></tr>\n"; }
$infraction = array('warning' => 1, 'expires' => 10, 'period' => 'D', 'points' => 1, 'extend' => 0); print_table_header($vbphrase['add_new_user_infraction_level']); } if ($infraction['title']) { print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=infractionlevel&varname={$title}&t=1", 1) . '</dfn>', 'title', $infraction['title']); } else { print_input_row($vbphrase['title'], 'title'); } if ($infraction['infr_user_msg']) { print_textarea_row($vbphrase['rcd_infraction_user_msg'] . '<dfn>' . construct_link_code($vbphrase['translations'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=infractionlevel&varname={$infr_user_msg_id}&t=1", 1) . '</dfn>', 'infr_user_msg', $infraction['infr_user_msg']); } else { print_textarea_row($vbphrase['rcd_infraction_user_msg'], 'infr_user_msg'); } $periods = array('H' => $vbphrase['hours'], 'D' => $vbphrase['days'], 'M' => $vbphrase['months'], 'N' => $vbphrase['never']); $input = '<input type="text" class="bginput" name="expires" size="5" dir="ltr" tabindex="1" value="' . $infraction['expires'] . '"' . ($vbulletin->debug ? ' title="name="expires""' : '') . " />\r\n"; $input .= '<select name="period" class="bginput" tabindex="1"' . ($vbulletin->debug ? ' title="name="period""' : '') . '>' . construct_select_options($periods, $infraction['period']) . '</select>'; print_label_row($vbphrase['expires'], $input, '', 'top', 'expires'); print_input_row($vbphrase['points'], 'points', $infraction['points'], true, 5); print_yes_no_row($vbphrase['warning'], 'warning', $infraction['warning']); print_yes_no_row($vbphrase['extend'], 'extend', $infraction['extend']); print_textarea_row($vbphrase['rcd_infraction_hook_start'], 'hook_start', $infraction['hook_start']); print_textarea_row($vbphrase['rcd_infraction_hook_end'], 'hook_end', $infraction['hook_end']); print_submit_row($vbphrase['save']); } // ###################### Start do update ####################### if ($_POST['do'] == 'updatelevel') { $vbulletin->input->clean_array_gpc('p', array('title' => TYPE_STR, 'points' => TYPE_UINT, 'expires' => TYPE_UINT, 'period' => TYPE_NOHTML, 'warning' => TYPE_BOOL, 'extend' => TYPE_BOOL, 'hook_start' => TYPE_STR, 'hook_end' => TYPE_STR, 'infr_user_msg' => TYPE_STR)); if (empty($vbulletin->GPC['title']) or empty($vbulletin->GPC['expires']) and $vbulletin->GPC['period'] != 'N') { print_stop_message('please_complete_required_fields'); } if (empty($vbulletin->GPC['infractionlevelid'])) {
} if (isset($product['version']) and !empty($product['version'])) { $productversion = ' - ' . htmlspecialchars_uni($product['version']); } $options = array('productedit' => $vbphrase['edit']); if (isset($product['versioncheckurl']) and !empty($product['versioncheckurl'])) { $options['productversioncheck'] = $vbphrase['check_version']; } if ($product['active']) { $options['productdisable'] = $vbphrase['disable']; } else { $options['productenable'] = $vbphrase['enable']; } $options['productexport'] = $vbphrase['export']; $options['productdelete'] = $vbphrase['uninstall']; print_description_row(($product['productid'] != 'vbulletin' ? '<span style="float: right">' . '<select name="s' . $product['productid'] . '" onchange="js_page_jump(\'' . $product['productid'] . '\');" class="bginput">' . construct_select_options($options) . '</select> ' . '<input type="button" class="button" value="' . $vbphrase['go'] . '" onclick="js_page_jump(\'' . $product['productid'] . '\');" />' . '</span>' : '') . '<a href="#" onclick="return toggle_collapse(\'' . $product['productid'] . '\')"><img border="0" style="vertical-align: middle" id="collapseimg_' . $product['productid'] . '" src="../images/buttons/collapse_alt' . $vbcollapse["collapseimg_" . $product['productid']] . '.gif" /></a> ' . $producttitle . $productversion . $productdescription, 0, 4, 'tfoot'); echo '<tbody id="collapseobj_' . $product['productid'] . '" style="' . $vbcollapse['collapseobj_' . $product['productid']] . '">'; $pluginidx = $product['productid'] ? $product['productid'] : 'vbulletin'; if (isset($plugins["{$pluginidx}"])) { foreach ($plugins["{$pluginidx}"] as $plugin) { $plugintitle = htmlspecialchars_uni($plugin['title']); $plugintitle = ($product['active'] and $plugin['active']) ? $plugintitle : '<strike>' . $plugintitle . '</strike>'; // lwe $preview = strip_quotes($plugin['phpcode']); $preview = htmlspecialchars_uni(fetch_trimmed_title($preview, 400)); // / lwe print_cells_row(array("<a href=\"plugin.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&pluginid={$plugin['pluginid']}\" title=\"{$preview}\">{$plugintitle}</a>", $plugin['hookname'], '<input type="checkbox" name="active[' . $plugin['pluginid'] . ']" value="1"' . ($plugin['active'] ? ' checked="checked"' : '') . ' />', construct_link_code($vbphrase['edit'], 'plugin.php?' . $vbulletin->session->vars['sessionurl'] . 'do=edit&pluginid=' . $plugin['pluginid']) . construct_link_code($vbphrase['delete'], 'plugin.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delete&pluginid=' . $plugin['pluginid']))); } } echo '</tbody>'; }
$style_options["{$style['styleid']}"] = $style['title']; $style_options["{$style['styleid']}"] = construct_depth_mark($style['depth'], '--') . ' ' . $style['title']; } // build the list of criteria options $criteria_options = array('in_usergroup_x' => array('<select name="criteria[in_usergroup_x][condition1]" tabindex="1">' . construct_select_options($usergroup_options, empty($criteria_cache['in_usergroup_x']) ? 2 : $criteria_cache['in_usergroup_x']['condition1']) . '</select>'), 'not_in_usergroup_x' => array('<select name="criteria[not_in_usergroup_x][condition1]" tabindex="1">' . construct_select_options($usergroup_options, empty($criteria_cache['not_in_usergroup_x']) ? 6 : $criteria_cache['not_in_usergroup_x']['condition1']) . '</select>'), 'browsing_content_page' => array('<select name="criteria[browsing_content_page][condition1]" tabindex="1"> <option value="1"' . (empty($criteria_cache['browsing_content_page']['condition1']) ? ' selected="selected"' : '') . '>' . $vbphrase['content'] . '</option> <option value="0"' . ($criteria_cache['browsing_content_page']['condition1'] == 0 ? ' selected="selected"' : '') . '>' . $vbphrase['non_content'] . '</option> </select>'), 'browsing_forum_x' => array('<select name="criteria[browsing_forum_x][condition1]" tabindex="1">' . construct_select_options(construct_forum_chooser_options(), $criteria_cache['browsing_forum_x']['condition1']) . '</select>'), 'browsing_forum_x_and_children' => array('<select name="criteria[browsing_forum_x_and_children][condition1]" tabindex="1">' . construct_select_options(construct_forum_chooser_options(), $criteria_cache['browsing_forum_x_and_children']['condition1']) . '</select>'), 'style_is_x' => array('<select name="criteria[style_is_x][condition1]" tabindex="1">' . construct_select_options($style_options, $criteria_cache['style_is_x']['condition1']) . '</select>'), 'no_visit_in_x_days' => array('<input type="text" name="criteria[no_visit_in_x_days][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['no_visit_in_x_days']) ? 30 : intval($criteria_cache['no_visit_in_x_days']['condition1'])) . '" />'), 'no_posts_in_x_days' => array('<input type="text" name="criteria[no_posts_in_x_days][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['no_posts_in_x_days']) ? 30 : intval($criteria_cache['no_posts_in_x_days']['condition1'])) . '" />'), 'has_x_postcount' => array('<input type="text" name="criteria[has_x_postcount][condition1]" size="5" class="bginput" tabindex="1" value="' . $criteria_cache['has_x_postcount']['condition1'] . '" />', '<input type="text" name="criteria[has_x_postcount][condition2]" size="5" class="bginput" tabindex="1" value="' . $criteria_cache['has_x_postcount']['condition2'] . '" />'), 'has_never_posted' => array(), 'has_x_reputation' => array('<input type="text" name="criteria[has_x_reputation][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['has_x_reputation']) ? 100 : $criteria_cache['has_x_reputation']['condition1']) . '" />', '<input type="text" name="criteria[has_x_reputation][condition2]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['has_x_reputation']) ? 200 : $criteria_cache['has_x_reputation']['condition2']) . '" />'), 'pm_storage_x_percent_full' => array('<input type="text" name="criteria[pm_storage_x_percent_full][condition1]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['pm_storage_x_percent_full']) ? 90 : $criteria_cache['pm_storage_x_percent_full']['condition1']) . '" />', '<input type="text" name="criteria[pm_storage_x_percent_full][condition2]" size="5" class="bginput" tabindex="1" value="' . (empty($criteria_cache['pm_storage_x_percent_full']) ? 100 : $criteria_cache['pm_storage_x_percent_full']['condition2']) . '" />'), 'came_from_search_engine' => array(), 'is_date' => array('<input type="text" name="criteria[is_date][condition1]" size="10" class="bginput" tabindex="1" value="' . (empty($criteria_cache['is_date']['condition1']) ? vbdate('d-m-Y', TIMENOW, false, false) : $criteria_cache['is_date']['condition1']) . '" />', '<select name="criteria[is_date][condition2]" tabindex="1"> <option value="0"' . (empty($criteria_cache['is_date']['condition2']) ? ' selected="selected"' : '') . '>' . $vbphrase['user_timezone'] . '</option> <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 (sizeof($ad_name_cache)) { $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']);
<?php print_form_header('subscriptions'); // PHRASE ME print_table_header($vbphrase['payment_api_manager'], 3); print_cells_row(array($vbphrase['title'], $vbphrase['active'], $vbphrase['controls']), 1, 'tcat', 1); $apis = $db->query_read("\n\t\tSELECT * FROM " . TABLE_PREFIX . "paymentapi\n\t"); while ($api = $db->fetch_array($apis)) { $cells = array(); $cells[] = $api['title']; if ($api['active']) { $yesno = 'yes'; } else { $yesno = 'no'; } $cells[] = "<img src=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/cp_tick_{$yesno}.gif\" alt=\"\" />"; $cells[] = "\n\t<select name=\"p{$api['paymentapiid']}\" onchange=\"js_forum_jump({$api['paymentapiid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_forum_jump({$api['paymentapiid']});\" />\n\t"; print_cells_row($cells, 0, '', 1); } print_table_footer(3); } // ###################### Start find ####################### if ($_REQUEST['do'] == 'transdetails') { $vbulletin->input->clean_array_gpc('r', array('paymenttransactionid' => TYPE_UINT)); if (!($payment = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "paymenttransaction WHERE paymenttransactionid = " . $vbulletin->GPC['paymenttransactionid']))) { print_stop_message('no_matches_found'); } $request = unserialize($payment['request']); if (empty($request['GET']) and empty($request['POST'])) { print_stop_message('no_matches_found'); } else { print_form_header('', '');
echo $vbphrase['master_style'] . '";'; foreach ($stylecache as $styleid => $style) { echo "\n\tstyle['{$styleid}'] = \"" . addslashes_js($style['title'], '"') . "\";"; $styleoptions["{$styleid}"] = construct_depth_mark($style['depth'], '--', iif($vbulletin->debug, '--', '')) . ' ' . $style['title']; } echo "\n"; ?> // --> </script> <?php print_form_header('template', 'download', 0, 1, 'downloadform" target="download'); print_table_header($vbphrase['download']); print_label_row($vbphrase['style'], ' <select name="dostyleid" onchange="js_fetch_style_title();" tabindex="1" class="bginput"> ' . iif($vbulletin->debug, '<option value="-1">' . $vbphrase['master_style'] . '</option>') . ' ' . construct_select_options($styleoptions, $vbulletin->GPC['dostyleid']) . ' </select> ', '', 'top', 'dostyleid'); print_select_row($vbphrase['product'], 'product', fetch_product_list()); print_input_row($vbphrase['title'], 'title'); print_input_row($vbphrase['filename'], 'filename', 'vbulletin-style.xml'); print_label_row($vbphrase['options'], ' <span class="smallfont"> <label for="rb_mode_0"><input type="radio" name="mode" value="0" id="rb_mode_0" tabindex="1" checked="checked" />' . $vbphrase['get_customizations_from_this_style_only'] . '</label><br /> <label for="rb_mode_1"><input type="radio" name="mode" value="1" id="rb_mode_1" tabindex="1" />' . $vbphrase['get_customizations_from_parent_styles'] . '</label> </span> ', '', 'top', 'mode'); print_submit_row($vbphrase['download']); print_form_header('template', 'upload', 1, 1, 'uploadform" onsubmit="return js_confirm_upload(this, this.stylefile);'); print_table_header($vbphrase['import_style_xml_file']); print_upload_row($vbphrase['upload_xml_file'], 'stylefile', 999999999);
$holidayinfo = array('allowsmilies' => 1); $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'])) {
$options['productdisable'] = $vbphrase['disable']; } else { $options['productenable'] = $vbphrase['enable']; } $options['productexport'] = $vbphrase['export']; $options['productdelete'] = $vbphrase['uninstall']; $safeid = preg_replace('#[^a-z0-9_]#', '', $product['productid']); if (file_exists(DIR . '/includes/version_' . $safeid . '.php')) { include_once DIR . '/includes/version_' . $safeid . '.php'; } $define_name = 'FILE_VERSION_' . strtoupper($safeid); if (defined($define_name) and constant($define_name) !== '') { $product['version'] = constant($define_name); } $i++; print_cells_row(array($title, htmlspecialchars_uni($product['version']), htmlspecialchars_uni($product['description']), "<div align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\">\r\n\t\t\t\t<select name=\"s{$product['productid']}\" id=\"prodsel{$i}\" onchange=\"js_page_jump({$i}, '{$product['productid']}')\" class=\"bginput\">\r\n\t\t\t\t\t" . construct_select_options($options) . "\r\n\t\t\t\t</select> <input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_page_jump({$i}, '{$product['productid']}');\" />\r\n\t\t\t</div>"), false, '', -2); } print_table_footer(); echo '<p align="center">' . construct_link_code($vbphrase['add_import_product'], "plugin.php?" . $vbulletin->session->vars['sessionurl'] . "do=productadd") . '</p>'; } // ############################################################################# if ($_REQUEST['do'] == 'productversioncheck') { $vbulletin->input->clean_array_gpc('r', array('productid' => TYPE_STR)); $product = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "product\r\n\t\tWHERE productid = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t"); if (!$product or empty($product['versioncheckurl'])) { print_stop_message('invalid_product_specified'); } $version_url = @parse_url($product['versioncheckurl']); if (!$version_url) { print_stop_message('invalid_version_check_url_specified'); }
do=removeanswer&answerid=" + aid + "&questionid=" + qid; break; default: return false; break; } } </script> <?php $answers = $db->query_read_slave("\r\n\t\t\tSELECT answer, answerid, questionid\r\n\t\t\tFROM " . TABLE_PREFIX . "hvanswer AS answer\r\n\t\t\tWHERE questionid = " . $vbulletin->GPC['questionid'] . "\r\n\t\t\tORDER BY dateline\r\n\t\t"); print_form_header('verify', 'modifyanswer'); print_table_header($vbphrase['answers'], 2); construct_hidden_code('questionid', $vbulletin->GPC['questionid']); if ($db->num_rows($answers)) { print_cells_row(array($vbphrase['answer'], $vbphrase['controls']), 1); } $options = array('modifyanswer' => $vbphrase['edit'], 'killanswer' => $vbphrase['delete']); while ($answer = $db->fetch_array($answers)) { print_cells_row(array($answer['answer'], "\n\t<select name=\"a{$answer['answerid']}\" onchange=\"js_jump({$answer['answerid']}, {$answer['questionid']}, this);\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_jump({$answer['answerid']}, {$answer['questionid']}, this.form.a{$answer['answerid']});\" />\n\t")); } print_submit_row($vbphrase['add_new_answer'], 0, 2); } } // ###################### Save Question ####################### if ($_POST['do'] == 'updatequestion') { $vbulletin->input->clean_array_gpc('p', array('question' => TYPE_STR, 'regex' => TYPE_STR)); if (empty($vbulletin->GPC['question'])) { print_stop_message('please_complete_required_fields'); } if (empty($vbulletin->GPC['questionid'])) { $db->query_write("\r\n\t\t\tINSERT INTO " . TABLE_PREFIX . "hvquestion\r\n\t\t\t\t(regex, dateline)\r\n\t\t\tVALUES\r\n\t\t\t\t('" . $vbulletin->db->escape_string($vbulletin->GPC['regex']) . "', " . TIMENOW . ")\r\n\t\t"); $vbulletin->GPC['questionid'] = $db->insert_id(); } else { $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "hvquestion\r\n\t\t\tSET regex = '" . $db->escape_string($vbulletin->GPC['regex']) . "'\r\n\t\t\tWHERE questionid = " . $vbulletin->GPC['questionid']);
{ case 'edit': window.location = "usertitle.php?<?php echo vB::getCurrentSession()->get('sessionurl_js'); ?> do=edit&usertitleid=" + usertitleid; break; case 'kill': window.location = "usertitle.php?<?php echo vB::getCurrentSession()->get('sessionurl_js'); ?> do=remove&usertitleid=" + usertitleid; break; default: return false; break; } } </script> <?php $options = array('edit' => $vbphrase['edit'], 'kill' => $vbphrase['delete']); print_form_header('usertitle', 'add'); print_table_header($vbphrase['user_title_manager_gcpuser'], 3); print_description_row('<p>' . construct_phrase($vbphrase['it_is_recommended_that_you_update_user_titles'], vB::getCurrentSession()->get('sessionurl')) . '</p>', 0, 3); print_cells_row(array($vbphrase['user_title_guser'], $vbphrase['minimum_posts'], $vbphrase['controls']), 1); foreach ($usertitles as $usertitle) { print_cells_row(array('<b>' . $usertitle['title'] . '</b>', $usertitle['minposts'], "\n\t<select name=\"u{$usertitle['usertitleid']}\" onchange=\"js_usergroup_jump({$usertitle['usertitleid']}, this);\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$usertitle['usertitleid']}, this.form.u{$usertitle['usertitleid']});\" />\n\t")); } print_submit_row($vbphrase['add_new_user_title_gcpuser'], 0, 3); } print_cp_footer(); /*=========================================================================*\ || ####################################################################### || # Downloaded: 15:45, Tue Sep 8th 2015 || # CVS: $RCSfile$ - $Revision: 83432 $ || ####################################################################### \*=========================================================================*/
foreach ($crons as $cron) { $options = array('edit' => $vbphrase['edit'], 'switchactive' => $cron['effective_active'] ? $vbphrase['disable'] : $vbphrase['enable']); if (!$cron['volatile'] or $vb5_config['Misc']['debug']) { $options['kill'] = $vbphrase['delete']; } $item_title = htmlspecialchars_uni($vbphrase['task_' . $cron['varname'] . '_title']); if (isset($vbphrase['task_' . $cron['varname'] . '_title'])) { $item_title = htmlspecialchars_uni($vbphrase['task_' . $cron['varname'] . '_title']); } else { $item_title = $cron['varname']; } if (!$cron['effective_active']) { $item_title = "<strike>{$item_title}</strike>"; } $item_desc = htmlspecialchars_uni($vbphrase['task_' . $cron['varname'] . '_desc']); $timerule = fetch_cron_timerule($cron); // this will happen in the future which the yestoday setting doesn't handle when its in the detailed mode $future = ($cron['nextrun'] > TIMENOW and $vbulletin->options['yestoday'] == 2); $cell = array("<input type=\"checkbox\" name=\"enabled[{$cron['varname']}]\" value=\"1\" title=\"{$vbphrase['enabled']}\" id=\"cb_enabled_{$cron['varname']}\" tabindex=\"1\"" . ($cron['active'] ? ' checked="checked"' : '') . " />", $timerule['minute'], $timerule['hour'], $timerule['day'], $timerule['month'], $timerule['weekday'], "<label for=\"cb_enabled_{$cron['varname']}\"><strong>{$item_title}</strong><br /><span class=\"smallfont\">{$item_desc}</span></label>", '<div style="white-space:nowrap">' . ($cron['effective_active'] ? vbdate($vbulletin->options['dateformat'], $cron['nextrun'], true and !$future) . (($vbulletin->options['yestoday'] != 2 or $future) ? '<br />' . vbdate($vbulletin->options['timeformat'], $cron['nextrun']) : '') : $vbphrase['n_a']) . '</div>', "\n\t<select name=\"c{$cron['cronid']}\" onchange=\"js_cron_jump({$cron['cronid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select><input type=\"button\" class=\"button\" value=\"{$vbphrase['go']}\" onclick=\"js_cron_jump({$cron['cronid']});\" />\n\t" . "\n\t<input type=\"button\" class=\"button\" value=\"{$vbphrase['run_now']}\" onclick=\"js_run_cron({$cron['cronid']});\" />"); print_cells_row($cell, 0, '', -6); } print_description_row("<div class=\"smallfont\" align=\"center\">{$vbphrase['all_times_are_gmt_x_time_now_is_y']}</div>", 0, 9, 'thead'); print_submit_row($vbphrase['save_enabled_status'], 0, 9, '', "<input type=\"button\" class=\"button\" value=\"{$vbphrase['add_new_scheduled_task_gcron']}\" tabindex=\"1\" onclick=\"window.location='cronadmin.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit'\" />"); } print_cp_footer(); /*=========================================================================*\ || ####################################################################### || # Downloaded: 15:45, Tue Sep 8th 2015 || # CVS: $RCSfile$ - $Revision: 83432 $ || ####################################################################### \*=========================================================================*/