5 * Copyright 2004 (c) GForge LLC
7 * @version index.php,v 1.11 2004/08/05 20:48:59 tperdue Exp
8 * @author Tim Perdue tim@gforge.org
11 * This file is part of GForge.
13 * GForge is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * GForge 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
24 * along with GForge; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 require_once('../../env.inc.php');
28 require_once('pre.php');
29 require_once('common/reporting/report_utils.php');
30 require_once('common/reporting/Report.class.php');
31 require_once('www/tracker/include/ArtifactTypeHtml.class.php');
33 $sw = getStringFromRequest('sw');
34 $group_id = getIntFromRequest('group_id');
35 $atid = getStringFromRequest('atid');
36 $area = getStringFromRequest('area');
37 $SPAN = getStringFromRequest('SPAN');
38 $start = getStringFromRequest('start');
39 $end = getStringFromRequest('end');
42 if ($report->isError()) {
43 exit_error($report->getErrorMessage());
46 $group =& group_get_object($group_id);
47 if (!$group || !is_object($group)) {
48 exit_error('Error','Error - Could Not Get Group');
49 } elseif ($group->isError()) {
50 exit_error('Error',$group->getErrorMessage());
53 if (!session_loggedin()) {
57 $perm =& $group->getPermission( session_get_user() );
58 if (!$perm || !is_object($perm)) {
59 exit_error('Error','Error - Could Not Get Perm');
60 } elseif ($perm->isError()) {
61 exit_error('Error',$perm->getErrorMessage());
66 // Get list of trackers this person can see
68 if ($perm->isArtifactAdmin()) {
71 $alevel=' ap.user_id='. user_getid() ." AND ap.perm_level > 1 AND ";
74 $sql="SELECT DISTINCT agl.group_artifact_id,agl.name
75 FROM artifact_group_list agl
76 LEFT JOIN artifact_perm ap
77 ON (ap.group_artifact_id=agl.group_artifact_id)
80 agl.group_id='$group_id'";
81 $restracker=db_query($sql);
85 // Build list of reports
89 $vals[]='activity'; $labels[]='Response Time';
90 $vals[]='assignee'; $labels[]='By Assignee';
93 //required params for site_project_header();
95 $params['group']=$group_id;
96 $params['toptab']='tracker';
98 echo site_project_header($params);
101 <h3>Project Activity</h3>
103 <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
104 <input type="hidden" name="sw" value="<?php echo $sw; ?>">
105 <input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
107 <td><strong>Tracker:</strong><br /><?php echo html_build_select_box($restracker,'atid',$atid,false); ?></td>
108 <td><strong>Area:</strong><br /><?php echo html_build_select_box_from_arrays($vals, $labels, 'area',$area,false); ?></td>
109 <td><strong>Type:</strong><br /><?php echo report_span_box('SPAN',$SPAN,true); ?></td>
110 <td><strong>Start:</strong><br /><?php echo report_months_box($report, 'start', $start); ?></td>
111 <td><strong>End:</strong><br /><?php echo report_months_box($report, 'end', $end); ?></td>
112 <td><input type="submit" name="submit" value="Refresh"></td>
117 if (!$area || $area == 'activity') {
119 <img src="trackeract_graph.php?<?php echo "SPAN=$SPAN&start=$start&end=$end&group_id=$group_id&atid=$atid"; ?>" width="640" height="480">
124 <img src="trackerpie_graph.php?<?php echo "SPAN=$SPAN&start=$start&end=$end&group_id=$group_id&atid=$atid&area=$area"; ?>" width="640" height="480">
132 echo site_project_footer(array());