-// Put all values in constants for the template
-define('GUESTS_ONLINE_CNT' , SQL_NUMROWS($result_guests));
-define('MEMBERS_ONLINE_CNT', SQL_NUMROWS($result_members));
-define('ADMINS_ONLINE_CNT' , SQL_NUMROWS($result_admins));
+// Prepare content
+$content = array(
+ 'guests' => countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='N'"),
+ 'members' => countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='Y'"),
+ 'admins' => countSumTotalData('Y', 'online', 'id', 'is_admin', true),
+ 'total' => $total
+);