3 * List of active wikis in Forge
5 * Copyright 2009-2011 Marc-Etienne Vargenau, Alcatel-Lucent
7 * This file is part of FusionForge.
9 * FusionForge is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * FusionForge is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with FusionForge; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 require_once dirname(__FILE__)."/../../env.inc.php";
25 require_once $gfcommon.'include/pre.php';
26 require_once $gfwww.'admin/admin_utils.php';
28 $title = _('List of active wikis in Forge');
29 site_admin_header(array('title'=>$title));
31 $sortorder = getStringFromRequest('sortorder', 'group_name');
32 $sortorder = util_ensure_value_in_set ($sortorder, array ('group_name','register_time','unix_group_name','is_public','is_external','members')) ;
34 $res = db_query_params('SELECT group_name,register_time,unix_group_name,groups.group_id,is_public,is_external,status, COUNT(user_group.group_id) AS members
35 FROM groups LEFT JOIN user_group ON user_group.group_id=groups.group_id
37 GROUP BY group_name,register_time,unix_group_name,groups.group_id,is_public,is_external,status
38 ORDER BY '.$sortorder,
43 _('Project Register Time'),
47 if (isset($sys_intranet) & $sys_intranet) {
48 $headers[] = _("External?");
50 $headers[] = _('Members');
51 $headers[] = _('Upgrade');
54 '/wiki/wikilist.php?sortorder=group_name',
55 '/wiki/wikilist.php?sortorder=register_time',
56 '/wiki/wikilist.php?sortorder=unix_group_name',
57 '/wiki/wikilist.php?sortorder=is_public');
58 if (isset($sys_intranet) & $sys_intranet) {
59 $headerLinks[] = '?sortorder=is_external';
61 $headerLinks[] = '/wiki/wikilist.php?sortorder=members';
64 echo $HTML->listTableTop($headers, $headerLinks);
67 while ($grp = db_fetch_array($res)) {
69 $project = group_get_object($grp['group_id']);
70 if ($project->usesPlugin("wiki")) {
72 if ($grp['register_time'] != 0) {
73 $time_display = date(_('Y-m-d H:i'),$grp['register_time']);
75 echo '<tr '.$HTML->boxGetAltRowStyle($i).'>';
76 echo '<td><a href="/wiki/g/'.$grp['unix_group_name'].'/">'.$grp['group_name'].'</a></td>';
77 echo '<td>'.$time_display.'</td>';
78 echo '<td>'.$grp['unix_group_name']. '</td>';
79 echo '<td>'.$grp['is_public'].'</td>';
80 if (isset($sys_intranet) & $sys_intranet) {
81 echo '<td>'.$grp['is_external'].'</td>';
83 echo '<td>'.$grp['members'].'</td>';
84 echo '<td><a href="/wiki/g/'.$grp['unix_group_name'].'/?action=upgrade">'._("Upgrade").'</a></td>';
90 echo $HTML->listTableBottom();
92 site_admin_footer(array());