diff --git a/public/include/pages/admin/dashboard.inc.php b/public/include/pages/admin/dashboard.inc.php index deb50994..4a2d4d7a 100644 --- a/public/include/pages/admin/dashboard.inc.php +++ b/public/include/pages/admin/dashboard.inc.php @@ -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( diff --git a/public/templates/mpos/admin/dashboard/default.tpl b/public/templates/mpos/admin/dashboard/default.tpl index 36bfa757..16fbad24 100644 --- a/public/templates/mpos/admin/dashboard/default.tpl +++ b/public/templates/mpos/admin/dashboard/default.tpl @@ -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} diff --git a/public/templates/mpos/admin/dashboard/registrations.tpl b/public/templates/mpos/admin/dashboard/registrations.tpl new file mode 100644 index 00000000..b96ae710 --- /dev/null +++ b/public/templates/mpos/admin/dashboard/registrations.tpl @@ -0,0 +1,25 @@ +{nocache} +
+

Registrations

+ + + + + + + + + + + + + + + + + + + +
24 hours7 days1 month6 months1 year
{$USER_REGISTRATIONS.24hours}{$USER_REGISTRATIONS.7days}{$USER_REGISTRATIONS.1month}{$USER_REGISTRATIONS.6month}{$USER_REGISTRATIONS.1year}
+
+{/nocache}