예제 #1
0
                        $change_acl_list[$forum_id][$auth_field] = $value;
                    }
                }
            }
            $sql = 'SELECT f.* 
				FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c
				WHERE f.cat_id = c.cat_id
				ORDER BY c.cat_order, f.forum_order';
            if (!($result = $db->sql_query($sql))) {
                message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
            }
            $forum_access = array();
            while ($row = $db->sql_fetchrow($result)) {
                $forum_access[] = $row;
                //-- mod: sf
                $_sf_tree->data[$_sf_tree->make_id(intval($row['forum_id']))]['idx_row'] = count($forum_access) - 1;
                //-- mod: sf - end
            }
            $db->sql_freeresult($result);
            $sql = $mode == 'user' ? "SELECT aa.* FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g WHERE ug.user_id = {$user_id} AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND g.group_single_user = "******"SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = {$group_id}";
            if (!($result = $db->sql_query($sql))) {
                message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
            }
            $auth_access = array();
            while ($row = $db->sql_fetchrow($result)) {
                $auth_access[$row['forum_id']] = $row;
            }
            $db->sql_freeresult($result);
            $forum_auth_action = array();
            $update_acl_status = array();
            $update_mod_status = array();
예제 #2
0
     $forum_display_sort_list = get_forum_display_sort_option($forum_display_sort, 'list', 'sort');
     $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