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 * http://fusionforge.org/
11 * This file is part of FusionForge. FusionForge is free software;
12 * you can redistribute it and/or modify it under the terms of the
13 * GNU General Public License as published by the Free Software
14 * Foundation; either version 2 of the Licence, or (at your option)
17 * FusionForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 require ('../env.inc.php');
28 require_once $gfcommon.'include/pre.php';
29 require_once $gfcommon.'include/Stats.class.php';
31 $offset = getIntFromRequest('offset');
32 $type = getStringFromRequest('type');
33 $limit = getStringFromRequest('limit');
35 if (!$offset || $offset < 0) {
39 if ($type == 'week') {
40 $title = _('Most Active This Week');
42 $title = _('Most Active All Time');
45 $HTML->header(array('title'=>$title));
47 print '<p><em>('._('Updated Daily').')</em></p>
49 <p>'.util_make_link ('/top/','['._('View Other Top Categories').']').'</p>';
51 $arr=array(_('Rank'),_('Project name'),_('Percentile'));
53 echo $HTML->listTableTop($arr);
56 $res_top = $stats->getMostActiveStats($type, $offset);
57 $rows=db_numrows($res_top);
60 while ($row_top = db_fetch_array($res_top)) {
61 if (!forge_check_perm ('project_read', $row_top['group_id'])) {
66 <tr '. $HTML->boxGetAltRowStyle($i) .'>
67 <td> '.$row_top['ranking'].'
69 <td>'.util_make_link_g (strtolower($row_top['unix_group_name']),$row_top['group_id'],$row_top['group_name']).'
71 <td align="right">'.substr($row_top['percentile'],0,5).'%</td>
78 <tr class="tablegetmore">
79 <td>'.util_make_link ('/top/mostactive.php?type='.$type.'&offset='.($offset-$LIMIT),'<strong><-- '._('More').'</strong>');
86 <td align="RIGHT">'.util_make_link ('/top/mostactive.php?type='.$type.'&offset='.($offset+$LIMIT),'<strong>'._('More').' --></strong>').'
91 echo $HTML->listTableBottom();
93 $HTML->footer(array());
97 // c-file-style: "bsd"