updated serverhandling saimod
This commit is contained in:
parent
bbd39276c8
commit
aded0aadf6
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once dirname(__FILE__).'/sql/autoload.inc';
|
require_once dirname(__FILE__).'/sql/autoload.inc';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SAI');
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SAI');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq/','SQL');
|
||||||
\SYSTEM\SAI\sai::register('\SAI\saimod_mojotrollz_server_handling');
|
\SYSTEM\SAI\sai::register('\SAI\saimod_mojotrollz_server_handling');
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace SQL;
|
||||||
|
class ONLINE_PLAYERS extends \SYSTEM\DB\QQ {
|
||||||
|
public static function get_class(){return \get_class();}
|
||||||
|
public static function mysql(){return
|
||||||
|
'SELECT count(*) as count FROM characters WHERE online = 1 OR at_login = 1;';
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,9 +6,13 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule {
|
|||||||
$vars['classic_realm_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_realm_status();
|
$vars['classic_realm_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_realm_status();
|
||||||
$vars['classic_world_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_world_status();
|
$vars['classic_world_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_world_status();
|
||||||
$vars['classic_world_test_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_world_test_status();
|
$vars['classic_world_test_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_world_test_status();
|
||||||
|
$vars['classic_players_online'] = self::online_classic();
|
||||||
|
$vars['classic_test_players_online'] = self::online_classic_test();
|
||||||
$vars['tbc_realm_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_realm_status();
|
$vars['tbc_realm_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_realm_status();
|
||||||
$vars['tbc_world_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_world_status();
|
$vars['tbc_world_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_world_status();
|
||||||
$vars['tbc_world_test_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_world_test_status();
|
$vars['tbc_world_test_status'] = self::sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_world_test_status();
|
||||||
|
$vars['tbc_players_online'] = self::online_tbc();
|
||||||
|
$vars['tbc_test_players_online'] = self::online_tbc_test();
|
||||||
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/main.tpl', $vars);}
|
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/tpl/main.tpl', $vars);}
|
||||||
public static function html_li_menu(){return '<li class=""><a data-toggle="tooltip" data-placement="left" title="Mojotrollz" href="#!mojotrollz_server"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Mojotrollz Server</a></li>';}
|
public static function html_li_menu(){return '<li class=""><a data-toggle="tooltip" data-placement="left" title="Mojotrollz" href="#!mojotrollz_server"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Mojotrollz Server</a></li>';}
|
||||||
public static function right_public(){return false;}
|
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(
|
public static function js(){return array(
|
||||||
\SYSTEM\WEBPATH(new \PSAI(),'saimod_mojotrollz_server_handling/js/saimod_mojotrollz_server_handling.js'));}
|
\SYSTEM\WEBPATH(new \PSAI(),'saimod_mojotrollz_server_handling/js/saimod_mojotrollz_server_handling.js'));}
|
||||||
//public static function css(){}
|
//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(){
|
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_update(){
|
||||||
\LIB\lib_git::php();
|
\LIB\lib_git::php();
|
||||||
$log = '';
|
$log = '';
|
||||||
|
|||||||
@ -23,6 +23,14 @@
|
|||||||
<th>world_test</th>
|
<th>world_test</th>
|
||||||
<td>${classic_world_test_status}</td>
|
<td>${classic_world_test_status}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>players live</th>
|
||||||
|
<td>${classic_players_online}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>players test</th>
|
||||||
|
<td>${classic_test_players_online}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -107,6 +115,14 @@
|
|||||||
<th>world_test</th>
|
<th>world_test</th>
|
||||||
<td>${tbc_world_test_status}</td>
|
<td>${tbc_world_test_status}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>players live</th>
|
||||||
|
<td>${tbc_players_online}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>players test</th>
|
||||||
|
<td>${tbc_test_players_online}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
8
mojotrollz/sql/mangos_one_chars.php
Normal file
8
mojotrollz/sql/mangos_one_chars.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace SQL;
|
||||||
|
class mangos_one_chars extends \SYSTEM\DB\DBInfoMYS {
|
||||||
|
public function __construct() {
|
||||||
|
parent::__construct('mangos_one_chars', 'mojotrolls_dev', 'dsjgfasudzfsvad', '127.0.0.1');}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
8
mojotrollz/sql/mangos_one_chars_test.php
Normal file
8
mojotrollz/sql/mangos_one_chars_test.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace SQL;
|
||||||
|
class mangos_one_chars_test extends \SYSTEM\DB\DBInfoMYS {
|
||||||
|
public function __construct() {
|
||||||
|
parent::__construct('mangos_one_chars_test', 'mojotrolls_dev', 'dsjgfasudzfsvad', '127.0.0.1');}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
8
mojotrollz/sql/mangos_zero_chars.php
Normal file
8
mojotrollz/sql/mangos_zero_chars.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace SQL;
|
||||||
|
class mangos_zero_chars extends \SYSTEM\DB\DBInfoMYS {
|
||||||
|
public function __construct() {
|
||||||
|
parent::__construct('mangos_zero_chars', 'mojotrolls_dev', 'dsjgfasudzfsvad', '127.0.0.1');}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
8
mojotrollz/sql/mangos_zero_chars_test1.php
Normal file
8
mojotrollz/sql/mangos_zero_chars_test1.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace SQL;
|
||||||
|
class mangos_zero_chars extends \SYSTEM\DB\DBInfoMYS {
|
||||||
|
public function __construct() {
|
||||||
|
parent::__construct('mangos_zero_chars', 'mojotrolls_dev', 'dsjgfasudzfsvad', '127.0.0.1');}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user