3 * Project Statistics Page
4 * Copyright 2003 GForge, LLC
9 require_once('../../env.inc.php');
10 require_once $gfwww.'include/pre.php';
11 require_once $gfcommon.'reporting/report_utils.php';
12 require_once $gfcommon.'reporting/Report.class.php';
14 $group_id = getIntFromRequest('group_id');
19 $group =& group_get_object($group_id);
20 if (!$group || !is_object($group)) {
21 exit_error('Error','Could Not Get Group');
22 } elseif ($group->isError()) {
23 exit_error('Error',$group->getErrorMessage());
27 if ($report->isError()) {
28 exit_error($report->getErrorMessage());
31 $area = getStringFromRequest('area');
32 $SPAN = getIntFromRequest('SPAN');
33 $start = getIntFromRequest('start');
34 $end = getIntFromRequest('end');
38 $z =& $report->getMonthStartArr();
39 $start = $z[count($z)-1];
42 // Find a default SPAN value depending on the number of days.
43 $delta=($end - $start)/24/60/60;
46 if ($delta > 60) $SPAN=2;
47 if ($delta > 365) $SPAN=3;
50 site_project_header(array('title'=>_('Project Activity').' '.$group->getPublicName(),'group'=>$group_id,'toptab'=>'home'));
52 $area = util_ensure_value_in_set ($area, array ('tracker','forum','docman','taskman','downloads')) ;
53 if ($SPAN && !is_numeric($SPAN)) { $SPAN = 1; }
54 if ($start && !is_numeric($start)) { $start = false; }
55 if ($end && !is_numeric($end)) { $end = false; }
58 // BEGIN PAGE CONTENT CODE
62 <h1><?php echo _('Project Activity'); ?></h1>
64 <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
65 <input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
67 <td><strong><?php echo _('Areas'); ?>:</strong><br /><?php echo report_area_box('area',$area,$group); ?></td>
68 <td><strong><?php echo _('Type'); ?>:</strong><br /><?php echo report_span_box('SPAN',$SPAN); ?></td>
69 <td><strong><?php echo _('Start'); ?>:</strong><br /><?php echo report_months_box($report, 'start', $start); ?></td>
70 <td><strong><?php echo _('End'); ?>:</strong><br /><?php echo report_months_box($report, 'end', $end); ?></td>
71 <td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" /></td>
75 <img src="/reporting/projectact_graph.php?<?php echo "SPAN=$SPAN&start=$start&end=$end&g_id=$group_id&area=$area"; ?>" width="640" height="480" alt="" />
80 site_project_footer( array() );