* Copyright 2011, Franck Villaume - Capgemini
* http://fusionforge.org
*
- * This file is part of FusionForge.
- *
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
*
* FusionForge is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with FusionForge; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-require_once('../env.inc.php');
+require_once '../env.inc.php';
require_once $gfcommon.'include/pre.php';
+require_once $gfcommon.'include/FusionForge.class.php';
require_once $gfwww.'admin/admin_utils.php';
require_once $gfwww.'include/role_utils.php';
-$feedback = htmlspecialchars(getStringFromRequest('feedback'));
-$error_msg = htmlspecialchars(getStringFromRequest('error_msg'));
-$warning_msg = htmlspecialchars(getStringFromRequest('warning_msg'));
-
site_admin_header(array('title'=>_('Site Admin')));
$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');
<h2><?php echo _('User Maintenance'); ?></h2>
<ul>
<li><?php
- $res=db_query_params ('SELECT count(*) AS count FROM users WHERE status=$1',
- array('A')) ;
-
- $row = db_fetch_array($res);
- printf(_('Active site users: <strong>%1$s</strong>'), $row['count']);
+ $gforge = new FusionForge();
+ printf(_('Active site users: <strong>%d</strong>'),
+ $gforge->getNumberOfActiveUsers());
?></li>
</ul>
<ul>
- <li><a href="userlist.php"><?php echo _('Display Full User List/Edit Users'); ?></a> </li>
+ <li><a href="userlist.php"><?php echo _('Display Full User List/Edit Users'); ?></a></li>
<li><?php
echo _('Display Users Beginning with:').' ';
for ($i=0; $i < count($abc_array); $i++) {
}
?>
-<?php if (USE_PFO_RBAC) { ?>
<h2><?php echo _('Global roles and permissions'); ?></h2>
<ul>
<li><?php
echo '<form action="globalroleedit.php" method="post"><p>';
echo global_role_box('role_id');
- echo ' <input type="submit" name="edit" value="'._("Edit Role").'" /></p></form>';
+ echo '<input type="submit" name="edit" value="'._("Edit Role").'" /></p></form>';
?>
</li>
<li>
echo '<form action="globalroleedit.php" method="post"><p>';
echo '<input type="text" name="role_name" size="10" value="" />';
- echo ' <input type="submit" name="add" value="'._("Create Role").'" /></p></form>';
+ echo '<input type="submit" name="add" value="'._("Create Role").'" /></p></form>';
?></li>
</ul>
-<?php } ?>
<h2><?php echo _('Project Maintenance'); ?></h2>
<ul>
<li><?php
echo $plugins_site_admin_project_html;
echo '</ul>';
}
-?>
+
+if(forge_get_config('use_news')) {
+?>
<h2><?php echo _('News'); ?></h2>
<ul>
- <li><?php echo util_make_link ('/news/admin/',_('Approve/Reject')); ?> <?php echo _('Front-page news'); ?></li>
+ <li><?php echo util_make_link ('/admin/pending-news.php',_('Pending news (moderation for front-page)')); ?></li>
</ul>
+<?php } ?>
+
<h2><?php echo _('Stats'); ?></h2>
<ul>
- <li><?php echo util_make_link ('/stats/',_('Site-Wide Stats')); ?></li>
+ <li><?php echo util_make_link('/stats/',_('Site-Wide Stats')); ?></li>
+ <?php plugin_hook('webanalytics_admin', array()); ?>
</ul>
<h2><?php echo _('Trove Project Tree'); ?></h2>
<li><a href="database.php"><?php echo _('Project Database Administration'); ?></a></li>
<?php }
if(forge_get_config('use_people')) { ?>
- <li><a href="<?php echo util_make_url ('/people/admin/'); ?>"><?php echo _('Job / Categories Administration'); ?></a></li>
+ <li><a href="<?php echo util_make_url ('/people/admin/'); ?>"><?php echo _('Job / Categories Administration'); ?></a></li>
<?php } ?>
</ul>
<?php }
// mode: php
// c-file-style: "bsd"
// End:
-
-?>