5 * Copyright 1999-2001 (c) Tim Perdue - VA Linux Systems
6 * Copyright 2002-2004 (c) GForge Team
7 * Copyright 2010 (c) Franck Villaume - Capgemini
8 * http://fusionforge.org/
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require_once '../../env.inc.php';
27 require_once $gfcommon.'include/pre.php';
28 require_once $gfcommon.'forum/ForumHTML.class.php';
29 require_once $gfcommon.'forum/Forum.class.php';
30 require_once $gfcommon.'forum/ForumAdmin.class.php';
31 require_once $gfcommon.'forum/ForumFactory.class.php';
32 require_once $gfcommon.'forum/ForumMessageFactory.class.php';
33 require_once $gfcommon.'forum/ForumMessage.class.php';
34 require_once $gfcommon.'include/TextSanitizer.class.php'; // to make the HTML input by the user safe to store
36 $group_id = getIntFromRequest('group_id');
37 $group_forum_id = getIntFromRequest('group_forum_id');
38 $g=group_get_object($group_id);
39 $f = new Forum ($g,$group_forum_id);
40 if (!$f || !is_object($f)) {
41 exit_error(_('Could Not Get Forum Object'),'forums');
42 } elseif ($f->isError()) {
43 exit_error($f->getErrorMessage(),'forums');
46 session_require_perm ('forum_admin', $f->Group->getID()) ;
48 forum_header(array('title'=>_('Monitoring Users')));
50 $res = db_query_params ('select users.user_id,users.user_name, users.email, users.realname from
51 users,forum_monitored_forums fmf where fmf.user_id=users.user_id and
52 fmf.forum_id =$1 order by users.user_id',
53 array ($group_forum_id));
55 if ($res && db_numrows($res) == 0) {
56 echo '<p class="information">'._('No Monitoring Users').'</p>';
57 forum_footer(array());
61 $tableHeaders = array(_('User'), _('Email'), _('Realname'));
65 echo $HTML->listTableTop($tableHeaders);
67 while ($arr=db_fetch_array($res)) {
69 echo '<tr '. $HTML->boxGetAltRowStyle($j++) . '><td>'.$arr['user_name'].'</td>
70 <td>'.$arr['email'].'</td>
71 <td>'.$arr['realname'].'</td></tr>';
74 echo $HTML->listTableBottom();
76 forum_footer(array());