5 * This pages lists all global administration facilities for the
6 * site, including user/group properties editing, maintanance of
7 * site meta-information (Trove maps, metadata for file releases),
10 * Copyright 1999-2001 (c) VA Linux Systems
11 * Copyright 2010 (c) FusionForge Team
12 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
13 * Copyright 2011, Franck Villaume - Capgemini
14 * http://fusionforge.org
16 * This file is part of FusionForge. FusionForge is free software;
17 * you can redistribute it and/or modify it under the terms of the
18 * GNU General Public License as published by the Free Software
19 * Foundation; either version 2 of the Licence, or (at your option)
22 * FusionForge is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License along
28 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
29 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 require_once '../env.inc.php';
33 require_once $gfcommon.'include/pre.php';
34 require_once $gfcommon.'include/FusionForge.class.php';
35 require_once $gfwww.'admin/admin_utils.php';
36 require_once $gfwww.'include/role_utils.php';
38 site_admin_header(array('title'=>_('Site Admin')));
40 $abc_array = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9');
44 <h2><?php echo _('User Maintenance'); ?></h2>
47 $gforge = new FusionForge();
48 printf(_('Active site users: <strong>%d</strong>'),
49 $gforge->getNumberOfActiveUsers());
53 <li><a href="userlist.php"><?php echo _('Display Full User List/Edit Users'); ?></a></li>
55 echo _('Display Users Beginning with:').' ';
56 for ($i=0; $i < count($abc_array); $i++) {
57 echo '<a href="userlist.php?user_name_search='.$abc_array[$i].'">'.$abc_array[$i].'</a>|';
61 <form name="usersrch" action="search.php" method="post">
62 <?php echo _('Search <em>(userid, username, realname, email)</em>'); ?>:
63 <input type="text" name="search" />
64 <input type="hidden" name="substr" value="1" />
65 <input type="hidden" name="usersearch" value="1" />
66 <input type="submit" value="<?php echo _('Search'); ?>" />
69 <li><a href="../account/register.php"><?php
70 echo _('Register a New User');
73 <li><a href="userlist.php?status=P"><?php echo _('Pending users'); ?></a></li>
76 $params = array('result' => '');
77 $plugins_site_admin_user_html = '';
78 plugin_hook_by_reference("site_admin_user_maintenance_hook", $params);
79 if ($params['result']) {
80 $plugins_site_admin_user_html = $params['result'];
82 if ($plugins_site_admin_user_html) {
83 echo '<h3>'. _('Plugins User Maintenance') .'</h3>';
85 echo $plugins_site_admin_user_html;
90 <h2><?php echo _('Global roles and permissions'); ?></h2>
94 echo '<form action="globalroleedit.php" method="post"><p>';
95 echo global_role_box('role_id');
96 echo '<input type="submit" name="edit" value="'._("Edit Role").'" /></p></form>';
102 echo '<form action="globalroleedit.php" method="post"><p>';
103 echo '<input type="text" name="role_name" size="10" value="" />';
104 echo '<input type="submit" name="add" value="'._("Create Role").'" /></p></form>';
107 <h2><?php echo _('Project Maintenance'); ?></h2>
110 $res=db_query_params ('SELECT count(*) AS count FROM groups',
113 $row = db_fetch_array($res);
114 printf(_('Registered projects: <strong>%1$s</strong>'), $row['count']);
117 $res=db_query_params ('SELECT count(*) AS count FROM groups WHERE status=$1',
120 $row = db_fetch_array($res);
121 printf(_('Active projects: <strong>%1$s</strong>'), $row['count']);
124 $res=db_query_params ('SELECT count(*) AS count FROM groups WHERE status=$1',
127 $row = db_fetch_array($res);
128 printf(_('Pending projects: <strong>%1$s</strong>'), $row['count']);
130 <li><a href="grouplist.php"><?php echo _('Display Full Project List/Edit Projects'); ?></a></li>
132 <li><?php echo _('Display Projects Beginning with:').' ';
133 for ($i=0; $i < count($abc_array); $i++) {
134 echo '<a href="grouplist.php?group_name_search='.$abc_array[$i].'">'.$abc_array[$i].'</a>|';
138 <form name="gpsrch" action="search.php" method="post">
139 <?php echo _('Search <em>(groupid, project Unix name, project full name)</em>'); ?>:
140 <input type="text" name="search" />
141 <input type="hidden" name="substr" value="1" />
142 <input type="hidden" name="groupsearch" value="1" />
143 <input type="submit" value="<?php echo _('Search'); ?>" />
146 <li><?php echo util_make_link ('/register/',_('Register New Project')); ?></li>
147 <li><a href="approve-pending.php"><?php echo _('Pending projects (new project approval)'); ?></a></li>
148 <li><form name="projectsearch" action="search.php">
149 <?php echo _('Projects with status'); ?>
150 <select name="status">
151 <option value="A"><?php echo _('Active (A)'); ?></option>
152 <option value="H"><?php echo _('Hold (H)'); ?></option>
153 <option value="P"><?php echo _('Pending (P)'); ?></option>
155 <input type="hidden" name="groupsearch" value="1"/>
156 <input type="hidden" name="search" value="%"/>
157 <input type="submit" value="<?php echo _('Submit');?> "/>
159 <li><a href="search.php?groupsearch=1&is_public=0"><?php echo _('Private Projects'); ?></a></li>
162 $params = array('result' => '');
163 $plugins_site_admin_project_html = '';
164 plugin_hook_by_reference("site_admin_project_maintenance_hook", $params);
165 if ($params['result']) {
166 $plugins_site_admin_project_html = $params['result'];
168 if ($plugins_site_admin_project_html) {
169 echo '<h3>'. _('Plugins Project Maintenance') .'</h3>';
171 echo $plugins_site_admin_project_html;
176 if(forge_get_config('use_news')) {
178 <h2><?php echo _('News'); ?></h2>
180 <li><?php echo util_make_link ('/admin/pending-news.php',_('Pending news (moderation for front-page)')); ?></li>
185 <h2><?php echo _('Stats'); ?></h2>
187 <li><?php echo util_make_link('/stats/',_('Site-Wide Stats')); ?></li>
188 <?php plugin_hook('webanalytics_admin', array()); ?>
191 <h2><?php echo _('Trove Project Tree'); ?></h2>
193 <li><a href="trove/trove_cat_list.php"><?php echo _('Display Trove Map'); ?></a></li>
194 <li><a href="trove/trove_cat_add.php"><?php echo _('Add to the Trove Map'); ?></a></li>
197 <h2><?php echo _('Site Utilities'); ?></h2>
199 <li><a href="massmail.php"><?php printf(_('Mail Engine for %1$s Subscribers'), forge_get_config ('forge_name')); ?></a></li>
200 <li><a href="unsubscribe.php"><?php echo forge_get_config ('forge_name'); ?> <?php echo _('Site Mailings Maintenance'); ?></a></li>
201 <li><a href="edit_frs_filetype.php"><?php echo _('Add, Delete, or Edit File Types'); ?></a></li>
202 <li><a href="edit_frs_processor.php"><?php echo _('Add, Delete, or Edit Processors'); ?></a></li>
203 <li><a href="edit_theme.php"><?php echo _('Add, Delete, or Edit Themes'); ?></a></li>
204 <li><a href="<?php echo util_make_url ('/stats/lastlogins.php'); ?>"><?php echo _('Most Recent Opened Sessions'); ?></a></li>
205 <li><a href="cronman.php"><?php echo _('Cron Manager'); ?></a></li>
206 <li><a href="pluginman.php"><?php echo _('Plugin Manager'); ?></a></li>
207 <li><a href="configman.php"><?php echo _('Config Manager'); ?></a></li>
208 <?php plugin_hook("site_admin_option_hook", false); ?>
211 <?php if(forge_get_config('use_project_database') || forge_get_config('use_project_vhost') || forge_get_config('use_people')) { ?>
213 <?php if(forge_get_config('use_project_vhost')) { ?>
214 <li><a href="vhost.php"><?php echo _('Virtual Host Admin Tool'); ?></a></li>
217 if(forge_get_config('use_project_database')) { ?>
218 <li><a href="database.php"><?php echo _('Project Database Administration'); ?></a></li>
220 if(forge_get_config('use_people')) { ?>
221 <li><a href="<?php echo util_make_url ('/people/admin/'); ?>"><?php echo _('Job / Categories Administration'); ?></a></li>
226 site_admin_footer(array());
230 // c-file-style: "bsd"