diff options
| author | spiderr <spider@viovio.com> | 2013-02-08 10:21:43 -0500 |
|---|---|---|
| committer | spiderr <spider@viovio.com> | 2013-02-08 10:21:43 -0500 |
| commit | 74d2e44352a1e923eebf57abd7e43f495c34c3c9 (patch) | |
| tree | 15a65f895d5a2aec90dfe196a6f2c7bc68e9667c | |
| parent | 048bfca7e0b6081c045489fa78f8d33677ee3cd6 (diff) | |
| parent | 30d26b5401acba82b58c7737b9de8aa95e2b6c86 (diff) | |
| download | stats-PRE_BOOTSTRAP.tar.gz stats-PRE_BOOTSTRAP.tar.bz2 stats-PRE_BOOTSTRAP.zip | |
Merge branch 'master' of github.com:bitweaver/statsPRE_BOOTSTRAP
| -rw-r--r-- | Statistics.php | 20 | ||||
| -rw-r--r-- | templates/user_stats.tpl | 8 |
2 files changed, 6 insertions, 22 deletions
diff --git a/Statistics.php b/Statistics.php index 58483bc..b7903c1 100644 --- a/Statistics.php +++ b/Statistics.php @@ -15,25 +15,7 @@ class Statistics extends BitBase { public static function prepGetList( &$pListHash ) { if( !empty( $pListHash['period'] ) ) { - switch( $pListHash["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; - } - $pListHash['period_format'] = $format; + $pListHash['period_format'] = BitDb::getPeriodFormat( $pListHash['period_format'] ); } parent::prepGetList( $pListHash ); diff --git a/templates/user_stats.tpl b/templates/user_stats.tpl index 18d6681..7cbab83 100644 --- a/templates/user_stats.tpl +++ b/templates/user_stats.tpl @@ -16,7 +16,7 @@ </div> <table class="clear data"> - <caption>{tr}User Registrations at {$gBitSystem->getConfig('site_title')}{/tr}</caption> + <caption>{$gBitSystem->getConfig('site_title')} {tr}User Registrations{/tr}</caption> <tr> <th style="width:20%;" colspan="2">{tr}Period{/tr}</td> <th style="width:80%;">{tr}Number of Registrations{/tr}</td> @@ -24,8 +24,10 @@ {foreach item=reg key=timeframe from=$userStats.per_period} <tr class="{cycle values="even,odd"}"> <td><a href="{$smarty.const.STATS_PKG_URL}users.php?period={$smarty.request.period}&timeframe={$timeframe|urlencode}">{$timeframe}</td> - <td>[<a href="{$smarty.const.STATS_PKG_URL}referer_stats.php?period={$smarty.request.period}&timeframe={$timeframe|urlencode}">Referrers</a>]</td> - <td><div style="width:{math equation="round( ( r / m ) * 100 )" r=$reg m=$userStats.max}%; background:#f80;padding:0 0 0 5px;">{$reg}</div></td> + <td> + [<a href="{$smarty.const.STATS_PKG_URL}referer_stats.php?period={$smarty.request.period}&timeframe={$timeframe|urlencode}">Referrers</a>] + </td> + <td><div style="width:{math equation="round( ( r / m ) * 100 )" r=$reg m=$userStats.max}%; background:#ff9;padding:0 0 0 5px;"><a href="{$smarty.const.USERS_PKG_URL}admin/index.php?period={$smarty.request.period}&timeframe={$timeframe|urlencode}">{$reg}</a></div></td> </tr> {foreachelse} <tr class="norecords"> |
