[UPDATE] Adding registrations to Admin Dashboard

This commit is contained in:
iAmShorty 2014-02-23 20:23:21 +01:00
parent bb77ef5d17
commit 47f6048378
3 changed files with 36 additions and 0 deletions

View File

@ -54,6 +54,16 @@ $aLoginInfo = array(
);
$smarty->assign('USER_LOGINS', $aLoginInfo);
// Fetch registration information
$aRegistrationInfo = array(
'24hours' => $user->getCountFiltered('signup_timestamp', time() - 86400, 'i', '>='),
'7days' => $user->getCountFiltered('signup_timestamp', (time() - (86400 * 7)), 'i', '>='),
'1month' => $user->getCountFiltered('signup_timestamp', (time() - (86400 * 7 * 4)), 'i', '>='),
'6month' => $user->getCountFiltered('signup_timestamp', (time() - (86400 * 7 * 4 * 6)), 'i', '>='),
'1year' => $user->getCountFiltered('signup_timestamp', (time() - (86400 * 365)), 'i', '>=')
);
$smarty->assign('USER_REGISTRATIONS', $aRegistrationInfo);
// Fetch invitation information
if (!$setting->getValue('disable_invitations')) {
$aInvitationInfo = array(

View File

@ -4,4 +4,5 @@
{include file="admin/dashboard/status.tpl"}
{if $GLOBAL.config.disable_invitations|default:"0" == 0}{include file="admin/dashboard/invitations.tpl"}{/if}
{include file="admin/dashboard/logins.tpl"}
{include file="admin/dashboard/registrations.tpl"}
{/nocache}

View File

@ -0,0 +1,25 @@
{nocache}
<article class="module width_quarter">
<header><h3>Registrations</h3></header>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="center">24 hours</th>
<th align="center">7 days</th>
<th align="center">1 month</th>
<th align="center">6 months</th>
<th align="center">1 year</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">{$USER_REGISTRATIONS.24hours}</td>
<td align="center">{$USER_REGISTRATIONS.7days}</td>
<td align="center">{$USER_REGISTRATIONS.1month}</td>
<td align="center">{$USER_REGISTRATIONS.6month}</td>
<td align="center">{$USER_REGISTRATIONS.1year}</td>
</tr>
</tbody>
</table>
</article>
{/nocache}