function print_move_prune_rows($permcheck = '') { global $vbphrase; print_description_row($vbphrase['date_options'], 0, 2, 'thead', 'center'); print_input_row($vbphrase['original_post_date_is_at_least_xx_days_ago'], 'thread[originaldaysolder]', 0, 1, 5); print_input_row($vbphrase['original_post_date_is_at_most_xx_days_ago'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '0') . '</dfn>', 'thread[originaldaysnewer]', 0, 1, 5); print_input_row($vbphrase['last_post_date_is_at_least_xx_days_ago'], 'thread[lastdaysolder]', 0, 1, 5); print_input_row($vbphrase['last_post_date_is_at_most_xx_days_ago'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '0') . '</dfn>', 'thread[lastdaysnewer]', 0, 1, 5); print_description_row($vbphrase['view_options'], 0, 2, 'thead', 'center'); print_input_row($vbphrase['thread_has_at_least_xx_replies'], 'thread[repliesleast]', 0, 1, 5); print_input_row($vbphrase['thread_has_at_most_xx_replies'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '-1') . '</dfn>', 'thread[repliesmost]', -1, 1, 5); print_input_row($vbphrase['thread_has_at_least_xx_views'], 'thread[viewsleast]', 0, 1, 5); print_input_row($vbphrase['thread_has_at_most_xx_views'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '-1') . '</dfn>', 'thread[viewsmost]', -1, 1, 5); print_description_row($vbphrase['status_options'], 0, 2, 'thead', 'center'); print_yes_no_other_row($vbphrase['thread_is_sticky'], 'thread[issticky]', $vbphrase['either'], 0); $state = array('visible' => $vbphrase['visible'], 'moderation' => $vbphrase['awaiting_moderation'], 'deleted' => $vbphrase['deleted'], 'any' => $vbphrase['any']); print_radio_row($vbphrase['thread_state'], 'thread[state]', $state, 'any'); $status = array('open' => $vbphrase['open'], 'closed' => $vbphrase['closed'], 'redirect' => $vbphrase['redirect'], 'not_redirect' => $vbphrase['not_redirect'], 'any' => $vbphrase['any']); print_radio_row($vbphrase['thread_status'], 'thread[status]', $status, 'not_redirect'); print_description_row($vbphrase['other_options'], 0, 2, 'thead', 'center'); print_input_row($vbphrase['username'], 'thread[posteduser]'); print_input_row($vbphrase['title'], 'thread[titlecontains]'); print_moderator_forum_chooser('thread[forumid]', -1, $vbphrase['all_forums'], $vbphrase['forum'], true, false, true, $permcheck); print_yes_no_row($vbphrase['include_child_forums'], 'thread[subforums]'); if ($prefix_options = construct_prefix_options(0, '', true, true)) { print_label_row($vbphrase['prefix'], '<select name="thread[prefixid]" class="bginput">' . $prefix_options . '</select>', '', 'top', 'prefixid'); } }
function print_statistic_code($title, $name, $start, $end, $nullvalue = true, $scope = 'daily', $sort = 'date_desc') { global $vbphrase; print_form_header('stats', $name); print_table_header($title); print_time_row($vbphrase['start_date'], 'start', $start, false); print_time_row($vbphrase['end_date'], 'end', $end, false); if ($name != 'activity') { print_select_row($vbphrase['scope'], 'scope', array('daily' => $vbphrase['daily'], 'weekly' => $vbphrase['weekly'], 'monthly' => $vbphrase['monthly']), $scope); } else { construct_hidden_code('scope', 'daily'); } print_select_row($vbphrase['order_by'], 'sort', array( 'date_asc' => $vbphrase['date_ascending'], 'date_desc' => $vbphrase['date_descending'], 'total_asc' => $vbphrase['total_ascending'], 'total_desc' => $vbphrase['total_descending'], ), $sort); print_yes_no_row($vbphrase['include_empty_results'], 'nullvalue', $nullvalue); print_submit_row($vbphrase['go']); }
function print_channel_permission_rows($customword, $channelpermission = array(), $extra = '') { global $vbphrase; print_label_row("<b>{$customword}</b>", ' <input type="button" class="button" value="' . $vbphrase['all_yes'] . '" onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 1);' . iif($extra != '', ' }') . '" class="button" /> <input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 0);' . iif($extra != '', ' }') . '" class="button" /> <!--<input type="submit" class="button" value="Okay" class="button" />--> ', 'tcat', 'middle'); // Load permissions require_once DIR . '/includes/class_bitfield_builder.php'; $bitvalues = array('forumpermissions', 'forumpermissions2', 'moderatorpermissions', 'createpermissions'); $permFields = vB_ChannelPermission::fetchPermFields(); $permPhrases = vB_ChannelPermission::fetchPermPhrases(); if (empty($channelpermission)) { // we need the defaults to be displayed $channelpermission = vB_ChannelPermission::instance()->fetchPermissions(1); $channelpermission = current($channelpermission); } foreach ($permFields as $permField => $type) { //Do the non-bitmap fields first. switch ($type) { case vB_ChannelPermission::TYPE_HOURS: case vB_ChannelPermission::TYPE_COUNT: $permvalue = $channelpermission[$permField]; print_input_row($vbphrase[$permPhrases[$permField]], $permField, $permvalue, true, 35, 0, '', false, 'channelPerm_' . $permField); break; case vB_ChannelPermission::TYPE_BOOL: $permvalue =& $channelpermission[$permField]; print_yes_no_row($vbphrase[$permPhrases[$permField]], $permField, $permvalue, $extra); break; } } //now do the bitmaps foreach ($permFields as $permField => $type) { if ($type == vB_ChannelPermission::TYPE_BITMAP) { if ($permField !== 'forumpermissions2') { print_table_header($vbphrase[$permPhrases[$permField]]); } foreach ($channelpermission['bitfields'][$permField] as $permBit) { if ($permBit['used']) { if (empty($permBit['phrase']) and $permField == 'moderatorpermissions') { $permBit['phrase'] = "moderator_add_edit_" . $permBit['name'] . "_title"; } if ($permField == 'moderatorpermissions' and $permBit['name'] == 'canopenclose') { $helpOptions = array('prefix' => $permField); } else { $helpOptions = array(); } print_yes_no_row(isset($vbphrase[$permBit['phrase']]) ? $vbphrase[$permBit['phrase']] : $permBit['phrase'], $permField . '[' . $permBit['name'] . ']', $permBit['set'], $extra, $helpOptions); } } } } // Legacy Hook 'admin_nperms_form' Removed // }
} // ###################### Start add ####################### if ($_REQUEST['do'] == 'editgroup') { print_form_header('admininfraction', 'updategroup'); if (!empty($vbulletin->GPC['infractiongroupid'])) { $infraction = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "infractiongroup WHERE infractiongroupid = " . $vbulletin->GPC['infractiongroupid']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['infraction_group'], '', $vbulletin->GPC['infractiongroupid']), 2, 0); construct_hidden_code('infractiongroupid', $vbulletin->GPC['infractiongroupid']); } else { $infraction = array('override' => 1); print_table_header($vbphrase['add_new_user_infraction_group']); } print_input_row($vbphrase['points'], 'pointlevel', $infraction['pointlevel'], true, 5); print_chooser_row($vbphrase['primary_usergroup'], 'usergroupid', 'usergroup', $infraction['usergroupid'], '-- ' . $vbphrase['all_usergroups'] . ' --'); print_chooser_row($vbphrase['override_with_permissions'], 'orusergroupid', 'usergroup', $infraction['orusergroupid']); print_yes_no_row($vbphrase['override_display'], 'override', $infraction['override']); print_submit_row($vbphrase['save']); } // ###################### Start do update ####################### if ($_POST['do'] == 'updategroup') { $vbulletin->input->clean_array_gpc('p', array('pointlevel' => TYPE_UINT, 'usergroupid' => TYPE_INT, 'orusergroupid' => TYPE_UINT, 'override' => TYPE_BOOL)); if (empty($vbulletin->GPC['pointlevel'])) { print_stop_message('please_complete_required_fields'); } if ($db->query_first("\n\t\tSELECT infractiongroupid\n\t\tFROM " . TABLE_PREFIX . "infractiongroup\n\t\tWHERE\n\t\t\t" . ($vbulletin->GPC['usergroupid'] == -1 ? "" : "usergroupid IN (-1," . $vbulletin->GPC['usergroupid'] . ") AND") . "\n\t\t\tpointlevel = " . $vbulletin->GPC['pointlevel'] . "\n\t\t\t" . ($vbulletin->GPC['infractiongroupid'] ? "AND infractiongroupid <> " . $vbulletin->GPC['infractiongroupid'] : ""))) { print_stop_message('invalid_infraction_usergroup'); } if (empty($vbulletin->GPC['infractiongroupid'])) { $db->query_write("INSERT INTO " . TABLE_PREFIX . "infractiongroup (pointlevel) VALUES (0)"); $vbulletin->GPC['infractiongroupid'] = $db->insert_id(); }
for (var i = 0; i < els.length; i++) { els[i].checked = toggle.checked; } } // --> </script> <?php print_form_header('prefix', 'savepermissions'); print_table_header($vbphrase['edit_thread_prefix_permissions']); construct_hidden_code('prefixids', sign_client_string(serialize($prefixids))); construct_hidden_code('shownusergroups', sign_client_string(serialize(array_keys($vbulletin->usergroupcache)))); print_description_row(construct_phrase($vbphrase['editing_permissions_for_x'], implode(', ', $prefix_html))); if (count(array_unique($prefixdefaults)) <= 1) { print_yes_no_row($vbphrase['allow_new_groups_to_use_selected_prefixes'], 'default', $prefixdefaults[0]); } else { $conflict_options_default = array('-1' => $vbphrase['leave_default_permissions_unchanged'], '0' => $vbphrase['new_groups_may_use_selected_prefixes'], '1' => $vbphrase['new_groups_may_not_use_selected_prefixes']); print_label_row($vbphrase['allow_new_groups_to_use_selected_prefixes'], "<label for=\"sel_ug{$usergroupid}\" class=\"smallfont\">" . $vbphrase['set_default_permissions'] . ": <select name=\"conflict[{$usergroupid}]\" id=\"sel_ug{$usergroupid}\">" . construct_select_options($conflict_options_default, '-1') . "</select>"); } print_description_row('<label for="cb_allbox"><input type="checkbox" name="allbox" id="cb_allbox" onclick="check_all_checkable(this)"' . (empty($usergroupperms) ? ' checked="checked"' : '') . " />{$vbphrase['check_uncheck_all']}</label>", false, 2, 'thead'); foreach ($vbulletin->usergroupcache as $usergroupid => $usergroup) { if (in_array($usergroupid, $conflicts)) { print_label_row("<label for=\"cb_ug{$usergroupid}\"><input type=\"checkbox\" disabled=\"disabled\" id=\"cb_ug{$usergroupid}\" />{$usergroup['title']}</label>", "<label for=\"sel_ug{$usergroupid}\" class=\"smallfont\">" . $vbphrase['resolve_permission_conflict'] . ": <select name=\"conflict[{$usergroupid}]\" id=\"sel_ug{$usergroupid}\">" . construct_select_options($conflict_options, 0) . "</select>"); } else { print_description_row("<label for=\"cb_ug{$usergroupid}\"><input type=\"checkbox\" name=\"usergroup[{$usergroupid}]\" id=\"cb_ug{$usergroupid}\" class=\"checkable\"" . (empty($usergroupperms["{$usergroupid}"]) ? ' checked="checked"' : '') . " />{$usergroup['title']}</label>"); } } print_submit_row(); } // ########################################################################
$admindm->set('cssprefs', $vbulletin->GPC['cssprefs']); $admindm->set('dismissednews', $vbulletin->GPC['dismissednews']); $admindm->save(); define('CP_REDIRECT', "adminpermissions.php?" . $vbulletin->session->vars['sessionurl'] . "#user{$user['userid']}"); print_stop_message('saved_administrator_permissions_successfully'); } // ############################################################################# if ($_REQUEST['do'] == 'edit') { echo "<p align=\"center\">{$vbphrase['give_admin_access_arbitrary_html']}</p>"; print_form_header('adminpermissions', 'update'); construct_hidden_code('userid', $vbulletin->GPC['userid']); construct_hidden_code('oldpermissions', $user['adminpermissions']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['administrator_permissions'], $user['username'], $user['userid'])); print_label_row("{$vbphrase['administrator']}: <a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u=" . $vbulletin->GPC['userid'] . "\">{$user['username']}</a>", '<div align="' . $stylevar['right'] . '"><input type="button" class="button" value=" ' . $vbphrase['all_yes'] . ' " onclick="js_check_all_option(this.form, 1);" /> <input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="js_check_all_option(this.form, 0);" /></div>', 'thead'); foreach (convert_bits_to_array($user['adminpermissions'], $ADMINPERMISSIONS) as $field => $value) { print_yes_no_row($permsphrase["{$field}"] == '' ? $vbphrase['n_a'] : $permsphrase["{$field}"], "adminpermissions[{$field}]", $value); } ($hook = vBulletinHook::fetch_hook('admin_permissions_form')) ? eval($hook) : false; print_select_row($vbphrase['control_panel_style_choice'], 'cssprefs', array_merge(array('' => "({$vbphrase['default']})"), fetch_cpcss_options()), $user['cssprefs']); print_input_row($vbphrase['dismissed_news_item_ids'], 'dismissednews', $user['dismissednews']); print_submit_row(); } // ############################################################################# if ($_REQUEST['do'] == 'modify') { print_form_header('adminpermissions', 'edit'); print_table_header($vbphrase['administrator_permissions'], 3); $users = $db->query_read("\n\t\tSELECT user.username, usergroupid, membergroupids, infractiongroupids, administrator.*\n\t\tFROM " . TABLE_PREFIX . "administrator AS administrator\n\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\tORDER BY user.username\n\t"); while ($user = $db->fetch_array($users)) { $perms = fetch_permissions(0, $user['userid'], $user); if ($perms['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) { print_cells_row(array("<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}\" name=\"user{$user['userid']}\"><b>{$user['username']}</b></a>", '-', construct_link_code($vbphrase['view_control_panel_log'], "adminlog.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&script=&u={$user['userid']}") . construct_link_code($vbphrase['edit_permissions'], "adminpermissions.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}")), 0, '', 0);
$criteria_options['ad_x_not_displayed'] = array('<select name="criteria[ad_x_not_displayed][condition1]" tabindex="1">' . construct_select_options($ad_name_cache, $criteria_cache['ad_x_not_displayed']['condition1']) . '</select>'); } // hook to allow third-party additions of criteria ($hook = vBulletinHook::fetch_hook('ads_list_criteria')) ? eval($hook) : false; // build the editor form print_form_header('ad', 'update'); construct_hidden_code('adid', $vbulletin->GPC['adid']); if ($vbulletin->GPC['ad_location_orig']) { construct_hidden_code('ad_location_orig', $vbulletin->GPC['ad_location_orig']); } print_table_header($table_title); print_input_row($vbphrase['title'] . '<dfn>' . $vbphrase['ad_title_description'] . '</dfn>', 'title', $ad['title'], 0, 60); print_select_row($vbphrase['ad_location'] . '<dfn>' . $vbphrase['ad_location_description'] . '</dfn>', 'ad_location', $location_options, $vbulletin->GPC['ad_location'] ? $vbulletin->GPC['ad_location'] : $ad['adlocation']); print_textarea_row($vbphrase['ad_html'] . '<dfn>' . $vbphrase['ad_html_description'] . '</dfn>', 'ad_html', $ad['html'] ? $ad['html'] : $ad['snippet'], 8, 60, true, false); print_input_row($vbphrase['display_order'], 'displayorder', $ad['displayorder'], 0, 10); print_yes_no_row($vbphrase['active'] . '<dfn>' . $vbphrase['ad_active_description'] . '</dfn>', 'active', $ad['active']); print_description_row('<strong>' . $vbphrase['display_ad_if_elipsis'] . '</strong>', false, 2, 'tcat', '', 'criteria'); if ($display_active_criteria_first) { function print_ad_criterion($criteria_option_id, &$criteria_options, $criteria_cache) { global $vbphrase; $criteria_option = $criteria_options["{$criteria_option_id}"]; print_description_row("<label><input type=\"checkbox\" id=\"cb_{$criteria_option_id}\" tabindex=\"1\" name=\"criteria[{$criteria_option_id}][active]\" title=\"{$vbphrase['criterion_is_active']}\" value=\"1\"" . (empty($criteria_cache["{$criteria_option_id}"]) ? '' : ' checked="checked"') . " />" . "<span id=\"span_{$criteria_option_id}\">" . construct_phrase($vbphrase[$criteria_option_id . '_criteria'], $criteria_option[0], $criteria_option[1], $criteria_option[2]) . '</span></label>'); unset($criteria_options["{$criteria_option_id}"]); } foreach (array_keys($criteria_cache) as $id) { print_ad_criterion($id, $criteria_options, $criteria_cache); } foreach ($criteria_options as $id => $criteria_option) { print_ad_criterion($id, $criteria_options, $criteria_cache); }
print_stop_message('invalid_nntp_plugin_specified'); } // load existing group $group_id = $vbulletin->GPC['group_id']; $nntp_group->get_group($group_id); print_form_header($this_script, 'set_group_settings'); construct_hidden_code('plugin', $vbulletin->GPC['plugin']); construct_hidden_code('group_id', $nntp_group->get_group_id()); print_table_header($vbphrase['nntp_set_group'], 2); print_input_row($vbphrase['nntp_group_name'], 'group_name', $nntp_group->get_group_name()); ($hook = vBulletinHook::fetch_hook('nntp_gate_group_settings')) ? eval($hook) : false; $is_active = $nntp_group->get_is_active(); if (is_null($is_active) || $is_active) { $is_active = 'yes'; } print_yes_no_row($vbphrase['nntp_group_is_active'], 'is_active', 'yes' == $is_active); print_submit_row($vbphrase['save'], '', 2, $vbphrase['no']); } // ###################### Start Remove ################################### if ($_REQUEST['do'] == 'remove_group') { // check for there is no groups mapped to this one // admincp_check_for_mapped_groups( $vbulletin->GPC['group_id'] ); print_form_header($this_script, 'kill_group'); construct_hidden_code('group_id', $vbulletin->GPC['group_id']); print_table_header($vbphrase['confirm_deletion']); print_description_row($vbphrase['nntp_are_you_sure_you_want_to_delete_this_group']); print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']); } // ###################### Start Kill ##################################### if ($_REQUEST['do'] == 'kill_group') { $group_id = $vbulletin->GPC['group_id'];
print_table_footer(7); } } } // ###################### Edit an attachment #################### if ($_REQUEST['do'] == 'edit') { $vbulletin->input->clean_array_gpc('r', array('attachmentid' => TYPE_UINT)); if (!($attachment = $db->query_first("\n\t\tSELECT\n\t\t\tattachmentid, filename, state, counter\n\t\tFROM " . TABLE_PREFIX . "attachment AS attachment\n\t\tWHERE\n\t\t\tattachment.attachmentid = " . $vbulletin->GPC['attachmentid'] . "\n\t"))) { print_stop_message('no_matches_found'); } print_form_header('attachment', 'doedit', true); construct_hidden_code('attachmentid', $vbulletin->GPC['attachmentid']); print_table_header($vbphrase['edit_attachment']); print_input_row($vbphrase['filename'], 'a_filename', htmlspecialchars_uni($attachment['filename'], false), false); print_input_row($vbphrase['views'], 'a_counter', $attachment['counter']); print_yes_no_row($vbphrase['visible'], 'a_visible', $attachment['state'] == 'visible' ? 1 : 0); print_submit_row($vbphrase['save']); /* print_table_break(); print_table_header($vbphrase['replace_attachment']); print_upload_row($vbphrase['please_select_a_file_to_attach'], 'upload', 99999999); print_input_row($vbphrase['or_enter_a_full_url_to_a_file'], 'url'); print_yes_no_row($vbphrase['visible'], 'newvisible', true); print_submit_row($vbphrase['save']); */ } // ###################### Edit an attachment #################### if ($_POST['do'] == 'doedit') { $vbulletin->input->clean_array_gpc('p', array('attachmentid' => TYPE_UINT, 'a_filename' => TYPE_STR, 'a_counter' => TYPE_UINT, 'a_visible' => TYPE_BOOL, 'newvisible' => TYPE_BOOL, 'url' => TYPE_STR)); if (!($attachment = $db->query_first("\n\t\tSELECT\n\t\t\tattachmentid, attachment.userid\n\t\tFROM " . TABLE_PREFIX . "attachment AS attachment\n\t\tWHERE\n\t\t\tattachment.attachmentid = " . $vbulletin->GPC['attachmentid'] . "\n\t"))) { print_stop_message('no_matches_found');
$_bbcode['bbcodereplacement'] = str_replace('%%', '%', $_bbcode['bbcodereplacement']); print_form_header('bbcode', 'doupdate'); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['bb_code'], $_bbcode['bbcodetag'], $_bbcode['bbcodeid']), 2, 0); construct_hidden_code('bbcodeid', $vbulletin->GPC['bbcodeid']); print_input_row($vbphrase['title'], 'title', $_bbcode['title']); print_input_row($vbphrase['bb_code_tag_name'], 'bbcodetag', $_bbcode['bbcodetag']); print_textarea_row($vbphrase['replacement'], 'bbcodereplacement', $_bbcode['bbcodereplacement'], 5, 60); print_input_row($vbphrase['example'], 'bbcodeexample', $_bbcode['bbcodeexample']); print_textarea_row($vbphrase['description'], 'bbcodeexplanation', $_bbcode['bbcodeexplanation'], 10, 60); print_yes_no_row($vbphrase['use_option'], 'twoparams', $_bbcode['twoparams']); print_input_row($vbphrase['button_image_desc'], 'buttonimage', $_bbcode['buttonimage']); print_yes_no_row($vbphrase['remove_tag_if_empty'], 'options[strip_empty]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['strip_empty'] ? 1 : 0); print_yes_no_row($vbphrase['disable_bbcode_in_bbcode'], 'options[stop_parse]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['stop_parse'] ? 1 : 0); print_yes_no_row($vbphrase['disable_smilies_in_bbcode'], 'options[disable_smilies]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['disable_smilies'] ? 1 : 0); print_yes_no_row($vbphrase['disable_wordwrap_in_bbcode'], 'options[disable_wordwrap]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['disable_wordwrap'] ? 1 : 0); print_yes_no_row($vbphrase['disable_urlconversion_in_bbcode'], 'options[disable_urlconversion]', intval($_bbcode['options']) & $vbulletin->bf_misc['bbcodeoptions']['disable_urlconversion'] ? 1 : 0); print_submit_row($vbphrase['save']); print_form_header('', ''); print_description_row('<span class="smallfont">' . $vbphrase['bb_code_explanations'] . '</span>'); print_table_footer(); } // ##################################### UPDATE #################################### if ($_POST['do'] == 'doupdate') { $vbulletin->input->clean_array_gpc('p', array('bbcodeid' => TYPE_INT, 'title' => TYPE_STR, 'bbcodetag' => TYPE_STR, 'bbcodereplacement' => TYPE_STR, 'bbcodeexample' => TYPE_STR, 'bbcodeexplanation' => TYPE_STR, 'twoparams' => TYPE_BOOL, 'buttonimage' => TYPE_STR, 'options' => TYPE_ARRAY_BOOL)); if (!$vbulletin->GPC['bbcodetag'] or !$vbulletin->GPC['bbcodereplacement']) { print_stop_message('please_complete_required_fields'); } if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "bbcode WHERE (bbcodetag = '" . $db->escape_string($vbulletin->GPC['bbcodetag']) . "' AND twoparams = " . $vbulletin->GPC['twoparams'] . ") AND bbcodeid <> " . $vbulletin->GPC['bbcodeid'])) { print_stop_message('there_is_already_bb_code_named_x', htmlspecialchars_uni($vbulletin->GPC['bbcodetag'])); } else { // fetch all tags, and make sure we can't redefine an existing, built-in code
// ###################### Start modify Signature Pic ########### if ($_REQUEST['do'] == 'sigpic') { $userinfo = vB_User::fetchUserinfo($vbulletin->GPC['userid'], array(vB_Api_User::USERINFO_SIGNPIC)); if (!$userinfo) { print_stop_message2('invalid_user_specified'); } if ($userinfo['sigpicwidth'] and $userinfo['sigpicheight']) { $size = " width=\"{$userinfo['sigpicwidth']}\" height=\"{$userinfo['sigpicheight']}\" "; } print_form_header('usertools', 'updatesigpic', 1); construct_hidden_code('userid', $userinfo['userid']); print_table_header($vbphrase['change_signature_picture'] . ": <span class=\"normal\">{$userinfo['username']}</span>"); if ($userinfo['sigpic']) { $userinfo['sigpicurl'] = vB::getDatastore()->getOption('frontendurl') . '/filedata/fetch?filedataid=' . $userinfo['sigpicfiledataid'] . '&sigpic=1'; print_description_row("<div align=\"center\"><img src=\"{$userinfo['sigpicurl']}\" {$size} alt=\"\" title=\"" . construct_phrase($vbphrase['xs_picture'], $userinfo['username']) . "\" /></div>"); print_yes_no_row($vbphrase['use_signature_picture'], 'usesigpic', 1); } else { construct_hidden_code('usesigpic', 1); } // TODO: Doesn't work yet for vB5 // cache_permissions($userinfo, false); // if ($userinfo['permissions']['signaturepermissions'] & $vbulletin->bf_ugp_signaturepermissions['cansigpic'] AND ($userinfo['permissions']['sigpicmaxwidth'] > 0 OR $userinfo['permissions']['sigpicmaxheight'] > 0)) // { // print_yes_no_row($vbphrase['resize_image_to_users_maximum_allowed_size'], 'resize'); // } print_input_row($vbphrase['enter_image_url_gcpuser'], 'sigpicurl', 'http://www.'); print_upload_row($vbphrase['upload_image_from_computer'], 'upload'); print_submit_row($vbphrase['save']); } // ###################### Start Update Profile Pic ################ if ($_POST['do'] == 'updatesigpic') {
} else { $ranks = array('ranklevel' => 1, 'usergroupid' => -1, 'minposts' => 10, 'rankimg' => 'images/'); print_form_header('ranks', 'insert'); } if ($ranks['type']) { $ranktext = $ranks['rankimg']; } else { $rankimg = $ranks['rankimg']; } $displaytype = array($vbphrase['always'], $vbphrase['if_displaygroup_equals_this_group']); construct_hidden_code('rankid', $vbulletin->GPC['rankid']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['user_rank'], '', $vbulletin->GPC['rankid'])); print_input_row($vbphrase['times_to_repeat_rank'], 'ranklevel', $ranks['ranklevel']); print_chooser_row($vbphrase['usergroup'], 'usergroupid', 'usergroup', $ranks['usergroupid'], $vbphrase['all_usergroups']); print_input_row($vbphrase['minimum_posts'], 'minposts', $ranks['minposts']); print_yes_no_row($vbphrase['stack_rank'], 'stack', $ranks['stack']); print_select_row($vbphrase['display_type'], 'display', $displaytype, $ranks['display']); print_table_header($vbphrase['rank_type']); print_input_row($vbphrase['user_rank_file_path'], 'rankimg', $rankimg); print_input_row($vbphrase['or_you_may_enter_text'], 'rankhtml', $ranktext); print_submit_row(); } // ###################### Start do update ####################### if ($_POST['do'] == 'doupdate') { $vbulletin->input->clean_array_gpc('p', array('ranklevel' => TYPE_UINT, 'minposts' => TYPE_UINT, 'rankimg' => TYPE_STR, 'usergroupid' => TYPE_INT, 'rankhtml' => TYPE_NOTRIM, 'stack' => TYPE_UINT, 'display' => TYPE_UINT)); if (!$vbulletin->GPC['ranklevel'] or !$vbulletin->GPC['rankimg'] and !$vbulletin->GPC['rankhtml']) { print_stop_message('please_complete_required_fields'); } if ($vbulletin->GPC['rankhtml']) { $type = 1; $vbulletin->GPC['rankimg'] = $vbulletin->GPC['rankhtml'];
print_input_row($vbphrase['photoplog_title'], 'photoplog_category[title]', $photoplog_category['title']); print_textarea_row($vbphrase['photoplog_description'], 'photoplog_category[description]', $photoplog_category['description']); print_input_row("{$vbphrase['photoplog_display_order']}<dfn>{$vbphrase['photoplog_zero_equals_no_display']}</dfn>", 'photoplog_category[displayorder]', $photoplog_category['displayorder']); print_select_row($vbphrase['photoplog_parent_category'], 'photoplog_category[parentid]', $photoplog_list_categories, $photoplog_category['parentid'], true, 0, false); print_table_header($vbphrase['photoplog_enable_disable_features']); print_yes_no_row($vbphrase['photoplog_allow_html'], 'photoplog_category[options][allowhtml]', $photoplog_category_options['allowhtml']); print_yes_no_row($vbphrase['photoplog_allow_smilies'], 'photoplog_category[options][allowsmilies]', $photoplog_category_options['allowsmilies']); print_yes_no_row($vbphrase['photoplog_allow_bbcode'], 'photoplog_category[options][allowbbcode]', $photoplog_category_options['allowbbcode']); print_yes_no_row($vbphrase['photoplog_allow_img_code'], 'photoplog_category[options][allowimgcode]', $photoplog_category_options['allowimgcode']); print_yes_no_row($vbphrase['photoplog_allow_parse_url'], 'photoplog_category[options][allowparseurl]', $photoplog_category_options['allowparseurl']); print_yes_no_row($vbphrase['photoplog_allow_comments'], 'photoplog_category[options][allowcomments]', $photoplog_category_options['allowcomments']); print_yes_no_row($vbphrase['photoplog_is_searchable'], 'photoplog_category[options][issearchable]', $photoplog_category_options['issearchable']); print_yes_no_row($vbphrase['photoplog_is_members_folder'], 'photoplog_category[options][ismembersfolder]', $photoplog_category_options['ismembersfolder']); print_yes_no_row($vbphrase['photoplog_act_as_divider'], 'photoplog_category[options][actasdivider]', $photoplog_category_options['actasdivider']); print_yes_no_row($vbphrase['photoplog_allow_desc_html'], 'photoplog_category[options][allowdeschtml]', $photoplog_category_options['allowdeschtml']); print_yes_no_row($vbphrase['photoplog_open_for_subcats'], 'photoplog_category[options][openforsubcats]', $photoplog_category_options['openforsubcats']); if ($_REQUEST['do'] == 'edit') { print_submit_row($vbphrase['photoplog_save']); } else { if ($_REQUEST['do'] == 'review') { print_submit_row($vbphrase['photoplog_approve'], '', 2, $vbphrase['photoplog_go_back']); } } } } if ($_REQUEST['do'] == 'doedit') { $vbulletin->input->clean_array_gpc('p', array('catid' => TYPE_UINT, 'photoplog_category' => TYPE_ARRAY)); $photoplog_catid = $vbulletin->GPC['catid']; $photoplog_category = $vbulletin->GPC['photoplog_category']; $photoplog_category_parentid = intval(trim(strval($photoplog_category['parentid']))); $photoplog_list_children = array();
// ###################### Start edit ####################### if ($_REQUEST['do'] == 'edit') { print_form_header('subscriptionpermission', 'doupdate'); if (empty($subobj->subscriptioncache[$vbulletin->GPC['subscriptionid']])) { print_stop_message('invalid_x_specified', $vbphrase['subscription']); } if (empty($vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']])) { print_stop_message('invalid_x_specified', $vbphrase['usergroup']); } $getperms = $db->query_first("\n\t\tSELECT subscriptionpermission.*\n\t\tFROM " . TABLE_PREFIX . "subscriptionpermission AS subscriptionpermission\n\t\tINNER JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (usergroup.usergroupid = subscriptionpermission.usergroupid)\n\t\tWHERE subscriptionid = " . $vbulletin->GPC['subscriptionid'] . " AND subscriptionpermission.usergroupid = " . $vbulletin->GPC['usergroupid']); $usergroup = $vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']]; $subtitle = $vbphrase['sub' . $vbulletin->GPC['subscriptionid'] . '_title']; construct_hidden_code('subscriptionid', $vbulletin->GPC['subscriptionid']); construct_hidden_code('usergroupid', $vbulletin->GPC['usergroupid']); print_table_header(construct_phrase($vbphrase['edit_usergroup_permissions_for_usergroup_x_in_subscription_y'], $usergroup['title'], $subtitle)); print_yes_no_row($vbphrase['can_use_subscription'], 'usesub', !$getperms); print_submit_row($vbphrase['save']); } // ###################### Start do update ####################### if ($_POST['do'] == 'doupdate') { $vbulletin->input->clean_array_gpc('p', array('usesub' => TYPE_BOOL, 'subscriptionpermissionid' => TYPE_INT, 'subscriptionid' => TYPE_INT, 'usergroupid' => TYPE_INT)); if (empty($subobj->subscriptioncache[$vbulletin->GPC['subscriptionid']])) { print_stop_message('invalid_x_specified', $vbphrase['subscription']); } if (empty($vbulletin->usergroupcache[$vbulletin->GPC['usergroupid']])) { print_stop_message('invalid_x_specified', $vbphrase['usergroup']); } define('CP_REDIRECT', "subscriptionpermission.php?do=modify#subscription" . $vbulletin->GPC['subscriptionid']); if ($vbulletin->GPC['usesub']) { $db->query_write("\n\t\t\tDELETE FROM " . TABLE_PREFIX . "subscriptionpermission\n\t\t\tWHERE subscriptionid = " . $vbulletin->GPC['subscriptionid'] . " AND usergroupid = " . $vbulletin->GPC['usergroupid']); if ($db->affected_rows()) {
$checked = array(6 => 'checked="checked"'); print_table_header($vbphrase['add_new_holiday']); } if ($holidayinfo['title']) { print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=holiday&varname={$title}&t=1", 1) . '</dfn>', 'title', $holidayinfo['title']); } else { print_input_row($vbphrase['title'], 'title'); } if ($holidayinfo['description']) { print_textarea_row($vbphrase['description'] . '<dfn>' . construct_link_code($vbphrase['translations'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=holiday&varname={$desc}&t=1", 1) . '</dfn>', 'description', $holidayinfo['description']); } else { print_textarea_row($vbphrase['description'], 'description'); } print_label_row($vbphrase['recurring_option'], '<input type="radio" name="holidayinfo[recurring]" value="6" tabindex="1" ' . $checked[6] . '/>' . construct_phrase($vbphrase['every_x_y'], construct_month_select_html($options[0], 'month1'), construct_day_select_html($options[1], 'day1')) . ' <br /><input type="radio" name="holidayinfo[recurring]" value="7" tabindex="1" ' . $checked[7] . '/>' . construct_phrase($vbphrase['the_x_y_of_z'], '<select name="period" tabindex="1" class="bginput">' . construct_select_options($periodarray, $options[0]) . '</select>', '<select name="day2" tabindex="1" class="bginput">' . construct_select_options($daysarray, $options[1]) . '</select>', construct_month_select_html($options[2], 'month2')), '', 'top', 'recurring'); print_yes_no_row($vbphrase['allow_smilies'], 'holidayinfo[allowsmilies]', $holidayinfo['allowsmilies']); print_submit_row($vbphrase['save']); } // ################# Save or Create a Holiday ################### if ($_POST['do'] == 'saveholiday') { $vbulletin->input->clean_array_gpc('p', array('holidayid' => TYPE_INT, 'holidayinfo' => TYPE_ARRAY, 'month1' => TYPE_INT, 'day1' => TYPE_INT, 'month2' => TYPE_INT, 'day2' => TYPE_INT, 'period' => TYPE_INT, 'title' => TYPE_STR, 'description' => TYPE_STR)); if (empty($vbulletin->GPC['title'])) { print_stop_message('please_complete_required_fields'); } if ($vbulletin->GPC['holidayinfo']['recurring'] == 6) { $vbulletin->GPC['holidayinfo']['recuroption'] = $vbulletin->GPC['month1'] . '|' . $vbulletin->GPC['day1']; } else { $vbulletin->GPC['holidayinfo']['recuroption'] = $vbulletin->GPC['period'] . '|' . $vbulletin->GPC['day2'] . '|' . $vbulletin->GPC['month2']; } if (empty($vbulletin->GPC['holidayid'])) { /*insert query*/
} // generate forum check boxes $channellist = array(); $channels = vB_Api::instanceInternal('search')->getChannels(true); foreach ($channels as $nodeid => $channel) { $depth = str_repeat('--', $channel['depth']); $channellist[] = "<input type=\"checkbox\" name=\"channellist[{$channel['nodeid']}]\" value=\"1\" tabindex=\"1\" />{$depth} {$channel['htmltitle']} "; } $channellist = implode("<br />\n", $channellist); print_form_header('forumpermission', 'doduplicate_channel'); print_table_header($vbphrase['channel_based_permission_duplicator']); print_channel_chooser($vbphrase['copy_permissions_from_channel'], 'nodeid_from', 0); print_label_row($vbphrase['copy_permissions_to_channels'], "<span class=\"smallfont\">{$channellist}</span>", '', 'top', 'channellist'); //print_chooser_row($vbphrase['only_copy_permissions_from_group'], 'limitugid', 'usergroup', -1, $vbphrase['all_usergroups']); print_yes_no_row($vbphrase['overwrite_duplicate_entries'], 'overwritedupes_channel', 0); print_yes_no_row($vbphrase['overwrite_inherited_entries'], 'overwriteinherited_channel', 0); print_submit_row($vbphrase['go']); } // ###################### Start do duplicate (group-based) ####################### if ($_POST['do'] == 'doduplicate_group') { $vbulletin->input->clean_array_gpc('p', array('ugid_from' => vB_Cleaner::TYPE_INT, 'limitnodeid' => vB_Cleaner::TYPE_INT, 'overwritedupes_group' => vB_Cleaner::TYPE_INT, 'overwriteinherited_group' => vB_Cleaner::TYPE_INT, 'usergrouplist' => vB_Cleaner::TYPE_ARRAY)); if (sizeof($vbulletin->GPC['usergrouplist']) == 0) { print_stop_message2('invalid_usergroup_specified'); } // if ($vbulletin->GPC['limitnode'] > 0) // { // $foruminfo = fetch_foruminfo($vbulletin->GPC['limitnodeid']); // $forumsql = "AND forumpermission.forumid IN ($foruminfo[parentlist])"; // $childforum = "AND forumpermission.forumid IN ($foruminfo[childlist])"; // } // else
define('CP_REDIRECT', 'language.php?dolanguageid=' . $vbulletin->GPC['dolanguageid'] . '&do=' . $do); print_stop_message('saved_language_x_successfully', $newlang['title']); } // ########################################################################## if ($_REQUEST['do'] == 'edit_settings') { $language = fetch_languages_array($vbulletin->GPC['dolanguageid']); $getoptions = convert_bits_to_array($language['options'], $vbulletin->bf_misc_languageoptions); $language = array_merge($language, $getoptions); print_form_header('language', 'update_settings'); construct_hidden_code('dolanguageid', $vbulletin->GPC['dolanguageid']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['language'], $language['title'], $language['languageid'])); print_description_row($vbphrase['general_settings'], 0, 2, 'thead'); print_input_row($vbphrase['title'], 'title', $language['title'], 0); print_yes_no_row($vbphrase['allow_user_selection'], 'userselect', $language['userselect']); print_yes_no_row($vbphrase['is_default_language'], 'isdefault', iif($vbulletin->GPC['dolanguageid'] == $vbulletin->options['languageid'], 1, 0)); print_yes_no_row($vbphrase['enable_directional_markup_fix'], 'options[dirmark]', $language['dirmark']); print_label_row($vbphrase['text_direction'], '<label for="rb_l2r"><input type="radio" name="options[direction]" id="rb_l2r" value="1" tabindex="1"' . iif($language['direction'], ' checked="checked"') . " />{$vbphrase['left_to_right']}</label><br />" . ' <label for="rb_r2l"><input type="radio" name="options[direction]" id="rb_r2l" value="0" tabindex="1"' . iif(!$language['direction'], ' checked="checked"') . " />{$vbphrase['right_to_left']}</label>", '', 'top', 'direction'); print_input_row($vbphrase['language_code'], 'languagecode', $language['languagecode']); print_input_row($vbphrase['html_charset'] . "<code><meta http-equiv="Content-Type" content="text/html; charset=<b>{$language['charset']}</b>" /></code>", 'charset', $language['charset']); print_input_row($vbphrase['image_folder_override'], 'imagesoverride', $language['imagesoverride']); print_description_row($vbphrase['date_time_formatting'], 0, 2, 'thead'); print_input_row($vbphrase['locale'], 'locale', $language['locale']); print_input_row($vbphrase['date_format_override'], 'dateoverride', $language['dateoverride']); print_input_row($vbphrase['time_format_override'], 'timeoverride', $language['timeoverride']); print_input_row($vbphrase['registereddate_format_override'], 'registereddateoverride', $language['registereddateoverride']); print_input_row($vbphrase['calformat1_format_override'], 'calformat1override', $language['calformat1override']); print_input_row($vbphrase['calformat2_format_override'], 'calformat2override', $language['calformat2override']); print_input_row($vbphrase['logdate_format_override'], 'logdateoverride', $language['logdateoverride']); print_description_row($vbphrase['number_formatting'], 0, 2, 'thead'); print_input_row($vbphrase['decimal_separator'], 'decimalsep', $language['decimalsep'], 1, 3, 1);
unset($minutes[-1]); } if (!isset($cron['minute'][$x])) { $cron['minute'][$x] = -2; } $selects .= "<select name=\"minute[{$x}]\" tabindex=\"1\" class=\"bginput\">\n"; $selects .= construct_select_options($minutes, $cron['minute'][$x]); $selects .= "</select>\n"; } print_label_row($vbphrase['minute'], $selects, '', 'top', 'minute'); print_yes_no_row($vbphrase['active_gcron'], 'active', $cron['active']); print_yes_no_row($vbphrase['log_entries'], 'loglevel', $cron['loglevel']); print_input_row($vbphrase['filename_gcpglobal'], 'filename', $cron['filename'], true, 35, 0, 'ltr'); print_select_row($vbphrase['product'], 'product', fetch_product_list(), $cron['product']); if ($vb5_config['Misc']['debug']) { print_yes_no_row($vbphrase['vbulletin_default'], 'volatile', $cron['volatile']); } else { construct_hidden_code('volatile', $cron['volatile']); } print_submit_row($vbphrase['save']); } // ###################### Start do update ####################### if ($_POST['do'] == 'update') { $vbulletin->input->clean_array_gpc('p', array('cronid' => vB_Cleaner::TYPE_INT, 'varname' => vB_Cleaner::TYPE_STR, 'filename' => vB_Cleaner::TYPE_STR, 'title' => vB_Cleaner::TYPE_STR, 'description' => vB_Cleaner::TYPE_STR, 'logphrase' => vB_Cleaner::TYPE_STR, 'weekday' => vB_Cleaner::TYPE_STR, 'day' => vB_Cleaner::TYPE_STR, 'hour' => vB_Cleaner::TYPE_STR, 'minute' => vB_Cleaner::TYPE_ARRAY, 'active' => vB_Cleaner::TYPE_INT, 'loglevel' => vB_Cleaner::TYPE_INT, 'filename' => vB_Cleaner::TYPE_STR, 'product' => vB_Cleaner::TYPE_STR, 'volatile' => vB_Cleaner::TYPE_INT)); try { vB_Api::instanceInternal('cron')->save($vbulletin->GPC, $vbulletin->GPC['cronid']); } catch (vB_Exception_Api $e) { $errors = $e->get_errors(); $errors = array_pop($errors); print_stop_message2($errors[0]); }
if ($vbulletin->GPC['settingconfirm'] == 1) { echo '<p>'; if ($vbulletin->GPC['disablesetting'] == 1) { $db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value=0 WHERE varname='timeoutcontrolpanel'"); echo $upgrade_phrases['upgrade_300b5.php']['disabled_timeout_admin']; } else { echo $upgrade_phrases['upgrade_300b5.php']['timeout_admin_not_changed']; } echo '</p>'; } else { if ($vbulletin->options['timeoutcontrolpanel'] == 1) { print_form_header('upgrade_300b5', ''); construct_hidden_code('step', $vbulletin->GPC['step']); construct_hidden_code('settingconfirm', 1); print_table_header($upgrade_phrases['upgrade_300b5.php']['change_setting_value']); print_yes_no_row($upgrade_phrases['upgrade_300b5.php']['setting_info'], 'disablesetting', 0); print_submit_row($upgrade_phrases['upgrade_300b5.php']['proceed'], ''); print_cp_footer(); } else { echo "<p>{$upgrade_phrases['upgrade_300b5.php']['no_change_needed']}</p>"; } } } // ############################################################################# // FINAL step (notice the SCRIPTCOMPLETE define) if ($vbulletin->GPC['step'] == 4) { // tell log_upgrade_step() that the script is done define('SCRIPTCOMPLETE', true); } // ############################################################################# print_next_step();
/** * Prints out the save options for the style generator */ function import_generated_style() { global $vbphrase, $stylecache; cache_styles(); echo " <script type=\"text/javascript\"> <!-- function js_confirm_upload(tform, filefield) { if (filefield.value == \"\") { return confirm(\"".construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], " + tform.serverfile.value + ")."\"); } return true; } function js_fetch_style_title() { styleid = document.forms.downloadform.dostyleid.options[document.forms.downloadform.dostyleid.selectedIndex].value; document.forms.downloadform.title.value = style[styleid]; } var style = new Array(); style['-1'] = \"" . $vbphrase['master_style'] . "\""; foreach($stylecache AS $styleid => $style) { echo "\n\tstyle['$styleid'] = \"" . addslashes_js($style['title'], '"') . "\";"; $styleoptions["$styleid"] = construct_depth_mark($style['depth'], '--', iif($vbulletin->debug, '--', '')) . ' ' . $style['title']; } echo " // --> </script>"; echo '<div id="styleform">'; echo '<form id="form">'; construct_hidden_code('adid', $vbulletin->GPC['adid']); echo '<input id="form-data" type="hidden" name="data">'; echo '<div class="styledetails"><div id="title-generated-style" class="help title-generated-style">'; print_input_row($vbphrase['title_generated_style'], 'name', null, null, null, null, null, null, 'form-name'); echo '</div><div id="parent-id" class="help parent-id">'; print_style_chooser_row('parentid', -1, $vbphrase['no_parent_style'], $vbphrase['parent_style'], 1); echo '</div></div><div class="styleoptions"><div id="display-order" class="help display-order">'; print_input_row($vbphrase['display_order'], 'displayorder', 1, null, null, null, null, null, 'form-displayorder'); echo '</div><div id="allow-user-selection" class="help allow-user-selection">'; print_yes_no_row($vbphrase['allow_user_selection'], 'userselect', 1, null, null, null, null, null, 'form-userselect'); echo '</div></div></form></div>'; }
function print_user_search_rows($email = false) { global $vbulletin, $vbphrase, $stylevar; print_label_row($vbphrase['username'], "\n\t\t<input type=\"text\" class=\"bginput\" name=\"user[username]\" tabindex=\"1\" size=\"35\"\n\t\t/><input type=\"image\" src=\"../" . $vbulletin->options['cleargifurl'] . "\" width=\"1\" height=\"1\"\n\t\t/><input type=\"submit\" class=\"button\" value=\"{$vbphrase['exact_match']}\" tabindex=\"1\" name=\"user[exact]\" />\n\t", '', 'top', 'user[username]'); if ($email) { global $iusergroupcache; $userarray = array('usergroupid' => 0, 'membergroupids' => ''); $iusergroupcache = array(); $usergroups = $vbulletin->db->query_read("SELECT usergroupid, title, (forumpermissions & " . $vbulletin->bf_ugp_forumpermissions['canview'] . ") AS CANVIEW FROM " . TABLE_PREFIX . "usergroup ORDER BY title"); while ($usergroup = $vbulletin->db->fetch_array($usergroups)) { if ($usergroup['CANVIEW']) { $userarray['membergroupids'] .= "{$usergroup['usergroupid']},"; } $iusergroupcache["{$usergroup['usergroupid']}"] = $usergroup['title']; } unset($usergroup); $vbulletin->db->free_result($usergroups); print_checkbox_row($vbphrase['all_usergroups'], 'usergroup_all', 0, -1, $vbphrase['all_usergroups'], 'check_all_usergroups(this.form, this.checked);'); print_membergroup_row($vbphrase['primary_usergroup'], 'user[usergroupid]', 2, $userarray); print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroup]', 2); print_yes_no_row($vbphrase['include_users_that_have_declined_email'], 'user[adminemail]', 0); } else { print_chooser_row($vbphrase['primary_usergroup'], 'user[usergroupid]', 'usergroup', -1, '-- ' . $vbphrase['all_usergroups'] . ' --'); print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroup]', 2); } print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>'); print_input_row($vbphrase['email'], 'user[email]'); print_input_row($vbphrase['parent_email_address'], 'user[parentemail]'); print_yes_no_other_row($vbphrase['coppa_user'], 'user[coppauser]', $vbphrase['either'], -1); print_input_row($vbphrase['home_page'], 'user[homepage]'); print_input_row($vbphrase['icq_uin'], 'user[icq]'); print_input_row($vbphrase['aim_screen_name'], 'user[aim]'); print_input_row($vbphrase['yahoo_id'], 'user[yahoo]'); print_input_row($vbphrase['msn_id'], 'user[msn]'); print_input_row($vbphrase['skype_name'], 'user[skype]'); print_input_row($vbphrase['signature'], 'user[signature]'); print_input_row($vbphrase['user_title'], 'user[usertitle]'); print_input_row($vbphrase['join_date_is_after'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[joindateafter]'); print_input_row($vbphrase['join_date_is_before'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[joindatebefore]'); print_input_row($vbphrase['last_activity_is_after'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastactivityafter]'); print_input_row($vbphrase['last_activity_is_before'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastactivitybefore]'); print_input_row($vbphrase['last_post_is_after'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastpostafter]'); print_input_row($vbphrase['last_post_is_before'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastpostbefore]'); print_input_row($vbphrase['birthday_is_after'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[birthdayafter]'); print_input_row($vbphrase['birthday_is_before'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[birthdaybefore]'); print_input_row($vbphrase['posts_are_greater_than'], 'user[postslower]', '', 1, 7); print_input_row($vbphrase['posts_are_less_than'], 'user[postsupper]', '', 1, 7); print_input_row($vbphrase['reputation_is_greater_than'], 'user[reputationlower]', '', 1, 7); print_input_row($vbphrase['reputation_is_less_than'], 'user[reputationupper]', '', 1, 7); print_input_row($vbphrase['warnings_are_greater_than'], 'user[warningslower]', '', 1, 7); print_input_row($vbphrase['warnings_are_less_than'], 'user[warningsupper]', '', 1, 7); print_input_row($vbphrase['infractions_are_greater_than'], 'user[infractionslower]', '', 1, 7); print_input_row($vbphrase['infractions_are_less_than'], 'user[infractionsupper]', '', 1, 7); print_input_row($vbphrase['infraction_points_are_greater_than'], 'user[pointslower]', '', 1, 7); print_input_row($vbphrase['infraction_points_are_less_than'], 'user[pointsupper]', '', 1, 7); print_input_row($vbphrase['userid_is_greater_than'], 'user[useridlower]', '', 1, 7); print_input_row($vbphrase['userid_is_less_than'], 'user[useridupper]', '', 1, 7); print_input_row($vbphrase['registration_ip_address'], 'user[ipaddress]'); print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>'); $forms = array(0 => $vbphrase['edit_your_details'], 1 => "{$vbphrase['options']}: {$vbphrase['log_in']} / {$vbphrase['privacy']}", 2 => "{$vbphrase['options']}: {$vbphrase['messaging']} / {$vbphrase['notification']}", 3 => "{$vbphrase['options']}: {$vbphrase['thread_viewing']}", 4 => "{$vbphrase['options']}: {$vbphrase['date']} / {$vbphrase['time']}", 5 => "{$vbphrase['options']}: {$vbphrase['other']}"); $currentform = -1; print_table_header($vbphrase['user_profile_fields']); $profilefields = $vbulletin->db->query_read("\n\t\tSELECT *\n\t\tFROM " . TABLE_PREFIX . "profilefield AS profilefield\n\t\tLEFT JOIN " . TABLE_PREFIX . "profilefieldcategory AS profilefieldcategory ON\n\t\t\t(profilefield.profilefieldcategoryid = profilefieldcategory.profilefieldcategoryid)\n\t\tORDER BY profilefield.form, profilefieldcategory.displayorder, profilefield.displayorder\n\t"); while ($profilefield = $vbulletin->db->fetch_array($profilefields)) { if ($profilefield['form'] != $currentform) { print_description_row(construct_phrase($vbphrase['fields_from_form_x'], $forms["{$profilefield['form']}"]), false, 2, 'optiontitle'); $currentform = $profilefield['form']; } $profilefield['def'] = 0; print_profilefield_row('profile', $profilefield); } print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>'); }
break; case 'group': $tablename = "groupmessage"; break; case 'sig': $tablename = "usertextfield"; break; default: $tablename = "post"; } print_description_row(construct_phrase($vbphrase["ame_convert_warning_x"], $tablename)); print_table_break(); print_table_header(construct_phrase($vbphrase['ame_rebuild_xs'], $vbphrase['ame_' . $zone])); print_yes_no_row($vbphrase['ame_test_mode'], 'test', $settings['test']); print_yes_no_row($vbphrase['ame_verbose_mode'], 'verbose', $settings['verbose']); print_yes_no_row($vbphrase['ame_upgrade_only'], 'ameup', $settings['ameup']); if ($zone != "sig") { print_select_row($vbphrase['ame_length'], 'length', $lengths, $settings['length']); } print_input_row($vbphrase['ame_perpage'], 'perpage', $settings['perpage']); print_input_row($vbphrase['ame_seconds_perpage'], 'seconds', $settings['seconds']); construct_hidden_code('zone', $zone); print_submit_row(); } /** * DO REBUILD */ if ($do == 'dorebuild') { $vbulletin->input->clean_array_gpc('r', array('length' => TYPE_UINT, 'perpage' => TYPE_UINT, 'seconds' => TYPE_UINT, 'cont' => TYPE_UINT, 'test' => TYPE_BOOL, 'verbose' => TYPE_BOOL, 'start' => TYPE_UINT, 'zone' => TYPE_STR, 'ameup' => TYPE_BOOL)); $length = $vbulletin->GPC['length']; $start = $vbulletin->GPC['start'];
define('CP_REDIRECT', "template.php?do=modify&expandset=" . $vbulletin->GPC['dostyleid'] . "&modify&group=" . $vbulletin->GPC['group']); print_stop_message('saved_style_x_successfully', $vbulletin->GPC['title']); } } // ############################################################################# // form to edit a style if ($_REQUEST['do'] == 'editstyle') { $vbulletin->input->clean_array_gpc('r', array('dostyleid' => TYPE_INT)); $style = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "style WHERE styleid = " . $vbulletin->GPC['dostyleid']); print_form_header('template', 'updatestyle'); construct_hidden_code('dostyleid', $vbulletin->GPC['dostyleid']); construct_hidden_code('oldparentid', $style['parentid']); print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['style'], $style['title'], $style['styleid']), 2, 0); print_style_chooser_row('parentid', $style['parentid'], $vbphrase['no_parent_style'], $vbphrase['parent_style'], 1); print_input_row($vbphrase['title'], 'title', $style['title']); print_yes_no_row($vbphrase['allow_user_selection'], 'userselect', $style['userselect']); print_input_row($vbphrase['display_order'], 'displayorder', $style['displayorder']); ($hook = vBulletinHook::fetch_hook('admin_style_form')) ? eval($hook) : false; print_submit_row($vbphrase['save']); } // ############################################################################# // kill a style, set parents for child forums and update template id caches for dependent styles if ($_POST['do'] == 'killstyle') { $vbulletin->input->clean_array_gpc('p', array('parentid' => TYPE_INT, 'parentlist' => TYPE_STR, 'group' => TYPE_STR)); // check to see if we are deleting the last style $check = $db->query_first("SELECT COUNT(*) AS numstyles FROM " . TABLE_PREFIX . "style"); // Delete css file if ($vbulletin->options['storecssasfile'] and $fetchstyle = $db->query_first("SELECT css FROM " . TABLE_PREFIX . "style WHERE styleid = " . $vbulletin->GPC['dostyleid'])) { $fetchstyle['css'] .= "\n"; $css = substr($fetchstyle['css'], 0, strpos($fetchstyle['css'], "\n")); // attempt to delete the old css file if it exists
function print_forum_permission_rows($customword, $forumpermission = array(), $extra = '') { global $vbphrase; print_label_row("<b>{$customword}</b>", ' <input type="button" class="button" value="' . $vbphrase['all_yes'] . '" onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 1);' . iif($extra != '', ' }') . '" class="button" /> <input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="' . iif($extra != '', 'if (js_set_custom()) { ') . ' js_check_all_option(this.form, 0);' . iif($extra != '', ' }') . '" class="button" /> <!--<input type="submit" class="button" value="Okay" class="button" />--> ', 'tcat', 'middle'); // Load permissions require_once DIR . '/includes/class_bitfield_builder.php'; $groupinfo = vB_Bitfield_Builder::fetch_permission_group('forumpermissions'); foreach ($groupinfo as $grouptitle => $group) { print_table_header($vbphrase["{$grouptitle}"]); foreach ($group as $permtitle => $permvalue) { print_yes_no_row($vbphrase["{$permvalue['phrase']}"], "forumpermission[{$permtitle}]", $forumpermission["{$permtitle}"], $extra); } //print_table_break(); //print_column_style_code(array('width: 70%', 'width: 30%')); } ($hook = vBulletinHook::fetch_hook('admin_fperms_form')) ? eval($hook) : false; }
print_yes_no_row($vbphrase['can_edit_user_avatars'], 'modperms[caneditavatar]', $moderator['caneditavatar']); print_yes_no_row($vbphrase['can_edit_user_profile_pictures'], 'modperms[caneditprofilepic]', $moderator['caneditprofilepic']); print_yes_no_row($vbphrase['can_edit_user_reputation_comments'], 'modperms[caneditreputation]', $moderator['caneditreputation']); // album permissions print_description_row($vbphrase['user_album_permissions'], false, 2, 'thead'); print_yes_no_row($vbphrase['can_edit_albums_pictures'], 'modperms[caneditalbumpicture]', $moderator['caneditalbumpicture']); print_yes_no_row($vbphrase['can_delete_albums_pictures'], 'modperms[candeletealbumpicture]', $moderator['candeletealbumpicture']); print_yes_no_row($vbphrase['can_moderate_pictures'], 'modperms[canmoderatepictures]', $moderator['canmoderatepictures']); print_yes_no_row($vbphrase['can_edit_picture_comments'], 'modperms[caneditpicturecomments]', $moderator['caneditpicturecomments']); print_yes_no_row($vbphrase['can_delete_picture_comments'], 'modperms[candeletepicturecomments]', $moderator['candeletepicturecomments']); print_yes_no_row($vbphrase['can_remove_picture_comments'], 'modperms[canremovepicturecomments]', $moderator['canremovepicturecomments']); print_yes_no_row($vbphrase['can_moderate_picture_comments'], 'modperms[canmoderatepicturecomments]', $moderator['canmoderatepicturecomments']); // new thread/new post email preferences print_description_row($vbphrase['email_preferences'], false, 2, 'thead'); print_yes_no_row($vbphrase['receive_email_on_new_thread'], 'modperms[newthreademail]', $moderator['newthreademail']); print_yes_no_row($vbphrase['receive_email_on_new_post'], 'modperms[newpostemail]', $moderator['newpostemail']); ($hook = vBulletinHook::fetch_hook('admin_moderator_form')) ? eval($hook) : false; print_submit_row($vbphrase['save']); } // ###################### Start insert / update moderator ####################### if ($_POST['do'] == 'update') { $vbulletin->input->clean_array_gpc('p', array('modperms' => TYPE_ARRAY_BOOL, 'usergroupid' => TYPE_UINT, 'membergroupids' => TYPE_ARRAY_UINT)); $modnames = $successnames = $moddata_dms = $moddata_existing = array(); if ($vbulletin->GPC['moderatorid']) { $moddata_existing = $db->query_first("\n\t\t\tSELECT moderator.*,\n\t\t\tuser.username, user.usergroupid, user.membergroupids\n\t\t\tFROM " . TABLE_PREFIX . "moderator AS moderator\n\t\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\t\tWHERE moderator.moderatorid = " . $vbulletin->GPC['moderatorid']); $modnames[] = trim(htmlspecialchars_uni($vbulletin->GPC['modusername'])); log_admin_action('username = '******'username'] . ', userid = ' . $moddata_existing['userid']); } else { // split multiple recipients into an array if (preg_match('/(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});/', $vbulletin->GPC['modusername'])) { $modnamelist = preg_split('/(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});/', $vbulletin->GPC['modusername'], -1, PREG_SPLIT_NO_EMPTY);
print_input_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permtitle}]", $getval, 1, 20); } else { $getval = $ug_bitfield["{$permvalue['parentgroup']}"]["{$permtitle}"]; if (isset($permvalue['readonly'])) { // This permission is readonly for certain usergroups $readonlyids = explode(',', $permvalue['readonly']); if (in_array($vbulletin->GPC['usergroupid'], $readonlyids)) { if ($permvalue['readonlyvalue'] == 'true') { print_yes_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permvalue['parentgroup']}][{$permtitle}]", $vbphrase['yes'], true); } else { print_yes_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permvalue['parentgroup']}][{$permtitle}]", $vbphrase['no'], false); } continue; } } print_yes_no_row($vbphrase["{$permvalue['phrase']}"], "usergroup[{$permvalue['parentgroup']}][{$permtitle}]", $getval); } } print_table_break(); print_column_style_code(array('width: 70%', 'width: 30%')); } print_submit_row(iif($_REQUEST['do'] == 'add', $vbphrase['save'], $vbphrase['update'])); } // ###################### Start insert / update ####################### if ($_POST['do'] == 'update') { $vbulletin->input->clean_array_gpc('p', array('usergroup' => TYPE_ARRAY, 'ugid_base' => TYPE_INT)); // create bitfield values require_once DIR . '/includes/functions_misc.php'; foreach ($vbulletin->bf_ugp as $permissiongroup => $fields) { $vbulletin->GPC['usergroup']["{$permissiongroup}"] = convert_array_to_bits($vbulletin->GPC['usergroup']["{$permissiongroup}"], $fields, 1); }
{ return confirm("<?php echo construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], '" + tform.serverfile.value + "'); ?> "); } return true; } //--> </script> <?php print_form_header('plugin', 'productimport', 1, 1, 'uploadform" onsubmit="return js_confirm_upload(this, this.productfile);'); print_table_header($vbphrase['import_product']); print_upload_row($vbphrase['upload_xml_file'], 'productfile', 999999999); print_input_row($vbphrase['import_xml_file'], 'serverfile', './includes/xml/product.xml'); print_yes_no_row($vbphrase['allow_overwrite_upgrade_product'], 'allowoverwrite', 0); print_submit_row($vbphrase['import']); } print_form_header('plugin', 'productsave'); if ($product) { print_table_header(construct_phrase($vbphrase['edit_product_x'], $product['productid'])); print_label_row($vbphrase['product_id'], $product['productid']); construct_hidden_code('productid', $product['productid']); construct_hidden_code('editing', 1); } else { print_table_header($vbphrase['add_new_product']); print_input_row($vbphrase['product_id'], 'productid', '', true, 50, 25); // max length = 25 } print_input_row($vbphrase['title'], 'title', $product['title'], true, 50, 50); print_input_row($vbphrase['version'], 'version', $product['version'], true, 50, 25);
while ($table = $db->fetch_array($tables, DBARRAY_NUM)) { $sqltable["{$table['0']}"] = $table[0]; } print_form_header('upgrade_300b3', 'sqltable'); print_table_header($upgradecore_phrases['dump_data_to_sql']); construct_hidden_code('step', 'backup'); print_label_row($upgradecore_phrases['choose_table_to_dump'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>'); print_submit_row($upgradecore_phrases['dump_tables'], 0); unset($sqltable['all tables']); print_form_header('upgrade_300b3', 'csvtable'); print_table_header($upgradecore_phrases['dump_data_to_csv']); construct_hidden_code('step', 'backup'); print_label_row($upgradecore_phrases['backup_individual_table'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>'); print_input_row($upgradecore_phrases['field_seperator'], 'separator', ',', 0, 15); print_input_row($upgradecore_phrases['quote_character'], 'quotes', "'", 0, 15); print_yes_no_row($upgradecore_phrases['show_column_names'], 'showhead', 1); print_submit_row($upgradecore_phrases['dump_table'], 0); define('NO_LOG', true); $vbulletin->GPC['step'] = 0; print_next_step(); } } // *************************************************************************************************************************** // ######################################################################### // ############# GENERIC UPGRADE / INSTALL FUNCTIONS PROTOTYPES ############ // ######################################################################### // ######################################################################### // checks the environment for vB3 conditions function verify_vb3_enviroment() { global $upgradecore_phrases, $db;
construct_hidden_code('bookmarksiteid', $bookmarksite['bookmarksiteid']); } else { // add new $bookmarksite = $vbulletin->db->query_first("SELECT MAX(displayorder) AS displayorder FROM " . TABLE_PREFIX . "bookmarksite"); $bookmarksite['displayorder'] += 10; $bookmarksite['url'] = 'http://'; $bookmarksite['active'] = true; $bookmarksite['utf8encode'] = false; print_table_header($vbphrase['add_new_social_bookmarking_site']); } print_input_row($vbphrase['title'], 'title', $bookmarksite['title'], false, 50); print_input_row($vbphrase['icon'] . '<dfn>' . $vbphrase['icon_bookmarksite_help'] . '</dfn>', 'iconpath', $bookmarksite['iconpath'], true, 50); print_input_row($vbphrase['link'] . '<dfn>' . $vbphrase['link_replacement_variables_help'] . '</dfn>', 'url', $bookmarksite['url'], true, 50); print_input_row($vbphrase['display_order'], 'displayorder', $bookmarksite['displayorder'], true, 2); print_yes_no_row($vbphrase['active'], 'active', $bookmarksite['active']); print_yes_no_row($vbphrase['utf8encode_title'] . '<dfn>' . $vbphrase['utf8encode_title_help'] . '</dfn>', 'utf8encode', $bookmarksite['utf8encode']); print_submit_row(); } // ############################################################################# // quick update of active and display order fields if ($_POST['do'] == 'quickupdate') { $vbulletin->input->clean_array_gpc('p', array('active' => TYPE_ARRAY_BOOL, 'displayorder' => TYPE_ARRAY_UINT, 'displayorderswap' => TYPE_CONVERT_KEYS)); $changes = false; $update_ids = '0'; $update_active = ''; $update_displayorder = ''; $bookmarksites_result = $db->query_read("SELECT bookmarksiteid, displayorder, active FROM " . TABLE_PREFIX . "bookmarksite"); while ($bookmarksite = $db->fetch_array($bookmarksites_result)) { if (intval($bookmarksite['active']) != $vbulletin->GPC['active']["{$bookmarksite['bookmarksiteid']}"] or $bookmarksite['displayorder'] != $vbulletin->GPC['displayorder']["{$bookmarksite['bookmarksiteid']}"]) { $update_ids .= ",{$bookmarksite['bookmarksiteid']}"; $update_active .= " WHEN {$bookmarksite['bookmarksiteid']} THEN " . intval($vbulletin->GPC['active']["{$bookmarksite['bookmarksiteid']}"]);
print_table_header($vbphrase['users_awaiting_moderation'], 4); print_cells_row(array($vbphrase['username'], $vbphrase['email'], $vbphrase['ip_address'], "<input type=\"button\" class=\"button\" value=\"" . $vbphrase['accept_all'] . "\" onclick=\"js_check_radio(1)\" />\n\t\t\t<input type=\"button\" class=\"button\" value=\"" . $vbphrase['delete_all'] . "\" onclick=\"js_check_radio(-1)\" />\n\t\t\t<input type=\"button\" class=\"button\" value=\"" . $vbphrase['ignore_all'] . "\" onclick=\"js_check_radio(0)\" />"), 0, 'thead', -3); while ($user = $db->fetch_array($users)) { $cell = array(); $cell[] = "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}\" target=\"_user\"><b>{$user['username']}</b></a>"; $cell[] = "<a href=\"mailto:{$user['email']}\">{$user['email']}</a>"; $cell[] = "<a href=\"usertools.php?" . $vbulletin->session->vars['sessionurl'] . "do=doips&depth=2&ipaddress={$user['ipaddress']}&hash=" . CP_SESSIONHASH . "\" target=\"_user\">{$user['ipaddress']}</a>"; $cell[] = "\n\t\t\t\t<label for=\"v_{$user['userid']}\"><input type=\"radio\" name=\"validate[{$user['userid']}]\" value=\"1\" id=\"v_{$user['userid']}\" tabindex=\"1\" />{$vbphrase['accept']}</label>\n\t\t\t\t<label for=\"d_{$user['userid']}\"><input type=\"radio\" name=\"validate[{$user['userid']}]\" value=\"-1\" id=\"d_{$user['userid']}\" tabindex=\"1\" />{$vbphrase['delete']}</label>\n\t\t\t\t<label for=\"i_{$user['userid']}\"><input type=\"radio\" name=\"validate[{$user['userid']}]\" value=\"0\" id=\"i_{$user['userid']}\" tabindex=\"1\" checked=\"checked\" />{$vbphrase['ignore']}</label>\n\t\t\t"; print_cells_row($cell, 0, '', -4); } require_once DIR . '/includes/functions_misc.php'; $template = fetch_phrase('validated', 'emailbody', 'email_'); print_table_break(); print_table_header($vbphrase['email_options']); print_yes_no_row($vbphrase['send_email_to_accepted_users'], 'send_validated', 1); print_yes_no_row($vbphrase['send_email_to_deleted_users'], 'send_deleted', 1); print_description_row($vbphrase['email_will_be_sent_in_user_specified_language']); print_table_break(); print_submit_row($vbphrase['continue']); } } // ###################### Start do moderate and coppa ####################### if ($_POST['do'] == 'domoderate') { $vbulletin->input->clean_array_gpc('p', array('send_validated' => TYPE_INT, 'send_deleted' => TYPE_INT, 'validate' => TYPE_ARRAY_INT)); if (empty($vbulletin->GPC['validate'])) { print_stop_message('please_complete_required_fields'); } else { $evalemail_validated = array(); $evalemail_deleted = array(); require_once DIR . '/includes/functions_misc.php'; if ($vbulletin->options['welcomepm']) {