Пример #1
0
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']);
}
Пример #2
0
/**
* Prints a row containing a <select> showing forums the user has permission to moderate
*
* @param	string	name for the <select>
* @param	mixed	selected <option>
* @param	string	text given to the -1 option
* @param	string	title for the row
* @param	boolean	Display the -1 option or not
* @param	boolean	Allow a multiple <select> or not
* @param	boolean	Display a 'select forum' option or not
* @param	string	If specified, check this permission for each forum
*/
function print_moderator_forum_chooser($name = 'forumid', $selectedid = -1, $topname = NULL, $title = NULL, $displaytop = true, $multiple = false, $displayselectforum = false, $permcheck = '')
{
    if ($title === NULL) {
        $title = $vbphrase['parent_forum'];
    }
    $select_options = fetch_moderator_forum_options($topname, $displaytop, $displayselectforum, $permcheck);
    print_select_row($title, $name, $select_options, $selectedid, 0, iif($multiple, 10, 0), $multiple);
}
Пример #3
0
/**
* Prints a row containing a <select> showing forums the user has permission to moderate
*
* @param	string	name for the <select>
* @param	mixed	selected <option>
* @param	string	text given to the -1 option
* @param	string	title for the row
* @param	boolean	Display the -1 option or not
* @param	boolean	Allow a multiple <select> or not
* @param	boolean	Display a 'select forum' option or not
* @param	string	If specified, check this permission for each forum
*/
function print_moderator_forum_chooser($name = 'forumid', $selectedid = -1, $topname = NULL, $title = NULL, $displaytop = true, $multiple = false, $displayselectforum = false, $permcheck = '')
{
    global $vbphrase;
    if ($title === NULL) {
        $title = $vbphrase['parent_forum'];
    }
    // stub this out.  The forum options function doesn't work and was removed, this function is used by a page that isn't displayed
    // but might be restored in some form, for now we'll just use a single "all forums" option (which is what was being displayed
    // by the broken code).
    //	$select_options = fetch_moderator_forum_options($topname, $displaytop, $displayselectforum, $permcheck);
    $select_options['-1'] = $topname === NULL ? $vbphrase['no_one'] : $topname;
    print_select_row($title, $name, $select_options, $selectedid, 0, iif($multiple, 10, 0), $multiple);
}
Пример #4
0
                $time_before = microtime();
                $db->query_write($query);
                $time_taken = fetch_microtime_difference($time_before);
                print_form_header('queries', 'doquery');
                print_table_header($vbphrase['vbulletin_message']);
                if ($errornum = $db->errno()) {
                    print_description_row(construct_phrase($vbphrase['an_error_occured_while_attempting_to_run_your_query'], $errornum, nl2br(htmlspecialchars_uni($db->error()))));
                } else {
                    print_description_row(construct_phrase($vbphrase['affected_rows'], vb_number_format($db->affected_rows()), vb_number_format($time_taken, 4)));
                }
                print_table_footer();
            }
            break;
    }
}
// ##################### START MODIFY #####################
if ($_REQUEST['do'] == 'modify') {
    print_form_header('queries', 'doquery');
    print_table_header($vbphrase['execute_sql_query']);
    print_select_row($vbphrase['auto_query'], 'autoquery', $queryoptions, -1);
    print_textarea_row($vbphrase['manual_query'], 'query', '', 10, 55);
    print_input_row($vbphrase['results_to_show_per_page'], 'perpage', 20);
    print_submit_row($vbphrase['continue']);
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 37230 $
|| ####################################################################
\*======================================================================*/
Пример #5
0
            $usergroups["{$usergroupid}"] = $usergroup['title'];
            if ($selectedid == 0) {
                $selectedid = $usergroupid;
            }
        }
    }
    $temporary_phrase = $vbphrase['temporary_ban_options'];
    $permanent_phrase = $vbphrase['permanent_ban_options'];
    // make a list of banning period options
    $periodoptions = array($temporary_phrase => array('D_1' => construct_phrase($vbphrase['x_days'], 1), 'D_2' => construct_phrase($vbphrase['x_days'], 2), 'D_3' => construct_phrase($vbphrase['x_days'], 3), 'D_4' => construct_phrase($vbphrase['x_days'], 4), 'D_5' => construct_phrase($vbphrase['x_days'], 5), 'D_6' => construct_phrase($vbphrase['x_days'], 6), 'D_7' => construct_phrase($vbphrase['x_days'], 7), 'D_10' => construct_phrase($vbphrase['x_days'], 10), 'D_14' => construct_phrase($vbphrase['x_weeks'], 2), 'D_21' => construct_phrase($vbphrase['x_weeks'], 3), 'M_1' => construct_phrase($vbphrase['x_months'], 1), 'M_2' => construct_phrase($vbphrase['x_months'], 2), 'M_3' => construct_phrase($vbphrase['x_months'], 3), 'M_4' => construct_phrase($vbphrase['x_months'], 4), 'M_5' => construct_phrase($vbphrase['x_months'], 5), 'M_6' => construct_phrase($vbphrase['x_months'], 6), 'Y_1' => construct_phrase($vbphrase['x_years'], 1), 'Y_2' => construct_phrase($vbphrase['x_years'], 2)), $permanent_phrase => array('PERMA' => "{$vbphrase['permanent']} - {$vbphrase['never_lift_ban']}"));
    $methods = array('points' => $vbphrase['points'], 'infractions' => $vbphrase['infractions']);
    print_input_row($vbphrase['amount'], 'amount', $infraction['amount'], true, 5);
    print_select_row($vbphrase['method'], 'method', $methods, $infraction['method']);
    print_chooser_row($vbphrase['primary_usergroup'], 'usergroupid', 'usergroup', $infraction['usergroupid'], '-- ' . $vbphrase['all_usergroups'] . ' --');
    print_select_row($vbphrase['move_user_to_usergroup'], 'banusergroupid', $usergroups, $selectedid);
    print_select_row($vbphrase['lift_ban_after'], 'period', $periodoptions, $infraction['period']);
    print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'updatebangroup') {
    $vbulletin->input->clean_array_gpc('p', array('method' => TYPE_NOHTML, 'amount' => TYPE_UINT, 'usergroupid' => TYPE_INT, 'banusergroupid' => TYPE_UINT, 'period' => TYPE_NOHTML));
    if (empty($vbulletin->GPC['amount'])) {
        print_stop_message('please_complete_required_fields');
    }
    if (empty($vbulletin->GPC['infractionbanid'])) {
        $db->query_write("INSERT INTO " . TABLE_PREFIX . "infractionban (amount) VALUES (0)");
        $vbulletin->GPC['infractionbanid'] = $db->insert_id();
    }
    $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "infractionban\n\t\tSET amount = " . $vbulletin->GPC['amount'] . ",\n\t\t\tmethod = '" . $db->escape_string($vbulletin->GPC['method']) . "',\n\t\t\tusergroupid = " . $vbulletin->GPC['usergroupid'] . ",\n\t\t\tbanusergroupid = " . $vbulletin->GPC['banusergroupid'] . ",\n\t\t\tperiod = '" . $db->escape_string($vbulletin->GPC['period']) . "'\n\t\tWHERE infractionbanid = " . $vbulletin->GPC['infractionbanid'] . "\n\t");
    define('CP_REDIRECT', 'admininfraction.php?do=modify');
    print_stop_message('saved_automatic_ban_successfully');
Пример #6
0
    // has varname appended
    print_form_header('prefix', 'insertprefix');
    if ($prefix['prefixid']) {
        print_table_header($vbphrase['editing_prefix']);
        print_label_row($vbphrase['prefix_id_alphanumeric_note'], $prefix['prefixid'], '', 'top', 'prefixid');
        construct_hidden_code('origprefixid', $prefix['prefixid']);
    } else {
        print_table_header($vbphrase['adding_prefix']);
        print_input_row($vbphrase['prefix_id_alphanumeric_note'], 'prefixid', '', true, 35, 25);
    }
    $prefixsets_sql = $db->query_read("\r\n\t\tSELECT prefixsetid\r\n\t\tFROM " . TABLE_PREFIX . "prefixset\r\n\t\tORDER BY displayorder\r\n\t");
    $prefixsets = array();
    while ($prefixset = $db->fetch_array($prefixsets_sql)) {
        $prefixsets["{$prefixset['prefixsetid']}"] = htmlspecialchars_uni($vbphrase["prefixset_{$prefixset['prefixsetid']}_title"]);
    }
    print_select_row($vbphrase['prefix_set'], 'prefixsetid', $prefixsets, $prefix['prefixsetid']);
    print_input_row($vbphrase['title_plain_text'] . ($prefix['prefixid'] ? '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . "prefix_{$prefix['prefixid']}_title_plain", 1) . '</dfn>' : ''), 'title_plain', $prefix['title_plain']);
    print_input_row($vbphrase['title_rich_text'] . ($prefix['prefixid'] ? '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . "prefix_{$prefix['prefixid']}_title_rich", 1) . '</dfn>' : ''), 'title_rich', $prefix['title_rich']);
    print_input_row($vbphrase['display_order'], 'displayorder', $prefix['displayorder']);
    print_submit_row();
}
// ########################################################################
if ($_POST['do'] == 'killset') {
    $vbulletin->input->clean_array_gpc('p', array('prefixsetid' => TYPE_NOHTML));
    $prefixsetdm =& datamanager_init('PrefixSet', $vbulletin, ERRTYPE_CP);
    $prefixset = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "prefixset\r\n\t\tWHERE prefixsetid = '" . $db->escape_string($vbulletin->GPC['prefixsetid']) . "'\r\n\t");
    if (!$prefixset) {
        print_stop_message('invalid_action_specified');
    }
    $prefixsetdm->set_existing($prefixset);
    $prefixsetdm->delete();
Пример #7
0
    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&amp;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&amp;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&amp;u={$user['userid']}")), 0, '', 0);
        }
    }
    print_table_footer();
Пример #8
0
/**
* Prints a row containing a <select> showing the available styles
*
* @param	string	Name for <select>
* @param	integer	Selected style ID
* @param	string	Name of top item in <select>
* @param	string	Title of row
* @param	boolean	Display top item?
*/
function print_style_chooser_row($name = 'parentid', $selectedid = -1, $topname = NULL, $title = NULL, $displaytop = true)
{
    global $stylecache, $vbphrase;
    if ($topname === NULL) {
        $topname = $vbphrase['no_parent_style'];
    }
    if ($title === NULL) {
        $title = $vbphrase['parent_style'];
    }
    cache_styles();
    $styles = array();
    if ($displaytop) {
        $styles['-1'] = $topname;
    }
    foreach ($stylecache as $style) {
        $styles["{$style['styleid']}"] = construct_depth_mark($style['depth'], '--', iif($displaytop, '--')) . " {$style['title']}";
    }
    print_select_row($title, $name, $styles, $selectedid);
}
Пример #9
0
/**
* Prints a row containing a <select> list of forums, complete with displayorder, parenting and depth information
*
* @param	string	text for the left cell of the table row
* @param	string	name of the <select>
* @param	mixed	selected <option>
* @param	string	name given to the -1 <option>
* @param	boolean	display the -1 <option> or not.
* @param	boolean	when true, allows multiple selections to be made. results will be stored in $name's array
* @param	string	Text to be used in sprintf() to indicate a 'category' forum, eg: '%s (Category)'. Leave blank for no category indicator
*/
function print_forum_chooser($title, $name, $selectedid = -1, $topname = null, $displayselectforum = false, $multiple = false, $category_phrase = null)
{
    if ($displayselectforum and $selectedid <= 0) {
        $selectedid = 0;
    }
    print_select_row($title, $name, construct_forum_chooser_options($displayselectforum, $topname, $category_phrase), $selectedid, 0, $multiple ? 10 : 0, $multiple);
}
Пример #10
0
     print_form_header('photoplog_category', 'doedit');
     construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
     construct_hidden_code('catid', $photoplog_catid);
     print_table_header($vbphrase['photoplog_edit_this_category']);
 } else {
     if ($_REQUEST['do'] == 'review') {
         print_form_header('photoplog_category', 'doadd');
         construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
         construct_hidden_code('suggestid', $photoplog_suggestid);
         print_table_header($vbphrase['photoplog_add_new_category']);
     }
 }
 print_input_row($vbphrase['photoplog_title'], 'photoplog_category[title]', $photoplog_category['title']);
 print_textarea_row($vbphrase['photoplog_description'], 'photoplog_category[description]', $photoplog_category['description']);
 print_input_row("{$vbphrase['photoplog_display_order']}<dfn>{$vbphrase['photoplog_zero_equals_no_display']}</dfn>", 'photoplog_category[displayorder]', $photoplog_category['displayorder']);
 print_select_row($vbphrase['photoplog_parent_category'], 'photoplog_category[parentid]', $photoplog_list_categories, $photoplog_category['parentid'], true, 0, false);
 print_table_header($vbphrase['photoplog_enable_disable_features']);
 print_yes_no_row($vbphrase['photoplog_allow_html'], 'photoplog_category[options][allowhtml]', $photoplog_category_options['allowhtml']);
 print_yes_no_row($vbphrase['photoplog_allow_smilies'], 'photoplog_category[options][allowsmilies]', $photoplog_category_options['allowsmilies']);
 print_yes_no_row($vbphrase['photoplog_allow_bbcode'], 'photoplog_category[options][allowbbcode]', $photoplog_category_options['allowbbcode']);
 print_yes_no_row($vbphrase['photoplog_allow_img_code'], 'photoplog_category[options][allowimgcode]', $photoplog_category_options['allowimgcode']);
 print_yes_no_row($vbphrase['photoplog_allow_parse_url'], 'photoplog_category[options][allowparseurl]', $photoplog_category_options['allowparseurl']);
 print_yes_no_row($vbphrase['photoplog_allow_comments'], 'photoplog_category[options][allowcomments]', $photoplog_category_options['allowcomments']);
 print_yes_no_row($vbphrase['photoplog_is_searchable'], 'photoplog_category[options][issearchable]', $photoplog_category_options['issearchable']);
 print_yes_no_row($vbphrase['photoplog_is_members_folder'], 'photoplog_category[options][ismembersfolder]', $photoplog_category_options['ismembersfolder']);
 print_yes_no_row($vbphrase['photoplog_act_as_divider'], 'photoplog_category[options][actasdivider]', $photoplog_category_options['actasdivider']);
 print_yes_no_row($vbphrase['photoplog_allow_desc_html'], 'photoplog_category[options][allowdeschtml]', $photoplog_category_options['allowdeschtml']);
 print_yes_no_row($vbphrase['photoplog_open_for_subcats'], 'photoplog_category[options][openforsubcats]', $photoplog_category_options['openforsubcats']);
 if ($_REQUEST['do'] == 'edit') {
     print_submit_row($vbphrase['photoplog_save']);
 } else {
Пример #11
0
 }
 print_input_row($vbphrase['title'], 'calendar[title]', $calendar['title']);
 print_input_row("{$vbphrase['display_order']} <dfn>{$vbphrase['zero_equals_no_display']}</dfn>", 'calendar[displayorder]', $calendar['displayorder'], 1, 5);
 print_table_header($vbphrase['custom_fields'] . '&nbsp;&nbsp;&nbsp;' . construct_link_code($vbphrase['add_new_custom_field'], "admincalendar.php?" . $vbulletin->session->vars['sessionurl'] . "c=" . $vbulletin->GPC['calendarid'] . "&do=addcustom"));
 if ($fieldcount > 0) {
     while ($field = $db->fetch_array($customfields)) {
         print_label_row($field['title'], construct_link_code($vbphrase['modify'], "admincalendar.php?" . $vbulletin->session->vars['sessionurl'] . "do=addcustom&c=" . $vbulletin->GPC['calendarid'] . "&calendarcustomfieldid={$field['calendarcustomfieldid']}") . ' ' . construct_link_code($vbphrase['delete'], "admincalendar.php?" . $vbulletin->session->vars['sessionurl'] . "do=deletecustom&c=" . $vbulletin->GPC['calendarid'] . "&calendarcustomfieldid={$field['calendarcustomfieldid']}"), '', 'top', 'customfields');
     }
 }
 print_table_header($vbphrase['moderation_options']);
 print_textarea_row($vbphrase['emails_to_notify_when_event'], 'calendar[neweventemail]', $calendar['neweventemail']);
 print_yes_no_row($vbphrase['moderate_events'] . ' <dfn>(' . $vbphrase['require_moderator_validation_before_new_events_are_displayed'] . ')</dfn>', 'calendar[moderatenew]', $calendar['moderatenew']);
 print_table_header($vbphrase['options']);
 print_input_row(construct_phrase($vbphrase['date_range_dfn'], $exampledaterange), 'calendar[daterange]', $calendar['daterange']);
 print_select_row($vbphrase['default_view'], 'default', array(0 => $vbphrase['monthly'], $vbphrase['weekly'], $vbphrase['yearly']), !empty($calendar['weekly']) ? 1 : (!empty($calendar['yearly']) ? 2 : 0));
 print_select_row($vbphrase['start_of_week'], 'calendar[startofweek]', array(1 => $vbphrase['sunday'], $vbphrase['monday'], $vbphrase['tuesday'], $vbphrase['wednesday'], $vbphrase['thursday'], $vbphrase['friday'], $vbphrase['saturday']), $calendar['startofweek']);
 print_input_row($vbphrase['event_title_cutoff'], 'calendar[cutoff]', $calendar['cutoff'], 1, 5);
 print_input_row($vbphrase['event_count_max_events_per_day'], 'calendar[eventcount]', $calendar['eventcount'], 1, 5);
 print_input_row($vbphrase['birthday_count_max_birthdays_per_day'], 'calendar[birthdaycount]', $calendar['birthdaycount'], 1, 5);
 print_table_header($vbphrase['enable_disable_features']);
 print_yes_no_row($vbphrase['show_birthdays_on_this_calendar'], 'options[showbirthdays]', $calendar['showbirthdays']);
 print_yes_no_row($vbphrase['show_holidays_on_this_calendar'], 'options[showholidays]', $calendar['showholidays']);
 $endtable = 0;
 foreach ($_CALENDARHOLIDAYS as $holiday => $value) {
     $holidaytext .= iif(!$endtable, "<tr>\n");
     $checked = iif($calendar["{$holiday}"], 'checked="checked"');
     $holidaytext .= "<td><input type=\"checkbox\" name=\"holidays[{$holiday}]\" value=\"1\" {$checked} />{$vbphrase[$holiday]}</td>\n";
     $holidaytext .= iif($endtable, "</tr>\n");
     $endtable = iif($endtable, 0, 1);
 }
 print_label_row($vbphrase['show_easter_holidays_on_this_calendar'], '<table cellspacing="2" cellpadding="0" border="0">' . $holidaytext . '</tr></table>', '', 'top', 'holidays');
Пример #12
0
     }
     if (!$vbulletin->GPC['transactionid']) {
         print_form_header('subscriptions', 'transactions');
         print_table_header($vbphrase['transaction_log']);
         construct_hidden_code('type', 'log');
         construct_hidden_code('scope', 1);
         print_time_row($vbphrase['start_date'], 'start', $vbulletin->GPC['start'], false);
         print_time_row($vbphrase['end_date'], 'end', $vbulletin->GPC['end'], false);
         if (!empty($subobj->subscriptioncache)) {
             print_select_row($vbphrase['subscription'], 'subscriptionid', $sublist, $vbulletin->GPC['subscriptionid']);
         }
         print_select_row($vbphrase['processor'], 'paymentapiid', $apicache, $vbulletin->GPC['paymentapiid']);
         print_select_row($vbphrase['currency'], 'currency', array('' => $vbphrase['all_currency'], 'usd' => $vbphrase['us_dollars'], 'gbp' => $vbphrase['pounds_sterling'], 'eur' => $vbphrase['euros'], 'aud' => $vbphrase['aus_dollars'], 'cad' => $vbphrase['cad_dollars']), $vbulletin->GPC['currency']);
         print_select_row($vbphrase['type'], 'state', array('-1' => $vbphrase['all_types'], '0' => $vbphrase['failure'], '1' => $vbphrase['charge'], '2' => $vbphrase['reversal']), $vbulletin->GPC['state']);
         print_input_row($vbphrase['username'], 'username', $userinfo['username'], false);
         print_select_row($vbphrase['order_by'], 'orderby', array('dateline' => $vbphrase['date'], 'amount' => $vbphrase['amount'], 'transactionid' => $vbphrase['transactionid'], 'username' => $vbphrase['username'], 'paymentapiid' => $vbphrase['processor']), $vbulletin->GPC['orderby']);
         print_submit_row($vbphrase['go']);
     }
     if ($vbulletin->GPC['transactionid'] or !$vbulletin->GPC['scope']) {
         print_form_header('subscriptions', 'transactions');
         construct_hidden_code('type', 'log');
         construct_hidden_code('scope', 1);
         print_table_header($vbphrase['transaction_lookup']);
         print_input_row($vbphrase['transactionid'], 'transactionid', $vbulletin->GPC['transactionid']);
         print_yes_no_row($vbphrase['exact_match'], 'exact', empty($vbulletin->GPC['transactionid']) ? true : $vbulletin->GPC['exact']);
         print_submit_row($vbphrase['go']);
     }
 }
 $condition = array();
 if (!$vbulletin->GPC['transactionid']) {
     $start_time = mktime(0, 0, 0, $vbulletin->GPC['start']['month'], $vbulletin->GPC['start']['day'], $vbulletin->GPC['start']['year']);
Пример #13
0
    print_form_header('user', 'viewuser', 0, 0);
    construct_hidden_code('userid', $vbulletin->GPC['userid']);
    ?>
	<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 
    // start main table
    require_once DIR . '/includes/functions_misc.php';
    // PROFILE SECTION
    print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['user'], $user['username'], $user['userid']));
    print_input_row($vbphrase['username'], 'user[username]', $user['username'], 0);
    print_input_row($vbphrase['email'], 'user[email]', $user['email'], 0);
    print_select_row($vbphrase['language'], 'user[languageid]', fetch_language_titles_array('', 0), $user['languageid']);
    print_input_row($vbphrase['user_title'], 'user[usertitle]', $user['usertitle']);
    print_yes_no_row($vbphrase['custom_user_title'], 'options[customtitle]', $user['customtitle']);
    print_input_row($vbphrase['home_page'], 'user[homepage]', $user['homepage'], 0);
    print_time_row($vbphrase['birthday'], 'birthday', $user['birthday'], 0, 1);
    print_textarea_row($vbphrase['signature'] . iif(can_moderate(0, 'caneditsigs'), '<br /><br />' . construct_link_code($vbphrase['edit_signature'], 'user.php?' . $vbulletin->session->vars['sessionurl'] . "do=editsig&amp;u={$user['userid']}")), 'signature', $user['signature'], 8, 45, 1, 0);
    print_input_row($vbphrase['icq_uin'], 'user[icq]', $user['icq'], 0);
    print_input_row($vbphrase['aim_screen_name'], 'user[aim]', $user['aim'], 0);
    print_input_row($vbphrase['yahoo_id'], 'user[yahoo]', $user['yahoo'], 0);
    print_input_row($vbphrase['msn_id'], 'user[msn]', $user['msn'], 0);
    print_input_row($vbphrase['skype_name'], 'user[skype]', $user['skype'], 0);
    print_yes_no_row($vbphrase['coppa_user'], 'options[coppauser]', $user['coppauser']);
    print_input_row($vbphrase['parent_email_address'], 'user[parentemail]', $user['parentemail'], 0);
    print_input_row($vbphrase['post_count'], 'user[posts]', $user['posts']);
    if ($user['referrerid']) {
        $referrername = $db->query_first("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = {$user['referrerid']}");
/**
* Fetch array of podcast categories
*
* @param	string	text for the left cell of the table row
* @param	string	name of the <select>
* @param	mixed	selected <option>
*
*/
function print_podcast_chooser($title, $name, $selectedid = -1)
{
    print_select_row($title, $name, fetch_podcast_categories(), $selectedid, true);
}
Пример #15
0
    if (!defined('FEED_SAVE_ERROR') and !is_array($feed['options'])) {
        $feed['options'] = convert_bits_to_array($feed['options'], $vbulletin->bf_misc_feedoptions);
    }
    foreach ($feed['options'] as $bitname => $bitvalue) {
        $checked["{$bitname}"] = $bitvalue ? ' checked="checked"' : '';
    }
    $checked['itemtype']["{$feed['itemtype']}"] = ' checked="checked"';
    print_form_header('rssposter', 'update');
    print_table_header($form_title);
    if ($feed['rssfeedid']) {
        print_checkbox_row($vbphrase['reset_last_checked_time'], 'resetlastrun', 0, 1, "<span class=\"normal\">{$vbphrase['reset']}</span>");
    }
    print_yes_no_row($vbphrase['feed_is_enabled'], 'options[enabled]', $feed['options']['enabled']);
    print_input_row($vbphrase['title'], 'title', $feed['title'], false, 50);
    print_input_row($vbphrase['url_of_feed'], 'url', $feed['url'], true, 50);
    print_select_row($vbphrase['check_feed_every'], 'ttl', array(600 => construct_phrase($vbphrase['x_minutes'], 10), 1200 => construct_phrase($vbphrase['x_minutes'], 20), 1800 => construct_phrase($vbphrase['x_minutes'], 30), 3600 => construct_phrase($vbphrase['x_minutes'], 60), 7200 => construct_phrase($vbphrase['x_hours'], 2), 14400 => construct_phrase($vbphrase['x_hours'], 4), 21600 => construct_phrase($vbphrase['x_hours'], 6), 28800 => construct_phrase($vbphrase['x_hours'], 8), 36000 => construct_phrase($vbphrase['x_hours'], 10), 43200 => construct_phrase($vbphrase['x_hours'], 12)), $feed['ttl']);
    print_input_row($vbphrase['maximum_items_to_fetch'], 'maxresults', $feed['maxresults'], true, 50);
    print_label_row($vbphrase['search_items_for_words'], '
		<div><textarea name="searchwords" rows="5" cols="50" tabindex="1">' . $feed['searchwords'] . '</textarea></div>
		<input type="hidden" name="options[searchboth]" value="0" />
		<input type="hidden" name="options[matchall]" value="0" />
		<div class="smallfont">
			<label for="cb_searchboth"><input type="checkbox" name="options[searchboth]" id="cb_searchboth" value="1" tabindex="1"' . $checked['searchboth'] . ' />' . $vbphrase['search_item_body'] . '</label>
			<label for="cb_matchall"><input type="checkbox" name="options[matchall]" id="cb_matchall" value="1" tabindex="1"' . $checked['matchall'] . ' />' . $vbphrase['match_all_words'] . '</label>
		</div>
	', '', 'top', 'searchwords');
    print_input_row($vbphrase['username'], 'username', $feed['username'], false, 50);
    print_forum_chooser($vbphrase['forum'], 'forumid', $feed['forumid'], null, true, false, '[%s]');
    print_yes_no_row($vbphrase['allow_smilies'], 'options[allowsmilies]', $feed['options']['allowsmilies']);
    print_yes_no_row($vbphrase['display_signature'], 'options[showsignature]', $feed['options']['showsignature']);
    print_yes_no_row($vbphrase['convert_html_to_bbcode'], 'options[html2bbcode]', $feed['options']['html2bbcode']);
Пример #16
0
 $result = vB::getDbAssertor()->assertQuery('fetchpermgroups', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_STORED));
 $ugarr = array();
 while ($result and $result->valid()) {
     $permgroup = $result->current();
     $ugarr["{$permgroup['usergroupid']}"] = $permgroup['title'];
     $result->next();
 }
 if (!empty($ugarr)) {
     $usergrouplist = array();
     foreach ($vbulletin->usergroupcache as $usergroup) {
         $usergrouplist[] = "<input type=\"checkbox\" name=\"usergrouplist[{$usergroup['usergroupid']}]\" value=\"1\" /> {$usergroup['title']}";
     }
     $usergrouplist = implode("<br />\n", $usergrouplist);
     print_form_header('forumpermission', 'doduplicate_group');
     print_table_header($vbphrase['usergroup_based_permission_duplicator']);
     print_select_row($vbphrase['copy_permissions_from_group'], 'ugid_from', $ugarr);
     print_label_row($vbphrase['copy_permissions_to_groups'], "<span class=\"smallfont\">{$usergrouplist}</span>", '', 'top', 'usergrouplist');
     print_channel_chooser($vbphrase['only_copy_permissions_from_channel'], 'limitnodeid', 0);
     print_yes_no_row($vbphrase['overwrite_duplicate_entries'], 'overwritedupes_group', 0);
     print_yes_no_row($vbphrase['overwrite_inherited_entries'], 'overwriteinherited_group', 0);
     print_submit_row($vbphrase['go']);
 }
 // 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');
Пример #17
0
            print_stop_message('no_file_uploaded_and_no_local_file_found');
        }
    }
    xml_import_language($xml, $vbulletin->GPC['dolanguageid'], $vbulletin->GPC['title'], $vbulletin->GPC['anyversion']);
    build_language_datastore();
    print_cp_redirect("language.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&amp;goto=language.php?" . $vbulletin->session->vars['sessionurl'], 0);
}
// ##########################################################################
if ($_REQUEST['do'] == 'files') {
    require_once DIR . '/includes/functions_misc.php';
    $languages = fetch_language_titles_array('', 1);
    // download form
    print_form_header('language', 'download', 0, 1, 'downloadform" target="download');
    print_table_header($vbphrase['download']);
    print_label_row($vbphrase['language'], '<select name="dolanguageid" tabindex="1" class="bginput">' . iif($vbulletin->debug, '<option value="-1">' . MASTER_LANGUAGE . '</option>') . construct_select_options($languages, $vbulletin->GPC['dolanguageid']) . '</select>', '', 'top', 'languageid');
    print_select_row($vbphrase['product'], 'product', fetch_product_list());
    print_input_row($vbphrase['filename'], 'filename', DEFAULT_FILENAME);
    print_yes_no_row($vbphrase['include_custom_phrases'], 'custom', 0);
    print_yes_no_row($vbphrase['just_fetch_phrases'], 'just_phrases', 0);
    print_submit_row($vbphrase['download']);
    ?>
	<script type="text/javascript">
	<!--
	function js_confirm_upload(tform, filefield)
	{
		if (filefield.value == "")
		{
			return confirm("<?php 
    echo construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], '" + tform.serverfile.value + "');
    ?>
");
Пример #18
0
        $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'];
    } else {
Пример #19
0
				<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']);
    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);
        }
Пример #20
0
        if ($field_names['padding']) {
            print_select_row($vbphrase['usercss_padding'], $field_names['padding'], $allowedpaddings, $selector['padding']);
        }
        if ($field_names['background_color']) {
            print_color_input_row($vbphrase['usercss_background_color'], $field_names['background_color'], $selector['background_color'], true, 10);
        }
        if ($field_names['background_image']) {
            if (preg_match("/^([0-9]+),([0-9]+)\$/", $selector['background_image'], $picture)) {
                $selector['background_image'] = "attachment.php?albumid=" . $picture[1] . "&attachmentid=" . $picture[2];
            } else {
                $selector['background_image'] = '';
            }
            print_input_row($vbphrase['usercss_background_image'], $field_names['background_image'], $selector['background_image']);
        }
        if ($field_names['background_repeat']) {
            print_select_row($vbphrase['usercss_background_repeat'], $field_names['background_repeat'], $allowedbackgroundrepeats, $selector['background_repeat']);
        }
    }
    if ($have_output == false) {
        print_description_row($vbphrase['user_no_permission_customize_profile']);
        print_table_footer();
    } else {
        print_submit_row();
        echo $colorPicker;
        ?>
	<script type="text/javascript">
	<!--

	var bburl = "<?php 
        echo $vbulletin->options['bburl'];
        ?>
Пример #21
0
    if ($template['styleid'] == -1) {
        $template['style'] = $vbphrase['global_templates'];
    }
    print_form_header('template', 'updatetemplate');
    print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['template'], $template['title'], $template['templateid']));
    construct_hidden_code('templateid', $template['templateid']);
    construct_hidden_code('group', $vbulletin->GPC['group']);
    construct_hidden_code('searchstring', $vbulletin->GPC['searchstring']);
    construct_hidden_code('dostyleid', $template['styleid']);
    construct_hidden_code('expandset', $vbulletin->GPC['expandset']);
    construct_hidden_code('oldtitle', $template['title']);
    construct_hidden_code('lastedit', $template['dateline']);
    $backlink = "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&amp;expandset={$template['styleid']}&amp;group=" . $vbulletin->GPC['group'] . "&amp;templateid=" . $vbulletin->GPC['templateid'] . "&amp;searchstring=" . urlencode($vbulletin->GPC['searchstring']);
    $products = fetch_product_list();
    if ($template['styleid'] == -1) {
        print_select_row($vbphrase['product'], 'product', $products, $template['product']);
    } else {
        print_label_row($vbphrase['product'], $products[$template['product'] ? $template['product'] : 'vbulletin']);
        construct_hidden_code('product', $template['product'] ? $template['product'] : 'vbulletin');
    }
    print_label_row($vbphrase['style'], "<a href=\"{$backlink}\" title=\"" . $vbphrase['edit_templates'] . "\"><b>{$template['style']}</b></a>");
    print_input_row($vbphrase['title'] . ($template['styleid'] != -1 ? '<dfn>' . construct_link_code($vbphrase['view_history'], 'template.php?do=history&amp;dostyleid=' . $template['styleid'] . '&amp;title=' . urlencode($template['title']), 1) . '</dfn>' : ''), 'title', $template['title']);
    print_textarea_row($vbphrase['template'] . '
			<br /><br />
			<span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&amp;title={$template['title']}", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />-->
			</span>', 'template', $template['template_un'], 22, '75" style="width:100%', true, true, 'ltr', 'code');
    print_template_javascript();
    print_label_row($vbphrase['save_in_template_history'], '<label for="savehistory"><input type="checkbox" name="savehistory" id="savehistory" value="1" tabindex="1" />' . $vbphrase['yes'] . '</label><br /><span class="smallfont">' . $vbphrase['comment'] . '</span> <input type="text" name="histcomment" value="" tabindex="1" class="bginput" size="50" />');
    print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
    ?>
	<script type="text/javascript">
Пример #22
0
            $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'];
    $perpage = $vbulletin->GPC['perpage'];
    $seconds = $vbulletin->GPC['seconds'];
Пример #23
0
         print_input_row($vbphrase['moderator_usernames'] . "<dfn>{$vbphrase['separate_usernames_semicolon']}</dfn>", 'modusername', $moderator['username'], 0);
     } else {
         if ($_REQUEST['do'] == 'edit') {
             print_input_row($vbphrase['moderator_username'], 'modusername', $moderator['username'], 0);
         }
     }
     construct_hidden_code('redir', $vbulletin->GPC['redir']);
 }
 // usergroup membership options
 if ($_REQUEST['do'] == 'add' and can_administer('canadminusers')) {
     $usergroups = array(0 => $vbphrase['do_not_change_usergroup']);
     foreach ($vbulletin->usergroupcache as $usergroupid => $usergroup) {
         $usergroups["{$usergroupid}"] = $usergroup['title'];
     }
     print_table_header($vbphrase['usergroup_options']);
     print_select_row($vbphrase['change_moderator_primary_usergroup_to'], 'usergroupid', $usergroups, 0);
     print_membergroup_row($vbphrase['make_moderator_a_member_of'], 'membergroupids', 2);
 }
 // post permissions
 print_description_row($vbphrase['post_thread_permissions'], false, 2, 'thead');
 print_yes_no_row($vbphrase['can_edit_posts'], 'modperms[caneditposts]', $moderator['caneditposts']);
 print_yes_no_row($vbphrase['can_delete_posts'], 'modperms[candeleteposts]', $moderator['candeleteposts']);
 print_yes_no_row($vbphrase['can_physically_delete_posts'], 'modperms[canremoveposts]', $moderator['canremoveposts']);
 // thread permissions
 print_yes_no_row($vbphrase['can_open_close_threads'], 'modperms[canopenclose]', $moderator['canopenclose']);
 print_yes_no_row($vbphrase['can_edit_threads'], 'modperms[caneditthreads]', $moderator['caneditthreads']);
 print_yes_no_row($vbphrase['can_manage_threads'], 'modperms[canmanagethreads]', $moderator['canmanagethreads']);
 print_yes_no_row($vbphrase['can_edit_polls'], 'modperms[caneditpoll]', $moderator['caneditpoll']);
 // moderation permissions
 print_description_row($vbphrase['forum_permissions'], false, 2, 'thead');
 print_yes_no_row($vbphrase['can_post_announcements'], 'modperms[canannounce]', $moderator['canannounce']);
Пример #24
0
            $promotion['reputationtype'] = 0;
        }
        if ($vbulletin->GPC['returnug']) {
            construct_hidden_code('returnug', 1);
        }
        construct_hidden_code('userpromotionid', $vbulletin->GPC['userpromotionid']);
        construct_hidden_code('usergroupid', $promotion['usergroupid']);
        print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['promotion'], $promotion['title'], $promotion['userpromotionid']));
    }
    $promotionarray = array(17 => $vbphrase['posts'], 18 => $vbphrase['join_date'], 16 => $vbphrase['reputation'], 0 => $vbphrase['promotion_strategy1'], 1 => $vbphrase['promotion_strategy2'], 2 => $vbphrase['promotion_strategy3'], 3 => $vbphrase['promotion_strategy4'], 4 => $vbphrase['promotion_strategy5'], 5 => $vbphrase['promotion_strategy6'], 6 => $vbphrase['promotion_strategy7'], 7 => $vbphrase['promotion_strategy8']);
    print_input_row($vbphrase['reputation_level'], 'promotion[reputation]', $promotion['reputation']);
    print_input_row($vbphrase['days_registered'], 'promotion[date]', $promotion['date']);
    print_input_row($vbphrase['posts'], 'promotion[posts]', $promotion['posts']);
    print_select_row($vbphrase['promotion_strategy'] . " <dfn> {$vbphrase['promotion_strategy_description']}</dfn>", 'promotion[strategy]', $promotionarray, $promotion['strategy']);
    print_select_row($vbphrase['promotion_type'] . ' <dfn>' . $vbphrase['promotion_type_description_primary_additional'] . '</dfn>', 'promotion[type]', array(1 => $vbphrase['primary_usergroup'], 2 => $vbphrase['additional_usergroups']), $promotion['type']);
    print_select_row($vbphrase['reputation_comparison_type'] . '<dfn>' . $vbphrase['reputation_comparison_type_desc'] . '</dfn>', 'promotion[reputationtype]', array($vbphrase['greater_or_equal_to'], $vbphrase['less_than']), $promotion['reputationtype']);
    print_chooser_row($vbphrase['move_user_to_usergroup'] . " <dfn>{$vbphrase['move_user_to_usergroup_description']}</dfn>", 'promotion[joinusergroupid]', 'usergroup', $promotion['joinusergroupid'], '&nbsp;');
    print_submit_row(iif(empty($vbulletin->GPC['userpromotionid']), $vbphrase['save'], '_default_'));
}
// ###################### Start do edit/insert promotions #######################
if ($_POST['do'] == 'doupdatepromotion') {
    $vbulletin->input->clean_array_gpc('p', array('promotion' => TYPE_ARRAY, 'userpromotionid' => TYPE_INT, 'returnug' => TYPE_BOOL));
    if ($vbulletin->GPC['promotion']['joinusergroupid'] == -1) {
        print_stop_message('invalid_usergroup_specified');
    }
    if ($vbulletin->GPC['promotion']['reputationtype'] and $vbulletin->GPC['promotion']['strategy'] <= 16) {
        $vbulletin->GPC['promotion']['strategy'] += 8;
    }
    unset($vbulletin->GPC['promotion']['reputationtype']);
    if (!empty($vbulletin->GPC['userpromotionid'])) {
        // update
Пример #25
0
 }
 uksort($hooklocations, 'strnatcasecmp');
 $plugin = $db->query_first("\r\n\t\tSELECT plugin.*,\r\n\t\t\tIF(product.productid IS NULL, 0, 1) AS foundproduct,\r\n\t\t\tIF(plugin.product = 'vbulletin', 1, product.active) AS productactive\r\n\t\tFROM " . TABLE_PREFIX . "plugin AS plugin\r\n\t\tLEFT JOIN " . TABLE_PREFIX . "product AS product ON(product.productid = plugin.product)\r\n\t\tWHERE pluginid = " . $vbulletin->GPC['pluginid']);
 if (!$plugin) {
     $plugin = array('executionorder' => 5);
 }
 print_form_header('plugin', 'update');
 construct_hidden_code('pluginid', $plugin['pluginid']);
 if ($_REQUEST['do'] == 'add') {
     $heading = $vbphrase['add_new_plugin'];
 } else {
     $heading = construct_phrase($vbphrase['edit_plugin_x'], htmlspecialchars_uni($plugin['title']));
 }
 print_table_header($heading);
 print_select_row($vbphrase['product'], 'product', fetch_product_list(), $plugin['product'] ? $plugin['product'] : 'vbulletin');
 print_select_row("{$vbphrase['hook_location']} <dfn>{$vbphrase['hook_location_desc']}</dfn>", 'hookname', array_merge(array('' => ''), $hooklocations), $plugin['hookname']);
 print_input_row("{$vbphrase['title']} <dfn>{$vbphrase['plugin_title_desc']}</dfn>", 'title', $plugin['title'], 1, 60);
 print_input_row("{$vbphrase['plugin_execution_order']} <dfn>{$vbphrase['plugin_order_desc']}</dfn>", 'executionorder', $plugin['executionorder'], 1, 10);
 print_textarea_row("{$vbphrase['plugin_php_code']} <dfn>{$vbphrase['plugin_code_desc']}</dfn>", 'phpcode', htmlspecialchars($plugin['phpcode']), 10, '45" style="width:100%', false, true, 'ltr', 'code');
 if ($plugin['foundproduct'] and !$plugin['productactive']) {
     print_description_row(construct_phrase($vbphrase['plugin_inactive_due_to_product_disabled'], $products["{$plugin['product']}"]));
 }
 print_yes_no_row("{$vbphrase['plugin_is_active']} <dfn>{$vbphrase['plugin_active_desc']}</dfn>", 'active', $plugin['active']);
 print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
 if ($plugin['phpcode'] != '') {
     // highlight the string
     $code = $plugin['phpcode'];
     // do we have an opening <? tag?
     if (!preg_match('#^\\s*<\\?#si', $code)) {
         // if not, replace leading newlines and stuff in a <?php tag and a closing tag at the end
         $code = "<?php BEGIN__VBULLETIN__CODE__SNIPPET {$code} \r\nEND__VBULLETIN__CODE__SNIPPET ?>";
Пример #26
0
        $userlist["{$user['userid']}"] = $user['username'];
    }
    print_form_header('modlog', 'view');
    print_table_header($vbphrase['moderator_log_viewer']);
    print_input_row($vbphrase['log_entries_to_show_per_page'], 'perpage', 15);
    print_select_row($vbphrase['show_only_entries_generated_by'], 'userid', $userlist);
    print_time_row($vbphrase['start_date'], 'startdate', 0, 0);
    print_time_row($vbphrase['end_date'], 'enddate', 0, 0);
    if (count($products = fetch_product_list()) > 1) {
        print_select_row($vbphrase['product'], 'product', array('' => $vbphrase['all_products']) + $products);
    }
    print_select_row($vbphrase['order_by'], 'orderby', array('date' => $vbphrase['date'], 'user' => $vbphrase['username']), 'date');
    print_submit_row($vbphrase['view'], 0);
    if (can_access_logs($vbulletin->config['SpecialUsers']['canpruneadminlog'], 0, '')) {
        print_form_header('modlog', 'prunelog');
        print_table_header($vbphrase['prune_moderator_log']);
        print_select_row($vbphrase['remove_entries_logged_by_user'], 'userid', $userlist);
        if (count($products) > 1) {
            print_select_row($vbphrase['product'], 'product', array('' => $vbphrase['all_products']) + $products);
        }
        print_input_row($vbphrase['remove_entries_older_than_days'], 'daysprune', 30);
        print_submit_row($vbphrase['prune_log_entries'], 0);
    }
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26275 $
|| ####################################################################
\*======================================================================*/
Пример #27
0
		)
	);

	foreach ($periodoptions["$temporary_phrase"] AS $thisperiod => $text)
	{
		if ($liftdate = convert_date_to_timestamp($thisperiod))
		{
			$periodoptions["$temporary_phrase"]["$thisperiod"] .= ' (' . vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $liftdate) . ')';
		}
	}

	print_form_header('banning', 'dobanuser');
	print_table_header($vbphrase['ban_user']);
	print_input_row($vbphrase['username'], 'username', $vbulletin->GPC['username'], 0);
	print_select_row($vbphrase['move_user_to_usergroup'], 'usergroupid', $usergroups, $selectedid);
	print_select_row($vbphrase['lift_ban_after'], 'period', $periodoptions, $vbulletin->GPC['period']);
	print_input_row($vbphrase['user_ban_reason'], 'reason', '', true, 50, 250);
	print_submit_row($vbphrase['ban_user']);
}

if ($_POST['do'] == 'updatereason')
{
	$vbulletin->input->clean_array_gpc('r', array(
		'userid' => TYPE_INT,
		'reason' => TYPE_NOHTML
	));

	if (!$canbanuser)
	{
		print_stop_message('no_permission_ban_users');
	}
Пример #28
0
    print_radio_row($vbphrase['thread_display_mode'], 'user[threadedmode]', 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);
    // ADMIN OVERRIDE OPTIONS SECTION
    print_table_header($vbphrase['admin_override_options']);
    foreach ($vbulletin->bf_misc_adminoptions as $field => $value) {
        print_yes_no_row($vbphrase['keep_' . $field], 'adminoptions[' . $field . ']', $user["{$field}"]);
    }
    print_table_break('', $INNERTABLEWIDTH);
    // TIME FIELDS SECTION
    print_table_header($vbphrase['time_options']);
    print_select_row($vbphrase['timezone'], 'user[timezoneoffset]', fetch_timezones_array(), $user['timezoneoffset']);
    print_yes_no_row($vbphrase['automatically_detect_dst_settings'], 'options[dstauto]', $user['dstauto']);
    print_yes_no_row($vbphrase['dst_currently_in_effect'], 'options[dstonoff]', $user['dstonoff']);
    print_select_row($vbphrase['default_view_age'], 'user[daysprune]', $pruneoptions, $user['daysprune']);
    print_time_row($vbphrase['join_date'], 'user[joindate]', $user['joindate']);
    print_time_row($vbphrase['last_activity'], 'user[lastactivity]', $user['lastactivity']);
    print_time_row($vbphrase['last_post'], 'user[lastpost]', $user['lastpost']);
    ($hook = vBulletinHook::fetch_hook('useradmin_edit_column2')) ? eval($hook) : false;
    ?>
	</table>
	</td>
	</tr>
	<?php 
    print_table_break('', $OUTERTABLEWIDTH);
    $tableadded = 1;
    print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'update') {
Пример #29
0
                $db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\tSET languageid = 0\n\t\t");
                build_options();
                build_language($_languageid);
                build_language_datastore();
                define('SCRIPT_REDIRECT', true);
            } else {
                $sellanguages = array();
                while ($language = $db->fetch_array($languages)) {
                    $sellanguages[$language['languageid']] = $language['title'];
                }
                $languageids = implode(',', array_keys($sellanguages));
                $db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\tSET languageid = 0\n\t\t\tWHERE languageid NOT IN ({$languageids})\n\t\t");
                if (empty($vbulletin->GPC['languageid'])) {
                    print_form_header('tools', 'language');
                    print_table_header('Select the new default language');
                    print_select_row('Language', 'languageid', $sellanguages, $vbulletin->options['languageid']);
                    print_submit_row('Submit', '');
                } else {
                    $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\t\tSET value = " . $vbulletin->GPC['languageid'] . "\n\t\t\t\tWHERE varname = 'languageid'\n\t\t\t");
                    build_options();
                    build_language($vbulletin->GPC['languageid']);
                    build_language_datastore();
                    define('SCRIPT_REDIRECT', true);
                }
            }
        }
    }
}
if (defined('SCRIPT_REDIRECT')) {
    echo '<p align="center" class="smallfont"><a href="tools.php" onclick="javascript:clearTimeout(timerID);">' . $vbphrase['processing_complete_proceed'] . '</a></p>';
    echo "\n<script type=\"text/javascript\">\n";
Пример #30
0
        print_table_header('Compose Email');
        construct_hidden_code('act', '2');
        $sql = "SELECT * FROM " . TABLE_PREFIX . "qhvbmailer_templates WHERE orderr < 1 ORDER BY created DESC";
        $templates = $db->query_read_slave($sql);
        while ($template = $db->fetch_array($templates)) {
            $select_options_templates[$template['id']] = $template_phrases[$template['id'] . "_" . $template['varname'] . "_subject"];
        }
        $select_options_usergroups[0] = 'All Users';
        $sql = "SELECT * FROM " . TABLE_PREFIX . "usergroup";
        $usergroups = $db->query_read_slave($sql);
        while ($usergroup = $db->fetch_array($usergroups)) {
            $select_options_usergroups[$usergroup['usergroupid']] = $usergroup['title'];
        }
        print_select_row('What to send', 'template_id', $select_options_templates);
        print_time_row('When to send', 'date', TIMENOW);
        print_select_row('Who to send to', 'send_to', $select_options_usergroups);
        print_submit_row('Continue', '');
    } elseif ($_GET['act'] == 2) {
        $vbulletin->input->clean_array_gpc('p', array('template_id' => TYPE_UINT, 'date' => TYPE_ARRAY, 'send_to' => TYPE_UINT));
        if ($vbulletin->GPC['template_id'] > 0) {
            $send_when = mktime($vbulletin->GPC['date'][hour], $vbulletin->GPC['date'][minute], '00', $vbulletin->GPC['date'][month], $vbulletin->GPC['date'][day], $vbulletin->GPC['date'][year]);
            if ($db->query_write("INSERT INTO " . TABLE_PREFIX . "qhvbmailer_campaigns(created, send_when, send_to, template_id) VALUES('" . TIMENOW . "', '" . $send_when . "', '" . $vbulletin->GPC['send_to'] . "', '" . $vbulletin->GPC['template_id'] . "')")) {
                print_cp_message('Campaign scheduled!', 'qhvbmailer.php?do=manage_campaigns', 1);
            } else {
                print_cp_message('Error scheduling campaign!', 'qhvbmailer.php?do=compose_email', 2);
            }
        } else {
            print_cp_message('Template ID must be greater than zero!', 'qhvbmailer.php?do=compose_email', 2);
        }
    }
} elseif ($_GET['do'] == 'manage_campaigns') {