summaryrefslogtreecommitdiff
path: root/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'users.php')
-rw-r--r--users.php31
1 files changed, 28 insertions, 3 deletions
diff --git a/users.php b/users.php
index 6229e36..2047277 100644
--- a/users.php
+++ b/users.php
@@ -1,12 +1,12 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_stats/users.php,v 1.11 2009/10/01 14:17:05 wjames5 Exp $
+ * $Header: /cvsroot/bitweaver/_bit_stats/users.php,v 1.12 2009/11/11 17:38:46 spiderr Exp $
*
* Copyright (c) 2005 bitweaver.org
* All Rights Reserved. See below for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
*
- * $Id: users.php,v 1.11 2009/10/01 14:17:05 wjames5 Exp $
+ * $Id: users.php,v 1.12 2009/11/11 17:38:46 spiderr Exp $
* @package stats
* @subpackage functions
*/
@@ -25,7 +25,32 @@ if( !isset( $_REQUEST["period"] )) {
$_REQUEST["period"] = 'month';
}
-$gBitSmarty->assign( 'userStats', $stats->registrationStats( $_REQUEST["period"] ));
+switch( $_REQUEST["period"] ) {
+ case 'year':
+ $format = 'Y';
+ break;
+ case 'quarter':
+ $format = 'Y-\QQ';
+ break;
+ case 'day':
+ $format = 'Y-m-d';
+ break;
+ case 'week':
+ $format = 'Y \Week W';
+ break;
+ case 'month':
+ default:
+ $format = 'Y-m';
+ break;
+}
+
+if( !empty( $_REQUEST['itemize'] ) ) {
+ $listHash['registration_period'] = $_REQUEST['itemize'];
+ $listHash['registration_period_format'] = $format;
+ bit_redirect( USERS_PKG_URL.'admin/index.php?registration_period='.urlencode( $_REQUEST['itemize'] ).'&registration_period_format='.urlencode( $listHash['registration_period_format'] ) );
+}
+
+$gBitSmarty->assign( 'userStats', $stats->registrationStats( $format ));
$gBitSmarty->assign( 'period', $_REQUEST["period"] );
// Display the template