if (empty($HTTP_POST_VARS[POST_FORUM_URL])) { // // Output a selection table if no forum id has been specified. // $template->set_filenames(array('body' => 'admin/forum_prune_select_body.tpl')); $select_list = '<select name="' . POST_FORUM_URL . '">'; $select_list .= '<option value="-1">' . $lang['All_Forums'] . '</option>'; //-- mod: sf /* for($i = 0; $i < count($forum_rows); $i++) { $select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>'; } */ $select_list .= '<option value="-2" disabled="disabled"> </option>'; $select_list .= $_sf_tree->select('', '', true); //-- mod: sf - end $select_list .= '</select>'; // // Assign the template variables. // $template->assign_vars(array('L_FORUM_PRUNE' => $lang['Forum_Prune'], 'L_SELECT_FORUM' => $lang['Select_a_Forum'], 'L_LOOK_UP' => $lang['Look_up_Forum'], 'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.{$phpEx}"), 'S_FORUMS_SELECT' => $select_list)); } else { $forum_id = intval($HTTP_POST_VARS[POST_FORUM_URL]); // // Output the form to retrieve Prune information. // $template->set_filenames(array('body' => 'admin/forum_prune_body.tpl')); $forum_name = $forum_id == -1 ? $lang['All_Forums'] : $forum_rows[0]['forum_name']; $prune_data = $lang['Prune_topics_not_posted'] . " "; $prune_data .= '<input class="post" type="text" name="prunedays" size="4"> ' . $lang['Days'];
$forum_display_order_list = get_forum_display_sort_option($forum_display_order, 'list', 'order'); //-- fin mod : topic display order ----------------------------------------------------------------- $s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />'; //-- mod : Edit Forums On Index ----------------------------------------------------- //-- add $in_from = $_GET['in_from'] ? $_GET['in_from'] : $HTTP_GET_VARS['in_from']; if (isset($in_from)) { $s_hidden_fields .= '<input type="hidden" name="popup" value="1">'; } //-- fin mod : Edit Forums On Index ------------------------------------------------- //-- mod: sf /* $catlist = get_list('category', $cat_id, TRUE); */ $parent_id = $_sf_tree->make_id(intval($forum_id) ? $_sf_tree->data[$_sf_tree->make_id($forum_id)]['forum_parent'] : 0, $cat_id); $catlist = $_sf_tree->select($parent_id, intval($forum_id) ? $_sf_tree->make_id($forum_id) : 0, false); //-- mod: sf - end $template->assign_vars(array('L_FORUM_DISPLAY_SORT' => $lang['Sort_by'], 'S_FORUM_DISPLAY_SORT_LIST' => $forum_display_sort_list, 'S_FORUM_DISPLAY_ORDER_LIST' => $forum_display_order_list, 'S_FORUM_ACTION' => append_sid("admin_forums.{$phpEx}"), 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_SUBMIT_VALUE' => $buttonvalue, 'S_CAT_LIST' => $catlist, 'S_STATUS_LIST' => $statuslist, 'S_PRUNE_ENABLED' => $prune_enabled, 'S_POINTS_LIST' => $pointslist, 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_QP_TITLE' => $lang['qp_quick_post'], 'FORUM_QP_YES' => $forum_qpes ? 'checked="checked"' : '', 'FORUM_QP_NO' => !$forum_qpes ? 'checked="checked"' : '', 'L_FORUM_TITLE' => $l_title, 'L_FORUM_EXPLAIN' => $lang['Forum_edit_delete_explain'], 'L_FORUM_SETTINGS' => $lang['Forum_settings'], 'L_FORUM_NAME' => $lang['Forum_name'], 'L_CATEGORY' => $lang['sf_Forum_parent'], 'L_FORUM_DESCRIPTION' => $lang['Forum_desc'], 'L_FORUM_DESC_EXPLAIN' => $lang['Forum_desc_explain'], 'L_FORUM_DESC_LONG' => $lang['Forum_desc_long'], 'L_DESC_LONG_EXPLAIN' => $lang['Forum_desc_long_explain'], 'L_FORUM_STATUS' => $lang['Forum_status'], 'L_PASSWORD' => $lang['Forum_password'], 'L_FORUM_ICON' => $lang['Forum_icon'], 'L_AUTO_PRUNE' => $lang['Forum_pruning'], 'L_ENABLED' => $lang['Enabled'], 'L_PRUNE_DAYS' => $lang['prune_days'], 'L_PRUNE_FREQ' => $lang['prune_freq'], 'L_DAYS' => $lang['Days'], 'FORUM_EXTERNAL_YES' => $forum_external ? 'checked="checked"' : '', 'FORUM_EXTERNAL_NO' => !$forum_external ? 'checked="checked"' : '', 'FORUM_REDIRECT_URL' => $forum_redirect_url, 'FORUM_EXT_NEWWIN_YES' => $forum_ext_newwin ? 'checked="checked"' : '', 'FORUM_EXT_NEWWIN_NO' => !$forum_ext_newwin ? 'checked="checked"' : '', 'FORUM_EXT_IMAGE' => $forum_ext_image, 'L_FORUM_EXT_NEWWIN' => $lang['Forum_ext_newwin'], 'L_FORUM_EXT_IMAGE' => $lang['Forum_ext_image'], 'L_FORUM_EXTERNAL' => $lang['Forum_external'], 'L_FORUM_REDIRECT_URL' => $lang['Forum_redirect_url'], 'L_NO' => $lang['No'], 'L_YES' => $lang['Yes'], 'L_POINTS_DISABLED' => sprintf($lang['Points_disabled'], $board_config['points_name']), 'PRUNE_DAYS' => isset($pr_row['prune_days']) ? $pr_row['prune_days'] : 7, 'PRUNE_FREQ' => isset($pr_row['prune_freq']) ? $pr_row['prune_freq'] : 1, 'FORUM_NAME' => $forumname, 'FORUM_PASSWORD' => $forum_password, 'FORUM_ENTER_LIMIT' => $forum_enter_limit, 'L_FORUM_ENTER_LIMIT' => $lang['Forum_enter_limit'], 'DESCRIPTION' => $forumdesc, 'DESCRIPTION_LONG' => $forumdesc_long, 'ICON_LIST' => $forum_icons_list, 'ICON_BASEDIR' => $phpbb_root_path . $board_config['forum_icon_path'], 'ICON_IMG' => $forumicon ? $phpbb_root_path . $board_config['forum_icon_path'] . '/' . $forumicon : $phpbb_root_path . $board_config['forum_icon_path'] . '/' . $default_ficon)); $template->pparse("body"); break; case 'createforum': // // Create a forum in the DB // if (trim($HTTP_POST_VARS['forumname']) == "") { message_die(GENERAL_ERROR, "Can't create a forum without a name"); } //-- mod: sf /* $sql = "SELECT MAX(forum_order) AS max_order FROM " . FORUMS_TABLE . "