5 * Copyright 2003-2004 (c) GForge LLC
6 * Copyright 2013,2016, Franck Villaume - TrivialDev
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 require_once '../env.inc.php';
26 require_once $gfcommon.'include/pre.php';
27 require_once $gfcommon.'reporting/report_utils.php';
28 require_once $gfcommon.'reporting/Report.class.php';
29 require_once $gfcommon.'reporting/ReportSiteAct.class.php';
31 session_require_global_perm ('forge_stats', 'read') ;
34 if ($report->isError()) {
35 exit_error($report->getErrorMessage());
38 $area = getStringFromRequest('area');
39 $SPAN = getIntFromRequest('SPAN');
40 $start = getIntFromRequest('start');
41 $end = getIntFromRequest('end');
43 if (!$start || !$end) {
44 $z =& $report->getMonthStartArr();
51 $end = $z[count($z)-1];
54 list($start, $end) = array($end, $start);
58 $error_msg .= _('Start and end dates must be different');
61 $area = util_ensure_value_in_set ($area, array ('tracker','forum','docman','taskman','downloads', 'pageviews')) ;
63 html_use_jqueryjqplotpluginCanvas();
64 html_use_jqueryjqplotpluginhighlighter();
65 html_use_jqueryjqplotplugindateAxisRenderer();
66 html_use_jqueryjqplotpluginBar();
68 report_header(_('Site-Wide Activity'));
69 echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 'method' =>'get'));
72 <td><strong><?php echo _('Area')._(':'); ?></strong><br /><?php echo report_area_box('area',$area); ?></td>
73 <td><strong><?php echo _('Type')._(':'); ?></strong><br /><?php echo report_span_box('SPAN',$SPAN); ?></td>
74 <td><strong><?php echo _('Start Date')._(':'); ?></strong><br /><?php echo report_months_box($report, 'start', $start); ?></td>
75 <td><strong><?php echo _('End Date')._(':'); ?></strong><br /><?php echo report_months_box($report, 'end', $end); ?></td>
76 <td><br><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" /></td>
79 echo $HTML->closeForm();
80 if ($area && $start != $end) {
81 report_actgraph('sitewide', $SPAN, $start, $end, 0, $area);
88 // c-file-style: "bsd"