4 * GForge Forum Pending Messages Management Admin Page
6 * Portions Copyright 1999-2001 (c) VA Linux Systems
7 * The rest Copyright 2002-2004 (c) GForge Team
12 * This file is part of GForge.
14 * GForge is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * GForge is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with GForge; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 by Daniel Perez - 2005
33 require_once('../../env.inc.php');
34 require_once('pre.php');
35 require_once('www/forum/include/ForumHTML.class.php');
36 require_once('www/forum/admin/ForumAdmin.class.php');
37 require_once('common/forum/Forum.class.php');
38 require_once('common/forum/ForumMessage.class.php');
39 require_once('www/forum/include/AttachManager.class.php'); //attachent manager
41 $action = getStringFromRequest('action');
42 $group_id = getIntFromRequest('group_id');
43 $forum_id = getStringFromRequest("forum_id");
45 $fa = new ForumAdmin();
47 if ($fa->Authorized($group_id)) {
48 //user authorized, continue check
50 //if there�s no forum_id input, then the user must have access to all forums, thus he�s a group admin for the forums
52 if ($fa->isGroupAdmin()) {
53 forum_header(array('title'=>_('Forums: Administration')));
54 if (getStringFromRequest("Go")) {
55 $fa->ExecuteAction("view_pending");
57 $fa->ExecuteAction($action);
59 forum_footer(array());
61 exit_permission_denied();
64 // if ($forum_id=="A") {
66 // if (!$fa->isGroupAdmin()) {
67 // exit_permission_denied();
70 if (!$fa->isForumAdmin($forum_id)) {
71 exit_permission_denied();
74 forum_header(array('title'=>_('Forums: Administration')));
75 if (getStringFromRequest("Go")) {
76 $fa->ExecuteAction("view_pending");
78 $fa->ExecuteAction($action);
80 forum_footer(array());
84 if ($fa->isGroupIdError()) {
86 } elseif ($fa->isPermissionDeniedError()) {
87 exit_permission_denied();