summaryrefslogtreecommitdiff
path: root/pv_chart.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-06-22 12:35:26 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-06-22 12:35:26 +0000
commit643c5ff5b94066529aa1dd1e6ddf41ab86b731d1 (patch)
treef8ee1333afb89794527ad87260131cc1e12a443a /pv_chart.php
parent7b3c4d681d6a88e4e4de5a7a28524f63da468ca5 (diff)
downloadstats-643c5ff5b94066529aa1dd1e6ddf41ab86b731d1.tar.gz
stats-643c5ff5b94066529aa1dd1e6ddf41ab86b731d1.tar.bz2
stats-643c5ff5b94066529aa1dd1e6ddf41ab86b731d1.zip
massive stats overhaul. remove all non-stats code and allow packages to insert their own stats using a ::getStats method. view BitPage::getStats for an example on how it works. not sure if this is the best way to do it, but this way we'll have a unified look.
Diffstat (limited to 'pv_chart.php')
-rw-r--r--pv_chart.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/pv_chart.php b/pv_chart.php
index 89e288f..c965154 100644
--- a/pv_chart.php
+++ b/pv_chart.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_stats/pv_chart.php,v 1.6 2006/04/11 13:09:28 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_stats/pv_chart.php,v 1.7 2007/06/22 12:35:26 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: pv_chart.php,v 1.6 2006/04/11 13:09:28 squareing Exp $
+ * $Id: pv_chart.php,v 1.7 2007/06/22 12:35:26 squareing Exp $
* @package stats
* @subpackage functions
*/
@@ -17,16 +17,16 @@
* required setup
*/
require_once( '../bit_setup_inc.php' );
-//Include the code
-include_once( STATS_PKG_PATH . "stats_lib.php" );
+include_once( STATS_PKG_PATH . "Statistics.php" );
include_once( UTIL_PKG_PATH . "phplot.php" );
-global $gBitSystem;
$gBitSystem->isPackageActive( 'stats' );
$gBitSystem->verifyPermission( 'p_stats_view' );
+$stats = new Statistics();
+
$days = isset( $_REQUEST["days"] ) ? $_REQUEST['days'] : 7;
-$data = $statslib->get_pv_chart_data( $days );
+$data = $stats->getPageviewChartData( $days );
// initialise phplot and insert data
$graph =& new PHPlot( 600, 600 );