/**
* Reporting System
*
- * Copyright 2004 (c) GForge LLC
+ * Copyright 2003-2004 (c) GForge LLC
+ * http://fusionforge.org
*
- * @author Tim Perdue tim@gforge.org
- * @date 2003-03-16
+ * 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.
*
- * This file is part of GForge.
- *
- * GForge 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.
- *
- * GForge is distributed in the hope that it will be useful,
+ * 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 GForge; 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 $gfwww.'include/pre.php';
+require_once $gfcommon.'include/pre.php';
require_once $gfcommon.'reporting/report_utils.php';
require_once $gfcommon.'reporting/Report.class.php';
$start = getIntFromRequest('start');
$end = getIntFromRequest('end');
+if (!$start || !$end) $z =& $report->getMonthStartArr();
+
if (!$start) {
- $z =& $report->getMonthStartArr();
$start = $z[0];
}
-if (!$end || $end <= $start) {
- $z =& $report->getMonthStartArr();
+if (!$end) {
$end = $z[count($z)-1];
}
+if ($end < $start) list($start, $end) = array($end, $start);
+
+if ($start == $end) {
+ $error_msg .= _('Start and end dates must be different');
+}
-$area = util_ensure_value_in_set ($area, array ('tracker','forum','docman','taskman','downloads')) ;
+$area = util_ensure_value_in_set ($area, array ('tracker','forum','docman','taskman','downloads', 'pageviews')) ;
-echo report_header(_('Site-Wide Activity'));
+report_header(_('Site-Wide Activity'));
?>
-<h2><?php echo _('Site-Wide Activity'); ?></h2>
<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
<table><tr>
<td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" /></td>
</tr></table>
</form>
-<?php if ($area) { ?>
+<?php if ($area && $start != $end) { ?>
<p>
<img src="siteact_graph.php?<?php echo "SPAN=$SPAN&start=$start&end=$end&area=$area"; ?>" width="640" height="480" alt="" />
</p>
}
-echo report_footer();
+report_footer();
// Local Variables:
// mode: php