5 * Copyright 2004 (c) GForge LLC
7 * @author Tim Perdue tim@gforge.org
10 * This file is part of GForge.
12 * GForge is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * GForge 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
23 * along with GForge; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 require_once('../env.inc.php');
28 require_once $gfcommon.'include/pre.php';
29 require_once $gfcommon.'reporting/report_utils.php';
30 require_once $gfcommon.'reporting/Report.class.php';
33 if ($report->isError()) {
34 exit_error($report->getErrorMessage());
37 $datatype = getStringFromRequest('datatype');
38 $start = getIntFromRequest('start');
39 $end = getIntFromRequest('end');
42 $z =& $report->getMonthStartArr();
47 $z =& $report->getMonthStartArr();
48 $end = $z[count($z)-1];
51 session_require_global_perm ('forge_stats', 'read') ;
53 echo report_header(_('Tool Pie Graphs'));
60 <h2><?php echo _('Tool Pie Graphs'); ?></h2>
61 <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
63 <td><strong><?php echo _('Trackers'); ?>:</strong><br /><?php echo report_tracker_box('datatype',$datatype); ?></td>
64 <td><strong><?php echo _('Start'); ?>:</strong><br /><?php echo report_months_box($report, 'start', $start); ?></td>
65 <td><strong><?php echo _('End'); ?>:</strong><br /><?php echo report_months_box($report, 'end', $end); ?></td>
66 <td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" /></td>
70 <img src="toolspie_graph.php?<?php echo "datatype=$datatype&start=$start&end=$end"; ?>" width="640" height="480" alt="" />
78 // c-file-style: "bsd"