4 * Top-Statistics: Most active Users
6 * Copyright 1999-2000 (c) The SourceForge Crew
7 * Copyright 2002-2004 (c) GForge Team
8 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
9 * Copyright 2013, Franck Villaume - TrivialDev
10 * http://fusionforge.org/
12 * This file is part of FusionForge. FusionForge is free software;
13 * you can redistribute it and/or modify it under the terms of the
14 * GNU General Public License as published by the Free Software
15 * Foundation; either version 2 of the Licence, or (at your option)
18 * FusionForge is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 require '../env.inc.php';
29 require_once $gfcommon.'include/pre.php';
30 require_once $gfcommon.'include/Stats.class.php';
32 $offset = getIntFromRequest('offset');
33 $type = getStringFromRequest('type');
34 $limit = getStringFromRequest('limit');
36 if (!$offset || $offset < 0) {
40 if ($type == 'week') {
41 $title = _('Most Active This Week');
43 $title = _('Most Active All Time');
46 $HTML->header(array('title'=>$title));
48 print '<p><em>('._('Updated Daily').')</em></p>
50 <p>'.util_make_link ('/top/','['._('View Other Top Categories').']').'</p>';
52 $arr=array(_('Rank'),_('Project name'),_('Percentile'));
54 echo $HTML->listTableTop($arr);
57 $res_top = $stats->getMostActiveStats($type, $offset);
58 $rows=db_numrows($res_top);
61 while ($row_top = db_fetch_array($res_top)) {
62 if (!forge_check_perm ('project_read', $row_top['group_id'])) {
67 <tr '. $HTML->boxGetAltRowStyle($i) .'>
68 <td> '.$row_top['ranking'].'
70 <td>'.util_make_link_g (strtolower($row_top['unix_group_name']),$row_top['group_id'],$row_top['group_name']).'
72 <td align="right">'.substr($row_top['percentile'],0,5).'%</td>
79 <tr class="tablegetmore">
80 <td>'.util_make_link ('/top/mostactive.php?type='.$type.'&offset='.($offset-$limit),'<strong><-- '._('More').'</strong>');
87 <td align="RIGHT">'.util_make_link ('/top/mostactive.php?type='.$type.'&offset='.($offset+$limit),'<strong>'._('More').' --></strong>').'
92 echo $HTML->listTableBottom();
94 $HTML->footer(array());
98 // c-file-style: "bsd"