diff --git a/mojotrollz/sai/autoload.inc b/mojotrollz/sai/autoload.inc
index 1f33a44..19f8480 100644
--- a/mojotrollz/sai/autoload.inc
+++ b/mojotrollz/sai/autoload.inc
@@ -1,7 +1,9 @@
Classic Server';}
+ public static function right_public(){return false;}
+ public static function right_right(){return \SYSTEM\SECURITY\security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
+ public static function js(){return array(new \PSAI('saimod_mojotrollz_server_classic/js/saimod_mojotrollz_server_classic.js'));}
+ //public static function css(){}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_stats_classic($filter = 600){
+ return \SYSTEM\LOG\JsonResult::toString(\SQL\STATS_CLASSIC::QA(array($filter)));}
+
+ public static function online_classic(){
+ return \SQL\ONLINE_PLAYERS::Q1(new \SQL\mangos_zero_chars())['count'];}
+ public static function online_classic_test(){
+ return 0;}//\SQL\ONLINE_PLAYERS::Q1(new \SQL\mangos_zero_chars_test())['count'];}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_chars_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/Char.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_chars_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/Char.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_db_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/DBErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_db_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_eventai_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_eventai_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_realm_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/Realmd.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_realm_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_sd2_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_sd2_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_server_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/Server.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_log_classic_server_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/Server.log'));}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_chars_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/Char.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_chars_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/Char.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_db_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/DBErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_db_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_eventai_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_eventai_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_realm_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/Realmd.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_realm_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_sd2_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_sd2_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_server_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/Server.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_logdel_classic_server_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/Server.log',''));}
+
+ private static function shell_run($ver,$prog,$cmd){
+ return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/run '.$ver.' '.$prog.' '.$cmd.' 2>&1'));}
+ private static function shell_db($ver,$db,$cmd){
+ return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/db '.$ver.' '.$db.' '.$cmd.' 2>&1'));}
+ private static function shell_compile($ver,$cmd){
+ return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/compile '.$ver.' '.$cmd.' 2>&1'));}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_compile_classic_live(){
+ $log = \htmlentities(self::shell_compile('classic', 'live'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'classic/server/bin/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_compile_classic_test(){
+ $log = \htmlentities(self::shell_compile('classic', 'test'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'classic/server/bin_test/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_db_classic_realm_live(){
+ return \htmlentities(self::shell_db('classic', 'realm', 'live'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_db_classic_chars_live(){
+ return \htmlentities(self::shell_db('classic', 'chars', 'live'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_db_classic_chars_test(){
+ return \htmlentities(self::shell_db('classic', 'chars', 'test'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_db_classic_world_live(){
+ return \htmlentities(self::shell_db('classic', 'world', 'live'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_db_classic_world_test(){
+ return \htmlentities(self::shell_db('classic', 'world', 'test'));}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_realm_start(){
+ return self::shell_run('classic', 'realm','start');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_world_start(){
+ return self::shell_run('classic', 'world','start');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_world_test_start(){
+ return self::shell_run('classic', 'world_test','start');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_realm_stop(){
+ return self::shell_run('classic', 'realm','stop');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_world_stop(){
+ return self::shell_run('classic', 'world','stop');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_world_test_stop(){
+ return self::shell_run('classic', 'world_test','stop');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_realm_status(){
+ return self::shell_run('classic', 'realm','status');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_world_status(){
+ return self::shell_run('classic', 'world','status');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_classic_action_run_classic_world_test_status(){
+ return self::shell_run('classic', 'world_test','status');}
+}
\ No newline at end of file
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_classic/sql/DATA_SAIMOD_MOJOTROLLZ_SERVER_CLASSIC.php b/mojotrollz/sai/saimod_mojotrollz_server_classic/sql/DATA_SAIMOD_MOJOTROLLZ_SERVER_CLASSIC.php
new file mode 100644
index 0000000..479ab19
--- /dev/null
+++ b/mojotrollz/sai/saimod_mojotrollz_server_classic/sql/DATA_SAIMOD_MOJOTROLLZ_SERVER_CLASSIC.php
@@ -0,0 +1,9 @@
+SERVERPATH(),
+ (new \PSAI('/saimod_mojotrollz_server_classic/sql/mysql/system_api.sql'))->SERVERPATH());
+ }
+}
\ No newline at end of file
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_classic/sql/autoload.inc b/mojotrollz/sai/saimod_mojotrollz_server_classic/sql/autoload.inc
new file mode 100644
index 0000000..1663a25
--- /dev/null
+++ b/mojotrollz/sai/saimod_mojotrollz_server_classic/sql/autoload.inc
@@ -0,0 +1,4 @@
+
+
+
+
Classic - Status
+
+
+
+ | realm |
+ ${classic_realm_status} |
+
+
+ | world |
+ ${classic_world_status} |
+
+
+ | world_test |
+ ${classic_world_test_status} |
+
+
+ | players live |
+ ${classic_players_online} |
+
+
+ | players test |
+ ${classic_test_players_online} |
+
+
+
+
+
+
+
+
Classic - Run
+
+
+
+ | realm |
+ |
+ |
+ |
+
+
+ | world |
+ |
+ |
+ |
+
+
+ | world_test |
+ |
+ |
+ |
+
+
+
+
+
+
Classic - Database Stop the Server first!
+
+
+
+ | realm |
+ |
+ |
+
+
+ | chars |
+ |
+ |
+
+
+ | world |
+ |
+ |
+
+
+
+
+
+
Classic - Compile Stop the Server first!
+
+
+
+ | live |
+ |
+
+
+ | test |
+ |
+
+
+
+
+
+
Classic - Log
+
+
+
+ | Char.log |
+ |
+ |
+ |
+ |
+
+
+ | DBErrors.log |
+ |
+ |
+ |
+ |
+
+
+ | EventAIErrors.log |
+ |
+ |
+ |
+ |
+
+
+ | Realmd.log |
+ |
+ |
+ |
+ |
+
+
+ | SD2Errors.log |
+ |
+ |
+ |
+ |
+
+
+ | Server.log |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
Output
+
+
+
+
+ | Path |
+ Submodule |
+ Action |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_handling/js/saimod_mojotrollz_server_handling.js b/mojotrollz/sai/saimod_mojotrollz_server_handling/js/saimod_mojotrollz_server_handling.js
index d16f6a1..b991dec 100644
--- a/mojotrollz/sai/saimod_mojotrollz_server_handling/js/saimod_mojotrollz_server_handling.js
+++ b/mojotrollz/sai/saimod_mojotrollz_server_handling/js/saimod_mojotrollz_server_handling.js
@@ -56,11 +56,11 @@ function init_saimod_mojotrollz_server(){
$('#table_changes').html('');
});
- register_classic();
- register_tbc();
+ register_classic_svr();
+ register_tbc_svr();
}
-function register_classic(){
+function register_classic_svr(){
{
$('#btn_classic_realm_start').click(function(){
growl_start('Doing ... please wait')
@@ -598,7 +598,7 @@ function register_classic(){
}
}
-function register_tbc(){
+function register_tbc_svr(){
{
$('#btn_tbc_realm_start').click(function(){
growl_start('Doing ... please wait')
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php b/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php
index 65a9a3a..2218ca3 100644
--- a/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php
+++ b/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php
@@ -51,12 +51,16 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule {
$log .= chmod('/home/mojotrollz/mojo/'.'classic/world',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'classic/realm',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'classic/db',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ $log .= chmod('/home/mojotrollz/mojo/'.'classic/server/bin/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ $log .= chmod('/home/mojotrollz/mojo/'.'classic/server/bin_test/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'tbc/compile',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'tbc/run',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'tbc/world',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'tbc/world_test',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'tbc/realm',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
$log .= chmod('/home/mojotrollz/mojo/'.'tbc/db',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ $log .= chmod('/home/mojotrollz/mojo/'.'tbc/server/bin/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ $log .= chmod('/home/mojotrollz/mojo/'.'tbc/server/bin_test/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
} catch (\Exception $e){
$log .= 'Error: '.$e->getMessage();
}
@@ -135,203 +139,7 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule {
}
return \SYSTEM\LOG\JsonResult::toString($result);
}
-
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_chars_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/Char.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_chars_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/Char.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_db_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/DBErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_db_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_eventai_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_eventai_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_realm_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/Realmd.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_realm_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_sd2_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_sd2_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_server_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log/Server.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_classic_server_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/classic/server/log_test/Server.log'));}
-
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_chars_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/Char.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_chars_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/Char.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_db_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_db_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/DBErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_eventai_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_eventai_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_realm_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/Realmd.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_realm_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_sd2_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_sd2_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_server_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/Server.log'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_log_tbc_server_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/Server.log'));}
-
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_chars_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/Char.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_chars_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/Char.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_db_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/DBErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_db_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/DBErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_eventai_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/EventAIErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_eventai_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/EventAIErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_realm_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/Realmd.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_realm_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/Realmd.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_sd2_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/SD2Errors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_sd2_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/SD2Errors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_server_live(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log/Server.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_classic_server_test(){
- if(!\file_exists('/home/mojotrollz/mojo/classic/server/log_test/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/classic/server/log_test/Server.log',''));}
-
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_chars_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/Char.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_chars_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Char.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/Char.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_db_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_db_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/DBErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/DBErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_eventai_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_eventai_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_realm_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/Realmd.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_realm_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_sd2_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_sd2_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_server_live(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/Server.log',''));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_logdel_tbc_server_test(){
- if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Server.log')){
- return 'File not Found';}
- return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/Server.log',''));}
-
+
private static function shell_run($ver,$prog,$cmd){
return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/run '.$ver.' '.$prog.' '.$cmd.' 2>&1'));}
private static function shell_db($ver,$db,$cmd){
@@ -340,21 +148,16 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule {
return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/compile '.$ver.' '.$cmd.' 2>&1'));}
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_compile_classic_live(){
- return \htmlentities(self::shell_compile('classic', 'live'));}
+ $log = \htmlentities(self::shell_compile('classic', 'live'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'classic/server/bin/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_compile_classic_test(){
- return \htmlentities(self::shell_compile('classic', 'test'));}
-
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_classic_realm_live(){
- return \htmlentities(self::shell_db('classic', 'realm', 'live'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_classic_chars_live(){
- return \htmlentities(self::shell_db('classic', 'chars', 'live'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_classic_chars_test(){
- return \htmlentities(self::shell_db('classic', 'chars', 'test'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_classic_world_live(){
- return \htmlentities(self::shell_db('classic', 'world', 'live'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_classic_world_test(){
- return \htmlentities(self::shell_db('classic', 'world', 'test'));}
-
+ $log = \htmlentities(self::shell_compile('classic', 'test'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'classic/server/bin_test/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
+
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_realm_start(){
return self::shell_run('classic', 'realm','start');}
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_classic_world_start(){
@@ -375,20 +178,15 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule {
return self::shell_run('classic', 'world_test','status');}
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_compile_tbc_live(){
- return \htmlentities(self::shell_compile('tbc', 'live'));}
+ $log = \htmlentities(self::shell_compile('tbc', 'live'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'tbc/server/bin/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_compile_tbc_test(){
- return \htmlentities(self::shell_compile('tbc', 'test'));}
-
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_tbc_realm_live(){
- return \htmlentities(self::shell_db('tbc', 'realm', 'live'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_tbc_chars_live(){
- return \htmlentities(self::shell_db('tbc', 'chars', 'live'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_tbc_chars_test(){
- return \htmlentities(self::shell_db('tbc', 'chars', 'test'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_tbc_world_live(){
- return \htmlentities(self::shell_db('tbc', 'world', 'live'));}
- public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_db_tbc_world_test(){
- return \htmlentities(self::shell_db('tbc', 'world', 'test'));}
+ $log = \htmlentities(self::shell_compile('tbc', 'test'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'tbc/server/bin_test/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
public static function sai_mod__SAI_saimod_mojotrollz_server_handling_action_run_tbc_realm_start(){
return self::shell_run('tbc', 'realm','start');}
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl b/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl
index 3277199..310665d 100644
--- a/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl
+++ b/mojotrollz/sai/saimod_mojotrollz_server_handling/tpl/main.tpl
@@ -1,8 +1,46 @@
Mojotrollz Server
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -32,27 +70,6 @@
${classic_test_players_online} |
-
-
@@ -80,28 +97,6 @@
-
-
Classic - Database Stop the Server first!
-
-
-
- | realm |
- |
- |
-
-
- | chars |
- |
- |
-
-
- | world |
- |
- |
-
-
-
-
Classic - Compile Stop the Server first!
@@ -117,55 +112,6 @@
-
-
Classic - Log
-
-
-
- | Char.log |
- |
- |
- |
- |
-
-
- | DBErrors.log |
- |
- |
- |
- |
-
-
- | EventAIErrors.log |
- |
- |
- |
- |
-
-
- | Realmd.log |
- |
- |
- |
- |
-
-
- | SD2Errors.log |
- |
- |
- |
- |
-
-
- | Server.log |
- |
- |
- |
- |
-
-
-
-
@@ -194,27 +140,6 @@
${tbc_test_players_online} |
-
-
@@ -242,28 +167,6 @@
-
-
TBC - Database Stop the Server first!
-
-
-
- | realm |
- |
- |
-
-
- | chars |
- |
- |
-
-
- | world |
- |
- |
-
-
-
-
TBC - Compile Stop the Server first!
@@ -279,55 +182,6 @@
-
-
TBC - Log
-
-
-
- | Char.log |
- |
- |
- |
- |
-
-
- | DBErrors.log |
- |
- |
- |
- |
-
-
- | EventAIErrors.log |
- |
- |
- |
- |
-
-
- | Realmd.log |
- |
- |
- |
- |
-
-
- | SD2Errors.log |
- |
- |
- |
- |
-
-
- | Server.log |
- |
- |
- |
- |
-
-
-
-
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_tbc/autoload.inc b/mojotrollz/sai/saimod_mojotrollz_server_tbc/autoload.inc
new file mode 100644
index 0000000..2ee11d3
--- /dev/null
+++ b/mojotrollz/sai/saimod_mojotrollz_server_tbc/autoload.inc
@@ -0,0 +1,4 @@
+
TBC Server';}
+ public static function right_public(){return false;}
+ public static function right_right(){return \SYSTEM\SECURITY\security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
+ public static function js(){return array(new \PSAI('saimod_mojotrollz_server_tbc/js/saimod_mojotrollz_server_tbc.js'));}
+ //public static function css(){}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_stats_tbc($filter = 600){
+ return \SYSTEM\LOG\JsonResult::toString(\SQL\STATS_TBC::QA(array($filter)));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_stats_classic($filter = 600){
+ return \SYSTEM\LOG\JsonResult::toString(\SQL\STATS_CLASSIC::QA(array($filter)));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_stats_ts($filter = 600){
+ return \SYSTEM\LOG\JsonResult::toString(\SQL\STATS_TS::QA(array($filter)));}
+
+ public static function online_tbc(){
+ return \SQL\ONLINE_PLAYERS::Q1(new \SQL\mangos_one_chars())['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_tbc_action_log_tbc_chars_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/Char.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_chars_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/Char.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_db_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_db_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/DBErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_eventai_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_eventai_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_realm_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/Realmd.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_realm_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_sd2_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_sd2_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_server_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log/Server.log'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_log_tbc_server_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_get_contents('/home/mojotrollz/mojo/tbc/server/log_test/Server.log'));}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_chars_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/Char.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_chars_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Char.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/Char.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_db_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/DBErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_db_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/DBErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/DBErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_eventai_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/EventAIErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_eventai_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/EventAIErrors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_realm_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/Realmd.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_realm_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/Realmd.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_sd2_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/SD2Errors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_sd2_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/SD2Errors.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_server_live(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log/Server.log',''));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_logdel_tbc_server_test(){
+ if(!\file_exists('/home/mojotrollz/mojo/tbc/server/log_test/Server.log')){
+ return 'File not Found';}
+ return \htmlentities(\file_put_contents('/home/mojotrollz/mojo/tbc/server/log_test/Server.log',''));}
+
+ private static function shell_run($ver,$prog,$cmd){
+ return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/run '.$ver.' '.$prog.' '.$cmd.' 2>&1'));}
+ private static function shell_db($ver,$db,$cmd){
+ return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/db '.$ver.' '.$db.' '.$cmd.' 2>&1'));}
+ private static function shell_compile($ver,$cmd){
+ return \str_replace("\n","\r\n",shell_exec('/home/mojotrollz/mojo/compile '.$ver.' '.$cmd.' 2>&1'));}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_compile_tbc_live(){
+ $log = \htmlentities(self::shell_compile('tbc', 'live'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'tbc/server/bin/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_compile_tbc_test(){
+ $log = \htmlentities(self::shell_compile('tbc', 'test'));
+ $log .= chmod('/home/mojotrollz/mojo/'.'tbc/server/bin_test/bin/run-mangosd',0755) ? "rights apply: yes\r\n" : "rights apply: no\r\n";
+ return $log;
+ }
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_db_tbc_realm_live(){
+ return \htmlentities(self::shell_db('tbc', 'realm', 'live'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_db_tbc_chars_live(){
+ return \htmlentities(self::shell_db('tbc', 'chars', 'live'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_db_tbc_chars_test(){
+ return \htmlentities(self::shell_db('tbc', 'chars', 'test'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_db_tbc_world_live(){
+ return \htmlentities(self::shell_db('tbc', 'world', 'live'));}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_db_tbc_world_test(){
+ return \htmlentities(self::shell_db('tbc', 'world', 'test'));}
+
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_realm_start(){
+ return self::shell_run('tbc', 'realm','start');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_start(){
+ return self::shell_run('tbc', 'world','start');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_test_start(){
+ return self::shell_run('tbc', 'world_test','start');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_realm_stop(){
+ return self::shell_run('tbc', 'realm','stop');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_stop(){
+ return self::shell_run('tbc', 'world','stop');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_test_stop(){
+ return self::shell_run('tbc', 'world_test','stop');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_realm_status(){
+ return self::shell_run('tbc', 'realm','status');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_status(){
+ return self::shell_run('tbc', 'world','status');}
+ public static function sai_mod__SAI_saimod_mojotrollz_server_tbc_action_run_tbc_world_test_status(){
+ return self::shell_run('tbc', 'world_test','status');}
+}
\ No newline at end of file
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_tbc/sql/DATA_SAIMOD_MOJOTROLLZ_SERVER_TBC.php b/mojotrollz/sai/saimod_mojotrollz_server_tbc/sql/DATA_SAIMOD_MOJOTROLLZ_SERVER_TBC.php
new file mode 100644
index 0000000..5d3395d
--- /dev/null
+++ b/mojotrollz/sai/saimod_mojotrollz_server_tbc/sql/DATA_SAIMOD_MOJOTROLLZ_SERVER_TBC.php
@@ -0,0 +1,9 @@
+SERVERPATH(),
+ (new \PSAI('/saimod_mojotrollz_server_handling/sql/mysql/system_api.sql'))->SERVERPATH());
+ }
+}
\ No newline at end of file
diff --git a/mojotrollz/sai/saimod_mojotrollz_server_tbc/sql/autoload.inc b/mojotrollz/sai/saimod_mojotrollz_server_tbc/sql/autoload.inc
new file mode 100644
index 0000000..5098a7a
--- /dev/null
+++ b/mojotrollz/sai/saimod_mojotrollz_server_tbc/sql/autoload.inc
@@ -0,0 +1,4 @@
+
+
+
+
TBC - Status
+
+
+
+ | realm |
+ ${tbc_realm_status} |
+
+
+ | world |
+ ${tbc_world_status} |
+
+
+ | world_test |
+ ${tbc_world_test_status} |
+
+
+ | players live |
+ ${tbc_players_online} |
+
+
+ | players test |
+ ${tbc_test_players_online} |
+
+
+
+
+
+
+
+
TBC - Run
+
+
+
+ | realm |
+ |
+ |
+ |
+
+
+ | world |
+ |
+ |
+ |
+
+
+ | world_test |
+ |
+ |
+ |
+
+
+
+
+
+
TBC - Database Stop the Server first!
+
+
+
+ | realm |
+ |
+ |
+
+
+ | chars |
+ |
+ |
+
+
+ | world |
+ |
+ |
+
+
+
+
+
+
TBC - Compile Stop the Server first!
+
+
+
+ | live |
+ |
+
+
+ | test |
+ |
+
+
+
+
+
+
TBC - Log
+
+
+
+ | Char.log |
+ |
+ |
+ |
+ |
+
+
+ | DBErrors.log |
+ |
+ |
+ |
+ |
+
+
+ | EventAIErrors.log |
+ |
+ |
+ |
+ |
+
+
+ | Realmd.log |
+ |
+ |
+ |
+ |
+
+
+ | SD2Errors.log |
+ |
+ |
+ |
+ |
+
+
+ | Server.log |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
Output
+
+
+
+
+ | Path |
+ Submodule |
+ Action |
+
+
+
+
+
+
+
+
+
\ No newline at end of file