diff --git a/system/pages/admin/dashboard.php b/system/pages/admin/dashboard.php
index 10e8dbe8..ec86249e 100644
--- a/system/pages/admin/dashboard.php
+++ b/system/pages/admin/dashboard.php
@@ -62,18 +62,6 @@ $query = $db->query('SELECT count(*) as `how_much` FROM `houses`;');
$query = $query->fetch();
$total_houses = $query['how_much'];
-if ($db->hasColumn('accounts', 'premium_points')) {
- $points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;');
-} else {
- $points = 0;
-}
-
-if ($db->hasColumn('accounts', 'coins')) {
- $coins = $db->query('SELECT `coins`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `coins` DESC LIMIT 10;');
-} else {
- $coins = 0;
-}
-
$twig->display('admin.statistics.html.twig', array(
'total_accounts' => $total_accounts,
'total_players' => $total_players,
@@ -86,9 +74,23 @@ $twig->display('admin.dashboard.html.twig', array(
'closed_message' => $closed_message,
'status' => $status,
'account_type' => (USE_ACCOUNT_NAME ? 'name' : 'number'),
- 'points' => $points,
- 'coins' => $coins,
+
));
+
+echo '
';
+$config['modules'] = "lastlogin,points,coins";
+if(isset($config['modules']))
+ $config['modules'] = explode(",", $config['modules']);
+
+$twig_loader->prependPath(__DIR__ . '/modules/templates');
+foreach($config['modules'] as $box) {
+ $file = __DIR__ . '/modules/' . $box . '.php';
+ if(file_exists($file)) {
+ include($file);
+ }
+}
+echo '
';
+
function clearCache()
{
global $template_name;
diff --git a/system/pages/admin/modules/coins.php b/system/pages/admin/modules/coins.php
new file mode 100644
index 00000000..3dbc19c8
--- /dev/null
+++ b/system/pages/admin/modules/coins.php
@@ -0,0 +1,11 @@
+hasColumn('accounts', 'coins')) {
+ $coins = $db->query('SELECT `coins`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `coins` DESC LIMIT 10;');
+} else {
+ $coins = 0;
+}
+
+$twig->display('coins.html.twig', array(
+ 'coins' => $coins
+));
\ No newline at end of file
diff --git a/system/pages/admin/modules/lastlogin.php b/system/pages/admin/modules/lastlogin.php
new file mode 100644
index 00000000..d8d5ed52
--- /dev/null
+++ b/system/pages/admin/modules/lastlogin.php
@@ -0,0 +1,11 @@
+hasColumn('players', 'lastlogin')) {
+ $players = $db->query('SELECT `id`, `name`,`level`,`lastlogin` FROM `players` ORDER BY `lastlogin` DESC LIMIT 10;');
+} else {
+ $players = 0;
+}
+
+$twig->display('lastlogin.html.twig', array(
+ 'players' => $players,
+));
\ No newline at end of file
diff --git a/system/pages/admin/modules/points.php b/system/pages/admin/modules/points.php
new file mode 100644
index 00000000..e5040f53
--- /dev/null
+++ b/system/pages/admin/modules/points.php
@@ -0,0 +1,10 @@
+hasColumn('accounts', 'premium_points')) {
+ $points = $db->query('SELECT `premium_points`, `' . (USE_ACCOUNT_NAME ? 'name' : 'id') . '` as `name` FROM `accounts` ORDER BY `premium_points` DESC LIMIT 10;');
+} else {
+ $points = 0;
+}
+
+$twig->display('points.html.twig', array(
+ 'points' => $points,
+));
\ No newline at end of file
diff --git a/system/pages/admin/modules/templates/coins.html.twig b/system/pages/admin/modules/templates/coins.html.twig
new file mode 100644
index 00000000..e5183443
--- /dev/null
+++ b/system/pages/admin/modules/templates/coins.html.twig
@@ -0,0 +1,29 @@
+{% if coins is iterable %}
+
+
+
+
+
+
+
+ # |
+ Account {{ account_type }} |
+ Tibia coins |
+
+ {% set i = 0 %}
+ {% for result in coins %}
+ {% set i = i + 1 %}
+
+ {{ i }} |
+ {{ result.name }} |
+ {{ result.coins }} |
+
+ {% endfor %}
+
+
+
+
+
+{% endif %}
\ No newline at end of file
diff --git a/system/pages/admin/modules/templates/lastlogin.html.twig b/system/pages/admin/modules/templates/lastlogin.html.twig
new file mode 100644
index 00000000..62d6fbc5
--- /dev/null
+++ b/system/pages/admin/modules/templates/lastlogin.html.twig
@@ -0,0 +1,29 @@
+{% if players is iterable %}
+
+
+
+
+
+
+
+ # |
+ Player |
+ Login Date |
+
+ {% set i = 0 %}
+ {% for result in players %}
+ {% set i = i + 1 %}
+
+ {{ i }} |
+ {{ result.name }} |
+ {{ result.lastlogin|date("M d Y, H:i:s") }} |
+
+ {% endfor %}
+
+
+
+
+
+{% endif %}
\ No newline at end of file
diff --git a/system/pages/admin/modules/templates/points.html.twig b/system/pages/admin/modules/templates/points.html.twig
new file mode 100644
index 00000000..acdcd390
--- /dev/null
+++ b/system/pages/admin/modules/templates/points.html.twig
@@ -0,0 +1,29 @@
+{% if points is iterable %}
+
+
+
+
+
+
+
+ # |
+ Account {{ account_type }} |
+ Premium points |
+
+ {% set i = 0 %}
+ {% for result in points %}
+ {% set i = i + 1 %}
+
+ {{ i }} |
+ {{ result.name }} |
+ {{ result.premium_points }} |
+
+ {% endfor %}
+
+
+
+
+
+{% endif %}
\ No newline at end of file