From aded0aadf6f5921365b5180ffdcb4bb88c00a9dd Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 18 Dec 2015 04:44:46 +0100 Subject: [PATCH] updated serverhandling saimod --- .../autoload.inc | 1 + .../qq/ONLINE_PLAYERS.php | 8 ++++++++ .../saimod_mojotrollz_server_handling.php | 12 ++++++++++++ .../tpl/main.tpl | 16 ++++++++++++++++ mojotrollz/sql/mangos_one_chars.php | 8 ++++++++ mojotrollz/sql/mangos_one_chars_test.php | 8 ++++++++ mojotrollz/sql/mangos_zero_chars.php | 8 ++++++++ mojotrollz/sql/mangos_zero_chars_test1.php | 8 ++++++++ 8 files changed, 69 insertions(+) create mode 100644 mojotrollz/sai/saimod_mojotrollz_server_handling/qq/ONLINE_PLAYERS.php create mode 100644 mojotrollz/sql/mangos_one_chars.php create mode 100644 mojotrollz/sql/mangos_one_chars_test.php create mode 100644 mojotrollz/sql/mangos_zero_chars.php create mode 100644 mojotrollz/sql/mangos_zero_chars_test1.php diff --git a/mojotrollz/sai/saimod_mojotrollz_server_handling/autoload.inc b/mojotrollz/sai/saimod_mojotrollz_server_handling/autoload.inc index 4219778..3d597da 100644 --- a/mojotrollz/sai/saimod_mojotrollz_server_handling/autoload.inc +++ b/mojotrollz/sai/saimod_mojotrollz_server_handling/autoload.inc @@ -1,4 +1,5 @@   Mojotrollz Server';} public static function right_public(){return false;} @@ -16,6 +20,14 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule { public static function js(){return array( \SYSTEM\WEBPATH(new \PSAI(),'saimod_mojotrollz_server_handling/js/saimod_mojotrollz_server_handling.js'));} //public static function css(){} + public static function online_classic(){ + return \SQL\ONLINE_PLAYERS::Q1(new \SQL\mangos_zero_chars())['count'];} + public static function online_tbc(){ + return \SQL\ONLINE_PLAYERS::Q1(new \SQL\mangos_one_chars())['count'];} + public static function online_classic_test(){ + return 0;}//\SQL\ONLINE_PLAYERS::Q1(new \SQL\mangos_zero_chars_test())['count'];} + public static function online_tbc_test(){ + return \SQL\ONLINE_PLAYERS::Q1(new \SQL\mangos_one_chars_test())['count'];} public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_update(){ \LIB\lib_git::php(); $log = ''; diff --git a/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl b/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl index 8240236..fec8208 100644 --- a/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl +++ b/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl @@ -23,6 +23,14 @@ world_test ${classic_world_test_status} + + players live + ${classic_players_online} + + + players test + ${classic_test_players_online} + @@ -107,6 +115,14 @@ world_test ${tbc_world_test_status} + + players live + ${tbc_players_online} + + + players test + ${tbc_test_players_online} + diff --git a/mojotrollz/sql/mangos_one_chars.php b/mojotrollz/sql/mangos_one_chars.php new file mode 100644 index 0000000..4eef78d --- /dev/null +++ b/mojotrollz/sql/mangos_one_chars.php @@ -0,0 +1,8 @@ +