summaryrefslogtreecommitdiff
path: root/users.php
blob: 8e59196caa4211b0e287c915d0cd0e486a4ce3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
 * $Header: /cvsroot/bitweaver/_bit_stats/users.php,v 1.4 2005/08/07 17:46:43 squareing Exp $
 *
 * Copyright (c) 2005 bitweaver.org
 * 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: users.php,v 1.4 2005/08/07 17:46:43 squareing Exp $
 * @package stats
 * @subpackage functions
 */
/**
 * Required files
 */
require_once( '../bit_setup_inc.php' );
include_once( STATS_PKG_PATH.'stats_lib.php' );

global $statslib, $gBitSystem;

$gBitSystem->verifyPackage( 'stats' );

$gBitSystem->verifyPermission( 'bit_p_view_stats' );

if (!isset($_REQUEST["period"])) {
	$_REQUEST["period"] = 86400;
}

switch( $_REQUEST["period"] ) {
	case 2592000:
		$periodName = '30 Days';
		break;
	case 604800:
		$periodName = 'Weekly';
		break;
	case 86400:
		$periodName = 'Daily';
		break;
}
$gBitSmarty->assign( 'periodName', $periodName );

$stats = $statslib->registrationStats( $_REQUEST["period"] );

$gBitSmarty->assign_by_ref( 'userStats', $stats );

// Display the template
$gBitSystem->display( 'bitpackage:stats/user_stats.tpl');

?>