Ejemplo n.º 1
0
    $trans_link = "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=prefix&t=1&varname=";
    // has varname appended
    print_input_row($vbphrase['title'] . ($prefixset['prefixsetid'] ? '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . "prefixset_{$prefixset['prefixsetid']}_title", 1) . '</dfn>' : ''), 'title', $prefixset['title']);
    print_input_row($vbphrase['display_order'], 'displayorder', $prefixset['displayorder']);
    $enabled_forums = array();
    if ($prefixset['prefixsetid']) {
        $forums_sql = $db->query_read("\r\n\t\t\tSELECT forumid\r\n\t\t\tFROM " . TABLE_PREFIX . "forumprefixset\r\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($prefixset['prefixsetid']) . "'\r\n\t\t");
        while ($forum = $db->fetch_array($forums_sql)) {
            $enabled_forums[] = $forum['forumid'];
        }
    }
    if (empty($enabled_forums)) {
        // default to selecting "none"
        $enabled_forums = array(-1);
    }
    print_forum_chooser($vbphrase['use_prefix_set_in_these_forums'], 'forumids[]', $enabled_forums, $vbphrase['none'], false, true);
    print_submit_row();
}
// ########################################################################
if ($_POST['do'] == 'displayorder') {
    $vbulletin->input->clean_array_gpc('p', array('prefixset_order' => TYPE_ARRAY_UINT, 'prefix_order' => TYPE_ARRAY_UINT));
    foreach ($vbulletin->GPC['prefixset_order'] as $prefixsetid => $displayorder) {
        $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "prefixset SET\r\n\t\t\t\tdisplayorder =  " . intval($displayorder) . "\r\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($prefixsetid) . "'\r\n\t\t");
    }
    foreach ($vbulletin->GPC['prefix_order'] as $prefixid => $displayorder) {
        $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "prefix SET\r\n\t\t\t\tdisplayorder =  " . intval($displayorder) . "\r\n\t\t\tWHERE prefixid = '" . $db->escape_string($prefixid) . "'\r\n\t\t");
    }
    build_prefix_datastore();
    define('CP_REDIRECT', 'prefix.php?do=list');
    print_stop_message('saved_display_order_successfully');
}
Ejemplo n.º 2
0
foreach ($vbulletin->bf_ugp_forumpermissions AS $key => $val)
{
	$bitfieldnames["$val"] = $perm_phrase["$key"];
}

if (empty($_REQUEST['do']))
{
	$_REQUEST['do'] = 'index';
}

// ###################### Start index ########################
if ($_REQUEST['do'] == 'index')
{
	print_form_header('resources', 'view');
	print_table_header($vbphrase['view_forum_permissions']);
	print_forum_chooser($vbphrase['forum'], 'forumid', -1, "($vbphrase[forum])");
	print_chooser_row($vbphrase['usergroup'], 'usergroupid', 'usergroup', '', "($vbphrase[usergroup])");
	print_label_row(
		$vbphrase['forum_permissions'],
		'<label for="cb_checkall"><input type="checkbox" id="cb_checkall" name="allbox" onclick="js_check_all(this.form)" />' . $vbphrase['check_all'] . '</label>',
		'thead'
	);
	foreach ($vbulletin->bf_ugp_forumpermissions AS $field => $value)
	{
		print_checkbox_row($perm_phrase["$field"], "checkperm[$value]", false, $value);
	}
	print_submit_row($vbphrase['find']);

}

// ###################### Start viewing resources for forums or usergroups ########################
Ejemplo n.º 3
0
    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']);
    print_table_header($vbphrase['templates']);
    print_description_row('<div class="smallfont">' . $vbphrase['rss_templates_description'] . '</div>');
    print_input_row($vbphrase['title_template'], 'titletemplate', $feed['titletemplate'], true, 50);
    print_textarea_row($vbphrase['body_template'], 'bodytemplate', $feed['bodytemplate'], 10, 50);
    print_description_row('<label for="rb_itemtype_thread"><input type="radio" name="itemtype" value="thread" id="rb_itemtype_thread"' . $checked['itemtype']['thread'] . "  />{$vbphrase['post_items_as_threads']}</label>", false, 2, 'thead', 'left', 'itemtype');
    if ($prefix_options = construct_prefix_options(0, $feed['prefixid'])) {
        print_label_row($vbphrase['prefix'] . '<dfn>' . $vbphrase['note_prefix_must_allowed_forum'] . '</dfn>', '<select name="prefixid" class="bginput">' . $prefix_options . '</select>', '', 'top', 'prefixid');
    }
    // build thread icon picker
    $icons = array();
    $icons_result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "icon ORDER BY imagecategoryid, displayorder");
    $icons_total = $db->num_rows($icons_result);
Ejemplo n.º 4
0
         $perms = convert_bits_to_array($moderator['permissions'], $vbulletin->bf_misc_moderatorpermissions);
         $perms2 = convert_bits_to_array($moderator['permissions2'], $vbulletin->bf_misc_moderatorpermissions2);
         $moderator = array_merge($perms, $perms2, $moderator);
         log_admin_action('username = '******'username'] . ', userid = ' . $moderator['userid']);
         // delete link
         print_form_header('moderator', 'remove');
         construct_hidden_code('moderatorid', $vbulletin->GPC['moderatorid']);
         print_table_header($vbphrase['if_you_would_like_to_remove_this_moderator'] . ' &nbsp; &nbsp; <input type="submit" class="button" value="' . $vbphrase['remove'] . '" tabindex="1" />');
         print_table_footer();
         print_form_header('moderator', 'update');
         construct_hidden_code('moderatorid', $vbulletin->GPC['moderatorid']);
         print_table_header(construct_phrase($vbphrase['edit_moderator_x_for_forum_y'], $moderator['username'], $moderator['forumtitle']));
     }
 }
 if ($_REQUEST['do'] != 'editglobal') {
     print_forum_chooser($vbphrase['forum_and_children'], 'forumid', $moderator['forumid']);
     if ($_REQUEST['do'] == 'add') {
         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'];
     }
Ejemplo n.º 5
0
function print_move_prune_rows()
{
    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['thread_open'], 'closed' => $vbphrase['thread_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_forum_chooser($vbphrase['forum'], 'thread[forumid]', -1, $vbphrase['all_forums'], true);
    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');
    }
}
Ejemplo n.º 6
0
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "forumpermission WHERE forumpermissionid IN ({$removeids})");
    build_forum_permissions();
    define('CP_REDIRECT', 'forumpermission.php?do=modify');
    print_stop_message('deleted_forum_permissions_successfully');
}
// ###################### Start quick forum setup #######################
if ($_REQUEST['do'] == 'quickforum') {
    $usergrouplist = array();
    $usergroups = $db->query_read("SELECT usergroupid, title FROM " . TABLE_PREFIX . "usergroup ORDER BY title");
    while ($usergroup = $db->fetch_array($usergroups)) {
        $usergrouplist[] = "<input type=\"checkbox\" name=\"usergrouplist[{$usergroup['usergroupid']}]\" value=\"1\" tabindex=\"1\" /> {$usergroup['title']}";
    }
    $usergrouplist = implode('<br />', $usergrouplist);
    print_form_header('forumpermission', 'doquickforum');
    print_table_header($vbphrase['quick_forum_permission_setup']);
    print_forum_chooser($vbphrase['apply_permissions_to_forum'], 'forumid', -1);
    print_label_row($vbphrase['apply_permissions_to_usergroup'], "<span class=\"smallfont\">{$usergrouplist}</span>", '', 'top', 'usergrouplist');
    print_description_row($vbphrase['permission_overwrite_notice']);
    print_table_break();
    print_forum_permission_rows($vbphrase['permissions']);
    print_submit_row();
}
// ###################### Start do quick forum #######################
if ($_POST['do'] == 'doquickforum') {
    $vbulletin->input->clean_array_gpc('p', array('usergrouplist' => TYPE_ARRAY, 'forumid' => TYPE_INT, 'forumpermission' => TYPE_ARRAY_INT));
    if (sizeof($vbulletin->GPC['usergrouplist']) == 0) {
        print_stop_message('invalid_usergroup_specified');
    }
    require_once DIR . '/includes/functions_misc.php';
    $permbits = convert_array_to_bits($vbulletin->GPC['forumpermission'], $vbulletin->bf_ugp_forumpermissions, 1);
    foreach ($vbulletin->GPC['usergrouplist'] as $usergroupid => $confirm) {
Ejemplo n.º 7
0
     if (!($forum = fetch_foruminfo($vbulletin->GPC['forumid'], false))) {
         print_stop_message('invalid_forum_specified');
     }
     print_form_header('forum', 'update');
     print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['forum'], $forum['title'], $forum['forumid']));
     construct_hidden_code('forumid', $vbulletin->GPC['forumid']);
 }
 $forum['title'] = str_replace('&amp;', '&', $forum['title']);
 $forum['description'] = str_replace('&amp;', '&', $forum['description']);
 print_input_row($vbphrase['title'], 'forum[title]', $forum['title']);
 print_textarea_row($vbphrase['description'], 'forum[description]', $forum['description']);
 print_input_row($vbphrase['forum_link'], 'forum[link]', $forum['link']);
 print_input_row("{$vbphrase['display_order']}<dfn>{$vbphrase['zero_equals_no_display']}</dfn>", 'forum[displayorder]', $forum['displayorder']);
 //print_input_row($vbphrase['default_view_age'], 'forum[daysprune]', $forum['daysprune']);
 if ($vbulletin->GPC['forumid'] != -1) {
     print_forum_chooser($vbphrase['parent_forum'], 'forum[parentid]', $forum['parentid'], $vbphrase['no_one']);
 } else {
     construct_hidden_code('parentid', 0);
 }
 // make array for daysprune menu
 $pruneoptions = array('1' => $vbphrase['show_threads_from_last_day'], '2' => construct_phrase($vbphrase['show_threads_from_last_x_days'], 2), '7' => $vbphrase['show_threads_from_last_week'], '10' => construct_phrase($vbphrase['show_threads_from_last_x_days'], 10), '14' => construct_phrase($vbphrase['show_threads_from_last_x_weeks'], 2), '30' => $vbphrase['show_threads_from_last_month'], '45' => construct_phrase($vbphrase['show_threads_from_last_x_days'], 45), '60' => construct_phrase($vbphrase['show_threads_from_last_x_months'], 2), '75' => construct_phrase($vbphrase['show_threads_from_last_x_days'], 75), '100' => construct_phrase($vbphrase['show_threads_from_last_x_days'], 100), '365' => $vbphrase['show_threads_from_last_year'], '-1' => $vbphrase['show_all_threads']);
 print_select_row($vbphrase['default_view_age'], 'forum[daysprune]', $pruneoptions, $forum['daysprune']);
 $sort_fields = array('title' => $vbphrase['thread_title'], 'lastpost' => $vbphrase['last_post_time'], 'dateline' => $vbphrase['thread_start_time'], 'replycount' => $vbphrase['number_of_replies'], 'views' => $vbphrase['number_of_views'], 'postusername' => $vbphrase['thread_starter'], 'voteavg' => $vbphrase['thread_rating']);
 print_select_row($vbphrase['default_sort_field'], 'forum[defaultsortfield]', $sort_fields, $forum['defaultsortfield']);
 print_select_row($vbphrase['default_sort_order'], 'forum[defaultsortorder]', array('asc' => $vbphrase['ascending'], 'desc' => $vbphrase['descending']), $forum['defaultsortorder']);
 print_select_row($vbphrase['show_private_forum'], 'forum[showprivate]', array($vbphrase['use_default'], $vbphrase['no'], $vbphrase['yes_hide_post_counts'], $vbphrase['yes_display_post_counts']), $forum['showprivate']);
 print_table_header($vbphrase['moderation_options']);
 print_input_row($vbphrase['emails_to_notify_when_post'], 'forum[newpostemail]', $forum['newpostemail']);
 print_input_row($vbphrase['emails_to_notify_when_thread'], 'forum[newthreademail]', $forum['newthreademail']);
 print_yes_no_row($vbphrase['moderate_posts'] . ' <dfn>(' . $vbphrase['require_moderator_validation_before_new_posts_are_displayed'] . ')</dfn>', 'forum[options][moderatenewpost]', $forum['moderatenewpost']);
 print_yes_no_row($vbphrase['moderate_threads'] . ' <dfn>(' . $vbphrase['require_moderator_validation_before_new_threads_are_displayed'] . ')</dfn>', 'forum[options][moderatenewthread]', $forum['moderatenewthread']);
Ejemplo n.º 8
0
			{
				print_table_header($vbphrase['no_permission_global_announcement']);
				print_table_break();
			}
			else if ($announcement['forumid'] != -1 AND !can_moderate($announcement['forumid'], 'canannounce'))
			{
				print_table_header($vbphrase['no_permission_announcement']);
				print_table_break();
			}
		}

		construct_hidden_code('announcementid', $vbulletin->GPC['announcementid']);
		print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['announcement'], htmlspecialchars_uni($announcement['title']), $announcement['announcementid']));
	}

	print_forum_chooser($vbphrase['forum_and_children'], 'forumid', $announcement['forumid'], $vbphrase['all_forums']);
	print_input_row($vbphrase['title'], 'title', $announcement['title']);

	print_time_row($vbphrase['start_date'], 'startdate', $announcement['startdate'], 0);
	print_time_row($vbphrase['end_date'], 'enddate', $announcement['enddate'], 0);

	print_textarea_row($vbphrase['text'], 'pagetext', $announcement['pagetext'], 20, '75" style="width:100%');

	if ($vbulletin->GPC['announcementid'])
	{
		print_yes_no_row($vbphrase['reset_views_counter'], 'reset_views', 0);
	}

	print_yes_no_row($vbphrase['allow_bbcode'], 'announcementoptions[allowbbcode]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['allowbbcode'] ? 1 : 0));
	print_yes_no_row($vbphrase['allow_smilies'], 'announcementoptions[allowsmilies]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['allowsmilies'] ? 1 : 0));
	print_yes_no_row($vbphrase['allow_html'], 'announcementoptions[allowhtml]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['allowhtml'] ? 1 : 0));
Ejemplo n.º 9
0
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['view_permissions']);
$perm_phrase = array('canview' => $vbphrase['can_view_forum'], 'canviewthreads' => $vbphrase['can_view_threads'], 'canviewothers' => $vbphrase['can_view_others_threads'], 'cansearch' => $vbphrase['can_search_forum'], 'canemail' => $vbphrase['can_use_email_to_friend'], 'canpostnew' => $vbphrase['can_post_threads'], 'canreplyown' => $vbphrase['can_reply_to_own_threads'], 'canreplyothers' => $vbphrase['can_reply_to_others_threads'], 'caneditpost' => $vbphrase['can_edit_own_posts'], 'candeletepost' => $vbphrase['can_delete_own_posts'], 'candeletethread' => $vbphrase['can_delete_own_threads'], 'canopenclose' => $vbphrase['can_open_close_own_threads'], 'canmove' => $vbphrase['can_move_own_threads'], 'cangetattachment' => $vbphrase['can_view_attachments'], 'canseethumbnails' => $vbphrase['can_see_thumbnails'], 'canpostattachment' => $vbphrase['can_post_attachments'], 'canpostpoll' => $vbphrase['can_post_polls'], 'canvote' => $vbphrase['can_vote_on_polls'], 'canthreadrate' => $vbphrase['can_rate_threads'], 'canseedelnotice' => $vbphrase['can_see_deletion_notices'], 'followforummoderation' => $vbphrase['follow_forum_moderation_rules'], 'cantagown' => $vbphrase['can_tag_own_threads'], 'cantagothers' => $vbphrase['can_tag_others_threads'], 'candeletetagown' => $vbphrase['can_delete_tags_own_threads']);
//build a nice array with permission names
foreach ($vbulletin->bf_ugp_forumpermissions as $key => $val) {
    $bitfieldnames["{$val}"] = $perm_phrase["{$key}"];
}
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'index';
}
// ###################### Start index ########################
if ($_REQUEST['do'] == 'index') {
    print_form_header('resources', 'view');
    print_table_header($vbphrase['view_forum_permissions']);
    print_forum_chooser($vbphrase['forum'], 'forumid', -1, "({$vbphrase['forum']})");
    print_chooser_row($vbphrase['usergroup'], 'usergroupid', 'usergroup', '', "({$vbphrase['usergroup']})");
    print_label_row($vbphrase['forum_permissions'], '<label for="cb_checkall"><input type="checkbox" id="cb_checkall" name="allbox" onclick="js_check_all(this.form)" />' . $vbphrase['check_all'] . '</label>', 'thead');
    foreach ($vbulletin->bf_ugp_forumpermissions as $field => $value) {
        print_checkbox_row($perm_phrase["{$field}"], "checkperm[{$value}]", false, $value);
    }
    print_submit_row($vbphrase['find']);
}
// ###################### Start viewing resources for forums or usergroups ########################
if ($_REQUEST['do'] == 'view') {
    $vbulletin->input->clean_array_gpc('r', array('checkperm' => TYPE_ARRAY_INT));
    if ($vbulletin->GPC['forumid'] == -1 and $vbulletin->GPC['usergroupid'] == -1) {
        print_stop_message('you_must_pick_a_usergroup_or_forum_to_check_permissions');
    }
    if (empty($vbulletin->GPC['checkperm'])) {
        $vbulletin->GPC['checkperm'][] = 1;
Ejemplo n.º 10
0
    print_submit_row('Edit category', 0);
    print_cp_footer();
}
// ########################################################
// ################### Do Edit Cat Form ###################
// ########################################################
if ($_POST['do'] == 'editcat') {
    $cat = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "dl_cats WHERE `id`=" . $db->sql_prepare($_POST['edit']));
    $dl->unset_subcats($cat['id']);
    print_cp_header('Manage Download Categories');
    print_form_header('download2newthreadadmin', 'doeditcat');
    print_table_header('Edit ' . $cat['name'] . '&#8217;s Thread Creation Information');
    print_label_row('<input type="hidden" name="cid" value="' . $cat['id'] . '" />');
    print_input_row('Thread UserId<dfn>Set to the userid that should be used to create threads. LEAVE at -1 if you want the uploader\'s userid used. <strong>NOTE: You must also allow the usergroup to create new threads for the user uploading the file!!</strong></dfn>', 'dl_userid_cat', $cat['dl_userid_cat']);
    //print_input_row('Forum ID<dfn>Set to the forum id where the thread will be created.  LEAVE at -1 to use the global forum id.</dfn>', 'dl_forumid_cat', $cat['dl_forumid_cat']);
    print_forum_chooser('Forum<dfn>Set to the forum where the thread will be created.  LEAVE at \'Select Forum\' to use the global forum.</dfn>', 'dl_forumid_cat', $cat['dl_forumid_cat'], null, true, false, '[%s]');
    print_yes_no_row('Prevent thread creation?<dfn>If you want this category to NEVER have threads created, click "Yes".</dfn>', 'dl_no_threads', $cat['dl_no_threads']);
    print_submit_row('Edit category', 0);
    print_cp_footer();
}
// ########################################################
// ################### Do Edit category ###################
// ########################################################
if ($_POST['do'] == 'doeditcat') {
    // Verifies that the specified forumid is valid
    if ($_POST['dl_forumid_cat'] != -1 and $_POST['dl_forumid_cat'] != 0 and empty($vbulletin->forumcache[$_POST['dl_forumid_cat']])) {
        print_stop_message('invalid_forum_specified');
    } else {
        if (!($vbulletin->forumcache[$_POST['dl_forumid_cat']]['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads']) and $_POST['dl_forumid_cat'] != 0) {
            print_stop_message('forum_is_a_category_allow_posting');
        }
Ejemplo n.º 11
0
    print_cells_row($cell);
    //Forums Policy
    foreach ($vbulletin->forumcache as $forumid => $forum) {
        $forumtitle = construct_depth_mark($forum['depth'], '--', $startdepth) . ' ' . $forum['title'] . ' ' . iif(!($forum['options'] & $vbulletin->bf_misc_forumoptions['allowposting']), " ({$vbphrase['forum_is_closed_for_posting']})");
        $policy = getPointPolicy($forum);
        $cell = array();
        $cell[] = $forumtitle;
        $cell[] = $policy['kbank_perthread_str'];
        $cell[] = $policy['kbank_perreply_str'];
        $cell[] = $policy['kbank_perchar_str'];
        print_cells_row($cell);
    }
    print_table_footer(4);
    print_form_header('kbankadmin', 'do_resetpolicy');
    print_table_header('Reset Forums Point Policy');
    print_forum_chooser('Please select forum to reset', 'forum[]', -1, null, false, true);
    print_input_row('[New] Per Thread Value', 'perthread', -1);
    print_input_row('[New] Per Reply Value', 'perreply', -1);
    print_input_row('[New] Per Char Value', 'perchar', -1);
    print_submit_row("Reset Policy", 0);
    print_table_footer();
    print_cp_footer();
}
if ($_GET['do'] == "do_resetpolicy") {
    $processed = true;
    $vbulletin->input->clean_array_gpc('p', array('forum' => TYPE_ARRAY_UINT, 'perthread' => TYPE_INT, 'perreply' => TYPE_INT, 'perchar' => TYPE_INT));
    $forumids =& $vbulletin->GPC['forum'];
    if (count($forumids) > 0) {
        $vbulletin->db->query("\n\t\t\tUPDATE `" . TABLE_PREFIX . "forum`\n\t\t\tSET \n\t\t\t\tkbank_perthread = {$vbulletin->GPC['perthread']}\n\t\t\t\t,kbank_perreply = {$vbulletin->GPC['perreply']}\n\t\t\t\t,kbank_perchar = {$vbulletin->GPC['perchar']}\n\t\t\tWHERE forumid IN (" . implode(',', $forumids) . ")\n\t\t");
        build_forum_permissions();
        print_cp_message('Reset Forums Point Policy Operation Completed!', 'kbankadmin.php?do=policy_man');
Ejemplo n.º 12
0
 print_input_row("{$vbphrase['summary']}<dfn>{$vbphrase['html_is_allowed']}</dfn>", 'summary', $project['summary']);
 print_textarea_row("{$vbphrase['description']}<dfn>{$vbphrase['html_is_allowed']}</dfn>", 'description', $project['description'], 6, 60);
 print_yes_no_row($vbphrase['send_email_on_issueassignment'], 'options[emailonassignment]', intval($project['options']) & $vbulletin->bf_misc['pt_projectoptions']['emailonassignment'] ? 1 : 0);
 print_input_row($vbphrase['display_order'], 'displayorder', $project['displayorder'], true, 5);
 $required_fields = '';
 foreach ($vbulletin->bf_misc['pt_projectoptions'] as $bitname => $value) {
     if (substr($bitname, 0, 7) == 'require') {
         $required_fields .= "<div class=\"smallfont\"><label><input type=\"checkbox\" name=\"options[{$bitname}]\" value=\"{$value}\" tabindex=\"1\"" . (intval($project['options']) & $value ? ' checked="checked"' : '') . " />" . $vbphrase["required_{$bitname}"] . "</label></div>";
     }
 }
 print_label_row($vbphrase['required_fields_issue_submit'], $required_fields, '', 'top', 'options');
 $afterforumids = explode(',', $project['afterforumids']);
 if ($project['afterforumids'] === '' or !$afterforumids or in_array(-1, $afterforumids)) {
     $afterforumids = array(-1);
 }
 print_forum_chooser($vbphrase['display_after_forums'], 'afterforumids[]', $afterforumids, $vbphrase['none'], false, true);
 print_input_row($vbphrase['title_in_forum_list'], 'forumtitle', $project['forumtitle']);
 if (!$project['projectid']) {
     // base permissions on an existing project
     $projects = array();
     $project_query = $db->query_read("\r\n\t\t\tSELECT projectid, title_clean\r\n\t\t\tFROM " . TABLE_PREFIX . "pt_project\r\n\t\t\tORDER BY displayorder\r\n\t\t");
     while ($proj = $db->fetch_array($project_query)) {
         $projects["{$proj['projectid']}"] = $proj['title_clean'];
     }
     print_select_row($vbphrase['base_permissions_off_existing_project'], 'permissionbase', array('0' => $vbphrase['none_meta']) + $projects);
 }
 // available issue types
 print_description_row($vbphrase['available_issue_types'], false, 2, 'thead', 'center', 'available_issue_types');
 print_description_row($vbphrase['select_start_status_for_types_available']);
 $statuses = array();
 $status_data = $db->query_read("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "pt_issuestatus\r\n\t\tORDER BY displayorder\r\n\t");
Ejemplo n.º 13
0
 print_yes_no_row($vbphrase['automediaembed_enable_cache'], 'enable_cache', $vbulletin->options['automediaembed_cache']);
 print_input_row($vbphrase['automediaembed_cache_path'], 'cache_path', $vbulletin->options['automediaembed_cache_path']);
 //##### OTHER ZONES (DEFAULT) #####
 print_table_header($vbphrase['automediaembed_zone_default_settings']);
 print_description_row($vbphrase['automediaembed_zone_desc_default']);
 print_input_row($vbphrase['automediaembed_default_width'], "width[other]", $vbulletin->options['automediaembed_width_other']);
 print_input_row($vbphrase['automediaembed_default_height'], "height[other]", $vbulletin->options['automediaembed_height_other']);
 print_input_row($vbphrase['automediaembed_default_template'], "template[other]", $vbulletin->options['automediaembed_template_other']);
 //##### POST ZONE (FORUMS) #####
 print_table_header($vbphrase['automediaembed_zone_post_settings']);
 print_description_row($vbphrase['automediaembed_zone_desc_post']);
 print_yes_no_row($vbphrase['automediaembed_doforums'], 'doforums', $vbulletin->options['automediaembed_doforums']);
 print_input_row($vbphrase['automediaembed_post_width'], "width[post]", $vbulletin->options['automediaembed_width_post']);
 print_input_row($vbphrase['automediaembed_post_height'], "height[post]", $vbulletin->options['automediaembed_height_post']);
 print_input_row($vbphrase['automediaembed_post_template'], "template[post]", $vbulletin->options['automediaembed_template_post']);
 print_forum_chooser($vbphrase['automediaembed_exempt_forums'], 'xforums[]', $settings['xforums'], null, false, true);
 //##### BLOG ZONE #####
 print_table_header($vbphrase['automediaembed_zone_blog_settings']);
 print_description_row($vbphrase['automediaembed_zone_desc_blog']);
 print_yes_no_row($vbphrase['automediaembed_doblogs'], 'doblogs', $vbulletin->options['automediaembed_doblogs']);
 print_input_row($vbphrase['automediaembed_blog_width'], "width[blog]", $vbulletin->options['automediaembed_width_blog']);
 print_input_row($vbphrase['automediaembed_blog_height'], "height[blog]", $vbulletin->options['automediaembed_height_blog']);
 print_input_row($vbphrase['automediaembed_blog_template'], "template[blog]", $vbulletin->options['automediaembed_template_blog']);
 //###### SOCIAL GROUP ZONE ######
 print_table_header($vbphrase['automediaembed_zone_group_settings']);
 print_description_row($vbphrase['automediaembed_zone_desc_group']);
 print_yes_no_row($vbphrase['automediaembed_dogroups'], 'dogroups', $vbulletin->options['automediaembed_dogroups']);
 print_input_row($vbphrase['automediaembed_group_width'], "width[group]", $vbulletin->options['automediaembed_width_group']);
 print_input_row($vbphrase['automediaembed_group_height'], "height[group]", $vbulletin->options['automediaembed_height_group']);
 print_input_row($vbphrase['automediaembed_group_template'], "template[group]", $vbulletin->options['automediaembed_template_group']);
 //##### VISITOR MESSAGE ZONE ####