3 * FusionForge reporting system
5 * Copyright 2003-2004, Tim Perdue/GForge, LLC
6 * Copyright 2009, Roland Mas
8 * This file is part of FusionForge.
10 * FusionForge is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published
12 * by the Free Software Foundation; either version 2 of the License,
13 * or (at your option) any later version.
15 * FusionForge is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with FusionForge; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 require_once $gfcommon.'reporting/Report.class.php';
28 class ReportProjectAct extends Report {
32 function ReportProjectAct($span,$group_id,$start=0,$end=0) {
36 $start=mktime(0,0,0,date('m'),1,date('Y'));;
45 $this->setError('No group_id');
48 if (!$span || $span == REPORT_TYPE_MONTHLY) {
49 $res = db_query_params ('SELECT * FROM rep_group_act_monthly WHERE group_id=$1 AND month BETWEEN $2 AND $3 ORDER BY month',
53 } elseif ($span == REPORT_TYPE_WEEKLY) {
54 $res = db_query_params ('SELECT * FROM rep_group_act_weekly WHERE group_id=$1 AND week BETWEEN $2 AND $3 ORDER BY week',
58 } elseif ($span == REPORT_TYPE_DAILY) {
59 $res = db_query_params ('SELECT * FROM rep_group_act_daily WHERE group_id=$1 AND day BETWEEN $2 AND $3 ORDER BY day',
65 $this->start_date=$start;
68 if (!$res || db_error()) {
69 $this->setError('ReportProjectAct:: '.db_error());
72 $this->setSpan($span);
73 $this->setDates($res,1);
78 function &getTrackerOpened() {
79 return util_result_column_to_array($this->res,2);
82 function &getTrackerClosed() {
83 return util_result_column_to_array($this->res,3);
86 function &getForum() {
87 return util_result_column_to_array($this->res,4);
91 return util_result_column_to_array($this->res,5);
94 function &getDownloads() {
95 return util_result_column_to_array($this->res,6);
98 function &getCVSCommits() {
99 return util_result_column_to_array($this->res,7);
102 function &getTaskOpened() {
103 return util_result_column_to_array($this->res,8);
106 function &getTaskClosed() {
107 return util_result_column_to_array($this->res,9);
114 // c-file-style: "bsd"