[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/www/project/stats index.php, 1.4, 1.5 project_st
From: |
tperdue |
Subject: |
[Gforge-commits] gforge/www/project/stats index.php, 1.4, 1.5 project_stats_utils.php, 1.5, NONE stats_graph.php, 1.5, NONE |
Date: |
Wed, 28 Jul 2004 12:31:41 -0500 |
Update of /cvsroot/gforge/gforge/www/project/stats
In directory db.perdue.net:/home/tperdue/share/dev.gforge.org/www/project/stats
Modified Files:
index.php
Removed Files:
project_stats_utils.php stats_graph.php
Log Message:
Release of Reporting Module
Index: index.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/project/stats/index.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- index.php 17 Feb 2003 10:15:09 -0000 1.4
+++ index.php 28 Jul 2004 17:31:38 -0000 1.5
@@ -1,103 +1,52 @@
<?php
/**
- *
- * Project Statistics Page
- *
- * SourceForge: Breaking Down the Barriers to Open Source Development
- * Copyright 1999-2001 (c) VA Linux Systems
- * http://sourceforge.net
- *
- * @version $Id$
- *
- */
+ * Project Statistics Page
+ * Copyright 2003 GForge, LLC
+ *
+ * @version $Id$
+ */
require_once('pre.php');
-require_once('project_stats_utils.php');
+require_once('common/reporting/report_utils.php');
+require_once('common/reporting/Report.class');
if ( !$group_id ) {
exit_no_group();
}
-site_project_header(array('title'=>$Language->getText('project_stats','title')."".$groupname,'group'=>$group_id,'toptab'=>'home'));
-
-//
-// BEGIN PAGE CONTENT CODE
-//
-
-if (!$report) {
- $report='last_7';
+$report=new Report();
+if ($report->isError()) {
+ exit_error($report->getErrorMessage());
}
-print '<div align="center">';
-print '<span
style="font-size:bigger"><strong>'.$Language->getText('project_stats','usage_statistics').'</strong></span><br
/>';
-print '<img src="stats_graph.php?group_id='.$group_id.'&report='. $report
.'" />';
-print '</div>';
-
-if ( $report == 'last_7' ) {
-
- print '<p>';
- stats_project_daily( $group_id, 7 );
-
-} elseif ( $report == 'last_30' ) {
-
- print '<p>';
- stats_project_daily( $group_id, 30 );
-
-} elseif ( $report == 'months' ) {
-
- print '<p>';
- stats_project_monthly( $group_id );
-
-} else {
-
- // default stats display, DAILY
- print '<p>';
- stats_project_daily( $group_id, 7 );
-
+if (!$start) {
+ $z =& $report->getMonthStartArr();
+ $start = $z[count($z)-1];
}
-print '</p><br /><p>';
-stats_project_all( $group_id );
-
-$reports_ids=array();
-$reports_ids[]='last_7';
-$reports_ids[]='last_30';
-$reports_ids[]='months';
-
-$reports_names=array();
-$reports_names[]=$Language->getText('project_stats','last_7_days');
-$reports_names[]=$Language->getText('project_stats','last_30_days');
-$reports_names[]=$Language->getText('project_stats','monthly');
-
-?>
-</p>
-<div align="center">
-<form action="index.php" method="get">
-<?php echo $Language->getText('project_stats','view_reports') ?>:
-<?php
-
- echo html_build_select_box_from_arrays($reports_ids, $reports_names,
'report', $report, false);
+site_project_header(array('title'=>"Project statistics
".$groupname,'group'=>$group_id,'toptab'=>'home'));
+//
+// BEGIN PAGE CONTENT CODE
+//
?>
-
-<input type="submit" value="<?php echo
$Language->getText('project_stats','change_stats_view') ?>" />
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
+<h3>Project Activity</h3>
+<p>
+<form action="<?php echo $PHP_SELF; ?>" method="get">
+<input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
+<table><tr>
+<td><strong>Area:</strong><br /><?php echo report_area_box('area',$area);
?></td>
+<td><strong>Type:</strong><br /><?php echo report_span_box('SPAN',$SPAN);
?></td>
+<td><strong>Start:</strong><br /><?php echo report_months_box($report,
'start', $start); ?></td>
+<td><strong>End:</strong><br /><?php echo report_months_box($report, 'end',
$end); ?></td>
+<td><input type="submit" name="submit" value="Refresh"></td>
+</tr></table>
</form>
-</div>
-
-
+<p>
+<img src="/reporting/projectact_graph.php?<?php echo
"SPAN=$SPAN&start=$start&end=$end&g_id=$group_id&area=$area"; ?>" width="640"
height="480">
<?php
-if ($group_id && user_ismember($group_id)) {
- print "
- <p>
- ".$Language->getText('project_stats','detailed_statistics').":
- <ul>
- <li><a
href=\"/tracker/?group_id=$group_id&period=$view&span=$span\">".$Language->getText('project_stats','tracker')."</a></li>
- <li><a
href=\"/pm/reporting/?group_id=$group_id&period=$view&span=$span\">".$Language->getText('project_stats','tasks')."</a></li>
- </ul>
- </p>";
-}
site_project_footer( array() );
+
?>
--- project_stats_utils.php DELETED ---
--- stats_graph.php DELETED ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/www/project/stats index.php, 1.4, 1.5 project_stats_utils.php, 1.5, NONE stats_graph.php, 1.5, NONE,
tperdue <=
- Prev by Date:
[Gforge-commits] gforge/www/tracker/reporting index.php,1.9,1.10
- Next by Date:
[Gforge-commits] gforge/common/reporting Report.class, NONE, 1.1 ReportProjectAct.class, NONE, 1.1 ReportProjectTime.class, NONE, 1.1 ReportSetup.class, NONE, 1.1 ReportSiteAct.class, NONE, 1.1 ReportSiteTime.class, NONE, 1.1 ReportTrackerAct.class, NONE, 1.1 ReportUserAct.class, NONE, 1.1 ReportUserAdded.class, NONE, 1.1 ReportUserCum.class, NONE, 1.1 ReportUserTime.class, NONE, 1.1 report_utils.php, NONE, 1.1
- Previous by thread:
[Gforge-commits] gforge/www/tracker/reporting index.php,1.9,1.10
- Next by thread:
[Gforge-commits] gforge/common/reporting Report.class, NONE, 1.1 ReportProjectAct.class, NONE, 1.1 ReportProjectTime.class, NONE, 1.1 ReportSetup.class, NONE, 1.1 ReportSiteAct.class, NONE, 1.1 ReportSiteTime.class, NONE, 1.1 ReportTrackerAct.class, NONE, 1.1 ReportUserAct.class, NONE, 1.1 ReportUserAdded.class, NONE, 1.1 ReportUserCum.class, NONE, 1.1 ReportUserTime.class, NONE, 1.1 report_utils.php, NONE, 1.1
- Index(es):