diff --git a/jobs/addon_assign_groups.php b/jobs/addon_assign_groups.php
index b9a3ac8..9ca6db4 100644
--- a/jobs/addon_assign_groups.php
+++ b/jobs/addon_assign_groups.php
@@ -20,18 +20,18 @@ function addon_assign_groups($addons_config,$ts3,$cfg,$dbname,$allclients,&$db_c
try {
usleep($cfg['teamspeak_query_command_delay']);
$ts3->serverGroupClientDel($group, $cldbid);
- enter_logfile($cfg,6,"Removed servergroup $group from user $nickname (UID: $uid), requested by Add-on 'Assign Servergroups'");
+ enter_logfile(6,"Removed servergroup $group from user $nickname (UID: $uid), requested by Add-on 'Assign Servergroups'");
}
catch (Exception $e) {
- enter_logfile($cfg,2,"addon_assign_groups:".$e->getCode().': '."Error while removing group: ".$e->getMessage());
+ enter_logfile(2,"addon_assign_groups:".$e->getCode().': '."Error while removing group: ".$e->getMessage());
}
} else {
try {
usleep($cfg['teamspeak_query_command_delay']);
$ts3->serverGroupClientAdd($group, $cldbid);
- enter_logfile($cfg,6,"Added servergroup $group from user $nickname (UID: $uid), requested by Add-on 'Assign Servergroups'");
+ enter_logfile(6,"Added servergroup $group from user $nickname (UID: $uid), requested by Add-on 'Assign Servergroups'");
} catch (Exception $e) {
- enter_logfile($cfg,2,"addon_assign_groups:".$e->getCode().': '."Error while adding group: ".$e->getMessage());
+ enter_logfile(2,"addon_assign_groups:".$e->getCode().': '."Error while adding group: ".$e->getMessage());
}
}
}
diff --git a/jobs/addon_channelinfo_toplist.php b/jobs/addon_channelinfo_toplist.php
index bece647..6ad5e4d 100644
--- a/jobs/addon_channelinfo_toplist.php
+++ b/jobs/addon_channelinfo_toplist.php
@@ -5,10 +5,10 @@ function addon_channelinfo_toplist(&$addons_config,$ts3,$mysqlcon,$cfg,$dbname,$
$smarty = new Smarty();
- $smarty->setTemplateDir($cfg['logs_path'].'smarty/templates');
- $smarty->setCompileDir($cfg['logs_path'].'smarty/templates_c');
- $smarty->setCacheDir($cfg['logs_path'].'smarty/cache');
- $smarty->setConfigDir($cfg['logs_path'].'smarty/configs');
+ $smarty->setTemplateDir($GLOBALS['logpath'].'smarty/templates');
+ $smarty->setCompileDir($GLOBALS['logpath'].'smarty/templates_c');
+ $smarty->setCacheDir($GLOBALS['logpath'].'smarty/cache');
+ $smarty->setConfigDir($GLOBALS['logpath'].'smarty/configs');
if(isset($addons_config['channelinfo_toplist_active']['value']) && $addons_config['channelinfo_toplist_active']['value'] == '1') {
if($addons_config['channelinfo_toplist_lastupdate']['value'] < ($nowtime - $addons_config['channelinfo_toplist_delay']['value'])) {
@@ -46,10 +46,10 @@ function addon_channelinfo_toplist(&$addons_config,$ts3,$mysqlcon,$cfg,$dbname,$
}
$filter = " AND `user`.`uuid` NOT IN ($notinuuid) AND `user`.`cldgroup` NOT IN ($notingroup) $andnotgroup ".$filter;
- #enter_logfile($cfg,2,'SQL: '."SELECT * FROM `$dbname`.`stats_user` INNER JOIN `$dbname`.`user` ON `user`.`uuid` = `stats_user`.`uuid` WHERE `removed`='0' {$filter} DESC LIMIT 10");
+ #enter_logfile(2,'SQL: '."SELECT * FROM `$dbname`.`stats_user` INNER JOIN `$dbname`.`user` ON `user`.`uuid` = `stats_user`.`uuid` WHERE `removed`='0' {$filter} DESC LIMIT 10");
if(($userdata = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_user` INNER JOIN `$dbname`.`user` ON `user`.`uuid` = `stats_user`.`uuid` WHERE `removed`='0' {$filter} DESC LIMIT 10")->fetchAll(PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,2,'addon_channelinfo1: '.print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,'addon_channelinfo1: '.print_r($mysqlcon->errorInfo(), true));
}
$smarty->assign('LAST_UPDATE_TIME',(DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s")));
@@ -125,16 +125,16 @@ function addon_channelinfo_toplist(&$addons_config,$ts3,$mysqlcon,$cfg,$dbname,$
$addons_config['channelinfo_toplist_lastupdate']['value'] = $nowtime;
$toplist_desc = $mysqlcon->quote($toplist_desc, ENT_QUOTES);
$sqlexec .= "INSERT IGNORE INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('channelinfo_toplist_lastdesc',{$toplist_desc}),('channelinfo_toplist_lastupdate','{$nowtime}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);\n";
- enter_logfile($cfg,5,' Addon: \'channelinfo_toplist\' writing new channelinfo toplist to channel description.');
+ enter_logfile(5,' Addon: \'channelinfo_toplist\' writing new channelinfo toplist to channel description.');
} catch (Exception $e) {
- enter_logfile($cfg,2,'addon_channelinfo2: ['.$e->getCode().']: '.$e->getMessage());
+ enter_logfile(2,'addon_channelinfo2: ['.$e->getCode().']: '.$e->getMessage());
}
}
} catch (Exception $e) {
$errmsg = str_replace('"', '\'', $e->getMessage());
$addons_config['channelinfo_toplist_lastupdate']['value'] = $nowtime;
$sqlexec .= "INSERT IGNORE INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('channelinfo_toplist_lastupdate','{$nowtime}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);\n";
- enter_logfile($cfg,2,' Addon: \'channelinfo_toplist\'; There might be a syntax error in your \'channel description\', which is defined in the webinterface! Error message: ['.$e->getCode().']: '.$errmsg);
+ enter_logfile(2,' Addon: \'channelinfo_toplist\'; There might be a syntax error in your \'channel description\', which is defined in the webinterface! Error message: ['.$e->getCode().']: '.$errmsg);
}
}
}
diff --git a/jobs/bot.php b/jobs/bot.php
index 334be78..6f13ee8 100644
--- a/jobs/bot.php
+++ b/jobs/bot.php
@@ -16,111 +16,110 @@ set_time_limit(0);
error_reporting(E_ALL);
ini_set("log_errors", 1);
-require_once(substr(__DIR__,0,-4).'other/_functions.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'other/_functions.php');
$persistent = 1;
-require_once(substr(__DIR__,0,-4).'other/config.php');
-$lang = set_language(get_language($cfg));
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'other/config.php');
+$lang = set_language(get_language());
set_error_handler("php_error_handling");
-ini_set("error_log", $cfg['logs_path'].'ranksystem.log');
+ini_set("error_log", $GLOBALS['logfile']);
-require_once(substr(__DIR__,0,-4).'other/phpcommand.php');
-
-if((isset($_SERVER['HTTP_HOST']) || isset($_SERVER['REMOTE_ADDR'])) && isset($cfg_params['default_cmdline_sec_switch']) && $cfg_params['default_cmdline_sec_switch'] == 1) {
- shutdown($mysqlcon,$cfg,1,"Request to start the Ranksystem from ".$_SERVER['REMOTE_ADDR'].". It seems the request came not from the command line!");
+if((isset($_SERVER['HTTP_HOST']) || isset($_SERVER['REMOTE_ADDR'])) && isset($cfg['default_cmdline_sec_switch']) && $cfg['default_cmdline_sec_switch'] == 1) {
+ shutdown($mysqlcon,3,"Request to start the Ranksystem from ".$_SERVER['REMOTE_ADDR'].". It seems the request came not from the command line!",FALSE);
}
if(version_compare(PHP_VERSION, '5.5.0', '<')) {
- shutdown($mysqlcon,$cfg,1,"Your PHP version (".PHP_VERSION.") is below 5.5.0. Update of PHP is required!");
+ shutdown($mysqlcon,1,"Your PHP version (".PHP_VERSION.") is below 5.5.0. Update of PHP is required!");
}
if(!function_exists('simplexml_load_file')) {
- shutdown($mysqlcon,$cfg,1,sprintf($lang['errphp'],'PHP SimpleXML'));
+ shutdown($mysqlcon,1,sprintf($lang['errphp'],'PHP SimpleXML'));
}
if(!in_array('curl', get_loaded_extensions())) {
- shutdown($mysqlcon,$cfg,1,sprintf($lang['errphp'],'PHP cURL'));
+ shutdown($mysqlcon,1,sprintf($lang['errphp'],'PHP cURL'));
}
if(!in_array('zip', get_loaded_extensions())) {
- shutdown($mysqlcon,$cfg,1,sprintf($lang['errphp'],'PHP Zip'));
+ shutdown($mysqlcon,1,sprintf($lang['errphp'],'PHP Zip'));
}
if(!in_array('mbstring', get_loaded_extensions())) {
- shutdown($mysqlcon,$cfg,1,sprintf($lang['errphp'],'PHP mbstring'));
+ shutdown($mysqlcon,1,sprintf($lang['errphp'],'PHP mbstring'));
}
-enter_logfile($cfg,9,"");
-enter_logfile($cfg,9,"###################################################################");
-enter_logfile($cfg,9,"Initialize Bot...");
-require_once(substr(__DIR__,0,-4).'libs/ts3_lib/TeamSpeak3.php');
-require_once(substr(__DIR__,0,-4).'jobs/calc_user.php');
-require_once(substr(__DIR__,0,-4).'jobs/get_avatars.php');
-require_once(substr(__DIR__,0,-4).'jobs/update_channel.php');
-require_once(substr(__DIR__,0,-4).'jobs/update_groups.php');
-require_once(substr(__DIR__,0,-4).'jobs/calc_serverstats.php');
-require_once(substr(__DIR__,0,-4).'jobs/server_usage.php');
-require_once(substr(__DIR__,0,-4).'jobs/calc_user_snapshot.php');
-require_once(substr(__DIR__,0,-4).'jobs/calc_userstats.php');
-require_once(substr(__DIR__,0,-4).'jobs/clean.php');
-require_once(substr(__DIR__,0,-4).'jobs/check_db.php');
-require_once(substr(__DIR__,0,-4).'jobs/handle_messages.php');
-require_once(substr(__DIR__,0,-4).'jobs/event_userenter.php');
-require_once(substr(__DIR__,0,-4).'jobs/update_rs.php');
-require_once(substr(__DIR__,0,-4).'jobs/reset_rs.php');
-require_once(substr(__DIR__,0,-4).'jobs/db_ex_imp.php');
-require_once(substr(__DIR__,0,-4).'libs/smarty/Smarty.class.php');
+enter_logfile(9,"");
+enter_logfile(9,"###################################################################");
+enter_logfile(9,"Initialize Bot...");
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'libs/ts3_lib/TeamSpeak3.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/calc_user.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/get_avatars.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/update_channel.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/update_groups.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/calc_serverstats.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/server_usage.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/calc_user_snapshot.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/calc_userstats.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/clean.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/check_db.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/handle_messages.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/event_userenter.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/update_rs.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/reset_rs.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/db_ex_imp.php');
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'libs/smarty/Smarty.class.php');
-enter_logfile($cfg,9,"Running on OS: ".php_uname("s")." ".php_uname("r"));
-enter_logfile($cfg,9,"Using PHP Version: ".PHP_VERSION);
-if(version_compare(PHP_VERSION, '7.2.0', '<')) {
- enter_logfile($cfg,3,"Your PHP Version: (".PHP_VERSION.") is outdated and no longer supported. Please update it!");
+enter_logfile(9,"Running on OS: ".php_uname("s")." ".php_uname("r"));
+enter_logfile(9,"Installation Path: ".__DIR__);
+enter_logfile(9,"Using PHP Version: ".PHP_VERSION);
+if(version_compare(PHP_VERSION, '8.0.0', '<')) {
+ enter_logfile(3,"Your PHP Version: (".PHP_VERSION.") is outdated and no longer supported. Please update it!");
}
-enter_logfile($cfg,9,"Database Version: ".$mysqlcon->getAttribute(PDO::ATTR_SERVER_VERSION));
+enter_logfile(9,"Database Version: ".$mysqlcon->getAttribute(PDO::ATTR_SERVER_VERSION));
-enter_logfile($cfg,9,"Starting connection test to the Ranksystem update-server (may need a few seconds)...");
+enter_logfile(9,"Starting connection test to the Ranksystem update-server (may need a few seconds)...");
$update_server = fsockopen('193.70.102.252', 443, $errno, $errstr, 10);
if(!$update_server) {
- enter_logfile($cfg,2," Connection to Ranksystem update-server failed: $errstr ($errno)");
- enter_logfile($cfg,3," This connection is neccessary to receive updates for the Ranksystem!");
- enter_logfile($cfg,3," Please whitelist the IP 193.70.102.252 (TCP port 443) on your network (firewall)");
+ enter_logfile(2," Connection to Ranksystem update-server failed: $errstr ($errno)");
+ enter_logfile(3," This connection is neccessary to receive updates for the Ranksystem!");
+ enter_logfile(3," Please whitelist the IP 193.70.102.252 (TCP port 443) on your network (firewall)");
} else {
- enter_logfile($cfg,9," Connection test successful");
+ enter_logfile(9," Connection test successful");
}
-enter_logfile($cfg,9,"Starting connection test to the Ranksystem update-server [done]");
+enter_logfile(9,"Starting connection test to the Ranksystem update-server [done]");
-check_db($mysqlcon,$lang,$cfg,$dbname);
+$cfg['temp_updatedone'] = check_db($mysqlcon,$lang,$cfg,$dbname);
$cfg['temp_db_version'] = $mysqlcon->getAttribute(PDO::ATTR_SERVER_VERSION);
$cfg['temp_last_botstart'] = time();
$cfg['temp_reconnect_attempts'] = 0;
$cfg['temp_ts_no_reconnection'] = 0;
-enter_logfile($cfg,4,"Check Ranksystem files for updates...");
+enter_logfile(4,"Check Ranksystem files for updates...");
if(isset($cfg['version_current_using']) && isset($cfg['version_latest_available']) && $cfg['version_latest_available'] != NULL && version_compare($cfg['version_latest_available'], $cfg['version_current_using'], '>')) {
- update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand);
+ update_rs($mysqlcon,$lang,$cfg,$dbname);
}
-enter_logfile($cfg,4,"Check Ranksystem files for updates [done]");
-enter_logfile($cfg,9,"Ranksystem Version: ".$cfg['version_current_using']." (on Update-Channel: ".$cfg['version_update_channel'].")");
-enter_logfile($cfg,4,"Loading addons...");
-require_once(substr(__DIR__,0,-4).'other/load_addons_config.php');
+enter_logfile(4,"Check Ranksystem files for updates [done]");
+enter_logfile(9,"Ranksystem Version: ".$cfg['version_current_using']." (on Update-Channel: ".$cfg['version_update_channel'].")");
+enter_logfile(4,"Loading addons...");
+require_once(dirname(__DIR__).DIRECTORY_SEPARATOR.'other/load_addons_config.php');
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
if($addons_config['assign_groups_active']['value'] == '1') {
- enter_logfile($cfg,4," Addon: 'assign_groups' [ON]");
- include(substr(__DIR__,0,-4).'jobs/addon_assign_groups.php');
+ enter_logfile(4," Addon: 'assign_groups' [ON]");
+ include(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/addon_assign_groups.php');
$cfg['temp_addon_assign_groups'] = "enabled";
} else {
- enter_logfile($cfg,4," Addon: 'assign_groups' [OFF]");
+ enter_logfile(4," Addon: 'assign_groups' [OFF]");
$cfg['temp_addon_assign_groups'] = "disabled";
}
if($addons_config['channelinfo_toplist_active']['value'] == '1') {
- enter_logfile($cfg,4," Addon: 'channelinfo_toplist' [ON]");
- include(substr(__DIR__,0,-4).'jobs/addon_channelinfo_toplist.php');
+ enter_logfile(4," Addon: 'channelinfo_toplist' [ON]");
+ include(dirname(__DIR__).DIRECTORY_SEPARATOR.'jobs/addon_channelinfo_toplist.php');
$cfg['temp_addon_channelinfo_toplist'] = "enabled";
} else {
- enter_logfile($cfg,4," Addon: 'channelinfo_toplist' [OFF]");
+ enter_logfile(4," Addon: 'channelinfo_toplist' [OFF]");
$cfg['temp_addon_channelinfo_toplist'] = "disabled";
}
-enter_logfile($cfg,4,"Loading addons [done]");
+enter_logfile(4,"Loading addons [done]");
function run_bot(&$cfg) {
global $mysqlcon, $db, $dbname, $dbtype, $lang, $phpcommand, $addons_config, $max_execution_time, $memory_limit, $ts3server;
- enter_logfile($cfg,9,"Connect to TS3 Server (Address: '".$cfg['teamspeak_host_address']."' Voice-Port: '".$cfg['teamspeak_voice_port']."' Query-Port: '".$cfg['teamspeak_query_port']."' SSH: '".$cfg['teamspeak_query_encrypt_switch']."' Query-Slowmode: '".number_format(($cfg['teamspeak_query_command_delay']/1000000),1)."').");
+ enter_logfile(9,"Connect to TS3 Server (Address: '".$cfg['teamspeak_host_address']."' Voice-Port: '".$cfg['teamspeak_voice_port']."' Query-Port: '".$cfg['teamspeak_query_port']."' SSH: '".$cfg['teamspeak_query_encrypt_switch']."' Query-Slowmode: '".number_format(($cfg['teamspeak_query_command_delay']/1000000),1)."').");
try {
if($cfg['temp_ts_no_reconnection'] != 1) {
@@ -130,20 +129,20 @@ function run_bot(&$cfg) {
$ts3host = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?blocking=0");
}
- enter_logfile($cfg,9,"Connection to TS3 Server established.");
+ enter_logfile(9,"Connection to TS3 Server established.");
try{
$ts3version = $ts3host->version();
- enter_logfile($cfg,5," TS3 Server version: ".$ts3version['version']." on ".$ts3version['platform']." [Build: ".$ts3version['build']." from ".date("Y-m-d H:i:s",$ts3version['build'])."]");
+ enter_logfile(5," TS3 Server version: ".$ts3version['version']." on ".$ts3version['platform']." [Build: ".$ts3version['build']." from ".date("Y-m-d H:i:s",$ts3version['build'])."]");
$cfg['temp_ts_version'] = $ts3version['version'];
} catch (Exception $e) {
- enter_logfile($cfg,2," Error due getting TS3 server version - ".$e->getCode().': '.$e->getMessage());
+ enter_logfile(2," Error due getting TS3 server version - ".$e->getCode().': '.$e->getMessage());
}
- if(version_compare($ts3version['version'],'3.13.2','<=') && version_compare($ts3version['version'],'3.0.0','>=')) {
- enter_logfile($cfg,3," Your TS3 server is outdated, please update it!");
+ if(version_compare($ts3version['version'],'3.13.7','<') && version_compare($ts3version['version'],'3.0.0','>=')) {
+ enter_logfile(3," Your TS3 server is outdated, please update it!");
}
- enter_logfile($cfg,9," Select virtual server...");
+ enter_logfile(9," Select virtual server...");
try {
if(version_compare($ts3version['version'],'3.4.0','>=') || version_compare($ts3version['version'],'3.0.0','<=')) {
usleep($cfg['teamspeak_query_command_delay']);
@@ -161,15 +160,15 @@ function run_bot(&$cfg) {
}
break;
} catch (Exception $e) {
- enter_logfile($cfg,3,' '.$lang['errorts3'].$e->getCode().': '.$e->getMessage());
- shutdown($mysqlcon,$cfg,1,"Critical TS3 error on core function!");
+ enter_logfile(3,' '.$lang['errorts3'].$e->getCode().': '.$e->getMessage());
+ shutdown($mysqlcon,1,"Critical TS3 error on core function!");
}
}
}
- enter_logfile($cfg,9," Select virtual server [done]");
+ enter_logfile(9," Select virtual server [done]");
$cfg['temp_reconnect_attempts'] = 0;
} catch (Exception $e) {
- enter_logfile($cfg,2," Error due selecting virtual server - ".$e->getCode().': '.$e->getMessage()." (bad Voice-Port or Bot name?)");
+ enter_logfile(2," Error due selecting virtual server - ".$e->getCode().': '.$e->getMessage()." (bad Voice-Port or Bot name?)");
}
try {
@@ -181,7 +180,7 @@ function run_bot(&$cfg) {
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyTextmessage", "handle_messages");
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyCliententerview", "event_userenter");
} catch (Exception $e) {
- enter_logfile($cfg,2," Error due notifyRegister on TS3 server - ".$e->getCode().': '.$e->getMessage());
+ enter_logfile(2," Error due notifyRegister on TS3 server - ".$e->getCode().': '.$e->getMessage());
}
$whoami = $ts3server->whoami();
@@ -189,19 +188,38 @@ function run_bot(&$cfg) {
try {
usleep($cfg['teamspeak_query_command_delay']);
$ts3server->clientMove($whoami['client_id'],$cfg['teamspeak_default_channel_id']);
- enter_logfile($cfg,5," Joined to specified TS channel with channel-ID ".$cfg['teamspeak_default_channel_id'].".");
+ enter_logfile(5," Joined to specified TS channel with channel-ID ".$cfg['teamspeak_default_channel_id'].".");
} catch (Exception $e) {
if($e->getCode() != 770) {
- enter_logfile($cfg,2," Could not join specified TS channel (channel-ID: ".$cfg['teamspeak_default_channel_id'].") - ".$e->getCode().': '.$e->getMessage());
+ enter_logfile(2," Could not join specified TS channel (channel-ID: ".$cfg['teamspeak_default_channel_id'].") - ".$e->getCode().': '.$e->getMessage());
} else {
- enter_logfile($cfg,5," Joined to specified TS channel with channel-ID ".$cfg['teamspeak_default_channel_id']." (already member of it).");
+ enter_logfile(5," Joined to specified TS channel with channel-ID ".$cfg['teamspeak_default_channel_id']." (already member of it).");
}
}
} else {
- enter_logfile($cfg,5," No channel defined where the Ranksystem Bot should be entered.");
+ enter_logfile(5," No channel defined where the Ranksystem Bot should be entered.");
+ }
+
+ if($cfg['temp_updatedone'] === TRUE) {
+ enter_logfile(4,$lang['upinf']);
+ if(isset($cfg['webinterface_admin_client_unique_id_list']) && $cfg['webinterface_admin_client_unique_id_list'] != NULL) {
+ foreach(array_flip($cfg['webinterface_admin_client_unique_id_list']) as $clientid) {
+ usleep($cfg['teamspeak_query_command_delay']);
+ try {
+ if(isset($cfg['teamspeak_news_bb']) && $cfg['teamspeak_news_bb'] != '') {
+ sendmessage($ts3server, $cfg, $clientid, sprintf($lang['upmsg2'], $cfg['version_current_using'], 'https://ts-ranksystem.com/#changelog')."\n\n[U]Latest News:[/U]\n".$cfg['teamspeak_news_bb'], 1, NULL, sprintf($lang['upusrerr'], $clientid), 6, sprintf($lang['upusrinf'], $clientid));
+ } else {
+ sendmessage($ts3server, $cfg, $clientid, sprintf($lang['upmsg2'], $cfg['version_current_using'], 'https://ts-ranksystem.com/#changelog'), 1, NULL, sprintf($lang['upusrerr'], $clientid), 6, sprintf($lang['upusrinf'], $clientid));
+ }
+ enter_logfile(4," ".sprintf($lang['upusrinf'], $clientid));
+ } catch (Exception $e) {
+ enter_logfile(6," ".sprintf($lang['upusrerr'], $clientid));
+ }
+ }
+ }
}
- enter_logfile($cfg,9,"Config check started...");
+ enter_logfile(9,"Config check started...");
switch ($cfg['logs_debug_level']) {
case 1:
$loglevel = "1 - CRITICAL";
@@ -224,13 +242,13 @@ function run_bot(&$cfg) {
default:
$loglevel = "UNKNOWN";
}
- enter_logfile($cfg,9," Log Level: ".$loglevel);
- enter_logfile($cfg,6," Serverside config 'max_execution_time' (PHP.ini): ".$max_execution_time." sec.");
- enter_logfile($cfg,6," Serverside config 'memory_limit' (PHP.ini): ".$memory_limit);
+ enter_logfile(9," Log Level: ".$loglevel);
+ enter_logfile(6," Serverside config 'max_execution_time' (PHP.ini): ".$max_execution_time." sec.");
+ enter_logfile(6," Serverside config 'memory_limit' (PHP.ini): ".$memory_limit);
krsort($cfg['rankup_definition']);
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
}
$checkgroups = 0;
@@ -258,31 +276,31 @@ function run_bot(&$cfg) {
}
}
if($checkgroups > 0) {
- enter_logfile($cfg,3," Found servergroups in config, which are unknown. Redownload all servergroups from TS3 server.");
+ enter_logfile(3," Found servergroups in config, which are unknown. Redownload all servergroups from TS3 server.");
if($mysqlcon->exec("DELETE FROM `$dbname`.`groups`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
$serverinfo = $ts3server->serverInfo();
$select_arr = array();
$db_cache = array();
$sqlexec2 = update_groups($ts3server,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,$db_cache,1);
- if($mysqlcon->exec($sqlexec2) === false) {
- enter_logfile($cfg,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ if($sqlexec2 != NULL && $mysqlcon->exec($sqlexec2) === false) {
+ enter_logfile(2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
unset($sqlexec2,$select_arr,$db_cache,$groupslist,$serverinfo,$ts3version);
$errcnf = 0;
- enter_logfile($cfg,4," Downloading of servergroups finished. Recheck the config.");
+ enter_logfile(4," Downloading of servergroups finished. Recheck the config.");
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
}
if(isset($groupslist) && $groupslist != NULL) {
if(isset($cfg['rankup_definition']) && $cfg['rankup_definition'] != NULL) {
foreach($cfg['rankup_definition'] as $rank) {
if(!isset($groupslist[$rank['group']]) && $rank['group'] != NULL) {
- enter_logfile($cfg,1,' '.sprintf($lang['upgrp0001'], $rank['group'], $lang['wigrptime']));
+ enter_logfile(1,' '.sprintf($lang['upgrp0001'], $rank['group'], $lang['wigrptime']));
$errcnf++;
}
}
@@ -290,55 +308,43 @@ function run_bot(&$cfg) {
if(isset($cfg['rankup_boost_definition']) && $cfg['rankup_boost_definition'] != NULL) {
foreach($cfg['rankup_boost_definition'] as $groupid => $value) {
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
- enter_logfile($cfg,2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiboost']));
+ enter_logfile(2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiboost']));
}
}
}
if(isset($cfg['rankup_excepted_group_id_list']) && $cfg['rankup_excepted_group_id_list'] != NULL) {
foreach($cfg['rankup_excepted_group_id_list'] as $groupid => $value) {
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
- enter_logfile($cfg,2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiexgrp']));
+ enter_logfile(2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiexgrp']));
}
}
}
}
if($errcnf > 0) {
- shutdown($mysqlcon,$cfg,1,"Critical Config error!");
+ shutdown($mysqlcon,1,"Critical Config error!");
} else {
- enter_logfile($cfg,4," No critical problems found! All seems to be fine...");
- }
- }
-
- if(($lastupdate = $mysqlcon->query("SELECT `timestamp` FROM `$dbname`.`job_check` WHERE `job_name`='last_update'")->fetch()) === false) {
- enter_logfile($cfg,1," Select on DB failed for job check: ".print_r($mysqlcon->errorInfo(), true));
- } else {
- if($lastupdate['timestamp'] != 0 && ($lastupdate['timestamp'] + 10) > time()) {
- if(isset($cfg['webinterface_admin_client_unique_id_list']) && $cfg['webinterface_admin_client_unique_id_list'] != NULL) {
- foreach(array_flip($cfg['webinterface_admin_client_unique_id_list']) as $clientuuid) {
- sendmessage($ts3server, $cfg, $clientuuid, sprintf($lang['upmsg2'], $cfg['version_current_using'], 'https://ts-ranksystem.com/#changelog'), 1, NULL, sprintf($lang['upusrerr'], $clientuuid), 6, sprintf($lang['upusrinf'], $clientuuid));
- }
- }
+ enter_logfile(4," No critical problems found! All seems to be fine...");
}
}
if(isset($cfg['webinterface_fresh_installation']) && $cfg['webinterface_fresh_installation'] == 1) {
if($mysqlcon->exec("UPDATE `$dbname`.`cfg_params` SET `value`=0 WHERE `param`='webinterface_fresh_installation'") === false) {
- enter_logfile($cfg,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
}
unset($groupslist,$errcnf,$checkgroups,$lastupdate,$updcld,$loglevel,$whoami,$ts3host,$max_execution_time,$memory_limit,$memory_limit);
- enter_logfile($cfg,9,"Config check [done]");
+ enter_logfile(9,"Config check [done]");
} else {
- enter_logfile($cfg,9," Try to use the restored TS3 connection");
+ enter_logfile(9," Try to use the restored TS3 connection");
}
- enter_logfile($cfg,9,"Bot starts now his work!");
+ enter_logfile(9,"Bot starts now his work!");
$looptime = $cfg['temp_count_laps'] = $cfg['temp_whole_laptime'] = $cfg['temp_count_laptime'] = 0; $cfg['temp_last_laptime'] = '';
usleep(3000000);
if(($get_db_data = $mysqlcon->query("SELECT * FROM `$dbname`.`user`; SELECT MAX(`timestamp`) AS `timestamp` FROM `$dbname`.`server_usage`; SELECT * FROM `$dbname`.`job_check`; SELECT * FROM `$dbname`.`groups`; SELECT * FROM `$dbname`.`channel`; SELECT * FROM `$dbname`.`addon_assign_groups`; SELECT * FROM `$dbname`.`admin_addtime`; ")) === false) {
- shutdown($mysqlcon,$cfg,1,"Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
+ shutdown($mysqlcon,1,"Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
}
$count_select = 0;
@@ -382,13 +388,13 @@ function run_bot(&$cfg) {
unset($db_cache['job_check']);
if(($db_cache['job_check'] = $mysqlcon->query("SELECT * FROM `$dbname`.`job_check`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,3," Select on DB failed for job check: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(3," Select on DB failed for job check: ".print_r($mysqlcon->errorInfo(), true));
}
- if($db_cache['job_check']['reload_trigger']['timestamp'] == 1) {
+ if(intval($db_cache['job_check']['reload_trigger']['timestamp']) == 1) {
unset($db_cache['addon_assign_groups'],$db_cache['admin_addtime']);
if(($get_db_data = $mysqlcon->query("SELECT * FROM `$dbname`.`addon_assign_groups`; SELECT * FROM `$dbname`.`admin_addtime`; SELECT * FROM `$dbname`.`groups`; SELECT * FROM `$dbname`.`channel`;")) === false) {
- shutdown($mysqlcon,$cfg,1,"Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
+ shutdown($mysqlcon,1,"Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
}
$count_select = 0;
@@ -417,9 +423,9 @@ function run_bot(&$cfg) {
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`=0 WHERE `job_name`='reload_trigger';\n";
}
- enter_logfile($cfg,6,"SQL Select needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"SQL Select needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
- check_shutdown($cfg);
+ check_shutdown();
$ts3server->clientListReset();
$allclients = $ts3server->clientListtsn("-uid -groups -times -info -country");
@@ -452,23 +458,23 @@ function run_bot(&$cfg) {
foreach($sqlarr as $singlesql) {
if(strpos($singlesql, 'UPDATE') !== false || strpos($singlesql, 'INSERT') !== false || strpos($singlesql, 'DELETE') !== false || strpos($singlesql, 'SET') !== false) {
if($mysqlcon->exec($singlesql) === false) {
- enter_logfile($cfg,4,"Executing SQL: ".$singlesql);
- enter_logfile($cfg,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(4,"Executing SQL: ".$singlesql);
+ enter_logfile(2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
} elseif(strpos($singlesql, ' ') === false) {
- enter_logfile($cfg,2,"Command not recognized as SQL: ".$singlesql);
+ enter_logfile(2,"Command not recognized as SQL: ".$singlesql);
}
}
- $sqlfile = $cfg['logs_path'].'temp_sql_dump.sql';
+ $sqlfile = $GLOBALS['logpath'].'temp_sql_dump.sql';
$sqldump = fopen($sqlfile, 'wa+');
fwrite($sqldump, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." SQL:\n".$sqlexec);
fclose($sqldump);
} else {
if($mysqlcon->exec($sqlexec) === false) {
- enter_logfile($cfg,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
}
- enter_logfile($cfg,6,"SQL executions needs: ".(number_format(round((microtime(true) - $startsql), 5),5)));
+ enter_logfile(6,"SQL executions needs: ".(number_format(round((microtime(true) - $startsql), 5),5)));
reset_rs($ts3server,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,$db_cache);
db_ex_imp($ts3server,$mysqlcon,$lang,$cfg,$dbname,$db_cache);
@@ -480,7 +486,7 @@ function run_bot(&$cfg) {
$cfg['temp_count_laptime']++;
$cfg['temp_last_laptime'] = substr((number_format(round($looptime, 5),5) . ';' . $cfg['temp_last_laptime']),0,79);
- enter_logfile($cfg,6,"last loop: ".round($looptime, 5)." sec.");
+ enter_logfile(6,"last loop: ".round($looptime, 5)." sec.");
if($looptime < 1) {
$loopsleep = (1 - $looptime);
@@ -493,10 +499,10 @@ function run_bot(&$cfg) {
}
}
} catch (Exception $e) {
- enter_logfile($cfg,2,$lang['error'].': ['.$e->getCode().']: '.$e->getMessage());
+ enter_logfile(2,$lang['error'].': ['.$e->getCode().']: '.$e->getMessage());
if(in_array($e->getCode(), array(110,257,258,1024,1026,1031,1032,1033,1034,1280,1793))) {
if($mysqlcon->exec("UPDATE $dbname.stats_server SET server_status='0'") === false) {
- enter_logfile($cfg,2,$lang['error'].print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,$lang['error'].print_r($mysqlcon->errorInfo(), true));
}
}
@@ -515,11 +521,11 @@ function run_bot(&$cfg) {
$wait_reconnect = 43200;
}
- enter_logfile($cfg,4,"Try to reconnect in ".$wait_reconnect." seconds.");
+ enter_logfile(4,"Try to reconnect in ".$wait_reconnect." seconds.");
for($z = 1; $z <= $wait_reconnect; $z++) {
sleep(1);
- check_shutdown($cfg);
+ check_shutdown();
}
$check_db_arr = array_flip(array('HY000',10054,70100));
@@ -527,9 +533,9 @@ function run_bot(&$cfg) {
$cfg['temp_ts_no_reconnection'] = 1;
try {
$mysqlcon = db_connect($db['type'], $db['host'], $db['dbname'], $db['user'], $db['pass'], "no_exit");
- enter_logfile($cfg,9,"Connection to database restored");
+ enter_logfile(9,"Connection to database restored");
} catch (Exception $e) {
- enter_logfile($cfg,2,$lang['error'].print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,$lang['error'].print_r($mysqlcon->errorInfo(), true));
}
} else {
$cfg['temp_ts_no_reconnection'] = 0;
@@ -538,7 +544,7 @@ function run_bot(&$cfg) {
$cfg['temp_reconnect_attempts']++;
return $ts3server;
} else {
- shutdown($mysqlcon,$cfg,1,"Critical TS3 error on core function!");
+ shutdown($mysqlcon,1,"Critical TS3 error on core function!");
}
}
}
diff --git a/jobs/calc_serverstats.php b/jobs/calc_serverstats.php
index 4ec5796..732e7e4 100644
--- a/jobs/calc_serverstats.php
+++ b/jobs/calc_serverstats.php
@@ -4,7 +4,7 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
$nowtime = time();
$sqlexec = '';
- if($db_cache['job_check']['calc_donut_chars']['timestamp'] < ($nowtime - 8) || $db_cache['job_check']['get_version']['timestamp'] < ($nowtime - 43199)) {
+ if(intval($db_cache['job_check']['calc_donut_chars']['timestamp']) < ($nowtime - 8) || intval($db_cache['job_check']['get_version']['timestamp']) < ($nowtime - 43199)) {
$db_cache['job_check']['calc_donut_chars']['timestamp'] = $nowtime;
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`={$nowtime} WHERE `job_name`='calc_donut_chars';\n";
@@ -44,8 +44,8 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
$count_version_user[$version] = 1;
}
- $total_online_time = $total_online_time + $uuid['count'];
- $total_inactive_time = $total_inactive_time + $uuid['idle'];
+ if($uuid['count']>0) $total_online_time += $uuid['count'];
+ if($uuid['idle']>0) $total_inactive_time += $uuid['idle'];
}
arsort($country_array);
@@ -342,20 +342,21 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
// Calc Values for server stats
- if($db_cache['job_check']['calc_server_stats']['timestamp'] < ($nowtime - 899)) {
+ if(intval($db_cache['job_check']['calc_server_stats']['timestamp']) < ($nowtime - 899)) {
$db_cache['job_check']['calc_server_stats']['timestamp'] = $nowtime;
- $weekago = $db_cache['job_check']['last_snapshot_id']['timestamp'] - 28;
- $monthago = $db_cache['job_check']['last_snapshot_id']['timestamp'] - 120;
+ $weekago = intval($db_cache['job_check']['last_snapshot_id']['timestamp']) - 28;
+ $monthago = intval($db_cache['job_check']['last_snapshot_id']['timestamp']) - 120;
if ($weekago < 1) $weekago = $weekago + 121;
if ($monthago < 1) $monthago = $monthago + 121;
if(($entry_snapshot_count = $mysqlcon->query("SELECT count(DISTINCT(`id`)) AS `id` FROM `$dbname`.`user_snapshot`")->fetch(PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,2,"calc_serverstats 19:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"calc_serverstats 19:".print_r($mysqlcon->errorInfo(), true));
}
if ($entry_snapshot_count['id'] > 28) {
// Calc total_online_week
- if(($snapshot_count_week = $mysqlcon->query("SELECT (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$db_cache['job_check']['last_snapshot_id']['timestamp']}) - (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$weekago}) AS `count`;")->fetch(PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,2,"calc_serverstats 20:".print_r($mysqlcon->errorInfo(), true));
+ #if(($snapshot_count_week = $mysqlcon->query("SELECT (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$db_cache['job_check']['last_snapshot_id']['timestamp']}) - (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$weekago}) AS `count`;")->fetch(PDO::FETCH_ASSOC)) === false) {
+ if(($snapshot_count_week = $mysqlcon->query("SELECT SUM(`a`.`count` - `b`.`count`) AS `count` FROM `$dbname`.`user_snapshot` `a`, `$dbname`.`user_snapshot` `b` WHERE `b`.`cldbid` = `a`.`cldbid` AND `a`.`id`={$db_cache['job_check']['last_snapshot_id']['timestamp']} AND `b`.`id`={$weekago} AND `a`.`count`>`b`.`count`;")->fetch(PDO::FETCH_ASSOC)) === false) {
+ enter_logfile(2,"calc_serverstats 20:".print_r($mysqlcon->errorInfo(), true));
}
if($snapshot_count_week['count'] == NULL) {
$total_online_week = 0;
@@ -367,8 +368,9 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
}
if ($entry_snapshot_count['id'] > 120) {
// Calc total_online_month
- if(($snapshot_count_month = $mysqlcon->query("SELECT (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$db_cache['job_check']['last_snapshot_id']['timestamp']}) - (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$monthago}) AS `count`;")->fetch(PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,2,"calc_serverstats 21:".print_r($mysqlcon->errorInfo(), true));
+ #if(($snapshot_count_month = $mysqlcon->query("SELECT (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$db_cache['job_check']['last_snapshot_id']['timestamp']}) - (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `id`={$monthago}) AS `count`;")->fetch(PDO::FETCH_ASSOC)) === false) {
+ if(($snapshot_count_month = $mysqlcon->query("SELECT SUM(`a`.`count` - `b`.`count`) AS `count` FROM `$dbname`.`user_snapshot` `a`, `$dbname`.`user_snapshot` `b` WHERE `b`.`cldbid` = `a`.`cldbid` AND `a`.`id`={$db_cache['job_check']['last_snapshot_id']['timestamp']} AND `b`.`id`={$monthago} AND `a`.`count`>`b`.`count`;")->fetch(PDO::FETCH_ASSOC)) === false) {
+ enter_logfile(2,"calc_serverstats 21:".print_r($mysqlcon->errorInfo(), true));
}
if($snapshot_count_month['count'] == NULL) {
$total_online_month = 0;
@@ -380,9 +382,9 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
}
$sqlexec .= "UPDATE `$dbname`.`stats_server` SET `total_online_month`={$total_online_month},`total_online_week`={$total_online_week};\nUPDATE `$dbname`.`job_check` SET `timestamp`={$nowtime} WHERE `job_name`='calc_server_stats';\n";
- if ($db_cache['job_check']['get_version']['timestamp'] < ($nowtime - 43199)) {
+ if (intval($db_cache['job_check']['get_version']['timestamp']) < ($nowtime - 43199)) {
$db_cache['job_check']['get_version']['timestamp'] = $nowtime;
- enter_logfile($cfg,6,"Get the latest Ranksystem Version.");
+ enter_logfile(6,"Get the latest Ranksystem Version.");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://ts-n.net/ranksystem/'.$cfg['version_update_channel']);
curl_setopt($ch, CURLOPT_REFERER, 'TSN Ranksystem');
@@ -412,22 +414,58 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$cfg['version_latest_available'] = curl_exec($ch);
- curl_close($ch);
+ curl_close($ch); unset($ch);
+ if(!isset($cfg['stats_news_html']) || $cfg['stats_news_html'] != '') {
+ $sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='0' WHERE `job_name`='news_html';\nUPDATE `$dbname`.`cfg_params` SET `value`='' WHERE `param`='stats_news_html';\n";
+ }
+ $newh = curl_init();
+ curl_setopt($newh, CURLOPT_URL, 'https://ts-n.net/ranksystem/news_html');
+ curl_setopt($newh, CURLOPT_REFERER, 'TSN Ranksystem - News HTML');
+ curl_setopt($newh, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($newh, CURLOPT_MAXREDIRS, 10);
+ curl_setopt($newh, CURLOPT_FOLLOWLOCATION, 1);
+ curl_setopt($newh, CURLOPT_CONNECTTIMEOUT, 5);
+ $cfg['stats_news_html'] = curl_exec($newh);
+ curl_close($newh); unset($newh);
+ if($cfg['stats_news_html'] != '') {
+ $sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`=$nowtime WHERE `job_name`='news_html';\nUPDATE `$dbname`.`cfg_params` SET `value`='{$cfg['stats_news_html']}' WHERE `param`='stats_news_html';\n";
+ }
+
+ if(!isset($cfg['teamspeak_news_bb']) || $cfg['teamspeak_news_bb'] != '') {
+ $sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='0' WHERE `job_name`='news_bb';\nUPDATE `$dbname`.`cfg_params` SET `value`='' WHERE `param`='teamspeak_news_bb';\n";
+ }
+ $newb = curl_init();
+ curl_setopt($newb, CURLOPT_URL, 'https://ts-n.net/ranksystem/news_bb');
+ curl_setopt($newb, CURLOPT_REFERER, 'TSN Ranksystem - News BB');
+ curl_setopt($newb, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($newb, CURLOPT_MAXREDIRS, 10);
+ curl_setopt($newb, CURLOPT_FOLLOWLOCATION, 1);
+ curl_setopt($newb, CURLOPT_CONNECTTIMEOUT, 5);
+ $cfg['teamspeak_news_bb'] = curl_exec($newb);
+ curl_close($newb); unset($newb);
+ if($cfg['teamspeak_news_bb'] != '') {
+ $sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`=$nowtime WHERE `job_name`='news_bb';\nUPDATE `$dbname`.`cfg_params` SET `value`='{$cfg['teamspeak_news_bb']}' WHERE `param`='teamspeak_news_bb';\n";
+ }
+
if(version_compare($cfg['version_latest_available'], $cfg['version_current_using'], '>') && $cfg['version_latest_available'] != NULL) {
- enter_logfile($cfg,4,$lang['upinf']);
+ enter_logfile(4,$lang['upinf']);
if(isset($cfg['webinterface_admin_client_unique_id_list']) && $cfg['webinterface_admin_client_unique_id_list'] != NULL) {
foreach(array_flip($cfg['webinterface_admin_client_unique_id_list']) as $clientid) {
usleep($cfg['teamspeak_query_command_delay']);
try {
- $ts3->clientGetByUid($clientid)->message(sprintf($lang['upmsg'], $cfg['version_current_using'], $cfg['version_latest_available'], 'https://ts-ranksystem.com/#changelog'));
- enter_logfile($cfg,4," ".sprintf($lang['upusrinf'], $clientid));
+ if(isset($cfg['teamspeak_news_bb']) && $cfg['teamspeak_news_bb'] != '') {
+ $ts3->clientGetByUid($clientid)->message(sprintf($lang['upmsg'], $cfg['version_current_using'], $cfg['version_latest_available'], 'https://ts-ranksystem.com/#changelog')."\n\n[U]Latest News:[/U]\n".$cfg['teamspeak_news_bb']);
+ } else {
+ $ts3->clientGetByUid($clientid)->message(sprintf($lang['upmsg'], $cfg['version_current_using'], $cfg['version_latest_available'], 'https://ts-ranksystem.com/#changelog'));
+ }
+ enter_logfile(4," ".sprintf($lang['upusrinf'], $clientid));
} catch (Exception $e) {
- enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
+ enter_logfile(6," ".sprintf($lang['upusrerr'], $clientid));
}
}
}
- $sqlexec .= update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand);
+ $sqlexec .= update_rs($mysqlcon,$lang,$cfg,$dbname);
}
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`=$nowtime WHERE `job_name`='get_version';\nUPDATE `$dbname`.`cfg_params` SET `value`='{$cfg['version_latest_available']}' WHERE `param`='version_latest_available';\n";
}
@@ -436,13 +474,13 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
$dbversion = $mysqlcon->getAttribute(PDO::ATTR_SERVER_VERSION);
preg_match("/^[0-9\.-]+/", $dbversion, $version_number);
if ($cfg['rankup_time_assess_mode'] == 1) {
- if(version_compare($version_number[0], '10.6', '>=') || version_compare($version_number[0], '5.5.5-10.6', '>=')) {
+ if(version_compare($version_number[0], '10.6', '>=') || version_compare($version_number[0], '8', '>=') && version_compare($version_number[0], '10', '<') || version_compare($version_number[0], '5.5.5-10.6', '>=') && version_compare($version_number[0], '5.5.6', '<')) {
$sqlexec .= "UPDATE `$dbname`.`user` AS `u` INNER JOIN (SELECT RANK() OVER (ORDER BY (`count` - `idle`) DESC) AS `rank`, `uuid` FROM `$dbname`.`user` WHERE `except`<2) AS `s` USING (`uuid`) SET `u`.`rank`=`s`.`rank`;\n";
} else {
$sqlexec .= "SET @a:=0;\nUPDATE `$dbname`.`user` AS `u` INNER JOIN (SELECT @a:=@a+1 `nr`,`uuid` FROM `$dbname`.`user` WHERE `except`<2 ORDER BY (`count` - `idle`) DESC) AS `s` USING (`uuid`) SET `u`.`rank`=`s`.`nr`;\n";
}
} else {
- if(version_compare($version_number[0], '10.6', '>=') || version_compare($version_number[0], '5.5.5-10.6', '>=')) {
+ if(version_compare($version_number[0], '10.6', '>=') || version_compare($version_number[0], '8', '>=') && version_compare($version_number[0], '10', '<') || version_compare($version_number[0], '5.5.5-10.6', '>=') && version_compare($version_number[0], '5.5.6', '<')) {
$sqlexec .= "UPDATE `$dbname`.`user` AS `u` INNER JOIN (SELECT RANK() OVER (ORDER BY `count` DESC) AS `rank`, `uuid` FROM `$dbname`.`user` WHERE `except`<2) AS `s` USING (`uuid`) SET `u`.`rank`=`s`.`rank`;\n";
} else {
$sqlexec .= "SET @a:=0;\nUPDATE `$dbname`.`user` AS `u` INNER JOIN (SELECT @a:=@a+1 `nr`,`uuid` FROM `$dbname`.`user` WHERE `except`<2 ORDER BY `count` DESC) AS `s` USING (`uuid`) SET `u`.`rank`=`s`.`nr`;\n";
@@ -450,7 +488,7 @@ function calc_serverstats($ts3,$mysqlcon,&$cfg,$dbname,$dbtype,$serverinfo,&$db_
}
}
- enter_logfile($cfg,6,"calc_serverstats needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"calc_serverstats needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
?>
\ No newline at end of file
diff --git a/jobs/calc_user.php b/jobs/calc_user.php
index b92fb88..27a4ff3 100644
--- a/jobs/calc_user.php
+++ b/jobs/calc_user.php
@@ -5,16 +5,16 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
$sqlexec = '';
if(empty($cfg['rankup_definition'])) {
- shutdown($mysqlcon,$cfg,1,"calc_user:".$lang['wiconferr']);
+ shutdown($mysqlcon,1,"calc_user:".$lang['wiconferr']);
}
- $addtime = $nowtime - $db_cache['job_check']['calc_user_lastscan']['timestamp'];
+ $addtime = $nowtime - intval($db_cache['job_check']['calc_user_lastscan']['timestamp']);
if($addtime > 1800) {
- enter_logfile($cfg,4,"Much time gone since last scan.. set addtime to 1 second.");
+ enter_logfile(4,"Much time gone since last scan.. set addtime to 1 second.");
$addtime = 1;
} elseif($addtime < 0) {
- enter_logfile($cfg,3,"Negative time valie (now < last scan).. Error in your machine time!.. set addtime to 1 second.");
+ enter_logfile(3,"Negative time valie (now < last scan).. Error in your machine time!.. set addtime to 1 second.");
$addtime = 1;
}
@@ -36,11 +36,11 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
if($value['timecount'] == 0 && $value['timestamp'] == 4273093200) {
//remove user
if(($user = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` WHERE `uuid`='{$uuid}'")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
- enter_logfile($cfg,2,"Database error on selecting user (admin function remove user): ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"Database error on selecting user (admin function remove user): ".print_r($mysqlcon->errorInfo(), true));
} else {
$temp_cldbid = $user[$uuid]['cldbid'];
$sqlexec .= "DELETE FROM `$dbname`.`addon_assign_groups` WHERE `uuid`='{$uuid}';\nDELETE FROM `$dbname`.`admin_addtime` WHERE `uuid`='{$uuid}';\nDELETE FROM `$dbname`.`stats_user` WHERE `uuid`='{$uuid}';\nDELETE FROM `$dbname`.`user` WHERE `uuid`='{$uuid}';\nDELETE FROM `$dbname`.`user_iphash` WHERE `uuid`='{$uuid}';\nDELETE FROM `$dbname`.`user_snapshot` WHERE `cldbid`='{$temp_cldbid}';\n";
- enter_logfile($cfg,4,sprintf($lang['wihladm45'],$user[$uuid]['name'],$uuid,$temp_cldbid).' ('.$lang['wihladm46'].')');
+ enter_logfile(4,sprintf($lang['wihladm45'],$user[$uuid]['name'],$uuid,$temp_cldbid).' ('.$lang['wihladm46'].')');
if(isset($db_cache['all_user'][$uuid])) unset($db_cache['all_user'][$uuid]);
if(isset($db_cache['admin_addtime'][$uuid])) unset($db_cache['admin_addtime'][$uuid]);
if(isset($db_cache['addon_assign_groups'][$uuid])) unset($db_cache['addon_assign_groups'][$uuid]);
@@ -55,17 +55,17 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
}
if($isonline != 1) {
if(($user = $mysqlcon->query("SELECT `uuid`,`cldbid` FROM `$dbname`.`user` WHERE `uuid`='{$uuid}'")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
- enter_logfile($cfg,2,"Database error on selecting user (admin function remove/add time): ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"Database error on selecting user (admin function remove/add time): ".print_r($mysqlcon->errorInfo(), true));
} else {
$temp_cldbid = $user[$uuid]['cldbid'];
$sqlexec .= "UPDATE `$dbname`.`user` SET `count`='{$db_cache['all_user'][$uuid]['count']}', `idle`='{$db_cache['all_user'][$uuid]['idle']}' WHERE `uuid`='{$uuid}';\n";
}
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`admin_addtime` WHERE `timestamp`=".$value['timestamp']." AND `uuid`='$uuid';") === false) {
- enter_logfile($cfg,2,"Database error on updating user (admin function remove/add time): ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"Database error on updating user (admin function remove/add time): ".print_r($mysqlcon->errorInfo(), true));
}
if(($usersnap = $mysqlcon->query("SELECT `id`,`cldbid`,`count`,`idle` FROM `$dbname`.`user_snapshot` WHERE `cldbid`={$temp_cldbid}")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
- enter_logfile($cfg,2,"Database error on selecting user (admin function remove/add time): ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"Database error on selecting user (admin function remove/add time): ".print_r($mysqlcon->errorInfo(), true));
} else {
foreach($usersnap as $id => $valuesnap) {
$valuesnap['count'] += $value['timecount'];
@@ -77,7 +77,7 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
$sqlexec .= "UPDATE `$dbname`.`user_snapshot` SET `count`='{$valuesnap['count']}', `idle`='{$valuesnap['idle']}' WHERE `cldbid`='{$temp_cldbid}' AND `id`='{$id}';\n";
}
}
- enter_logfile($cfg,4,sprintf($lang['sccupcount2'],$value['timecount'],$uuid).' ('.$lang['wihladm46'].')');
+ enter_logfile(4,sprintf($lang['sccupcount2'],$value['timecount'],$uuid).' ('.$lang['wihladm46'].')');
unset($user, $usersnap);
}
}
@@ -108,7 +108,7 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
if(isset($db_cache['all_user'][$uid]['except']) && ($db_cache['all_user'][$uid]['except'] == 3 || $db_cache['all_user'][$uid]['except'] == 2) && $cfg['rankup_excepted_mode'] == 2) {
$db_cache['all_user'][$uid]['count'] = 0;
$db_cache['all_user'][$uid]['idle'] = 0;
- enter_logfile($cfg,5,sprintf($lang['resettime'], $client['client_nickname'], $uid, $client['client_database_id']));
+ enter_logfile(5,sprintf($lang['resettime'], $client['client_nickname'], $uid, $client['client_database_id']));
$sqlexec .= "DELETE FROM `$dbname`.`user_snapshot` WHERE `cldbid`='{$client['client_database_id']}';\n";
}
$except = 0;
@@ -116,7 +116,7 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
if(isset($db_cache['all_user'][$uid])) {
$idle = $db_cache['all_user'][$uid]['idle'] + $clientidle;
if ($db_cache['all_user'][$uid]['cldbid'] != $client['client_database_id'] && $cfg['rankup_client_database_id_change_switch'] == 1) {
- enter_logfile($cfg,5,sprintf($lang['changedbid'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['all_user'][$uid]['cldbid']));
+ enter_logfile(5,sprintf($lang['changedbid'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['all_user'][$uid]['cldbid']));
$count = 1;
$idle = 0;
$boosttime = 0;
@@ -135,9 +135,9 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
try {
$ts3->serverGroupClientDel($boost['group'], $client['client_database_id']);
$boosttime = 0;
- enter_logfile($cfg,5,sprintf($lang['sgrprm'], $db_cache['groups'][$boost['group']]['sgidname'], $boost['group'], $client['client_nickname'], $uid, $client['client_database_id']).' [Boost-Group]');
+ enter_logfile(5,sprintf($lang['sgrprm'], $db_cache['groups'][$boost['group']]['sgidname'], $boost['group'], $client['client_nickname'], $uid, $client['client_database_id']).' [Boost-Group]');
} catch (Exception $e) {
- enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$db_cache['all_user'][$uid]['grpid']]['sgidname'], $db_cache['all_user'][$uid]['grpid']));
+ enter_logfile(2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$db_cache['all_user'][$uid]['grpid']]['sgidname'], $db_cache['all_user'][$uid]['grpid']));
$db_cache['all_user'][$uid]['grouperror'] = $nowtime;
}
}
@@ -195,10 +195,10 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
usleep($cfg['teamspeak_query_command_delay']);
try {
$ts3->serverGroupClientDel($db_cache['all_user'][$uid]['grpid'], $client['client_database_id']);
- enter_logfile($cfg,5,sprintf($lang['sgrprm'], $db_cache['groups'][$db_cache['all_user'][$uid]['grpid']]['sgidname'], $db_cache['all_user'][$uid]['grpid'], $client['client_nickname'], $uid, $client['client_database_id']));
+ enter_logfile(5,sprintf($lang['sgrprm'], $db_cache['groups'][$db_cache['all_user'][$uid]['grpid']]['sgidname'], $db_cache['all_user'][$uid]['grpid'], $client['client_nickname'], $uid, $client['client_database_id']));
if(isset($client_groups_rankup[$db_cache['all_user'][$uid]['grpid']])) unset($client_groups_rankup[$db_cache['all_user'][$uid]['grpid']]);
} catch (Exception $e) {
- enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$db_cache['all_user'][$uid]['grpid']]['sgidname'], $db_cache['all_user'][$uid]['grpid']));
+ enter_logfile(2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$db_cache['all_user'][$uid]['grpid']]['sgidname'], $db_cache['all_user'][$uid]['grpid']));
$db_cache['all_user'][$uid]['grouperror'] = $nowtime;
}
}
@@ -208,7 +208,7 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
try {
$ts3->serverGroupClientAdd($rank['group'], $client['client_database_id']);
$db_cache['all_user'][$uid]['grpsince'] = $nowtime;
- enter_logfile($cfg,5,sprintf($lang['sgrpadd'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group'], $client['client_nickname'], $uid, $client['client_database_id']));
+ enter_logfile(5,sprintf($lang['sgrpadd'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group'], $client['client_nickname'], $uid, $client['client_database_id']));
if ($cfg['rankup_message_to_user_switch'] == 1) {
$days = $dtF->diff($dtT)->format('%a');
$hours = $dtF->diff($dtT)->format('%h');
@@ -217,7 +217,7 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
sendmessage($ts3, $cfg, $uid, sprintf($cfg['rankup_message_to_user'],$days,$hours,$mins,$secs,$db_cache['groups'][$rank['group']]['sgidname'],$client['client_nickname']), 1, NULL, sprintf($lang['sgrprerr'], $name, $uid, $client['client_database_id'], $db_cache['groups'][$rank['group']]['sgidname'],$rank['group']), 2);
}
} catch (Exception $e) {
- enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group']));
+ enter_logfile(2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group']));
$db_cache['all_user'][$uid]['grouperror'] = $nowtime;
}
}
@@ -237,11 +237,15 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
try {
usleep($cfg['teamspeak_query_command_delay']);
$ts3->serverGroupClientDel($removegroup, $client['client_database_id']);
- enter_logfile($cfg,5,sprintf("Removed WRONG servergroup %s (ID: %s) from user %s (unique Client-ID: %s; Client-database-ID %s).", $db_cache['groups'][$removegroup]['sgidname'], $removegroup, $client['client_nickname'], $uid, $client['client_database_id']));
+ enter_logfile(5,sprintf("Removed WRONG servergroup %s (ID: %s) from user %s (unique Client-ID: %s; Client-database-ID %s).", $db_cache['groups'][$removegroup]['sgidname'], $removegroup, $client['client_nickname'], $uid, $client['client_database_id']));
} catch (Exception $e) {
- enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$removegroup]['sgidname'], $removegroup));
+ enter_logfile(2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $client['client_nickname'], $uid, $client['client_database_id'], $db_cache['groups'][$removegroup]['sgidname'], $removegroup));
$db_cache['all_user'][$uid]['grouperror'] = $nowtime;
}
+ } elseif ($cfg['rankup_excepted_remove_group_switch'] == 1 && $removegroup != NULL && $removegroup != 0 && $removegroup == $db_cache['all_user'][$uid]['grpid'] && $cfg['rankup_excepted_mode'] == 0 && ($db_cache['all_user'][$uid]['except'] == 3 || $db_cache['all_user'][$uid]['except'] == 2) && (!isset($db_cache['all_user'][$uid]['grouperror']) || $db_cache['all_user'][$uid]['grouperror'] < ($nowtime - 300))) {
+ usleep($cfg['teamspeak_query_command_delay']);
+ $ts3->serverGroupClientDel($removegroup, $client['client_database_id']);
+ enter_logfile(5,sprintf("Removed servergroup %s (ID: %s) cause EXCEPTED (%s) from user %s (unique Client-ID: %s; Client-database-ID %s).", $db_cache['groups'][$removegroup]['sgidname'], $removegroup, exception_client_code($db_cache['all_user'][$uid]['except']), $client['client_nickname'], $uid, $client['client_database_id']));
}
}
unset($client_groups_rankup);
@@ -302,7 +306,7 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
$db_cache['all_user'][$uid]['boosttime'] = 0;
$db_cache['all_user'][$uid]['grpsince'] = 0;
$db_cache['all_user'][$uid]['except'] = $except;
- enter_logfile($cfg,5,sprintf($lang['adduser'], $client['client_nickname'], $uid, $client['client_database_id']));
+ enter_logfile(5,sprintf($lang['adduser'], $client['client_nickname'], $uid, $client['client_database_id']));
}
$db_cache['all_user'][$uid]['name'] = $client['client_nickname'];
$db_cache['all_user'][$uid]['lastseen'] = $nowtime;
@@ -335,7 +339,7 @@ function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,&$d
unset($insertdata, $sqlinsertvalues);
}
- enter_logfile($cfg,6,"calc_user needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"calc_user needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
?>
\ No newline at end of file
diff --git a/jobs/calc_user_snapshot.php b/jobs/calc_user_snapshot.php
index e554dc8..b778099 100644
--- a/jobs/calc_user_snapshot.php
+++ b/jobs/calc_user_snapshot.php
@@ -6,9 +6,9 @@ function calc_user_snapshot($cfg,$dbname,&$db_cache) {
// Event Handling each 6 hours
// Duplicate users Table in snapshot Table
- if(($nowtime - $db_cache['job_check']['last_snapshot_time']['timestamp']) > 21600) {
+ if(($nowtime - intval($db_cache['job_check']['last_snapshot_time']['timestamp'])) > 21600) {
if(isset($db_cache['all_user'])) {
- $db_cache['job_check']['last_snapshot_id']['timestamp'] = $nextid = $db_cache['job_check']['last_snapshot_id']['timestamp'] + 1;
+ $db_cache['job_check']['last_snapshot_id']['timestamp'] = $nextid = intval($db_cache['job_check']['last_snapshot_id']['timestamp']) + 1;
if ($nextid > 121) $nextid = $nextid - 121;
$allinsertsnap = '';
@@ -25,6 +25,6 @@ function calc_user_snapshot($cfg,$dbname,&$db_cache) {
}
}
- enter_logfile($cfg,6,"calc_user_snapshot needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"calc_user_snapshot needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
\ No newline at end of file
diff --git a/jobs/calc_userstats.php b/jobs/calc_userstats.php
index e2b241c..6d1fb8b 100644
--- a/jobs/calc_userstats.php
+++ b/jobs/calc_userstats.php
@@ -1,10 +1,10 @@
query("SELECT `cldbid`,`id`,`count`,`idle` FROM `$dbname`.`user_snapshot` WHERE `id` IN ({$db_cache['job_check']['last_snapshot_id']['timestamp']},{$weekago},{$monthago}) AND `cldbid` IN ($cldbids)")->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,2,"calc_userstats 6:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(6,"Update User Stats between ".$job_begin." and ".$job_end.":");
+ if(($userdata = $mysqlcon->query("SELECT `cldbid`,`id`,`count`,`idle` FROM `$dbname`.`user_snapshot` WHERE `id` IN ({$db_cache['job_check']['last_snapshot_id']['timestamp']},{$dayago},{$weekago},{$monthago}) AND `cldbid` IN ($cldbids)")->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_ASSOC)) === false) {
+ enter_logfile(2,"calc_userstats 6:".print_r($mysqlcon->errorInfo(), true));
}
$allupdateuuid = '';
foreach ($sqlhis as $uuid => $userstats) {
if($userstats['lastseen'] > ($nowtime - 2678400)) {
- check_shutdown($cfg); usleep($cfg['teamspeak_query_command_delay']);
+ check_shutdown(); usleep($cfg['teamspeak_query_command_delay']);
if(isset($userdata[$userstats['cldbid']]) && $userdata[$userstats['cldbid']] != NULL) {
$keybase = array_search($db_cache['job_check']['last_snapshot_id']['timestamp'], array_column($userdata[$userstats['cldbid']], 'id'));
+ $keyday = array_search($dayago, array_column($userdata[$userstats['cldbid']], 'id'));
$keyweek = array_search($weekago, array_column($userdata[$userstats['cldbid']], 'id'));
$keymonth = array_search($monthago, array_column($userdata[$userstats['cldbid']], 'id'));
+ if(isset($userdata[$userstats['cldbid']]) && isset($userdata[$userstats['cldbid']][$keyday]) && $userdata[$userstats['cldbid']][$keyday]['id'] == $dayago) {
+ $count_day = $userdata[$userstats['cldbid']][$keybase]['count'] - $userdata[$userstats['cldbid']][$keyday]['count'];
+ $idle_day = $userdata[$userstats['cldbid']][$keybase]['idle'] - $userdata[$userstats['cldbid']][$keyday]['idle'];
+ $active_day = $count_day - $idle_day;
+ if($count_day < 0 || $count_day < $idle_day) $count_day = 0;
+ if($idle_day < 0 || $count_day < $idle_day) $idle_day = 0;
+ if($active_day < 0 || $count_day < $idle_day) $active_day = 0;
+ } else {
+ $count_day = $idle_day = $active_day = 0;
+ }
if(isset($userdata[$userstats['cldbid']]) && isset($userdata[$userstats['cldbid']][$keyweek]) && $userdata[$userstats['cldbid']][$keyweek]['id'] == $weekago) {
$count_week = $userdata[$userstats['cldbid']][$keybase]['count'] - $userdata[$userstats['cldbid']][$keyweek]['count'];
$idle_week = $userdata[$userstats['cldbid']][$keybase]['idle'] - $userdata[$userstats['cldbid']][$keyweek]['idle'];
@@ -67,7 +80,7 @@ function calc_userstats($ts3,$mysqlcon,&$cfg,$dbname,&$db_cache) {
$count_month = $idle_month = $active_month = 0;
}
} else {
- $count_week = $idle_week = $active_week = $count_month = $idle_month = $active_month = 0;
+ $count_day = $idle_day = $active_day = $count_week = $idle_week = $active_week = $count_month = $idle_month = $active_month = 0;
}
try {
@@ -80,15 +93,15 @@ function calc_userstats($ts3,$mysqlcon,&$cfg,$dbname,&$db_cache) {
if($clientinfo['client_totalconnections'] > 16777215) $clientinfo['client_totalconnections'] = 16777215;
} catch (Exception $e) {
if($e->getCode() == 512 || $e->getCode() == 1281) {
- enter_logfile($cfg,6,"Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") known by Ranksystem is missing in TS database, perhaps its already deleted or cldbid changed. Try to search for client by uuid.");
+ enter_logfile(6,"Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") known by Ranksystem is missing in TS database, perhaps its already deleted or cldbid changed. Try to search for client by uuid.");
try {
$getcldbid = $ts3->clientFindDb($uuid, TRUE);
if($getcldbid[0] != $userstats['cldbid']) {
- enter_logfile($cfg,4," Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") known by the Ranksystem changed its cldbid. New cldbid is ".$getcldbid[0].".");
+ enter_logfile(4," Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") known by the Ranksystem changed its cldbid. New cldbid is ".$getcldbid[0].".");
$db_cache['all_user'][$uuid]['cldbid'] = $getcldbid[0];
if($cfg['rankup_client_database_id_change_switch'] == 1) {
- $sqlexec .= "UPDATE `$dbname`.`user` SET `count`=0,`idle`=0 WHERE `uuid`='$uuid';\nUPDATE `$dbname`.`stats_user` SET `count_week`=0,`count_month`=0,`idle_week`=0,`idle_month`=0,`active_week`=0,`active_month`=0 WHERE `uuid`='$uuid';\nDELETE FROM `$dbname`.`user_snapshot` WHERE `cldbid`='{$userstats['cldbid']}';\n";
- enter_logfile($cfg,4," ".sprintf($lang['changedbid'], $userstats['name'], $uuid, $userstats['cldbid'], $getcldbid[0]));
+ $sqlexec .= "UPDATE `$dbname`.`user` SET `count`=0,`idle`=0 WHERE `uuid`='$uuid';\nUPDATE `$dbname`.`stats_user` SET `count_day`=0,`count_week`=0,`count_month`=0,`idle_day`=0,`idle_week`=0,`idle_month`=0,`active_day`=0,`active_week`=0,`active_month`=0 WHERE `uuid`='$uuid';\nDELETE FROM `$dbname`.`user_snapshot` WHERE `cldbid`='{$userstats['cldbid']}';\n";
+ enter_logfile(4," ".sprintf($lang['changedbid'], $userstats['name'], $uuid, $userstats['cldbid'], $getcldbid[0]));
} else {
$sqlexec .= "UPDATE `$dbname`.`user` SET `cldbid`={$getcldbid[0]} WHERE `uuid`='$uuid';\n";
// select current user_snapshot entries and insert this with the new database-ID
@@ -103,49 +116,49 @@ function calc_userstats($ts3,$mysqlcon,&$cfg,$dbname,&$db_cache) {
}
unset($allinsert);
}
- enter_logfile($cfg,4," Store new cldbid ".$getcldbid[0]." for client (uuid: ".$uuid." old cldbid: ".$userstats['cldbid'].")");
+ enter_logfile(4," Store new cldbid ".$getcldbid[0]." for client (uuid: ".$uuid." old cldbid: ".$userstats['cldbid'].")");
}
} else {
- enter_logfile($cfg,3," Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") is missing in TS database, but TeamSpeak answers on question with the same cldbid (".$getcldbid[0].").. It's weird!");
+ enter_logfile(3," Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") is missing in TS database, but TeamSpeak answers on question with the same cldbid (".$getcldbid[0].").. It's weird!");
}
} catch (Exception $e) {
if($e->getCode() == 2568) {
- enter_logfile($cfg,4,$e->getCode() . ': ' . $e->getMessage()."; Error due command clientdbfind (permission: b_virtualserver_client_dbsearch needed).");
+ enter_logfile(4,$e->getCode() . ': ' . $e->getMessage()."; Error due command clientdbfind (permission: b_virtualserver_client_dbsearch needed).");
} else {
- enter_logfile($cfg,6,$e->getCode() . ': ' . $e->getMessage()."; Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") is missing in TS database, it seems to be deleted. Run the !clean command to correct this.");
- $sqlexec .= "UPDATE `$dbname`.`stats_user` SET `count_week`=0,`count_month`=0,`idle_week`=0,`idle_month`=0,`active_week`=0,`active_month`=0,`removed`=1 WHERE `uuid`='$uuid';\n";
+ enter_logfile(6,$e->getCode() . ': ' . $e->getMessage()."; Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") is missing in TS database, it seems to be deleted. Run the !clean command to correct this.");
+ $sqlexec .= "UPDATE `$dbname`.`stats_user` SET `count_day`=0,`count_week`=0,`count_month`=0,`idle_day`=0,`idle_week`=0,`idle_month`=0,`active_day`=0,`active_week`=0,`active_month`=0,`removed`=1 WHERE `uuid`='$uuid';\n";
}
}
} else {
- enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.$e->getMessage()."; Error due command clientdbinfo for client-database-ID {$userstats['cldbid']} (permission: b_virtualserver_client_dbinfo needed).");
+ enter_logfile(2,$lang['errorts3'].$e->getCode().': '.$e->getMessage()."; Error due command clientdbinfo for client-database-ID {$userstats['cldbid']} (permission: b_virtualserver_client_dbinfo needed).");
}
$clientdesc = $clientinfo['client_base64HashClientUID'] = "NULL";
$clientinfo['client_totalconnections'] = $clientinfo['client_total_bytes_uploaded'] = $clientinfo['client_total_bytes_downloaded'] = 0;
}
- $allupdateuuid .= "('$uuid',$count_week,$count_month,$idle_week,$idle_month,$active_week,$active_month,{$clientinfo['client_totalconnections']},'{$clientinfo['client_base64HashClientUID']}',{$clientinfo['client_total_bytes_uploaded']},{$clientinfo['client_total_bytes_downloaded']},$clientdesc,$nowtime),";
+ $allupdateuuid .= "('$uuid',$count_day,$count_week,$count_month,$idle_day,$idle_week,$idle_month,$active_day,$active_week,$active_month,{$clientinfo['client_totalconnections']},'{$clientinfo['client_base64HashClientUID']}',{$clientinfo['client_total_bytes_uploaded']},{$clientinfo['client_total_bytes_downloaded']},$clientdesc,$nowtime),";
}
}
- unset($sqlhis,$userdataweekbegin,$userdataend,$userdatamonthbegin,$clientinfo,$count_week,$idle_week,$active_week,$count_month,$idle_month,$active_month,$clientdesc);
+ unset($sqlhis,$userdataweekbegin,$userdataend,$userdatamonthbegin,$clientinfo,$count_day,$idle_day,$active_day,$count_week,$idle_week,$active_week,$count_month,$idle_month,$active_month,$clientdesc);
$db_cache['job_check']['calc_user_limit']['timestamp'] = $job_end;
if ($allupdateuuid != '') {
$allupdateuuid = substr($allupdateuuid, 0, -1);
- $sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`=$job_end WHERE `job_name`='calc_user_limit';\nINSERT INTO `$dbname`.`stats_user` (`uuid`,`count_week`,`count_month`,`idle_week`,`idle_month`,`active_week`,`active_month`,`total_connections`,`base64hash`,`client_total_up`,`client_total_down`,`client_description`,`last_calculated`) VALUES $allupdateuuid ON DUPLICATE KEY UPDATE `count_week`=VALUES(`count_week`),`count_month`=VALUES(`count_month`),`idle_week`=VALUES(`idle_week`),`idle_month`=VALUES(`idle_month`),`active_week`=VALUES(`active_week`),`active_month`=VALUES(`active_month`),`total_connections`=VALUES(`total_connections`),`base64hash`=VALUES(`base64hash`),`client_total_up`=VALUES(`client_total_up`),`client_total_down`=VALUES(`client_total_down`),`client_description`=VALUES(`client_description`),`last_calculated`=VALUES(`last_calculated`);\n";
+ $sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`=$job_end WHERE `job_name`='calc_user_limit';\nINSERT INTO `$dbname`.`stats_user` (`uuid`,`count_day`,`count_week`,`count_month`,`idle_day`,`idle_week`,`idle_month`,`active_day`,`active_week`,`active_month`,`total_connections`,`base64hash`,`client_total_up`,`client_total_down`,`client_description`,`last_calculated`) VALUES $allupdateuuid ON DUPLICATE KEY UPDATE `count_day`=VALUES(`count_day`),`count_week`=VALUES(`count_week`),`count_month`=VALUES(`count_month`),`idle_day`=VALUES(`idle_day`),`idle_week`=VALUES(`idle_week`),`idle_month`=VALUES(`idle_month`),`active_day`=VALUES(`active_day`),`active_week`=VALUES(`active_week`),`active_month`=VALUES(`active_month`),`total_connections`=VALUES(`total_connections`),`base64hash`=VALUES(`base64hash`),`client_total_up`=VALUES(`client_total_up`),`client_total_down`=VALUES(`client_total_down`),`client_description`=VALUES(`client_description`),`last_calculated`=VALUES(`last_calculated`);\n";
unset($allupdateuuid);
} else {
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`=$job_end WHERE `job_name`='calc_user_limit';\n";
}
}
- if ($db_cache['job_check']['calc_user_removed']['timestamp'] < ($nowtime - 1800)) {
+ if (intval($db_cache['job_check']['calc_user_removed']['timestamp']) < ($nowtime - 1800)) {
$db_cache['job_check']['calc_user_removed']['timestamp'] = $nowtime;
$atime = $nowtime - 3600;
$sqlexec .= "UPDATE `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` SET `s`.`removed`='0' WHERE `s`.`removed`='1' AND `u`.`lastseen`>{$atime};\nUPDATE `$dbname`.`job_check` SET `timestamp`='{$nowtime}' WHERE `job_name`='calc_user_removed';\n";
}
- enter_logfile($cfg,6,"calc_userstats needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"calc_userstats needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
?>
\ No newline at end of file
diff --git a/jobs/check_db.php b/jobs/check_db.php
index 50ce781..3fdb16f 100644
--- a/jobs/check_db.php
+++ b/jobs/check_db.php
@@ -1,7 +1,7 @@
query("SELECT MAX(`cldbid`) AS `cldbid` FROM `$dbname`.`user`")->fetchAll(PDO::FETCH_ASSOC);
@@ -17,9 +17,9 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
$updatecldbid = $mysqlcon->query("SELECT `cldbid`,`uuid`,`name`,`lastseen` FROM `$dbname`.`user` WHERE `cldbid` in ({$doublecldbid})")->fetchAll(PDO::FETCH_ASSOC);
foreach($updatecldbid as $row) {
if($mysqlcon->exec("UPDATE `$dbname`.`user` SET `cldbid`='{$maxcldbid}' WHERE `uuid`='{$row['uuid']}'") === false) {
- enter_logfile($cfg,1," Repair double client-database-ID failed (".$row['uuid']."): ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(1," Repair double client-database-ID failed (".$row['uuid']."): ".print_r($mysqlcon->errorInfo(), true));
} else {
- enter_logfile($cfg,4," Repair double client-database-ID for ".$row['name']." (".$row['uuid']."); old ID ".$row['cldbid']."; set virtual ID $maxcldbid");
+ enter_logfile(4," Repair double client-database-ID for ".$row['name']." (".$row['uuid']."); old ID ".$row['cldbid']."; set virtual ID $maxcldbid");
}
$maxcldbid++;
}
@@ -29,11 +29,11 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
function set_new_version($mysqlcon,$cfg,$dbname) {
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('version_current_using','{$cfg['version_latest_available']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) {
- enter_logfile($cfg,1," An error happens due updating the Ranksystem Database:".print_r($mysqlcon->errorInfo(), true));
- shutdown($mysqlcon,$cfg,1," Check the database connection and properties in other/dbconfig.php and check also the database permissions.");
+ enter_logfile(1," An error happens due updating the Ranksystem Database:".print_r($mysqlcon->errorInfo(), true));
+ shutdown($mysqlcon,1," Check the database connection and properties in other/dbconfig.php and check also the database permissions.");
} else {
$cfg['version_current_using'] = $cfg['version_latest_available'];
- enter_logfile($cfg,4," Database successfully updated!");
+ enter_logfile(4," Database successfully updated!");
return $cfg;
}
}
@@ -48,58 +48,58 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
rmdir_recursive($folder.$file);
} else {
if(!unlink($folder.$file)) {
- enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: ".$folder.$file);
+ enter_logfile(4,"Unnecessary file, please delete it from your webserver: ".$folder.$file);
}
}
}
if(!rmdir($folder)) {
- enter_logfile($cfg,4,"Unnecessary folder, please delete it from your webserver: ".$folder);
+ enter_logfile(4,"Unnecessary folder, please delete it from your webserver: ".$folder);
}
}
foreach($del_folder as $folder) {
- if(is_dir(substr(__DIR__,0,-4).$folder)) {
- rmdir_recursive(substr(__DIR__,0,-4).$folder,$cfg);
+ if(is_dir(dirname(__DIR__).DIRECTORY_SEPARATOR.$folder)) {
+ rmdir_recursive(dirname(__DIR__).DIRECTORY_SEPARATOR.$folder,$cfg);
}
}
foreach($del_files as $file) {
- if(is_file(substr(__DIR__,0,-4).$file)) {
- if(!unlink(substr(__DIR__,0,-4).$file)) {
- enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: ".$file);
+ if(is_file(dirname(__DIR__).DIRECTORY_SEPARATOR.$file)) {
+ if(!unlink(dirname(__DIR__).DIRECTORY_SEPARATOR.$file)) {
+ enter_logfile(4,"Unnecessary file, please delete it from your webserver: ".$file);
}
}
}
}
function check_writable($cfg,$mysqlcon) {
- enter_logfile($cfg,5," Check files permissions...");
+ enter_logfile(5," Check files permissions...");
$counterr=0;
try {
- $scandir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(substr(__DIR__,0,-4)));
+ $scandir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__DIR__)));
$files = array();
foreach ($scandir as $object) {
if(!strstr($object, '/.') && !strstr($object, '\.')) {
if (!$object->isDir()) {
if(!is_writable($object->getPathname())) {
- enter_logfile($cfg,3," File is not writeable ".$object);
+ enter_logfile(3," File is not writeable ".$object);
$counterr++;
}
} else {
if(!is_writable($object->getPathname())) {
- enter_logfile($cfg,3," Folder is not writeable ".$object);
+ enter_logfile(3," Folder is not writeable ".$object);
$counterr++;
}
}
}
}
} catch (Exception $e) {
- shutdown($mysqlcon,$cfg,1,"File Permissions Error: ".$e->getCode()." ".$e->getMessage());
- enter_logfile($cfg,3,"File Permissions Error: ".$e->getCode()." ".$e->getMessage());
+ shutdown($mysqlcon,1,"File Permissions Error: ".$e->getCode()." ".$e->getMessage());
+ enter_logfile(3,"File Permissions Error: ".$e->getCode()." ".$e->getMessage());
}
if($counterr!=0) {
- shutdown($mysqlcon,$cfg,1,"Wrong file/folder permissions (see messages before!)! Check and correct the owner (chown) and access permissions (chmod)!");
+ shutdown($mysqlcon,1,"Wrong file/folder permissions (see messages before!)! Check and correct the owner (chown) and access permissions (chmod)!");
} else {
- enter_logfile($cfg,5," Check files permissions [done]");
+ enter_logfile(5," Check files permissions [done]");
}
}
@@ -108,153 +108,153 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
check_double_cldbid($mysqlcon,$cfg,$dbname);
if($cfg['version_current_using'] == $cfg['version_latest_available']) {
- enter_logfile($cfg,5," No newer version detected; Database check finished.");
+ enter_logfile(5," No newer version detected; Database check finished.");
} else {
- enter_logfile($cfg,4," Update the Ranksystem Database to new version...");
+ enter_logfile(4," Update the Ranksystem Database to new version...");
if(version_compare($cfg['version_current_using'], '1.3.0', '<')) {
- shutdown($mysqlcon,$cfg,1,"Your Ranksystem version is below 1.3.0. Please download the current version from the official page and install a new Ranksystem instead or contact the Ranksystem support.");
+ shutdown($mysqlcon,1,"Your Ranksystem version is below 1.3.0. Please download the current version from the official page and install a new Ranksystem instead or contact the Ranksystem support.");
}
if(version_compare($cfg['version_current_using'], '1.3.1', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('reset_user_time', '0'),('reset_user_delete', '0'),('reset_group_withdraw', '0'),('reset_webspace_cache', '0'),('reset_usage_graph', '0'),('reset_stop_after', '0');") === false) { } else {
- enter_logfile($cfg,4," [1.3.1] Added new job_check values.");
+ enter_logfile(4," [1.3.1] Added new job_check values.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.4', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_show_maxclientsline_switch', 0)") === false) { } else {
- enter_logfile($cfg,4," [1.3.4] Added new config values.");
+ enter_logfile(4," [1.3.4] Added new config values.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` MODIFY COLUMN `sgidname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.4] Adjusted table groups successfully.");
+ enter_logfile(4," [1.3.4] Adjusted table groups successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` MODIFY COLUMN `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.4] Adjusted table user successfully.");
+ enter_logfile(4," [1.3.4] Adjusted table user successfully.");
}
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='".time()."' WHERE `job_name`='last_update';") === false) { } else {
- enter_logfile($cfg,4," [1.3.4] Stored timestamp of last update successfully.");
+ enter_logfile(4," [1.3.4] Stored timestamp of last update successfully.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.7', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_fresh_installation', '0'),('webinterface_advanced_mode', '1')") === false) { } else {
- enter_logfile($cfg,4," [1.3.7] Added new config values.");
+ enter_logfile(4," [1.3.7] Added new config values.");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`groups`;") === false) { } else {
- enter_logfile($cfg,4," [1.3.7] Empty table groups successfully.");
+ enter_logfile(4," [1.3.7] Empty table groups successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` ADD COLUMN `sortid` int(10) NOT NULL default '0', ADD COLUMN `type` tinyint(1) NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.7] Adjusted table groups successfully.");
+ enter_logfile(4," [1.3.7] Adjusted table groups successfully.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.8', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_api_keys', '');") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Added new config values.");
+ enter_logfile(4," [1.3.8] Added new config values.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` MODIFY COLUMN `uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `lastseen` int(10) UNSIGNED NOT NULL default '0', MODIFY COLUMN `boosttime` int(10) UNSIGNED NOT NULL default '0', MODIFY COLUMN `firstcon` int(10) UNSIGNED NOT NULL default '0', MODIFY COLUMN `grpsince` int(10) UNSIGNED NOT NULL default '0', MODIFY COLUMN `rank` smallint(5) UNSIGNED NOT NULL default '65535', MODIFY COLUMN `nation` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table user successfully (part 1).");
+ enter_logfile(4," [1.3.8] Adjusted table user successfully (part 1).");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` MODIFY COLUMN `count` DECIMAL(14,3) NOT NULL default '0', MODIFY COLUMN `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, MODIFY COLUMN `idle` DECIMAL(14,3) NOT NULL default '0', MODIFY COLUMN `platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, MODIFY COLUMN `nation` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, MODIFY COLUMN `version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table user successfully (part 2).");
+ enter_logfile(4," [1.3.8] Adjusted table user successfully (part 2).");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user_snapshot` MODIFY COLUMN `timestamp` int(10) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table user_snapshot successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table user_snapshot successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` MODIFY COLUMN `uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `base64hash` char(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `count_week` mediumint(8) UNSIGNED NOT NULL default '0', MODIFY COLUMN `count_month` mediumint(8) UNSIGNED NOT NULL default '0', MODIFY COLUMN `idle_week` mediumint(8) UNSIGNED NOT NULL default '0', MODIFY COLUMN `idle_month` mediumint(8) UNSIGNED NOT NULL default '0', MODIFY COLUMN `active_week` mediumint(8) UNSIGNED NOT NULL default '0', MODIFY COLUMN `active_month` mediumint(8) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table stats_user (part 1) successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table stats_user (part 1) successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` DROP COLUMN `rank`, DROP COLUMN `battles_total`, DROP COLUMN `battles_won`, DROP COLUMN `battles_lost`, DROP COLUMN `achiev_time`, DROP COLUMN `achiev_connects`, DROP COLUMN `achiev_battles`, DROP COLUMN `achiev_time_perc`, DROP COLUMN `achiev_connects_perc`, DROP COLUMN `achiev_battles_perc`;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table stats_user (part 2) successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table stats_user (part 2) successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` MODIFY COLUMN `base64hash` char(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table stats_user (part 3) successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table stats_user (part 3) successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`server_usage` MODIFY COLUMN `timestamp` int(10) UNSIGNED NOT NULL default '0', MODIFY COLUMN `clients` smallint(5) UNSIGNED NOT NULL default '0', MODIFY COLUMN `channel` smallint(5) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table server_usage successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table server_usage successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`job_check` MODIFY COLUMN `timestamp` int(10) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table job_check successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table job_check successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`admin_addtime` MODIFY COLUMN `uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `timestamp` int(10) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table admin_addtime successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table admin_addtime successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user_iphash` MODIFY COLUMN `uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table user_iphash successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table user_iphash successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_versions` MODIFY COLUMN `count` smallint(5) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table stats_versions successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table stats_versions successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_platforms` MODIFY COLUMN `count` smallint(5) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table stats_platforms successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table stats_platforms successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_nations` MODIFY COLUMN `nation` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `count` smallint(5) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table stats_nations successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table stats_nations successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` ADD COLUMN `ext` char(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table groups (part 1) successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table groups (part 1) successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` MODIFY COLUMN `sgid` int(10) UNSIGNED NOT NULL default '0', MODIFY COLUMN `icondate` int(10) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table groups (part 2) successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table groups (part 2) successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` MODIFY COLUMN `sgidname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table groups (part 3) successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table groups (part 3) successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`csrf_token` MODIFY COLUMN `timestamp` int(10) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table csrf_token successfully (part 1).");
+ enter_logfile(4," [1.3.8] Adjusted table csrf_token successfully (part 1).");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`csrf_token` MODIFY COLUMN `sessionid` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table csrf_token successfully (part 2).");
+ enter_logfile(4," [1.3.8] Adjusted table csrf_token successfully (part 2).");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`addon_assign_groups` MODIFY COLUMN `uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Adjusted table addon_assign_groups successfully.");
+ enter_logfile(4," [1.3.8] Adjusted table addon_assign_groups successfully.");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`groups`;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Empty table groups successfully.");
+ enter_logfile(4," [1.3.8] Empty table groups successfully.");
}
if($mysqlcon->exec("UPDATE `$dbname`.`user` SET `idle`=0 WHERE `idle`<0; UPDATE `$dbname`.`user` SET `count`=`idle` WHERE `count`<0;") === false) { } else {
- enter_logfile($cfg,6," [1.3.8] Fix for negative values in table user.");
+ enter_logfile(6," [1.3.8] Fix for negative values in table user.");
}
if($mysqlcon->exec("UPDATE `$dbname`.`user_snapshot` SET `idle`=0 WHERE `idle`<0; UPDATE `$dbname`.`user_snapshot` SET `count`=`idle` WHERE `count`<0;") === false) { } else {
- enter_logfile($cfg,6," [1.3.8] Fix for negative values in table user_snapshot.");
+ enter_logfile(6," [1.3.8] Fix for negative values in table user_snapshot.");
}
$check_snapshot_convert = $mysqlcon->query("DESC `$dbname`.`user_snapshot`")->fetchAll(PDO::FETCH_ASSOC);
if($check_snapshot_convert[0]['Field'] == 'timestamp' && $check_snapshot_convert[0]['Field'] != 'id') {
if($mysqlcon->exec("DELETE `a` FROM `$dbname`.`user_snapshot` AS `a` CROSS JOIN(SELECT DISTINCT(`timestamp`) FROM `$dbname`.`user_snapshot` ORDER BY `timestamp` DESC LIMIT 1000 OFFSET 121) AS `b` WHERE `a`.`timestamp`=`b`.`timestamp`;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Deleted old values out of the table user_snapshot.");
+ enter_logfile(4," [1.3.8] Deleted old values out of the table user_snapshot.");
}
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_snapshot2` (`id` tinyint(3) UNSIGNED NOT NULL default '0',`cldbid` int(10) UNSIGNED NOT NULL default '0',`count` int(10) UNSIGNED NOT NULL default '0',`idle` int(10) UNSIGNED NOT NULL default '0',PRIMARY KEY (`id`,`cldbid`));") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Created new table user_snapshot2 successfully.");
- enter_logfile($cfg,4," [1.3.8] Beginn with converting values.. This could take a while! Please do NOT stop the Bot!");
+ enter_logfile(4," [1.3.8] Created new table user_snapshot2 successfully.");
+ enter_logfile(4," [1.3.8] Beginn with converting values.. This could take a while! Please do NOT stop the Bot!");
}
$maxvalues = $mysqlcon->query("SELECT COUNT(*) FROM `$dbname`.`user_snapshot`;")->fetch();
@@ -286,7 +286,7 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
$sqlinsertvalues = substr($sqlinsertvalues, 0, -1);
if ($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`user_snapshot2` (`id`,`cldbid`,`count`,`idle`) VALUES {$sqlinsertvalues};") === false) {
- enter_logfile($cfg,1," Insert failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(1," Insert failed: ".print_r($mysqlcon->errorInfo(), true));
}
unset($snapshot, $sqlinsertvalues);
if (($offset + 50000) > $maxvalues[0]) {
@@ -294,39 +294,39 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
} else {
$convertedvalus = $offset + 50000;
}
- enter_logfile($cfg,4," [1.3.8] Converted ".$convertedvalus." out of ".$maxvalues[0]." values.");
+ enter_logfile(4," [1.3.8] Converted ".$convertedvalus." out of ".$maxvalues[0]." values.");
}
- enter_logfile($cfg,4," [1.3.8] Finished converting values");
+ enter_logfile(4," [1.3.8] Finished converting values");
$lastsnapshot = $mysqlcon->query("SELECT MAX(`timestamp`) AS `timestamp` FROM `$dbname`.`user_snapshot`")->fetchAll(PDO::FETCH_ASSOC);
if($mysqlcon->exec("DROP TABLE `$dbname`.`user_snapshot`;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Dropped old table user_snapshot successfully.");
+ enter_logfile(4," [1.3.8] Dropped old table user_snapshot successfully.");
}
if($mysqlcon->exec("RENAME TABLE `$dbname`.`user_snapshot2` TO `$dbname`.`user_snapshot`;") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Renamed table user_snapshot2 to user_snapshot successfully.");
+ enter_logfile(4," [1.3.8] Renamed table user_snapshot2 to user_snapshot successfully.");
}
$currentid = count($timestamps);
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('last_snapshot_id', '{$currentid}'),('last_snapshot_time', '{$lastsnapshot[0]['timestamp']}');") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Added new job_check values (part 1).");
+ enter_logfile(4," [1.3.8] Added new job_check values (part 1).");
}
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('update_groups', '0');") === false) { } else {
- enter_logfile($cfg,4," [1.3.8] Added new job_check values (part 2).");
+ enter_logfile(4," [1.3.8] Added new job_check values (part 2).");
}
} else {
- enter_logfile($cfg,4," [1.3.8] Converting user_snapshot already done. Did not started it again.");
+ enter_logfile(4," [1.3.8] Converting user_snapshot already done. Did not started it again.");
}
foreach(scandir(substr(dirname(__FILE__),0,-4).'tsicons/') as $file) {
if (in_array($file, array('.','..','check.png','placeholder.png','rs.png','servericon.png','100.png','200.png','300.png','500.png','600.png'))) continue;
if(!unlink(substr(dirname(__FILE__),0,-4).'tsicons/'.$file)) {
- enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: tsicons/".$file);
+ enter_logfile(4,"Unnecessary file, please delete it from your webserver: tsicons/".$file);
}
}
@@ -335,22 +335,22 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
if(version_compare($cfg['version_current_using'], '1.3.9', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('get_avatars', '0'),('calc_donut_chars', '0'),('reload_trigger', '0');") === false) { } else {
- enter_logfile($cfg,4," [1.3.9] Added new job_check values.");
+ enter_logfile(4," [1.3.9] Added new job_check values.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.10', '<')) {
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` ADD COLUMN `last_calculated` int(10) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.10] Added new stats_user values.");
+ enter_logfile(4," [1.3.10] Added new stats_user values.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` MODIFY COLUMN `total_connections` MEDIUMINT(8) UNSIGNED NOT NULL default '0';") === false) { } else {
- enter_logfile($cfg,4," [1.3.10] Adjusted table stats_user successfully.");
+ enter_logfile(4," [1.3.10] Adjusted table stats_user successfully.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.11', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('assign_groups_excepted_groupids','');") === false) { } else {
- enter_logfile($cfg,4," [1.3.11] Adjusted table addons_config successfully.");
+ enter_logfile(4," [1.3.11] Adjusted table addons_config successfully.");
}
if($mysqlcon->exec("CREATE INDEX `snapshot_id` ON `$dbname`.`user_snapshot` (`id`)") === false) { }
@@ -363,7 +363,7 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
if(version_compare($cfg['version_current_using'], '1.3.12', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_imprint_switch', '0'),('stats_imprint_address', 'Max Mustermann Musterstraße 13 05172 Musterhausen Germany'),('stats_imprint_address_url', 'https://site.url/imprint/'), ('stats_imprint_email', 'info@example.com'),('stats_imprint_phone', '+49 171 1234567'),('stats_imprint_notes', NULL),('stats_imprint_privacypolicy', 'Add your own privacy policy here. (editable in the webinterface)'),('stats_imprint_privacypolicy_url', 'https://site.url/privacy/');") === false) { } else {
- enter_logfile($cfg,4," [1.3.12] Added new imprint values.");
+ enter_logfile(4," [1.3.12] Added new imprint values.");
}
}
@@ -372,7 +372,7 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
if($mysqlcon->exec("UPDATE `$dbname`.`user_snapshot` SET `idle`=0 WHERE `idle`<0; UPDATE `$dbname`.`user_snapshot` SET `count`=`idle` WHERE `count`<0; UPDATE `$dbname`.`user_snapshot` SET `count`=`idle` WHERE `count`<`idle`;") === false) { }
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('database_export', '0'),('update_groups', '0') ON DUPLICATE KEY UPDATE `timestamp`=VALUES(`timestamp`);") === false) { } else {
- enter_logfile($cfg,4," [1.3.13] Added new job_check values.");
+ enter_logfile(4," [1.3.13] Added new job_check values.");
}
try {
@@ -380,54 +380,54 @@ function check_db($mysqlcon,$lang,&$cfg,$dbname) {
} catch (Exception $e) { }
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('default_session_sametime', 'Strict'),('default_header_origin', ''),('default_header_xss', '1; mode=block'),('default_header_contenttyp', '1'),('default_header_frame', '') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);") === false) { } else {
- enter_logfile($cfg,4," [1.3.13] Added new cfg_params values.");
+ enter_logfile(4," [1.3.13] Added new cfg_params values.");
}
if($mysqlcon->exec("UPDATE `$dbname`.`user` SET `nation`='XX' WHERE `nation`='';") === false) { } else {
- enter_logfile($cfg,4," [1.3.13] Updated table user.");
+ enter_logfile(4," [1.3.13] Updated table user.");
}
try {
if($mysqlcon->exec("DROP INDEX `snapshot_id` ON `$dbname`.`user_snapshot` (`id`)") === false) { } else {
- enter_logfile($cfg,4," [1.3.13] Dropped unneeded Index snapshot_id on table user_snapshot.");
+ enter_logfile(4," [1.3.13] Dropped unneeded Index snapshot_id on table user_snapshot.");
}
if($mysqlcon->exec("DROP INDEX `snapshot_cldbid` ON `$dbname`.`user_snapshot` (`cldbid`)") === false) { } else {
- enter_logfile($cfg,4," [1.3.13] Dropped unneeded Index snapshot_cldbid on table user_snapshot.");
+ enter_logfile(4," [1.3.13] Dropped unneeded Index snapshot_cldbid on table user_snapshot.");
}
} catch (Exception $e) { }
}
if(version_compare($cfg['version_current_using'], '1.3.14', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_column_default_sort_2', 'rank'),('stats_column_default_order_2', 'asc');") === false) { } else {
- enter_logfile($cfg,4," [1.3.14] Added new cfg_params values.");
+ enter_logfile(4," [1.3.14] Added new cfg_params values.");
}
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('assign_groups_name','');") === false) { } else {
- enter_logfile($cfg,4," [1.3.14] Added new addons_config values.");
+ enter_logfile(4," [1.3.14] Added new addons_config values.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.16', '<')) {
if($mysqlcon->exec("INSERT INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('calc_user_removed', '0') ON DUPLICATE KEY UPDATE `timestamp`=VALUES(`timestamp`);") === false) { } else {
- enter_logfile($cfg,4," [1.3.16] Added new job_check values.");
+ enter_logfile(4," [1.3.16] Added new job_check values.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.18', '<')) {
if($mysqlcon->exec("INSERT INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('update_channel', '0') ON DUPLICATE KEY UPDATE `timestamp`=VALUES(`timestamp`);") === false) { } else {
- enter_logfile($cfg,4," [1.3.18] Added new job_check values.");
+ enter_logfile(4," [1.3.18] Added new job_check values.");
}
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('default_cmdline_sec_switch', '1');") === false) { } else {
- enter_logfile($cfg,4," [1.3.18] Added new cfg_params values.");
+ enter_logfile(4," [1.3.18] Added new cfg_params values.");
}
if($mysqlcon->exec("CREATE TABLE IF NOT EXISTS `$dbname`.`channel` (`cid` int(10) UNSIGNED NOT NULL default '0',`pid` int(10) UNSIGNED NOT NULL default '0',`channel_order` int(10) UNSIGNED NOT NULL default '0',`channel_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,PRIMARY KEY (`cid`));") === false) { } else {
- enter_logfile($cfg,4," [1.3.18] Created new table channel successfully.");
+ enter_logfile(4," [1.3.18] Created new table channel successfully.");
}
if($mysqlcon->exec("ALTER TABLE `$dbname`.`addons_config` MODIFY COLUMN `value` varchar(16000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.18] Adjusted table addons_config successfully.");
+ enter_logfile(4," [1.3.18] Adjusted table addons_config successfully.");
}
$channelinfo_desc = $mysqlcon->quote('[CENTER][B][SIZE=15]User Toplist (last week)[/SIZE][/B][/CENTER]
@@ -485,9 +485,9 @@ last seen {$CLIENT_LAST_SEEN_10|date_format:"%d.%m.%Y %H:%M:%S"}{/if}[/SIZE]
[SIZE=6]Updated: {$LAST_UPDATE_TIME}[/SIZE]', ENT_QUOTES);
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('channelinfo_toplist_active','0'),('channelinfo_toplist_desc',{$channelinfo_desc}),('channelinfo_toplist_lastdesc',''),('channelinfo_toplist_delay','600'),('channelinfo_toplist_channelid','0'),('channelinfo_toplist_modus','1'),('channelinfo_toplist_lastupdate','0') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);") === false) {
- enter_logfile($cfg,2," [1.3.18] Error on updating new addons_config values: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," [1.3.18] Error on updating new addons_config values: ".print_r($mysqlcon->errorInfo(), true));
} else {
- enter_logfile($cfg,4," [1.3.18] Updated new addons_config values.");
+ enter_logfile(4," [1.3.18] Updated new addons_config values.");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`admin_addtime`;") === false) { }
@@ -496,17 +496,44 @@ last seen {$CLIENT_LAST_SEEN_10|date_format:"%d.%m.%Y %H:%M:%S"}{/if}[/SIZE]
if(version_compare($cfg['version_current_using'], '1.3.19', '<')) {
if($mysqlcon->exec("ALTER TABLE `$dbname`.`addons_config` MODIFY COLUMN `value` varchar(16000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;") === false) { } else {
- enter_logfile($cfg,4," [1.3.19] Adjusted table addons_config successfully.");
+ enter_logfile(4," [1.3.19] Adjusted table addons_config successfully.");
}
}
if(version_compare($cfg['version_current_using'], '1.3.20', '<')) {
if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('clean_user_iphash', '0') ON DUPLICATE KEY UPDATE `timestamp`=VALUES(`timestamp`);") === false) { } else {
- enter_logfile($cfg,4," [1.3.20] Added new job_check values.");
+ enter_logfile(4," [1.3.20] Added new job_check values.");
}
}
- if(version_compare($cfg['version_current_using'], '1.3.21', '<')) {
+ if(version_compare($cfg['version_current_using'], '1.3.22', '<')) {
+ if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_server` MODIFY COLUMN `version_name_1` varchar(254) NOT NULL default '0',MODIFY COLUMN `version_name_2` varchar(254) NOT NULL default '0',MODIFY COLUMN `version_name_3` varchar(254) NOT NULL default '0',MODIFY COLUMN `version_name_4` varchar(254) NOT NULL default '0',MODIFY COLUMN `version_name_5` varchar(254) NOT NULL default '0';") === false) { } else {
+ enter_logfile(4," [1.3.22] Adjusted table stats_server successfully.");
+ }
+
+ if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('default_style', '0'),('stats_column_online_day_switch', '0'),('stats_column_idle_day_switch', '0'),('stats_column_active_day_switch', '0'),('stats_column_online_week_switch', '0'),('stats_column_idle_week_switch', '0'),('stats_column_active_week_switch', '0'),('stats_column_online_month_switch', '0'),('stats_column_idle_month_switch', '0'),('stats_column_active_month_switch', '0'),('teamspeak_chatcommand_prefix', '!'),('rankup_excepted_remove_group_switch', '0');") === false) { } else {
+ enter_logfile(4," [1.3.22] Added new cfg_params values.");
+ }
+ $cfg['rankup_excepted_remove_group_switch'] = '0';
+ $cfg['teamspeak_chatcommand_prefix'] = '!';
+
+ if(($check_new_columns = $mysqlcon->query("SHOW COLUMNS FROM `$dbname`.`stats_user` WHERE `field`='count_day'")->fetchAll(PDO::FETCH_ASSOC)) === false) { } else {
+ if(!isset($check_new_columns[0]['Field'])) {
+ if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` ADD COLUMN `count_day` mediumint(8) UNSIGNED NOT NULL default '0', ADD COLUMN `idle_day` mediumint(8) UNSIGNED NOT NULL default '0', ADD COLUMN `active_day` mediumint(8) UNSIGNED NOT NULL default '0';") === false) { } else {
+ enter_logfile(4," [1.3.22] Adjusted table stats_user successfully.");
+ }
+ }
+ }
+ if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`job_check` (`job_name`,`timestamp`) VALUES ('news_html', '".time()."'),('news_bb', '".time()."') ON DUPLICATE KEY UPDATE `timestamp`=VALUES(`timestamp`);") === false) { } else {
+ enter_logfile(4," [1.3.22] Added new job_check values.");
+ }
+
+ if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_news_html', '0'),('teamspeak_news_bb', '0') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);") === false) { } else {
+ enter_logfile(4," [1.3.22] Added new cfg_params values (part 2).");
+ $cfg['stats_news_html'] = 'New Feature VOTING! for the Ranksystem';
+ $cfg['teamspeak_news_bb'] = 'New Feature [URL=https://ts-ranksystem.com#voting]VOTING![/URL] for the Ranksystem';
+ }
+
if($mysqlcon->exec("DELETE FROM `$dbname`.`admin_addtime`;") === false) { }
if($mysqlcon->exec("DELETE FROM `$dbname`.`addon_assign_groups`;") === false) { }
@@ -518,11 +545,14 @@ last seen {$CLIENT_LAST_SEEN_10|date_format:"%d.%m.%Y %H:%M:%S"}{/if}[/SIZE]
if($mysqlcon->exec("CREATE INDEX `user_cldbid` ON `$dbname`.`user` (`cldbid` ASC,`uuid`,`rank`)") === false) { }
if($mysqlcon->exec("CREATE INDEX `user_online` ON `$dbname`.`user` (`online`,`lastseen`)") === false) { }
} catch (Exception $e) { }
+
+ $updatedone = TRUE;
}
$cfg = set_new_version($mysqlcon,$cfg,$dbname);
}
- enter_logfile($cfg,5,"Check Ranksystem database for updates [done]");
- return $cfg;
+ enter_logfile(5,"Check Ranksystem database for updates [done]");
+ if(isset($updatedone) && $updatedone === TRUE) return TRUE;
+ return FALSE;
}
?>
\ No newline at end of file
diff --git a/jobs/clean.php b/jobs/clean.php
index 44877e1..7e2ab59 100644
--- a/jobs/clean.php
+++ b/jobs/clean.php
@@ -5,27 +5,27 @@ function clean($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
$sqlexec = '';
// clean old clients out of the database
- if($db_cache['job_check']['clean_clients']['timestamp'] < ($nowtime - $cfg['rankup_clean_clients_period'])) {
+ if(intval($db_cache['job_check']['clean_clients']['timestamp']) < ($nowtime - $cfg['rankup_clean_clients_period'])) {
$db_cache['job_check']['clean_clients']['timestamp'] = $nowtime;
if ($cfg['rankup_clean_clients_switch'] == 1) {
- enter_logfile($cfg,4,$lang['clean']);
+ enter_logfile(4,$lang['clean']);
$start = $countdel = $countts = 0;
$break=200;
$count_tsuser['count'] = 0;
$clientdblist=array();
- enter_logfile($cfg,5," Get TS3 Clientlist...");
+ enter_logfile(5," Get TS3 Clientlist...");
while($getclientdblist=$ts3->clientListDb($start, $break)) {
- check_shutdown($cfg);
+ check_shutdown();
$clientdblist=array_merge($clientdblist, $getclientdblist);
$start=$start+$break;
$count_tsuser=array_shift($getclientdblist);
- enter_logfile($cfg,6," Got TS3 Clientlist ".count($clientdblist)." of ".$count_tsuser['count']." Clients.");
+ enter_logfile(6," Got TS3 Clientlist ".count($clientdblist)." of ".$count_tsuser['count']." Clients.");
if($count_tsuser['count'] <= $start) {
break;
}
usleep($cfg['teamspeak_query_command_delay']);
}
- enter_logfile($cfg,5," Get TS3 Clientlist [DONE]");
+ enter_logfile(5," Get TS3 Clientlist [DONE]");
foreach($clientdblist as $uuidts) {
$single_uuid = $uuidts['client_unique_identifier']->toString();
$uidarrts[$single_uuid]= 1;
@@ -40,19 +40,19 @@ function clean($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
$countdel++;
}
}
- enter_logfile($cfg,4," ".sprintf($lang['cleants'], $countts, $count_tsuser['count']));
- enter_logfile($cfg,4," ".sprintf($lang['cleanrs'], count($db_cache['all_user'])));
+ enter_logfile(4," ".sprintf($lang['cleants'], $countts, $count_tsuser['count']));
+ enter_logfile(4," ".sprintf($lang['cleanrs'], count($db_cache['all_user'])));
unset($uidarrts,$count_tsuser,$countts);
if(isset($deleteuuids)) {
$alldeldata = '';
- $fsfilelist = opendir(substr(__DIR__,0,-4).'avatars/');
+ $fsfilelist = opendir(dirname(__DIR__).DIRECTORY_SEPARATOR.'avatars');
while (false !== ($fsfile = readdir($fsfilelist))) {
if ($fsfile != '.' && $fsfile != '..') {
- $fsfilelistarray[$fsfile] = filemtime(substr(__DIR__,0,-4).'avatars/'.$fsfile);
+ $fsfilelistarray[$fsfile] = filemtime(dirname(__DIR__).DIRECTORY_SEPARATOR.'avatars'.DIRECTORY_SEPARATOR.$fsfile);
}
}
unset($fsfilelist,$fsfile);
- $avatarfilepath = substr(__DIR__,0,-4).'avatars/';
+ $avatarfilepath = dirname(__DIR__).DIRECTORY_SEPARATOR.'avatars'.DIRECTORY_SEPARATOR;
$convert = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p');
foreach ($deleteuuids as $uuid) {
$alldeldata = $alldeldata . "'" . $uuid . "',";
@@ -64,9 +64,9 @@ function clean($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
}
if (isset($fsfilelistarray[$uuidasbase16.'.png'])) {
if(unlink($avatarfilepath.$uuidasbase16.'.png') === false) {
- enter_logfile($cfg,2," ".sprintf($lang['clean0002'], $uuidasbase16, $uuid).' '.sprintf($lang['errperm'], 'avatars'));
+ enter_logfile(2," ".sprintf($lang['clean0002'], $uuidasbase16, $uuid).' '.sprintf($lang['errperm'], 'avatars'));
} else {
- enter_logfile($cfg,4," ".sprintf($lang['clean0001'], $uuidasbase16, $uuid));
+ enter_logfile(4," ".sprintf($lang['clean0001'], $uuidasbase16, $uuid));
}
}
}
@@ -75,30 +75,30 @@ function clean($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
$alldeldata = "(".$alldeldata.")";
if ($alldeldata != '') {
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_clients';\nUPDATE `$dbname`.`stats_user` AS `t` LEFT JOIN `$dbname`.`user` AS `u` ON `t`.`uuid`=`u`.`uuid` SET `t`.`removed`='1' WHERE `u`.`uuid` IS NULL;\nDELETE FROM `$dbname`.`user` WHERE `uuid` IN $alldeldata;\n";
- enter_logfile($cfg,4," ".sprintf($lang['cleandel'], $countdel));
+ enter_logfile(4," ".sprintf($lang['cleandel'], $countdel));
unset($$alldeldata);
}
} else {
- enter_logfile($cfg,4," ".$lang['cleanno']);
+ enter_logfile(4," ".$lang['cleanno']);
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_clients';\n";
}
} else {
- enter_logfile($cfg,4,$lang['clean0004']);
+ enter_logfile(4,$lang['clean0004']);
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_clients';\n";
}
}
// clean usersnaps older then 1 month + clean old server usage - older then a year
- if ($db_cache['job_check']['clean_db']['timestamp'] < ($nowtime - 86400)) {
+ if (intval($db_cache['job_check']['clean_db']['timestamp']) < ($nowtime - 86400)) {
$db_cache['job_check']['clean_db']['timestamp'] = $nowtime;
$sqlexec .= "DELETE FROM `$dbname`.`server_usage` WHERE `timestamp` < (UNIX_TIMESTAMP() - 31536000);\nDELETE `b` FROM `$dbname`.`user` AS `a` RIGHT JOIN `$dbname`.`stats_user` AS `b` ON `a`.`uuid`=`b`.`uuid` WHERE `a`.`uuid` IS NULL;\nUPDATE `$dbname`.`job_check` SET `timestamp`='{$nowtime}' WHERE `job_name`='clean_db';\nDELETE FROM `$dbname`.`csrf_token` WHERE `timestamp` < (UNIX_TIMESTAMP() - 3600);\nDELETE `h` FROM `$dbname`.`user_iphash` AS `h` LEFT JOIN `$dbname`.`user` AS `u` ON `u`.`uuid` = `h`.`uuid` WHERE (`u`.`uuid` IS NULL OR `u`.`online`!=1);\n";
- enter_logfile($cfg,4,$lang['clean0003']);
+ enter_logfile(4,$lang['clean0003']);
}
// clean user_iphash
- if ($db_cache['job_check']['clean_user_iphash']['timestamp'] < ($nowtime - 3500)) {
+ if (intval($db_cache['job_check']['clean_user_iphash']['timestamp']) < ($nowtime - 3500)) {
if(($sqlhashs = $mysqlcon->query("SELECT * FROM `$dbname`.`user_iphash`")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
- enter_logfile($cfg,2,"clean user_iphash:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"clean user_iphash:".print_r($mysqlcon->errorInfo(), true));
}
$rem_uuids = '';
@@ -114,7 +114,7 @@ function clean($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_user_iphash';\n";
}
- enter_logfile($cfg,6,"clean needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"clean needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
?>
\ No newline at end of file
diff --git a/jobs/db_ex_imp.php b/jobs/db_ex_imp.php
index 9569967..83e69ac 100644
--- a/jobs/db_ex_imp.php
+++ b/jobs/db_ex_imp.php
@@ -1,30 +1,30 @@
exec("UPDATE `$dbname`.`job_check` SET `timestamp`='2' WHERE `job_name`='database_export';") === false) {
$err++;
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['database_export']['timestamp'] = 2;
- enter_logfile($cfg,4," Started job '".$lang['wihladmex']."'");
+ enter_logfile(4," Started job '".$lang['wihladmex']."'");
}
$datetime = date("Y-m-d_H-i-s", time());
- $filepath = $cfg['logs_path'].'db_export_'.$datetime;
+ $filepath = $GLOBALS['logpath'].'db_export_'.$datetime;
$filename = 'db_export_'.$datetime;
$limit_entries = 10000;
if (($tables = $mysqlcon->query("SHOW TABLES")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
$err++;
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$dump = fopen($filepath.".sql", 'a');
@@ -37,20 +37,20 @@ function db_ex_imp($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
#if($table == 'user_snapshot') continue;
if (($numColumns = $mysqlcon->query("SELECT * FROM `$dbname`.`$table` LIMIT 1")->columnCount()) === false) {
$err++;
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
$out .= 'DROP TABLE IF EXISTS `' . $table . '`;' . "\n\n";
if (($create_table = $mysqlcon->query("SHOW CREATE TABLE `$dbname`.`$table`")->fetch(PDO::FETCH_ASSOC)) === false) {
$err++;
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
$out .= $create_table['Create Table'] . ';' . "\n\n";
if (($maxvalues = $mysqlcon->query("SELECT COUNT(*) FROM `$dbname`.`$table`;")->fetch()) === false) {
$err++;
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
$dump = fopen($filepath.".sql", 'a');
@@ -65,7 +65,7 @@ function db_ex_imp($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
$offset = $i * $limit_entries;
if (($sqldata = $mysqlcon->query("SELECT * FROM `$dbname`.`$table` LIMIT {$limit_entries} OFFSET {$offset}")->fetchALL(PDO::FETCH_NUM)) === false) {
$err++;
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
if(count($sqldata) != 0) {
@@ -97,10 +97,10 @@ function db_ex_imp($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
if (($job_status = $mysqlcon->query("SELECT `timestamp` FROM `$dbname`.`job_check` WHERE `job_name`='database_export';")->fetch(PDO::FETCH_ASSOC)) === false) {
$err++;
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} elseif($job_status['timestamp'] == 3) {
$db_cache['job_check']['database_export']['timestamp'] = 3;
- enter_logfile($cfg,4,"DB Export job(s) canceled by request");
+ enter_logfile(4,"DB Export job(s) canceled by request");
$dump = fopen($filepath.".sql", 'a');
fwrite($dump, "\nROLLBACK;\n\n-- Canceled export");
fclose($dump);
@@ -116,41 +116,41 @@ function db_ex_imp($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
$zip = new ZipArchive();
if ($zip->open($filepath.".sql.zip", ZipArchive::CREATE)!==TRUE) {
$err++;
- enter_logfile($cfg,2," Cannot create $filepath.sql.zip!");
+ enter_logfile(2," Cannot create $filepath.sql.zip!");
} else {
$zip->addFile($filepath.".sql",$filename.".sql");
if(version_compare(phpversion(), '7.2', '>=') && version_compare(phpversion("zip"), '1.2.0', '>=')) {
try {
$zip->setEncryptionName($filename.".sql", ZipArchive::EM_AES_256, $cfg['teamspeak_query_pass']);
} catch (Exception $e) {
- enter_logfile($cfg,2," Error due creating secured zip-File: ".$e->getCode().': '.$e->getMessage(). " ..Update PHP to Version 7.2 or above and update libzip to version 1.2.0 or above.");
+ enter_logfile(2," Error due creating secured zip-File: ".$e->getCode().': '.$e->getMessage(). " ..Update PHP to Version 7.2 or above and update libzip to version 1.2.0 or above.");
}
}
$zip->close();
if(!unlink($filepath.".sql")) {
$err++;
- enter_logfile($cfg,2," Cannot remove SQL file $filepath.sql!");
+ enter_logfile(2," Cannot remove SQL file $filepath.sql!");
}
}
}
if ($err == 0) {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='4' WHERE `job_name`='database_export';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['database_export']['timestamp'] = 4;
- enter_logfile($cfg,4," Finished job '".$lang['wihladmex']."'");
+ enter_logfile(4," Finished job '".$lang['wihladmex']."'");
}
} else {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='3' WHERE `job_name`='database_export';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['database_export']['timestamp'] = 3;
}
}
- enter_logfile($cfg,4,"DB Export job(s) finished");
+ enter_logfile(4,"DB Export job(s) finished");
}
- enter_logfile($cfg,6,"db_ex_imp needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"db_ex_imp needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
}
?>
\ No newline at end of file
diff --git a/jobs/event_userenter.php b/jobs/event_userenter.php
index 4a8d74b..6b73470 100644
--- a/jobs/event_userenter.php
+++ b/jobs/event_userenter.php
@@ -6,7 +6,7 @@ function event_userenter(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
$sqlexec3 = '';
if($event['client_type'] == 0) {
- enter_logfile($cfg,6,"User ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].") connected to the server.");
+ enter_logfile(6,"User ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].") connected to the server.");
try {
$host->serverGetSelected()->clientListReset();
usleep($cfg['teamspeak_query_command_delay']);
@@ -23,13 +23,13 @@ function event_userenter(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
}
unset($clientlist,$host);
if(!isset($ip)) {
- enter_logfile($cfg,6,"New user ({$event['client_nickname']} [{$event['client_database_id']}]) joined the server, but can't found a valid IP address.");
+ enter_logfile(6,"New user ({$event['client_nickname']} [{$event['client_database_id']}]) joined the server, but can't found a valid IP address.");
} else {
if($cfg['rankup_hash_ip_addresses_mode'] == 1) {
$hash = password_hash($ip, PASSWORD_DEFAULT);
$ip = '';
} elseif($cfg['rankup_hash_ip_addresses_mode'] == 2) {
- $salt = md5(dechex(crc32(substr(__DIR__,0,-4))));
+ $salt = md5(dechex(crc32(dirname(__DIR__))));
if(version_compare(PHP_VERSION, '7.9.9', '>')) {
$hash = crypt($ip, '$2y$10$'.$salt.'$');
} else {
@@ -39,26 +39,26 @@ function event_userenter(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
} else {
$hash = '';
}
- enter_logfile($cfg,6,"Event Userenter: Users IP-hash: ".$hash);
+ enter_logfile(6,"Event Userenter: Users IP-hash: ".$hash);
if(($sqlhashs = $mysqlcon->query("SELECT * FROM `$dbname`.`user_iphash`")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
- enter_logfile($cfg,2,"event_userenter 2:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"event_userenter 2:".print_r($mysqlcon->errorInfo(), true));
}
$uuid = htmlspecialchars($event['client_unique_identifier'], ENT_QUOTES);
if(isset($sqlhashs[$uuid])) {
$sqlexec3 .= "UPDATE `$dbname`.`user_iphash` SET `iphash`='$hash',`ip`='$ip' WHERE `uuid`='{$event['client_unique_identifier']}'; ";
- enter_logfile($cfg,6,"Userenter: UPDATE `$dbname`.`user_iphash` SET `iphash`='$hash',`ip`='$ip' WHERE `uuid`='{$event['client_unique_identifier']}'; ");
+ enter_logfile(6,"Userenter: UPDATE `$dbname`.`user_iphash` SET `iphash`='$hash',`ip`='$ip' WHERE `uuid`='{$event['client_unique_identifier']}'; ");
} else {
$sqlexec3 .= "INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`) VALUES ('{$event['client_unique_identifier']}','$hash','$ip'); ";
- enter_logfile($cfg,6,"Userenter: INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`) VALUES ('{$event['client_unique_identifier']}','$hash','$ip'); ");
+ enter_logfile(6,"Userenter: INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`) VALUES ('{$event['client_unique_identifier']}','$hash','$ip'); ");
}
if($mysqlcon->exec($sqlexec3) === false) {
- enter_logfile($cfg,2,"event_userenter 3:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"event_userenter 3:".print_r($mysqlcon->errorInfo(), true));
}
}
} catch (Exception $e) {
- enter_logfile($cfg,2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
+ enter_logfile(2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
}
}
}
diff --git a/jobs/get_avatars.php b/jobs/get_avatars.php
index 2f1dd40..9259b30 100644
--- a/jobs/get_avatars.php
+++ b/jobs/get_avatars.php
@@ -4,7 +4,7 @@ function get_avatars($ts3,$cfg,$dbname,&$db_cache) {
$nowtime = time();
$sqlexec = '';
- if($db_cache['job_check']['get_avatars']['timestamp'] < ($nowtime - 32)) {
+ if(intval($db_cache['job_check']['get_avatars']['timestamp']) < ($nowtime - 32)) {
$db_cache['job_check']['get_avatars']['timestamp'] = $nowtime;
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`={$nowtime} WHERE `job_name`='get_avatars';\n";
try {
@@ -12,13 +12,13 @@ function get_avatars($ts3,$cfg,$dbname,&$db_cache) {
$tsfilelist = $ts3->channelFileList($cid="0", $cpw="", $path="/");
} catch (Exception $e) {
if ($e->getCode() != 1281) {
- enter_logfile($cfg,2,"get_avatars 1:".$e->getCode().': '."Error while getting avatarlist: ".$e->getMessage());
+ enter_logfile(2,"get_avatars 1:".$e->getCode().': '."Error while getting avatarlist: ".$e->getMessage());
}
}
- $fsfilelist = opendir(substr(__DIR__,0,-4).'avatars/');
+ $fsfilelist = opendir($GLOBALS['avatarpath']);
while (false !== ($fsfile = readdir($fsfilelist))) {
if ($fsfile != '.' && $fsfile != '..') {
- $fsfilelistarray[$fsfile] = filemtime(substr(__DIR__,0,-4).'avatars/'.$fsfile);
+ $fsfilelistarray[$fsfile] = filemtime($GLOBALS['avatarpath'].$fsfile);
}
}
unset($fsfilelist);
@@ -32,24 +32,24 @@ function get_avatars($ts3,$cfg,$dbname,&$db_cache) {
if (!isset($fsfilelistarray[$uuidasbase16.'.png']) || ($tsfile['datetime'] - $cfg['teamspeak_avatar_download_delay']) > $fsfilelistarray[$uuidasbase16.'.png']) {
if (substr($tsfile['name'],0,7) == 'avatar_') {
try {
- check_shutdown($cfg); usleep($cfg['teamspeak_query_command_delay']);
+ check_shutdown(); usleep($cfg['teamspeak_query_command_delay']);
$avatar = $ts3->transferInitDownload($clientftfid="5",$cid="0",$name=$fullfilename,$cpw="", $seekpos=0);
$transfer = TeamSpeak3::factory("filetransfer://" . $avatar["host"] . ":" . $avatar["port"]);
$tsfile = $transfer->download($avatar["ftkey"], $avatar["size"]);
- $avatarfilepath = substr(__DIR__,0,-4).'avatars/'.$uuidasbase16.'.png';
+ $avatarfilepath = $GLOBALS['avatarpath'].$uuidasbase16.'.png';
$downloadedavatars++;
- enter_logfile($cfg,5,"Download avatar: ".$fullfilename);
+ enter_logfile(5,"Download avatar: ".$fullfilename);
if(file_put_contents($avatarfilepath, $tsfile) === false) {
- enter_logfile($cfg,2,"Error while writing out the avatar. Please check the permission for the folder 'avatars'");
+ enter_logfile(2,"Error while writing out the avatar. Please check the permission for the folder '".$GLOBALS['avatarpath']."'");
}
}
catch (Exception $e) {
- enter_logfile($cfg,2,"get_avatars 2:".$e->getCode().': '."Error while downloading avatar: ".$e->getMessage());
+ enter_logfile(2,"get_avatars 2:".$e->getCode().': '."Error while downloading avatar: ".$e->getMessage());
}
}
}
if((microtime(true) - $starttime) > 5) {
- enter_logfile($cfg,6,"get_avatars needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"get_avatars needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return;
}
}
@@ -57,7 +57,7 @@ function get_avatars($ts3,$cfg,$dbname,&$db_cache) {
}
}
- enter_logfile($cfg,6,"get_avatars needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"get_avatars needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
?>
\ No newline at end of file
diff --git a/jobs/handle_messages.php b/jobs/handle_messages.php
index 9749f30..16b0c04 100644
--- a/jobs/handle_messages.php
+++ b/jobs/handle_messages.php
@@ -2,7 +2,7 @@
function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host) {
global $lang,$cfg,$mysqlcon,$dbname,$phpcommand,$ts3,$whoami;
- enter_logfile($cfg,6,"whoami: ".print_r($host->whoami(),true));
+ enter_logfile(6,"whoami: ".print_r($host->whoami(),true));
if($event["targetmode"] == 1) {
$targetid = $event["invokerid"];
} elseif($event["targetmode"] == 2) {
@@ -11,7 +11,7 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
$targetid = NULL;
}
- enter_logfile($cfg,6,"event: ".print_r($event,true));
+ enter_logfile(6,"event: ".print_r($event,true));
if($host->whoami()["client_id"] != $event["invokerid"] && substr($event["msg"],0,1) === "!") {
$uuid = $event["invokeruid"];
@@ -22,15 +22,15 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
}
}
- enter_logfile($cfg,6,"Client ".$event["invokername"]." (".$event["invokeruid"].") sent textmessage: ".$event["msg"]);
+ enter_logfile(6,"Client ".$event["invokername"]." (".$event["invokeruid"].") sent textmessage: ".$event["msg"]);
if((strstr($event["msg"], '!nextup') || strstr($event["msg"], '!next')) && $cfg['rankup_next_message_mode'] != 0) {
if(($user = $mysqlcon->query("SELECT `count`,`nextup`,`idle`,`except`,`name`,`rank`,`grpsince`,`grpid` FROM `$dbname`.`user` WHERE `uuid`='$uuid'")->fetch()) === false) {
- enter_logfile($cfg,2,"handle_messages 1:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"handle_messages 1:".print_r($mysqlcon->errorInfo(), true));
}
if(($sqlhisgroup = $mysqlcon->query("SELECT `sgid`,`sgidname` FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
- enter_logfile($cfg,2,"handle_messages 2:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"handle_messages 2:".print_r($mysqlcon->errorInfo(), true));
}
ksort($cfg['rankup_definition']);
@@ -70,7 +70,7 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
return;
}
- if(strstr($event["msg"], '!version')) {
+ if(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'version')) {
if(version_compare($cfg['version_latest_available'], $cfg['version_current_using'], '>') && $cfg['version_latest_available'] != '') {
sendmessage($host, $cfg, $event["invokeruid"], sprintf($lang['upmsg'], $cfg['version_current_using'], $cfg['version_latest_available'], 'https://ts-ranksystem.com/#changelog'), $event["targetmode"], $targetid);
} else {
@@ -79,96 +79,103 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
return;
}
- if(strstr($event["msg"], '!help') || strstr($event["msg"], '!info') || strstr($event["msg"], '!commands') || strstr($event["msg"], '!cmd')) {
+ if(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'help') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'info') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'commands') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'cmd')) {
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0002'], $event["targetmode"], $targetid);
return;
}
- if((strstr($event["msg"], '!shutdown') || strstr($event["msg"], '!quit') || strstr($event["msg"], '!stop')) && $admin == 1) {
- enter_logfile($cfg,5,sprintf($lang['msg0004'], $event["invokername"], $event["invokeruid"]));
- $path = substr(__DIR__, 0, -4);
+ if(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'news')) {
+ if(isset($cfg['teamspeak_news_bb']) && $cfg['teamspeak_news_bb'] != '') {
+ sendmessage($host, $cfg, $event["invokeruid"], "Latest News:\n".$cfg['teamspeak_news_bb'], $event["targetmode"], $targetid);
+ } else {
+ sendmessage($host, $cfg, $event["invokeruid"], "No News available yet.", $event["targetmode"], $targetid);
+ }
+ return;
+ }
+
+ if((strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'shutdown') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'quit') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'stop')) && $admin == 1) {
+ enter_logfile(5,sprintf($lang['msg0004'], $event["invokername"], $event["invokeruid"]));
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0005'], $event["targetmode"], $targetid);
if (substr(php_uname(), 0, 7) == "Windows") {
- exec("start ".$phpcommand." ".$path."worker.php stop");
+ exec("start ".$phpcommand." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php stop");
} else {
- exec($phpcommand." ".$path."worker.php stop > /dev/null &");
+ exec($phpcommand." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php stop > /dev/null &");
}
- file_put_contents($cfg['logs_path'].'autostart_deactivated',"");
+ file_put_contents($GLOBALS['autostart'],"");
shutdown($mysql,$cfg,4,"Stop command received!");
- } elseif (strstr($event["msg"], '!shutdown') || strstr($event["msg"], '!quit') || strstr($event["msg"], '!stop')) {
+ } elseif (strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'shutdown') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'quit') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'stop')) {
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0003'], $event["targetmode"], $targetid);
return;
}
- if((strstr($event["msg"], '!restart') || strstr($event["msg"], '!reboot')) && $admin == 1) {
- enter_logfile($cfg,5,sprintf($lang['msg0007'], $event["invokername"], $event["invokeruid"], "restart"));
- $path = substr(__DIR__, 0, -4);
+ if((strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'restart') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'reboot')) && $admin == 1) {
+ enter_logfile(5,sprintf($lang['msg0007'], $event["invokername"], $event["invokeruid"], "restart"));
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0006'], $event["targetmode"], $targetid);
if (substr(php_uname(), 0, 7) == "Windows") {
- exec("start ".$phpcommand." ".$path."worker.php restart");
+ exec("start ".$phpcommand." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php restart");
} else {
- exec($phpcommand." ".$path."worker.php restart > /dev/null 2>/dev/null &");
+ exec($phpcommand." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php restart > /dev/null 2>/dev/null &");
}
return;
- } elseif (strstr($event["msg"], '!restart') || strstr($event["msg"], '!reboot')) {
+ } elseif (strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'restart') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'reboot')) {
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0003'], $event["targetmode"], $targetid);
return;
}
- if((strstr($event["msg"], '!checkupdate') || strstr($event["msg"], '!update')) && $admin == 1) {
+ if((strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'checkupdate') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'update')) && $admin == 1) {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='0' WHERE `job_name` IN ('check_update','get_version','calc_server_stats','calc_donut_chars')") === false) {
- enter_logfile($cfg,4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
}
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0008'], $event["targetmode"], $targetid);
return;
- } elseif(strstr($event["msg"], '!checkupdate') || strstr($event["msg"], '!update')) {
+ } elseif(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'checkupdate') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'update')) {
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0003'], $event["targetmode"], $targetid);
return;
}
- if((strstr($event["msg"], '!clean')) && $admin == 1) {
- enter_logfile($cfg,5,sprintf($lang['msg0007'], $event["invokername"], $event["invokeruid"], "clean"));
+ if((strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'clean')) && $admin == 1) {
+ enter_logfile(5,sprintf($lang['msg0007'], $event["invokername"], $event["invokeruid"], "clean"));
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='0' WHERE `job_name` IN ('clean_db','clean_clients')") === false) {
- enter_logfile($cfg,4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
}
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0009'] ." ". $lang['msg0010'], $event["targetmode"], $targetid);
return;
- } elseif(strstr($event["msg"], '!clean')) {
+ } elseif(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'clean')) {
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0003'], $event["targetmode"], $targetid);
return;
}
- if((strstr($event["msg"], '!reloadgroups') || strstr($event["msg"], '!reloadicons')) && $admin == 1) {
+ if((strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'reloadgroups') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'reloadicons')) && $admin == 1) {
if($mysqlcon->exec("DELETE FROM `$dbname`.`groups`") === false) {
- enter_logfile($cfg,4,"handle_messages 14:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(4,"handle_messages 14:".print_r($mysqlcon->errorInfo(), true));
} else {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`=1 WHERE `job_name`='reload_trigger';") === false) {
- enter_logfile($cfg,4,"handle_messages 15:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(4,"handle_messages 15:".print_r($mysqlcon->errorInfo(), true));
}
}
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0011'] ." ". $lang['msg0010'], $event["targetmode"], $targetid);
return;
- } elseif(strstr($event["msg"], '!reloadgroups')) {
+ } elseif(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'reloadgroups')) {
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0003'], $event["targetmode"], $targetid);
return;
}
- if(strstr($event["msg"], '!online') || strstr($event["msg"], '!uptime')) {
+ if(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'online') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'uptime')) {
sendmessage($host, $cfg, $event["invokeruid"], sprintf("Bot is online since %s, now %s.", (DateTime::createFromFormat('U', $cfg['temp_last_botstart'])->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s")), (new DateTime("@0"))->diff(new DateTime("@".(time()-$cfg['temp_last_botstart'])))->format($cfg['default_date_format'])), $event["targetmode"], $targetid);
return;
}
- if(strstr($event["msg"], '!runtime') || strstr($event["msg"], '!runtimes')) {
+ if(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'runtime') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'runtimes')) {
sendmessage($host, $cfg, $event["invokeruid"], sprintf("Last 10 runtimes (in seconds):\n%s\n\nØ %s sec. (Σ %s)", str_replace(";","\n",$cfg['temp_last_laptime']), round(($cfg['temp_whole_laptime'] / $cfg['temp_count_laptime']),5), $cfg['temp_count_laptime']), $event["targetmode"], $targetid);
return;
}
- if(strstr($event["msg"], '!memory')) {
+ if(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'memory')) {
sendmessage($host, $cfg, $event["invokeruid"], sprintf("Allocated memory of PHP for the Ranksystem Bot..\ncurrent using: %s KiB\npeak using: %s KiB", round((memory_get_usage()/1024),2), round((memory_get_peak_usage()/1024),2)), $event["targetmode"], $targetid);
return;
}
- if((strstr($event["msg"], '!logs') || strstr($event["msg"], '!log')) && $admin == 1) {
+ if((strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'logs') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'log')) && $admin == 1) {
$parameter = explode(' ', $event["msg"]);
if(isset($parameter[1]) && $parameter[1] > 0 && $parameter[1] < 1000) {
$number_lines = $parameter[1];
@@ -178,8 +185,8 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
$filters = explode(',', 'CRITICAL,ERROR,WARNING,NOTICE,INFO,DEBUG,NONE');
$filter2 = $lastfilter = '';
$lines=array();
- if(file_exists($cfg['logs_path']."ranksystem.log")) {
- $fp = fopen($cfg['logs_path']."ranksystem.log", "r");
+ if(file_exists($GLOBALS['logfile'])) {
+ $fp = fopen($GLOBALS['logfile'], "r");
$buffer=array();
while($line = fgets($fp, 4096)) {
array_push($buffer, $line);
@@ -220,7 +227,7 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
}
$targetid = $event["invokerid"];
sendmessage($host, $cfg, $event["invokeruid"], $message, 1, $targetid, NULL, NULL, NULL, $nolog=1);
- } elseif(strstr($event["msg"], '!logs') || strstr($event["msg"], '!log')) {
+ } elseif(strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'logs') || strstr($event["msg"], $cfg['teamspeak_chatcommand_prefix'].'log')) {
sendmessage($host, $cfg, $event["invokeruid"], $lang['msg0003'], $event["targetmode"], $targetid);
}
diff --git a/jobs/reset_rs.php b/jobs/reset_rs.php
index 4df06a0..f47133b 100644
--- a/jobs/reset_rs.php
+++ b/jobs/reset_rs.php
@@ -2,28 +2,28 @@
function reset_rs($ts3,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,&$db_cache) {
$starttime = microtime(true);
- if (in_array($db_cache['job_check']['reset_user_time']['timestamp'], ["1","2"], true) || in_array($db_cache['job_check']['reset_user_delete']['timestamp'], ["1","2"], true) || in_array($db_cache['job_check']['reset_group_withdraw']['timestamp'], ["1","2"], true) || in_array($db_cache['job_check']['reset_webspace_cache']['timestamp'], ["1","2"], true) || in_array($db_cache['job_check']['reset_usage_graph']['timestamp'], ["1","2"], true)) {
+ if (in_array(intval($db_cache['job_check']['reset_user_time']['timestamp']), [1,2], true) || in_array(intval($db_cache['job_check']['reset_user_delete']['timestamp']), [1,2], true) || in_array(intval($db_cache['job_check']['reset_group_withdraw']['timestamp']), [1,2], true) || in_array(intval($db_cache['job_check']['reset_webspace_cache']['timestamp']), [1,2], true) || in_array(intval($db_cache['job_check']['reset_usage_graph']['timestamp']), [1,2], true)) {
- enter_logfile($cfg,4,"Reset job(s) started");
+ enter_logfile(4,"Reset job(s) started");
$err_cnt = 0;
- if (in_array($db_cache['job_check']['reset_group_withdraw']['timestamp'], ["1","2"], true)) {
+ if (in_array(intval($db_cache['job_check']['reset_group_withdraw']['timestamp']), [1,2], true)) {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='2' WHERE `job_name`='reset_group_withdraw';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err_cnt++;
} else {
$db_cache['job_check']['reset_group_withdraw']['timestamp'] = 2;
- enter_logfile($cfg,4," Started job '".$lang['wihladm32']."'");
+ enter_logfile(4," Started job '".$lang['wihladm32']."'");
}
krsort($cfg['rankup_definition']);
if (($all_clients = $mysqlcon->query("SELECT `cldbid`,`uuid`,`name` FROM `$dbname`.`user`")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
- shutdown($mysqlcon,$cfg,1,"Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
+ shutdown($mysqlcon,1,"Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
}
foreach ($cfg['rankup_definition'] as $rank) {
- enter_logfile($cfg,5," Getting TS3 servergrouplist for ".$db_cache['groups'][$rank['group']]['sgidname']." (ID: ".$rank['group'].")");
+ enter_logfile(5," Getting TS3 servergrouplist for ".$db_cache['groups'][$rank['group']]['sgidname']." (ID: ".$rank['group'].")");
try {
usleep($cfg['teamspeak_query_command_delay']);
$tsclientlist = $ts3->servergroupclientlist($rank['group']);
@@ -33,28 +33,28 @@ function reset_rs($ts3,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,&$db_cache) {
try {
usleep($cfg['teamspeak_query_command_delay']);
$ts3->serverGroupClientDel($rank['group'], $tsclient['cldbid']);
- enter_logfile($cfg,5," ".sprintf($lang['sgrprm'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group'], $all_clients[$tsclient['cldbid']]['name'], $all_clients[$tsclient['cldbid']]['uuid'], $tsclient['cldbid']));
+ enter_logfile(5," ".sprintf($lang['sgrprm'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group'], $all_clients[$tsclient['cldbid']]['name'], $all_clients[$tsclient['cldbid']]['uuid'], $tsclient['cldbid']));
} catch (Exception $e) {
- enter_logfile($cfg,2," TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $all_clients[$tsclient['cldbid']]['name'], $all_clients[$tsclient['cldbid']]['uuid'], $tsclient['cldbid'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group']));
+ enter_logfile(2," TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $all_clients[$tsclient['cldbid']]['name'], $all_clients[$tsclient['cldbid']]['uuid'], $tsclient['cldbid'], $db_cache['groups'][$rank['group']]['sgidname'], $rank['group']));
$err_cnt++;
}
}
}
} catch (Exception $e) {
- enter_logfile($cfg,2," TS3 error: ".$e->getCode().': '.$e->getMessage()." due getting servergroupclientlist for group ".$groupid);
+ enter_logfile(2," TS3 error: ".$e->getCode().': '.$e->getMessage()." due getting servergroupclientlist for group ".$groupid);
$err_cnt++;
}
}
if ($err_cnt == 0) {
if ($mysqlcon->exec("UPDATE `$dbname`.`user` SET `grpid`=0; UPDATE `$dbname`.`job_check` SET `timestamp`='4' WHERE `job_name`='reset_group_withdraw';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_group_withdraw']['timestamp'] = 4;
- enter_logfile($cfg,4," Finished job '".$lang['wihladm32']."'");
+ enter_logfile(4," Finished job '".$lang['wihladm32']."'");
}
} else {
if ($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='3' WHERE `job_name`='reset_group_withdraw';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_group_withdraw']['timestamp'] = 3;
}
@@ -62,54 +62,54 @@ function reset_rs($ts3,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,&$db_cache) {
}
- if ($err_cnt == 0 && in_array($db_cache['job_check']['reset_user_time']['timestamp'], ["1","2"], true)) {
+ if ($err_cnt == 0 && in_array(intval($db_cache['job_check']['reset_user_time']['timestamp']), [1,2], true)) {
$err = 0;
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='2' WHERE `job_name`='reset_user_time';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
$db_cache['job_check']['reset_user_time']['timestamp'] = 2;
- enter_logfile($cfg,4," Started job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm311'].")");
+ enter_logfile(4," Started job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm311'].")");
}
// zero times
if($mysqlcon->exec("UPDATE `$dbname`.`stats_server` SET `total_online_time`='0', `total_online_month`='0', `total_online_week`='0', `total_active_time`='0', `total_inactive_time`='0';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Reset Server statistics summary (table: stats_server)");
+ enter_logfile(4," Reset Server statistics summary (table: stats_server)");
}
if($mysqlcon->exec("UPDATE `$dbname`.`stats_user` SET `count_week`='0', `count_month`='0', `idle_week`='0', `idle_month`='0', `total_connections`='0', `active_week`='0', `active_month`='0';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Reset My statistics (table: stats_user)");
+ enter_logfile(4," Reset My statistics (table: stats_user)");
}
if($mysqlcon->exec("UPDATE `$dbname`.`user` SET `count`='0', `grpid`='0', `nextup`='0', `idle`='0', `boosttime`='0', `rank`='0', `grpsince`='0';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Reset List Rankup / user statistics (table: user)");
+ enter_logfile(4," Reset List Rankup / user statistics (table: user)");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`user_snapshot`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned Top users / user statistic snapshots (table: user_snapshot)");
+ enter_logfile(4," Cleaned Top users / user statistic snapshots (table: user_snapshot)");
}
if ($err == 0) {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='4' WHERE `job_name`='reset_user_time';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_user_time']['timestamp'] = 4;
- enter_logfile($cfg,4," Finished job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm311'].")");
+ enter_logfile(4," Finished job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm311'].")");
}
} else {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='3' WHERE `job_name`='reset_user_time';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_user_time']['timestamp'] = 3;
}
@@ -117,100 +117,100 @@ function reset_rs($ts3,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,&$db_cache) {
}
- if ($err_cnt == 0 && in_array($db_cache['job_check']['reset_user_delete']['timestamp'], ["1","2"], true)) {
+ if ($err_cnt == 0 && in_array(intval($db_cache['job_check']['reset_user_delete']['timestamp']), [1,2], true)) {
$err = 0;
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='2' WHERE `job_name`='reset_user_delete';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
$db_cache['job_check']['reset_user_delete']['timestamp'] = 2;
- enter_logfile($cfg,4," Started job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm312'].")");
+ enter_logfile(4," Started job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm312'].")");
}
// remove clients
if($mysqlcon->exec("DELETE FROM `$dbname`.`stats_nations`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned donut chart nations (table: stats_nations)");
+ enter_logfile(4," Cleaned donut chart nations (table: stats_nations)");
}
if($mysqlcon->exec("UPDATE `$dbname`.`stats_platforms` SET `count`=0;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned donut chart platforms (table: stats_platforms)");
+ enter_logfile(4," Cleaned donut chart platforms (table: stats_platforms)");
}
if($mysqlcon->exec("UPDATE `$dbname`.`stats_server` SET `total_user`='0', `total_online_time`='0', `total_online_month`='0', `total_online_week`='0', `total_active_time`='0', `total_inactive_time`='0', `country_nation_name_1`='', `country_nation_name_2`='', `country_nation_name_3`='', `country_nation_name_4`='', `country_nation_name_5`='', `country_nation_1`='0', `country_nation_2`='0', `country_nation_3`='0', `country_nation_4`='0', `country_nation_5`='0', `country_nation_other`='0', `platform_1`='0', `platform_2`='0', `platform_3`='0', `platform_4`='0', `platform_5`='0', `platform_other`='0', `version_name_1`='', `version_name_2`='', `version_name_3`='', `version_name_4`='', `version_name_5`='', `version_1`='0', `version_2`='0', `version_3`='0', `version_4`='0', `version_5`='0', `version_other`='0';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Reset Server statistics summary (table: stats_server)");
+ enter_logfile(4," Reset Server statistics summary (table: stats_server)");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`stats_user`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned My statistics (table: stats_user)");
+ enter_logfile(4," Cleaned My statistics (table: stats_user)");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`stats_versions`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned donut chart versions (table: stats_versions)");
+ enter_logfile(4," Cleaned donut chart versions (table: stats_versions)");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`user`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned List Rankup / user statistics (table: user)");
+ enter_logfile(4," Cleaned List Rankup / user statistics (table: user)");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`user_iphash`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned user ip-hash values (table: user_iphash)");
+ enter_logfile(4," Cleaned user ip-hash values (table: user_iphash)");
}
if($mysqlcon->exec("DELETE FROM `$dbname`.`user_snapshot`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
$err++;
} else {
- enter_logfile($cfg,4," Cleaned Top users / user statistic snapshots (table: user_snapshot)");
+ enter_logfile(4," Cleaned Top users / user statistic snapshots (table: user_snapshot)");
}
if ($err == 0) {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='4' WHERE `job_name`='reset_user_delete';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_user_delete']['timestamp'] = 4;
- enter_logfile($cfg,4," Finished job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm312'].")");
+ enter_logfile(4," Finished job '".$lang['wihladm31']."' (".$lang['wisupidle'].": ".$lang['wihladm312'].")");
}
} else {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='3' WHERE `job_name`='reset_user_delete';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_user_delete']['timestamp'] = 3;
}
}
}
- if (in_array($db_cache['job_check']['reset_webspace_cache']['timestamp'], ["1","2"], true)) {
+ if (in_array(intval($db_cache['job_check']['reset_webspace_cache']['timestamp']), [1,2], true)) {
if ($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='2' WHERE `job_name`='reset_webspace_cache';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_webspace_cache']['timestamp'] = 2;
- enter_logfile($cfg,4," Started job '".$lang['wihladm33']."'");
+ enter_logfile(4," Started job '".$lang['wihladm33']."'");
if ($mysqlcon->exec("DELETE FROM `$dbname`.`groups`;") === false) {
- enter_logfile($cfg,4," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(4," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`=1 WHERE `job_name`='reload_trigger';") === false) {
- enter_logfile($cfg,4," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(4," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
}
}
}
- $del_folder = array('avatars/','tsicons/');
+ $del_folder = array('avatars'.DIRECTORY_SEPARATOR,'tsicons'.DIRECTORY_SEPARATOR);
$err_cnt = 0;
if (!function_exists('rm_file_reset')) {
@@ -218,9 +218,9 @@ function reset_rs($ts3,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,&$db_cache) {
foreach(scandir($folder) as $file) {
if (in_array($file, array('.','..','check.png','placeholder.png','rs.png','servericon.png','100.png','200.png','300.png','500.png','600.png')) || is_dir($folder.$file)) continue;
if(unlink($folder.$file)) {
- enter_logfile($cfg,4," File ".$folder.$file." successfully deleted.");
+ enter_logfile(4," File ".$folder.$file." successfully deleted.");
} else {
- enter_logfile($cfg,2," File ".$folder.$file." couldn't be deleted. Please check the file permissions.");
+ enter_logfile(2," File ".$folder.$file." couldn't be deleted. Please check the file permissions.");
$err_cnt++;
}
}
@@ -228,21 +228,21 @@ function reset_rs($ts3,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,&$db_cache) {
}
foreach ($del_folder as $folder) {
- if(is_dir(substr(__DIR__,0,-4).$folder)) {
- rm_file_reset(substr(__DIR__,0,-4).$folder,$cfg);
+ if(is_dir(dirname(__DIR__).DIRECTORY_SEPARATOR.$folder)) {
+ rm_file_reset(dirname(__DIR__).DIRECTORY_SEPARATOR.$folder,$cfg);
}
}
if ($err_cnt == 0) {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='4' WHERE `job_name`='reset_webspace_cache';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_webspace_cache']['timestamp'] = 4;
- enter_logfile($cfg,4," Finished job '".$lang['wihladm33']."'");
+ enter_logfile(4," Finished job '".$lang['wihladm33']."'");
}
} else {
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='3' WHERE `job_name`='reset_webspace_cache';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_webspace_cache']['timestamp'] = 3;
}
@@ -250,45 +250,44 @@ function reset_rs($ts3,$mysqlcon,$lang,$cfg,$dbname,$phpcommand,&$db_cache) {
}
- if (in_array($db_cache['job_check']['reset_usage_graph']['timestamp'], ["1","2"], true)) {
+ if (in_array(intval($db_cache['job_check']['reset_usage_graph']['timestamp']), [1,2], true)) {
if ($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='2' WHERE `job_name`='reset_usage_graph';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_usage_graph']['timestamp'] = 2;
- enter_logfile($cfg,4," Started job '".$lang['wihladm34']."'");
+ enter_logfile(4," Started job '".$lang['wihladm34']."'");
}
if ($mysqlcon->exec("DELETE FROM `$dbname`.`server_usage`;") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='3' WHERE `job_name`='reset_usage_graph';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_usage_graph']['timestamp'] = 3;
}
} else {
- enter_logfile($cfg,4," Cleaned server usage graph (table: server_usage)");
+ enter_logfile(4," Cleaned server usage graph (table: server_usage)");
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='4' WHERE `job_name`='reset_usage_graph';") === false) {
- enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
} else {
$db_cache['job_check']['reset_usage_graph']['timestamp'] = 4;
- enter_logfile($cfg,4," Finished job '".$lang['wihladm34']."'");
+ enter_logfile(4," Finished job '".$lang['wihladm34']."'");
}
}
}
- enter_logfile($cfg,4,"Reset job(s) finished");
+ enter_logfile(4,"Reset job(s) finished");
- if($db_cache['job_check']['reset_stop_after']['timestamp'] == "1") {
- $path = substr(__DIR__, 0, -4);
+ if(intval($db_cache['job_check']['reset_stop_after']['timestamp']) == 1) {
if (substr(php_uname(), 0, 7) == "Windows") {
- pclose(popen("start /B cmd /C ".$phpcommand." ".$path."worker.php stop >NUL 2>NUL", "r"));
- file_put_contents($path.'logs\autostart_deactivated',"");
+ pclose(popen("start /B cmd /C ".$phpcommand." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php stop >NUL 2>NUL", "r"));
+ file_put_contents($GLOBALS['autostart'],"");
} else {
- exec($phpcommand." ".$path."worker.php stop > /dev/null &");
- file_put_contents($path.'logs/autostart_deactivated',"");
+ exec($phpcommand." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php stop > /dev/null &");
+ file_put_contents($GLOBALS['autostart'],"");
}
- shutdown($mysqlcon,$cfg,4,"Stop requested after Reset job. Wait for manually start.");
+ shutdown($mysqlcon,4,"Stop requested after Reset job. Wait for manually start.");
}
}
- enter_logfile($cfg,6,"reset_rs needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"reset_rs needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
}
?>
\ No newline at end of file
diff --git a/jobs/server_usage.php b/jobs/server_usage.php
index ec48280..c8503ce 100644
--- a/jobs/server_usage.php
+++ b/jobs/server_usage.php
@@ -10,11 +10,11 @@ function server_usage($mysqlcon,$cfg,$dbname,$serverinfo,&$db_cache) {
$db_cache['max_timestamp_server_usage'][$nowtime] = '';
//Calc time next rankup
- enter_logfile($cfg,6,"Calc next rankup for offline user");
+ enter_logfile(6,"Calc next rankup for offline user");
$upnextuptime = $nowtime - 1800;
$server_used_slots = $serverinfo['virtualserver_clientsonline'] - $serverinfo['virtualserver_queryclientsonline'];
if(($uuidsoff = $mysqlcon->query("SELECT `uuid`,`idle`,`count` FROM `$dbname`.`user` WHERE `online`<>1 AND `lastseen`>$upnextuptime")->fetchAll(PDO::FETCH_ASSOC)) === false) {
- enter_logfile($cfg,2,"calc_serverstats 13:".print_r($mysqlcon->errorInfo(), true));
+ enter_logfile(2,"calc_serverstats 13:".print_r($mysqlcon->errorInfo(), true));
}
if(count($uuidsoff) != 0) {
foreach($uuidsoff as $uuid) {
@@ -60,9 +60,9 @@ function server_usage($mysqlcon,$cfg,$dbname,$serverinfo,&$db_cache) {
} else {
$sqlexec .= "INSERT INTO `$dbname`.`server_usage` (`timestamp`,`clients`,`channel`) VALUES ($nowtime,$server_used_slots,{$serverinfo['virtualserver_channelsonline']});\n";
}
- enter_logfile($cfg,6,"Calc next rankup for offline user [DONE]");
+ enter_logfile(6,"Calc next rankup for offline user [DONE]");
}
- enter_logfile($cfg,6,"server_usage needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"server_usage needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
\ No newline at end of file
diff --git a/jobs/update_channel.php b/jobs/update_channel.php
index 57d0cbe..3e8a591 100644
--- a/jobs/update_channel.php
+++ b/jobs/update_channel.php
@@ -4,7 +4,7 @@ function update_channel($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache
$nowtime = time();
$sqlexec = '';
- if($db_cache['job_check']['update_channel']['timestamp'] < ($nowtime - 7)) {
+ if(intval($db_cache['job_check']['update_channel']['timestamp']) < ($nowtime - 7)) {
$db_cache['job_check']['update_channel']['timestamp'] = $nowtime;
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`={$nowtime} WHERE `job_name`='update_channel';\n";
@@ -20,10 +20,10 @@ function update_channel($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache
$db_cache['channel'][$channel['cid']]['pid'] == $channel['pid'] &&
$db_cache['channel'][$channel['cid']]['channel_order'] == $channel['channel_order'] &&
$db_cache['channel'][$channel['cid']]['channel_name'] == $chname) {
- enter_logfile($cfg,7,"Continue channel ".$chname." (CID: ".$channel['cid'].")");
+ enter_logfile(7,"Continue channel ".$chname." (CID: ".$channel['cid'].")");
continue;
} else {
- enter_logfile($cfg,6,"Update/Insert channel ".$chname." (CID: ".$channel['cid'].")");
+ enter_logfile(6,"Update/Insert channel ".$chname." (CID: ".$channel['cid'].")");
$updatechannel[] = array(
"cid" => $channel['cid'],
"pid" => $channel['pid'],
@@ -46,7 +46,7 @@ function update_channel($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache
unset($updatechannel, $sqlinsertvalues);
}
} catch (Exception $e) {
- enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
+ enter_logfile(2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
}
if(isset($db_cache['channel'])) {
@@ -62,10 +62,10 @@ function update_channel($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache
if(isset($delchannel) && $delchannel != NULL) {
$delchannel = substr($delchannel, 0, -1);
$sqlexec .= "DELETE FROM `$dbname`.`channel` WHERE `cid` IN ($delchannel);\n";
- enter_logfile($cfg,6,"DELETE FROM `$dbname`.`channel` WHERE `cid` IN ($delchannel);");
+ enter_logfile(6,"DELETE FROM `$dbname`.`channel` WHERE `cid` IN ($delchannel);");
}
- enter_logfile($cfg,6,"update_channel needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"update_channel needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
}
}
diff --git a/jobs/update_groups.php b/jobs/update_groups.php
index 41999c0..0714d4e 100644
--- a/jobs/update_groups.php
+++ b/jobs/update_groups.php
@@ -4,7 +4,7 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
$nowtime = time();
$sqlexec = '';
- if($db_cache['job_check']['update_groups']['timestamp'] < ($nowtime - 6)) {
+ if(!isset($db_cache['job_check']['update_groups']['timestamp']) || intval($db_cache['job_check']['update_groups']['timestamp']) < ($nowtime - 6)) {
$db_cache['job_check']['update_groups']['timestamp'] = $nowtime;
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`={$nowtime} WHERE `job_name`='update_groups';\n";
try {
@@ -22,10 +22,10 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
unset($iconlist);
} catch (Exception $e) {
if ($e->getCode() != 1281) {
- enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
+ enter_logfile(2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
} else {
$iconarr["xxxxx"] = 0;
- enter_logfile($cfg,6,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
+ enter_logfile(6,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
}
}
@@ -41,28 +41,28 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
$extension = '';
if (!isset($db_cache['groups']['0']) || $db_cache['groups']['0']['iconid'] != $sIconId || (isset($iconarr["i".$sIconId]) && $iconarr["i".$sIconId] > $db_cache['groups']['0']['icondate'])) {
if(isset($db_cache['groups']['0']) && isset($iconarr["i".$sIconId])) {
- enter_logfile($cfg,6,"Servericon TSiconid:".$serverinfo['virtualserver_icon_id']."; powed TSiconid:".$sIconId."; DBiconid:".$db_cache['groups']['0']['iconid']."; TSicondate:".$iconarr["i".$sIconId]."; DBicondate:".$db_cache['groups']['0']['icondate'].";");
+ enter_logfile(6,"Servericon TSiconid:".$serverinfo['virtualserver_icon_id']."; powed TSiconid:".$sIconId."; DBiconid:".$db_cache['groups']['0']['iconid']."; TSicondate:".$iconarr["i".$sIconId]."; DBicondate:".$db_cache['groups']['0']['icondate'].";");
} else {
- enter_logfile($cfg,6,"Servericon TSiconid:".$serverinfo['virtualserver_icon_id']."; powed TSiconid:".$sIconId."; DBiconid: empty; TSicondate: empty; DBicondate: empty;");
+ enter_logfile(6,"Servericon TSiconid:".$serverinfo['virtualserver_icon_id']."; powed TSiconid:".$sIconId."; DBiconid: empty; TSicondate: empty; DBicondate: empty;");
}
if($sIconId > 600) {
try {
usleep($cfg['teamspeak_query_command_delay']);
- enter_logfile($cfg,5,$lang['upgrp0002']);
+ enter_logfile(5,$lang['upgrp0002']);
$sIconFile = $ts3->iconDownload();
$extension = mime2extension(TeamSpeak3_Helper_Convert::imageMimeType($sIconFile));
if(file_put_contents(substr(dirname(__FILE__),0,-4) . "tsicons/servericon." . $extension, $sIconFile) === false) {
- enter_logfile($cfg,2,$lang['upgrp0003'].' '.sprintf($lang['errperm'], 'tsicons'));
+ enter_logfile(2,$lang['upgrp0003'].' '.sprintf($lang['errperm'], 'tsicons'));
}
} catch (Exception $e) {
- enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().'; '.$lang['upgrp0004'].$e->getMessage());
+ enter_logfile(2,$lang['errorts3'].$e->getCode().'; '.$lang['upgrp0004'].$e->getMessage());
}
} elseif($sIconId == 0) {
foreach (glob(substr(dirname(__FILE__),0,-4) . "tsicons/servericon.*") as $file) {
if(unlink($file) === false) {
- enter_logfile($cfg,2,$lang['upgrp0005'].' '.sprintf($lang['errperm'], 'tsicons'));
+ enter_logfile(2,$lang['upgrp0005'].' '.sprintf($lang['errperm'], 'tsicons'));
} else {
- enter_logfile($cfg,5,$lang['upgrp0006']);
+ enter_logfile(5,$lang['upgrp0006']);
}
}
$iconarr["i".$sIconId] = $sIconId = 0;
@@ -101,16 +101,16 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
if($iconid > 600) {
if (!isset($db_cache['groups'][$sgid]) || $db_cache['groups'][$sgid]['iconid'] != $iconid || isset($iconarr["i".$iconid]) && $iconarr["i".$iconid] > $db_cache['groups'][$sgid]['icondate']) {
try {
- check_shutdown($cfg); usleep($cfg['teamspeak_query_command_delay']);
- enter_logfile($cfg,5,sprintf($lang['upgrp0011'], $sgname, $sgid));
+ check_shutdown(); usleep($cfg['teamspeak_query_command_delay']);
+ enter_logfile(5,sprintf($lang['upgrp0011'], $sgname, $sgid));
$iconfile = $servergroup->iconDownload();
$extension = mime2extension(TeamSpeak3_Helper_Convert::imageMimeType($iconfile));
if(file_put_contents(substr(dirname(__FILE__),0,-4) . "tsicons/" . $iconid . "." . $extension, $iconfile) === false) {
- enter_logfile($cfg,2,sprintf($lang['upgrp0007'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
+ enter_logfile(2,sprintf($lang['upgrp0007'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
}
$iconcount++;
} catch (Exception $e) {
- enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.sprintf($lang['upgrp0008'], $sgname, $sgid).$e->getMessage());
+ enter_logfile(2,$lang['errorts3'].$e->getCode().': '.sprintf($lang['upgrp0008'], $sgname, $sgid).$e->getMessage());
}
} else {
$extension = $db_cache['groups'][$sgid]['ext'];
@@ -118,9 +118,9 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
} elseif($iconid == 0) {
foreach (glob(substr(dirname(__FILE__),0,-4) . "tsicons/" . $iconid . ".*") as $file) {
if(unlink($file) === false) {
- enter_logfile($cfg,2,sprintf($lang['upgrp0009'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
+ enter_logfile(2,sprintf($lang['upgrp0009'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
} else {
- enter_logfile($cfg,5,sprintf($lang['upgrp0010'], $sgname, $sgid));
+ enter_logfile(5,sprintf($lang['upgrp0010'], $sgname, $sgid));
}
}
$iconarr["i".$iconid] = 0;
@@ -133,10 +133,10 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
}
if(isset($db_cache['groups'][$servergroup['sgid']]) && $db_cache['groups'][$servergroup['sgid']]['sgidname'] == $sgname && $db_cache['groups'][$servergroup['sgid']]['iconid'] == $iconid && $db_cache['groups'][$servergroup['sgid']]['icondate'] == $iconarr["i".$iconid] && $db_cache['groups'][$servergroup['sgid']]['sortid'] == $servergroup['sortid']) {
- enter_logfile($cfg,7,"Continue server group ".$sgname." (CID: ".$servergroup['sgid'].")");
+ enter_logfile(7,"Continue server group ".$sgname." (CID: ".$servergroup['sgid'].")");
continue;
} else {
- enter_logfile($cfg,6,"Update/Insert server group ".$sgname." (CID: ".$servergroup['sgid'].")");
+ enter_logfile(6,"Update/Insert server group ".$sgname." (CID: ".$servergroup['sgid'].")");
$updategroups[] = array(
"sgid" => $servergroup['sgid'],
"sgidname" => $sgname,
@@ -177,14 +177,14 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
foreach($cfg['rankup_definition'] as $rank) {
if(in_array($sgid, $rank)) {
if(in_array($sgid, $cfg['rankup_definition'])) {
- enter_logfile($cfg,2,sprintf($lang['upgrp0001'], $sgid, $lang['wigrptime']));
+ enter_logfile(2,sprintf($lang['upgrp0001'], $sgid, $lang['wigrptime']));
if(isset($cfg['webinterface_admin_client_unique_id_list']) && $cfg['webinterface_admin_client_unique_id_list'] != NULL) {
foreach ($cfg['webinterface_admin_client_unique_id_list'] as $clientid) {
usleep($cfg['teamspeak_query_command_delay']);
try {
$ts3->clientGetByUid($clientid)->message(sprintf($lang['upgrp0001'], $sgid, $lang['wigrptime']));
} catch (Exception $e) {
- enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
+ enter_logfile(6," ".sprintf($lang['upusrerr'], $clientid));
}
}
}
@@ -192,27 +192,27 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
}
}
if(isset($cfg['rankup_boost_definition'][$sgid])) {
- enter_logfile($cfg,2,sprintf($lang['upgrp0001'], $sgid, $lang['wiboost']));
+ enter_logfile(2,sprintf($lang['upgrp0001'], $sgid, $lang['wiboost']));
if(isset($cfg['webinterface_admin_client_unique_id_list']) && $cfg['webinterface_admin_client_unique_id_list'] != NULL) {
foreach ($cfg['webinterface_admin_client_unique_id_list'] as $clientid) {
usleep($cfg['teamspeak_query_command_delay']);
try {
$ts3->clientGetByUid($clientid)->message(sprintf($lang['upgrp0001'], $sgid, $lang['wigrptime']));
} catch (Exception $e) {
- enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
+ enter_logfile(6," ".sprintf($lang['upusrerr'], $clientid));
}
}
}
}
if(isset($cfg['rankup_excepted_group_id_list'][$sgid])) {
- enter_logfile($cfg,2,sprintf($lang['upgrp0001'], $sgid, $lang['wiexgrp']));
+ enter_logfile(2,sprintf($lang['upgrp0001'], $sgid, $lang['wiexgrp']));
if(isset($cfg['webinterface_admin_client_unique_id_list']) && $cfg['webinterface_admin_client_unique_id_list'] != NULL) {
foreach ($cfg['webinterface_admin_client_unique_id_list'] as $clientid) {
usleep($cfg['teamspeak_query_command_delay']);
try {
$ts3->clientGetByUid($clientid)->message(sprintf($lang['upgrp0001'], $sgid, $lang['wigrptime']));
} catch (Exception $e) {
- enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
+ enter_logfile(6," ".sprintf($lang['upusrerr'], $clientid));
}
}
}
@@ -225,11 +225,11 @@ function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,&$db_cache,
$delsgroupids = substr($delsgroupids, 0, -1);
$sqlexec .= "DELETE FROM `$dbname`.`groups` WHERE `sgid` IN ($delsgroupids);\n";
}
- enter_logfile($cfg,6,"update_groups needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
+ enter_logfile(6,"update_groups needs: ".(number_format(round((microtime(true) - $starttime), 5),5)));
return($sqlexec);
} catch (Exception $e) {
- enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
+ enter_logfile(2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
}
}
}
diff --git a/jobs/update_rs.php b/jobs/update_rs.php
index 6c24f5b..a21a1b3 100644
--- a/jobs/update_rs.php
+++ b/jobs/update_rs.php
@@ -1,22 +1,22 @@
query("SELECT 1 FROM `$dbname`.`bak_$table` LIMIT 1") !== false) {
if($mysqlcon->exec("DROP TABLE `$dbname`.`bak_$table`") === false) {
- enter_logfile($cfg,1," Error due deleting old backup table bak_".$table.".",$norotate);
+ enter_logfile(1," Error due deleting old backup table bak_".$table.".",$norotate);
$countbackuperr++;
} else {
- enter_logfile($cfg,4," Old backup table bak_".$table." successfully removed.",$norotate);
+ enter_logfile(4," Old backup table bak_".$table." successfully removed.",$norotate);
}
}
} catch (Exception $e) { }
@@ -24,47 +24,47 @@ function update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand,$norotate=NULL) {
foreach ($tables as $table) {
if($mysqlcon->exec("CREATE TABLE `$dbname`.`bak_$table` LIKE `$dbname`.`$table`") === false) {
- enter_logfile($cfg,1," Error due creating table bak_".$table.".",$norotate);
+ enter_logfile(1," Error due creating table bak_".$table.".",$norotate);
$countbackuperr++;
} else {
if($mysqlcon->exec("INSERT `$dbname`.`bak_$table` SELECT * FROM `$dbname`.`$table`") === false) {
- enter_logfile($cfg,1," Error due inserting data from table ".$table.".",$norotate);
+ enter_logfile(1," Error due inserting data from table ".$table.".",$norotate);
$countbackuperr++;
} else {
- enter_logfile($cfg,4," Table ".$table." successfully cloned.",$norotate);
+ enter_logfile(4," Table ".$table." successfully cloned.",$norotate);
}
}
}
if($countbackuperr != 0) {
- enter_logfile($cfg,4," Backup failed. Please check your database permissions.",$norotate);
- enter_logfile($cfg,4," Update failed. Go on with normal work on old version.",$norotate);
+ enter_logfile(4," Backup failed. Please check your database permissions.",$norotate);
+ enter_logfile(4," Update failed. Go on with normal work on old version.",$norotate);
return;
} else {
- enter_logfile($cfg,4," Database-tables successfully backuped.",$norotate);
+ enter_logfile(4," Database-tables successfully backuped.",$norotate);
}
- if(!is_file(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
- enter_logfile($cfg,4," Downloading new update...",$norotate);
+ if(!is_file(dirname(__DIR__).DIRECTORY_SEPARATOR.'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
+ enter_logfile(4," Downloading new update...",$norotate);
$newUpdate = file_get_contents('https://ts-n.net/downloads/ranksystem_'.$cfg['version_latest_available'].'.zip');
- if(!is_dir(substr(__DIR__,0,-4).'update/')) {
- mkdir (substr(__DIR__,0,-4).'update/');
+ if(!is_dir(dirname(__DIR__).DIRECTORY_SEPARATOR.'update/')) {
+ mkdir (dirname(__DIR__).DIRECTORY_SEPARATOR.'update/');
}
- $dlHandler = fopen(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip', 'w');
+ $dlHandler = fopen(dirname(__DIR__).DIRECTORY_SEPARATOR.'update/ranksystem_'.$cfg['version_latest_available'].'.zip', 'w');
if(!fwrite($dlHandler,$newUpdate)) {
- enter_logfile($cfg,1," Could not save new update. Please check the permissions for folder 'update'.",$norotate);
- enter_logfile($cfg,4," Update failed. Go on with normal work on old version.",$norotate);
+ enter_logfile(1," Could not save new update. Please check the permissions for folder 'update'.",$norotate);
+ enter_logfile(4," Update failed. Go on with normal work on old version.",$norotate);
return;
}
- if(!is_file(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
- enter_logfile($cfg,4," Something gone wrong with downloading/saving the new update file.",$norotate);
- enter_logfile($cfg,4," Update failed. Go on with normal work on old version.",$norotate);
+ if(!is_file(dirname(__DIR__).DIRECTORY_SEPARATOR.'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
+ enter_logfile(4," Something gone wrong with downloading/saving the new update file.",$norotate);
+ enter_logfile(4," Update failed. Go on with normal work on old version.",$norotate);
return;
}
fclose($dlHandler);
- enter_logfile($cfg,4," New update successfully saved.",$norotate);
+ enter_logfile(4," New update successfully saved.",$norotate);
} else {
- enter_logfile($cfg,5," New update file (update/ranksystem_".$cfg['version_latest_available'].".zip) already here...",$norotate);
+ enter_logfile(5," New update file (update/ranksystem_".$cfg['version_latest_available'].".zip) already here...",$norotate);
}
$countwrongfiles = 0;
@@ -72,63 +72,63 @@ function update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand,$norotate=NULL) {
$zip = new ZipArchive;
- if($zip->open(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
+ if($zip->open(dirname(__DIR__).DIRECTORY_SEPARATOR.'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
for ($i = 0; $i < $zip->numFiles; $i++) {
$thisFileName = $zip->getNameIndex($i);
$thisFileDir = dirname($thisFileName);
- enter_logfile($cfg,6," Parent directory: ".$thisFileDir,$norotate);
- enter_logfile($cfg,6," File/Dir: ".$thisFileName,$norotate);
+ enter_logfile(6," Parent directory: ".$thisFileDir,$norotate);
+ enter_logfile(6," File/Dir: ".$thisFileName,$norotate);
if(substr($thisFileName,-1,1) == '/' || substr($thisFileName,-1,1) == '\\') {
- enter_logfile($cfg,6," Check folder is existing: ".$thisFileName,$norotate);
- if(!is_dir(substr(__DIR__,0,-4).substr($thisFileName,0,-1))) {
- enter_logfile($cfg,5," Create folder: ".substr(__DIR__,0,-4).substr($thisFileName,0,-1),$norotate);
- if(mkdir((substr(__DIR__,0,-4).substr($thisFileName,0,-1)), 0740, true)) {
- enter_logfile($cfg,4," Created new folder ".substr(__DIR__,0,-4).substr($thisFileName,0,-1),$norotate);
+ enter_logfile(6," Check folder is existing: ".$thisFileName,$norotate);
+ if(!is_dir(dirname(__DIR__).DIRECTORY_SEPARATOR.substr($thisFileName,0,-1))) {
+ enter_logfile(5," Create folder: ".dirname(__DIR__).DIRECTORY_SEPARATOR.substr($thisFileName,0,-1),$norotate);
+ if(mkdir((dirname(__DIR__).DIRECTORY_SEPARATOR.substr($thisFileName,0,-1)), 0750, true)) {
+ enter_logfile(4," Created new folder ".dirname(__DIR__).DIRECTORY_SEPARATOR.substr($thisFileName,0,-1),$norotate);
} else {
- enter_logfile($cfg,2," Error by creating folder ".substr(__DIR__,0,-4).substr($thisFileName,0,-1).". Please check the permissions on the folder one level above.",$norotate);
+ enter_logfile(2," Error by creating folder ".dirname(__DIR__).DIRECTORY_SEPARATOR.substr($thisFileName,0,-1).". Please check the permissions on the folder one level above.",$norotate);
$countwrongfiles++;
}
} else {
- enter_logfile($cfg,6," Folder still existing.",$norotate);
+ enter_logfile(6," Folder still existing.",$norotate);
}
continue;
}
- if(!is_dir(substr(__DIR__,0,-4).'/'.$thisFileDir)) {
- enter_logfile($cfg,6," Check parent folder is existing: ".$thisFileDir,$norotate);
- if(mkdir(substr(__DIR__,0,-4).$thisFileDir, 0740, true)) {
- enter_logfile($cfg,4," Created new folder ".$thisFileDir,$norotate);
+ if(!is_dir(dirname(__DIR__).DIRECTORY_SEPARATOR.$thisFileDir)) {
+ enter_logfile(6," Check parent folder is existing: ".$thisFileDir,$norotate);
+ if(mkdir(dirname(__DIR__).DIRECTORY_SEPARATOR.$thisFileDir, 0750, true)) {
+ enter_logfile(4," Created new folder ".$thisFileDir,$norotate);
} else {
- enter_logfile($cfg,2," Error by creating folder ".$thisFileDir.". Please check the permissions on your folder ".substr(__DIR__,0,-4),$norotate);
+ enter_logfile(2," Error by creating folder ".$thisFileDir.". Please check the permissions on your folder ".dirname(__DIR__),$norotate);
$countwrongfiles++;
}
} else {
- enter_logfile($cfg,6," Parent folder still existing.",$norotate);
+ enter_logfile(6," Parent folder still existing.",$norotate);
}
- enter_logfile($cfg,6," Check file: ".substr(__DIR__,0,-4).$thisFileName,$norotate);
- if(!is_dir(substr(__DIR__,0,-4).$thisFileName)) {
+ enter_logfile(6," Check file: ".dirname(__DIR__).DIRECTORY_SEPARATOR.$thisFileName,$norotate);
+ if(!is_dir(dirname(__DIR__).DIRECTORY_SEPARATOR.$thisFileName)) {
$contents = $zip->getFromName($thisFileName);
$updateThis = '';
if($thisFileName == 'other/dbconfig.php' || $thisFileName == 'install.php' || $thisFileName == 'other/phpcommand.php' || $thisFileName == 'logs/autostart_deactivated') {
- enter_logfile($cfg,5," Did not touch ".$thisFileName,$norotate);
+ enter_logfile(5," Did not touch ".$thisFileName,$norotate);
} else {
- if(($updateThis = fopen(substr(__DIR__,0,-4).'/'.$thisFileName, 'w')) === false) {
- enter_logfile($cfg,2," Failed to open file ".$thisFileName,$norotate);
+ if(($updateThis = fopen(dirname(__DIR__).DIRECTORY_SEPARATOR.$thisFileName, 'w')) === false) {
+ enter_logfile(2," Failed to open file ".$thisFileName,$norotate);
$countwrongfiles++;
} elseif(!fwrite($updateThis, $contents)) {
- enter_logfile($cfg,2," Failed to write file ".$thisFileName,$norotate);
+ enter_logfile(2," Failed to write file ".$thisFileName,$norotate);
$countwrongfiles++;
} else {
- enter_logfile($cfg,4," Replaced file ".$thisFileName,$norotate);
+ enter_logfile(4," Replaced file ".$thisFileName,$norotate);
$countchangedfiles++;
}
fclose($updateThis);
unset($contents);
}
} else {
- enter_logfile($cfg,2," Unkown thing happened.. Is the parent directory existing? ".$thisFileDir." # ".$thisFileName,$norotate);
+ enter_logfile(2," Unknown thing happened.. Is the parent directory existing? ".$thisFileDir." # ".$thisFileName,$norotate);
$countwrongfiles++;
}
}
@@ -137,39 +137,37 @@ function update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand,$norotate=NULL) {
unset($zip);
sleep(1);
} else {
- enter_logfile($cfg,2," Error with downloaded Zip file happened. Is the file inside the folder 'update' valid and readable?",$norotate);
+ enter_logfile(2," Error with downloaded Zip file happened. Is the file inside the folder 'update' valid and readable?",$norotate);
$countwrongfiles++;
}
- if(!unlink(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
- enter_logfile($cfg,3," Could not clean update folder. Please remove the unneeded file ".substr(__DIR__,0,-4)."update/ranksystem_".$cfg['version_latest_available'].".zip",$norotate);
+ if(!unlink(dirname(__DIR__).DIRECTORY_SEPARATOR.'update'.DIRECTORY_SEPARATOR.'ranksystem_'.$cfg['version_latest_available'].'.zip')) {
+ enter_logfile(3," Could not clean update folder. Please remove the unneeded file ".dirname(__DIR__).DIRECTORY_SEPARATOR."update".DIRECTORY_SEPARATOR."ranksystem_".$cfg['version_latest_available'].".zip",$norotate);
} else {
- enter_logfile($cfg,5," Cleaned update folder.",$norotate);
+ enter_logfile(5," Cleaned update folder.",$norotate);
}
if($countwrongfiles == 0 && $countchangedfiles != 0) {
$sqlexec .= "UPDATE `$dbname`.`cfg_params` SET `value`='{$cfg['version_latest_available']}' WHERE `param`='version_latest_available';\n";
- $path = substr(__DIR__, 0, -4);
-
- if (file_exists($cfg['logs_path'].'pid')) {
- unlink($cfg['logs_path'].'pid');
+ if (file_exists($GLOBALS['pidfile'])) {
+ unlink($GLOBALS['pidfile']);
}
- enter_logfile($cfg,4," Files updated successfully.",$norotate);
+ enter_logfile(4," Files updated successfully.",$norotate);
if (substr(php_uname(), 0, 7) == "Windows") {
- pclose(popen("start /B cmd /C ".$phpcommand." ".$path."worker.php start 1500000 >NUL 2>NUL", "r"));
+ pclose(popen("start /B cmd /C ".$GLOBALS['phpcommand']." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php start 1500000 >NUL 2>NUL", "r"));
} else {
- exec($phpcommand." ".$path."worker.php start 2500000 > /dev/null 2>&1 &");
+ exec($GLOBALS['phpcommand']." ".dirname(__DIR__).DIRECTORY_SEPARATOR."worker.php start 2500000 > /dev/null 2>&1 &");
}
- shutdown($mysqlcon,$cfg,4,"Update done. Wait for restart via cron/task.",FALSE);
+ shutdown($mysqlcon,4,"Update done. Wait for restart via cron/task.",FALSE);
} else {
- enter_logfile($cfg,1," Files updated with at least one error. Please check the log!",$norotate);
- enter_logfile($cfg,2,"Update of the Ranksystem failed!",$norotate);
- enter_logfile($cfg,4,"Continue with normal work on old version.",$norotate);
+ enter_logfile(1," Files updated with at least one error. Please check the log!",$norotate);
+ enter_logfile(2,"Update of the Ranksystem failed!",$norotate);
+ enter_logfile(4,"Continue with normal work on old version.",$norotate);
}
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='get_version';\n";
diff --git a/languages/core_ar_العربية_arab.php b/languages/core_ar_العربية_arab.php
index 8af4131..eebbd40 100644
--- a/languages/core_ar_العربية_arab.php
+++ b/languages/core_ar_العربية_arab.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achievement";
$lang['adduser'] = "User %s (unique Client-ID: %s; Client-database-ID %s) is unknown -> added to the Ranksystem now.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "السماح ببدء/إيقاف كابتن Ranksystem عبر API";
+$lang['apipermdesc'] = "(ON = السماح ; OFF = منع)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Change password";
$lang['pass3'] = "old password";
$lang['pass4'] = "new password";
$lang['pass5'] = "Forgot Password?";
+$lang['permission'] = "أذونات";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "repeat";
$lang['resettime'] = "Reset the online and idle time of user %s (unique Client-ID: %s; Client-database-ID %s) to zero, cause user got removed out of exception.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s for portuguese translation";
$lang['stri0021'] = "%s for the great support on GitHub & our public server, sharing his ideas, pre-testing all that shit & much more";
$lang['stri0022'] = "%s for sharing their ideas & pre-testing";
$lang['stri0023'] = "Stable since: 18/04/2016.";
-$lang['stri0024'] = "%s for czech translation";
-$lang['stri0025'] = "%s for polish translation";
-$lang['stri0026'] = "%s for spanish translation";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s للترجمة التشيكية";
+$lang['stri0025'] = "%s للترجمة البولندية";
+$lang['stri0026'] = "%s للترجمة الإسبانية";
+$lang['stri0027'] = "%s للترجمة الهنغارية";
+$lang['stri0028'] = "%s للترجمة الأذربيجانية";
+$lang['stri0029'] = "%s للدالة الدمغة";
+$lang['stri0030'] = "%s للطراز 'CosmicBlue' لصفحة الإحصاءات وواجهة الويب";
$lang['stta0001'] = "لكل الوقت";
$lang['sttm0001'] = "لهذا الشهر";
$lang['sttw0001'] = "افضل مستخدمين";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "reset time";
$lang['wiexresdesc'] = "There are three modes, how to handle an exception. In every case the rank up is disabled (no assigning of servergroups). You can choose different options how the spended time from a user (which is excepted) should be handled.
1) count time (default): At default the Ranksystem also count the online/active time of users, which are excepted (by client/servergroup exception). With an exception only the rank up is disabled. That means if a user is not any more excepted, he would be assigned to the group depending his collected time (e.g. level 3).
2) break time: On this option the spend online and idle time will be frozen (break) to the actual value (before the user got excepted). After loosing the excepted reason (after removing the excepted servergroup or remove the expection rule) the 'counting' will go on.
3) reset time: With this function the counted online and idle time will be resetting to zero at the moment the user are not any more excepted (due removing the excepted servergroup or remove the exception rule). The spent time due exception will be still counting till it got reset.
The channel exception doesn't matter in any case, cause the time will always be ignored (like the mode break time).";
$lang['wiexuid'] = "استثناء المستخدم";
$lang['wiexuiddesc'] = "A comma seperated list of unique Client-IDs, which should not conside for the Ranksystem. User in this list will be ignored for the rank up.";
+$lang['wiexregrp'] = "إزالة المجموعة";
+$lang['wiexregrpdesc'] = "إذا تم إستبعاد المستخدم من Ranksystem، فسيتم إزالة المجموعة المخصصة للخادم من قبل Ranksystem.
سيتم إزالة المجموعة فقط مع '".$lang['wiexres']."' مع '".$lang['wiexres1']."'. في جميع الوضعيات الأخرى، لن يتم إزالة المجموعة الخادم.
هذه الوظيفة مهمة فقط في الجمع مع '".$lang['wiexuid']."' أو '".$lang['wiexgrp']."' مع '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Define the default sorting order for the List Rankup page.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "نمط مخصص";
+$lang['wistyledesc'] = "تعريف نمط مخصص (Style) لنظام الرتبة الذي يختلف عن النظام الإفتراضي. سيتم استخدام هذا النمط لصفحة الإحصائيات وواجهة الويب.
ضع النمط الخاص بك في الدليل 'style' في الدليل الفرعي الخاص بك. يحدد اسم الدليل الفرعي اسم النمط.
لذلك فلا ينبغي القيام بتعديلات في الأنماط التي تبدأ ب \"TSN_\". يمكن استخدامها كنموذج، لذلك يمكن نسخ الطراز في مجلد يدير تعديلاته.
يتطلب إنشاء ملفي CSS للصفحة الإحصائية والواجهة الشبكية. يمكن أيضًا تضمين جافا سكريبت خاص، الذي يعد ذلك اختياريًا.
تعريف تسمية الشكل الخارجي للصفحة الإحصائية والواجهة الشبكية:
- ثابت 'ST.css' للصفحة الإحصائية (/stats/) - ثابت 'WI.css' للصفحة الشبكية الخارجية (/webinterface/)
تعريف تسمية الجافا سكريبت للصفحة الإحصائية والواجهة الشبكية:
- ثابت 'ST.js' للصفحة الإحصائية (/stats/) - ثابت 'WI.js' للصفحة الشبكية الخارجية (/webinterface/)
إذا كنت ترغب في مشاركة الطراز الخاص بك مع الآخرين، يمكنك إرساله إلى العنوان الإلكتروني التالي:
%s
سنصدرها في الإصدار التالي!";
$lang['wisupidle'] = "time mode";
$lang['wisupidledesc'] = "There are two modes, how the time of a user will be rated.
1) online time: Servergroups will be given by online time. In this case the active and the inactive time will be rated. (see column 'sum. online time' in the 'stats/list_rankup.php')
2) active time: Servergroups will be given by active time. In this case the inactive time will not be rated. The online time will be taken and reduced by the inactive time (=idle) to build the active time. (see column 'sum. active time' in the 'stats/list_rankup.php')
A change of the 'time mode', also on longer running Ranksystem instances, should be no problem since the Ranksystem repairs wrong servergroups on a client.";
$lang['wisvconf'] = "save";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH). When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.
Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!
Attention: The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!
Requirements:
1) TS3 Server version 3.3.0 or above.
2) The PHP extension PHP-SSH2 is necessary. On Linux you can it install with the following command: %s 3) The encryption needs to be enabled on your TS3 server! Activate the following parameters inside your 'ts3server.ini' and customize it for your needs: %s After changing your TS3 server configurations a restart of your TS3 server is necessary.";
$lang['wits3host'] = "TS3 Hostaddress";
$lang['wits3hostdesc'] = "TeamSpeak 3 Server address (IP oder DNS)";
+$lang['wits3pre'] = "بريفيكس أمر البوت";
+$lang['wits3predesc'] = "على خادم TeamSpeak يمكنك التواصل مع بوت Ranksystem من خلال الدردشة. بشكل افتراضي، يتم وضع علامة '!' في أمام أوامر البوت كعلامة معرفة. يتم استخدام البريفيكس لتعريف الأوامر الخاصة بالبوت كما هو.
يمكن استبدال هذا البريفيكس بأي بريفيكس آخر مرغوب فيه. قد تكون هذه الخطوة ضرورية إذا كانت هناك بوتات أخرى تستخدم أوامر مماثلة.
على سبيل المثال، ستبدو الأمر الإفتراضي للبوت كما يلي:
!help
إذا قمت باستبدال البريفيكس ب '#'، فستبدو الأمر كما يلي:
#help
";
$lang['wits3qnm'] = "Botname";
$lang['wits3qnmdesc'] = "The name, with this the query-connection will be established. You can name it free.";
$lang['wits3querpw'] = "TS3 Query-Password";
diff --git a/languages/core_az_Azərbaycan_az.php b/languages/core_az_Azərbaycan_az.php
index 1d17067..4e18c77 100644
--- a/languages/core_az_Azərbaycan_az.php
+++ b/languages/core_az_Azərbaycan_az.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Nail olmaq";
$lang['adduser'] = "%s istifadəçisi % (unikal Müştəri-ID: %s; Müştəri bazası ID %s) bilinmir -> indi Ranks Sisteminə əlavə edildi";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "API vasitəsilə Ranksystem Bot-unun başlatılması/dayandırılmasına izin verin";
+$lang['apipermdesc'] = "(ON = İzin ver ; OFF = İzin vermə)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Şifrə dəyiş";
$lang['pass3'] = "köhnə şifrə";
$lang['pass4'] = "yeni şifrə";
$lang['pass5'] = "Şifrənizi unutmusunuz?";
+$lang['permission'] = "İcazələr";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "təkrar";
$lang['resettime'] = "Istifadəçi %s (unikal Müştəri-ID: %s; Client-database-ID: %s) onlayn və boş vaxtını sıfırla bərpa et, bir istisna (server və ya müştəri istisnası) həyata çıxardı.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s for portuguese translation";
$lang['stri0021'] = "%s for the great support on GitHub & our public server, sharing his ideas, pre-testing all that shit & much more";
$lang['stri0022'] = "%s for sharing their ideas & pre-testing";
$lang['stri0023'] = "Stable since: 18/04/2016.";
-$lang['stri0024'] = "%s for czech translation";
-$lang['stri0025'] = "%s for polish translation";
-$lang['stri0026'] = "%s for spanish translation";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s çek dili üçün tərcümə";
+$lang['stri0025'] = "%s polşa dili üçün tərcümə";
+$lang['stri0026'] = "%s ispanca dili üçün tərcümə";
+$lang['stri0027'] = "%s macar dili üçün tərcümə";
+$lang['stri0028'] = "%s azərbaycan dili üçün tərcümə";
+$lang['stri0029'] = "%s imza funksiyası üçün";
+$lang['stri0030'] = "%s 'CosmicBlue' stil statistika səhifəsi və veb-interfeysi üçün";
$lang['stta0001'] = "Ümumi sıralama";
$lang['sttm0001'] = "Aylıq sıralama";
$lang['sttw0001'] = "Sıralama";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "sıfırlama vaxtı";
$lang['wiexresdesc'] = "İstisna etmək üçün üç rejim var. Hər bir halda dərəcə söndürülür(server qrup təyin edilmir). Bir istifadəçinin (istisna olmaqla) xərclənmiş vaxtının necə işlədiləcəyini müxtəlif variantlardan seçə bilərsiniz.
1) sayma vaxtı (standart): Ranksystem, standart olaraq, istisna olan (müştəri/server qrup istisna ilə) istifadəçilərin onlayn/aktiv vaxtını da sayır. Bir istisna ilə yalnız sıralama dayandırılır. Yəni bir istifadəçi istisna edilməmişsə, topladığı vaxtdan asılı olaraq (məs. 3-cü səviyyə).
2) fasilə vaxtı: Bu seçimdə sərf edilən onlayn və boş vaxt sərf olunan dəyəri (istifadəçi istisna olmaqla) dondurulacaq. İstisna səbəbi aradan qaldırıldıqdan sonra (gözlənilən server qrup çıxarıldıqdan və ya istisna qaydasını çıxardıqdan sonra) onlayn/aktiv vaxtın 'counting' davam edir.
3) sıfırlama vaxtı: Bu funksiya sayəsində, sayta daxil olan onlayn və boş vaxt istifadəçi artıq istisna olmaqla (istisna olmaqla server qrupu kənarlaşdırmaq və ya istisna qaydasını çıxarmaq) sıfırlanacaqdır. Xərclənən vaxtı istisna hala yenidən qurulana qədər hesablanır.
Kanal istisnası heç bir halda əhəmiyyətli deyil, vaxt həmişə nəzərə alınmayacaq (rejimi pozma vaxtı kimi).";
$lang['wiexuid'] = "müştəri istisnası";
$lang['wiexuiddesc'] = "Virgülle ayrılmış unikal Müştəri ID siyahısı, Ranksystem üçün nəzərdə tutulmamalıdır. Bu siyahıda istifadəçi dərəcə üçün göz ardı edilir.";
+$lang['wiexregrp'] = "qrupu sil";
+$lang['wiexregrpdesc'] = "İstifadəçi Ranksystem tərk edildiyi halda, Ranksystem tərəfindən təyin edilmiş server qrupu silinir.
Qrup yalnız '".$lang['wiexres']."' ilə '".$lang['wiexres1']."' ilə silinir. Digər rejimlərdə server qrupu silinməyəcək.
Bu funksiya yalnız '".$lang['wiexuid']."' və ya '".$lang['wiexgrp']."' ilə '".$lang['wiexres1']."' ilə birlikdə istifadə edilən zaman mühümdür.";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Siyahı sıralaması səhifəsi üçün standart sıralama qaydasını müəyyənləşdirin.";
$lang['wistcodesc'] = "Mükəmməlliyi qarşılamaq üçün server-əlaqə bir tələb sayı göstərin.";
$lang['wisttidesc'] = "Mükəmməlliyi qarşılamaq üçün lazım olan vaxtı (saat) göstərin.";
+$lang['wistyle'] = "özəl üslub";
+$lang['wistyledesc'] = "Ranksistem üçün fərqli, istifadəçi təyinatı olan (Style) üslub təyin edin. Bu üslub statistika səhifəsi və veb-interfeys üçün istifadə olunur.
Öz üslubunuzu 'style' adlı qovluğun alt qovluğunda yerləşdirin. Alt qovluğun adı üslubun adını təyin edir.
'TSN_' ilə başlayan üslublar Ranksistem tərəfindən təqdim edilir. Bu gələcək yeniləmələr ilə yenilənir. Bu üslubların üzərində düzəlişlər etməməli! Lakin bu üslublar nümunə kimi istifadə edilə bilər. Öz üslubunuzu bir alt qovlu qda saxlayın. Alt qovluğun adı üslubun adını təyin edir.
'TSN_' ilə başlayan üslublar Rank Sistemi tərəfindən təqdim edilir. Bu, gələcək yeniləmələrlə yenilənəcəkdir. Bu üslublara düzəlişlər etməməli! Lakin, bu üslublar nümunə olarak istifadə oluna bilər. Üslubu bir qovluqda kopyalayın və düzəlişlər edin.
Statistika səhifəsi və Web İnterfeysi üçün iki CSS faylı tələb olunur. Ayrıca, öz JavaScript faylı da əlavə edilə bilər. Lakin, bu opsionaldır.
CSS ad konvensiya:
- Statistika səhifəsi üçün 'ST.css'- Webinterface səhifəsi üçün 'WI.css'
JavaScript ünvanlandırma qaydaları:
- Statistika səhifəsi üçün 'ST.js'- Webinterface səhifəsi üçün 'WI.js'
Üslubunuzu digər insanlarla da bölüşmək istəsəniz, onları aşağıdakı e-poçt ünvanına göndərə bilərsiniz:
%s
Onları son versiyanın vəzifəsindən keçirəcəyik!";
$lang['wisupidle'] = "time Mod";
$lang['wisupidledesc'] = "İki rejim var, vaxt necə sayılır.
1) onlayn vaxt: Burada istifadəçinin təmiz onlayn saatı nəzərə alınır (sütun bax 'sum. online time' 'stats/list_rankup.php')
2) aktiv vaxt: Burada istifadəçinin onlayn vaxtından qeyri-aktiv vaxt (boş vaxt) çıxılacaq və yalnız aktiv vaxt sayılır (sütun bax 'sum. active time' 'stats/list_rankup.php').
Zatən uzun müddət çalışan Ranksystem ilə rejimin dəyişməsi təklif edilmir, lakin daha böyük problemlər olmadan işləməlidir. Hər bir istifadəçi ən azı bir sonrakı rütbə ilə təmir ediləcək.";
$lang['wisvconf'] = "yadda saxla";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query şifrələmə";
$lang['wits3encryptdesc'] = "Ranksystem və TeamSpeak 3 server (SSH) arasında rabitəni şifrələmək üçün bu seçimi aktivləşdirin. Bu funksiya aradan qaldıqda, rabitə düz mətndə (RAW). Bu xüsusilə TS3 server və Ranksystem müxtəlif maşınlarda işləyərkən təhlükəsizlik riski ola bilər.
Həmçinin əmin olun ki, Ranksystem-də dəyişdirilməli olan (ehtimal) TS3 Sorgu Portunu yoxladınız!
Diqqət: SSH şifrələmə daha çox CPU vaxtına və daha çox sistem resurslarına ehtiyac duyur. Buna görə TS3 server və Ranksystem eyni host / server (localhost / 127.0.0.1) üzərində çalışan bir RAW bağlantısı (əlil şifrələmə) istifadə etməyi məsləhət görürük. Fərqli hostlarda çalışırlarsa, şifrli əlaqəni aktivləşdirməlisiniz!
Tələblər:
1) TS3 Server versiyası 3.3.0 və ya yuxarıda.
2) PHP-nin PHP-SSH2 uzadılması lazımdır. Linux-da aşağıdakı komanda ilə yükləyə bilərsiniz: %s 3) Şifrələmə TS3 serverinizdə aktivləşdirilməlidir! Aşağıdakı parametrləri sizin daxilində aktivləşdirin 'ts3server.ini' və ehtiyaclarınız üçün fərdiləşdirin: %s TS3 server konfiqurasiyasını dəyişdikdən sonra TS3 serverinizin yenidən başlanması lazımdır.";
$lang['wits3host'] = "TS3 Host Ünvanı";
$lang['wits3hostdesc'] = "TeamSpeak 3 Server ünvanı (IP və DNS)";
+$lang['wits3pre'] = "Bot əmrindən önad";
+$lang['wits3predesc'] = "TeamSpeak serverində chat vasitəsi ilə Ranksystem botu ilə əlaqə qurmaq olar. Susmaya görə, bot əmrləri '!' işarəsi ilə qeyd edilir. Önad bot əmrlərinin böyük harf şəklində tanınması üçün istifadə olunur.
Bu önad başqa istənilən önad ilə əvəz edilə bilər. Bu, eyni əmrlər olan digər botların istifadə olunduğu halda tələb edilə bilər.
Misal üçün, susmaya görə bot əmrini aşağıdakı kimi görürsüz:
!help
Əgər önad '#' ilə əvəz edilirsə, əmr aşağıdakı kimi görünür:
#help
";
$lang['wits3qnm'] = "Bot adı";
$lang['wits3qnmdesc'] = "Adı, bununla birlikdə sorğu-əlaqə qurulacaq. You can name it free.";
$lang['wits3querpw'] = "TS3 Query-Şifrə";
diff --git a/languages/core_cz_Čeština_cz.php b/languages/core_cz_Čeština_cz.php
index d61135f..349d9b2 100644
--- a/languages/core_cz_Čeština_cz.php
+++ b/languages/core_cz_Čeština_cz.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achievement";
$lang['adduser'] = "Uživatel %s (unique Client-ID: %s; Client-database-ID %s) ještě není v databázi -> přidán do Ranksystem.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Povolit spuštění/zastavení Ranksystem Bot pomocí API";
+$lang['apipermdesc'] = "(ON = Povolit ; OFF = Zakázat)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Změnit heslo";
$lang['pass3'] = "Staré heslo";
$lang['pass4'] = "Nové heslo";
$lang['pass5'] = "Zapomenuté heslo?";
+$lang['permission'] = "Oprávnění";
$lang['privacy'] = "Zásady ochrany osobních údajů";
$lang['repeat'] = "Opakovat (obnovit)";
$lang['resettime'] = "Obnovení času online a nečinnosti uživatele% s (jedinečné ID klienta:% s; klientské databáze-ID% s) na nulu, což způsobilo, že uživatel byl odstraněn z výjimky.";
@@ -366,9 +369,10 @@ $lang['stri0023'] = "Stabilní od: 18/04/2016.";
$lang['stri0024'] = "%s za český překlad";
$lang['stri0025'] = "%s za polský překlad";
$lang['stri0026'] = "%s za španělský překlad";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0027'] = "%s pro maďarský překlad";
+$lang['stri0028'] = "%s pro ázerbájdžánský překlad";
+$lang['stri0029'] = "%s pro funkci Imprint";
+$lang['stri0030'] = "%s pro styl 'CosmicBlue' pro stránku statistik a webové rozhraní";
$lang['stta0001'] = "Od počátku věků";
$lang['sttm0001'] = "Tohoto měsíce";
$lang['sttw0001'] = "Nejlepší uživatelé";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "čas resetování";
$lang['wiexresdesc'] = "Existují tři režimy, jak zacházet s výjimkou. V každém případě je pozici (přiřazení serverové skupiny) zakázáno. Můžete si zvolit různé možnosti, jak by měl být vynaložen čas strávený od uživatele (který je vyloučen).
1) doba počítání (výchozí): Ve výchozím nastavení Ranksystem také počítá online / aktivní čas uživatelů, které jsou vyloučeny (klient / servergroup). S výjimkou je zakázána pouze pozice (přiřazení serverové skupiny). To znamená, že pokud uživatel není více vyloučen, bude mu přiřazen do skupiny v závislosti na jeho shromážděném čase (např. Úroveň 3).
2) čas přestávky: Na této volbě strávit čas online a nečinně zmrznout (zlomit) na skutečnou hodnotu (předtím, než je uživatel vyloučen). Po vynechání výjimky (po odebrání výjimky pro skupinu serverů nebo odebrání pravopisu výpovědi) se počítá 'počítání'.
3) čas vynulování: S touto funkcí se počítá doba online a nečinnosti bude v okamžiku, kdy již uživatel není vyloučen, vynulován (vynecháním výjimky skupiny serverů nebo odebráním pravidla výjimky). Týdenní výjimka by se stále počítala, dokud se neobnoví.
Výjimka z kanálu nezáleží na tom, protože čas bude vždy ignorován (jako je režim přerušení).";
$lang['wiexuid'] = "klientská výjimka";
$lang['wiexuiddesc'] = "Čárka odděluje seznam jedinečných identifikátorů klientů, které by se neměly týkat systému Ranks. Uživatel v tomto seznamu bude ignorován pro hodnocení.";
+$lang['wiexregrp'] = "odstranit skupinu";
+$lang['wiexregrpdesc'] = "Pokud je uživatel vyloučen ze systému Ranksystem, je odstraněna serverová skupina přidělená systémem Ranksystem.
Skupina bude odstraněna pouze s '".$lang['wiexres']."' s '".$lang['wiexres1']."'. V ostatních režimech serverová skupina nebude odstraněna.
Tato funkce je relevantní pouze v kombinaci s '".$lang['wiexuid']."' nebo '".$lang['wiexgrp']."' v kombinaci s '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Čas v sekundách";
$lang['wigrpt2'] = "Servergroup";
@@ -658,6 +664,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Definujte výchozí pořadí řazení pro stránku Seznam povýšení.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "vlastní styl";
+$lang['wistyledesc'] = "Definujte odlišný, uživatelem definovaný styl (Style) pro systém hodnocení. Tento styl bude použit pro stránku statistik a webové rozhraní.
Umístěte svůj vlastní styl do adresáře 'style' ve vlastním podsložce. Název podsložky určuje název stylu.
Styly začínající 'TSN_' jsou dodávány systémem hodnocení. Tyto budou aktualizovány v budoucích aktualizacích. V těchto by se tedy neměly provádět žádné úpravy! Nicméně mohou sloužit jako šablona. Zkopírujte styl do vlastní složky, abyste mohli provádět úpravy.
Jsou potřebné dvě soubory CSS. Jeden pro stránku statistik a druhý pro rozhraní webu. Může být také zahrnut vlastní JavaScript, ale to je volitelné.
Konvence názvů CSS:
- Fix 'ST.css' pro stránku statistik (/stats/) - Fix 'WI.css' pro stránku webového rozhraní (/webinterface/)
Konvence názvů pro JavaScript:
- Fix 'ST.js' pro stránku statistik (/stats/) - Fix 'WI.js' pro stránku webového rozhraní (/webinterface/)
Pokud byste chtěli svůj styl také poskytnout ostatním, můžete ho poslat na následující e-mail:
%s
S dalším vydáním ho vydáme!";
$lang['wisupidle'] = "time Mod";
$lang['wisupidledesc'] = "Existují dva režimy, protože může být započítán čas a může se použít pro zvýšení počtu bodů.
1) online čas: Zde je zohledněna čistá doba online uživatele (viz sloupec 'Součet online času 'v' stats / list_rankup.php ')
2) aktivní čas: bude odečten z online času uživatele, neaktivního času (nečinnosti) (viz sloupec' součet aktivního času 'v 'stats / list_rankup.php').
Změna režimu s již delší běžící databází se nedoporučuje, ale může fungovat.";
$lang['wisvconf'] = "uložit";
@@ -674,6 +682,8 @@ $lang['wits3encrypt'] = "TS3 Query šifrování";
$lang['wits3encryptdesc'] = "Aktivováním této volby se zapne šifrovaná komunikace mezi Ranky systémem a TeamSpeak 3 serverem, nebo-li použije se SSH komunikace. Pokud je tato volba vypnuta, komuniakce probíhá nešifrovaně - v plain textu, nebo-li prostřednictvím RAW komunikace - tato komunikace je potencionálně nebezpečná, pokud TS3 server a Rank systém běží každý na jiném serveru a jsou propojeni přes interent.
Nezapomeňte zkontrolovat a nastavit správný TS3 Query Port, který je pro komuniaci použit!
Upozornění: Šifrovaná SSH komunikace potřebuje více výkonu CPU, než nešifrovaná RAW komunikace. Pokud není z důvodu bezpečnosti nutné použit SSH komunikaci (TS3 server a Ranksystem běží na stejném serveru nebo jsou propojeny výhradně lokální sítí), doporučujeme použít RAW komunikaci. Pokud jsou však propojeny např. přes interent, doporučujeme použít výhradně SSH komunikaci!
Požadavky:
1) TS3 Server version 3.3.0 a novější.
2) Rozšíření PHP o PHP-SSH2 modul, pokud je to nutné. Na Linuxu lze provést instaalci například příkazy: %s 3) SSH musí být konfigurováno i na straně TS3 serveru! Aktivovat SSH lze přidáním nebo úpravou níže uvedených paramterů v souboru 'ts3server.ini': %s Po provedení úpravy konfigurace TS3 serveru je nutné TS3 server restartovat!";
$lang['wits3host'] = "TS3 Hostaddress";
$lang['wits3hostdesc'] = "TeamSpeak 3 adresa serveru (IP oder DNS)";
+$lang['wits3pre'] = "Předpona příkazu botu";
+$lang['wits3predesc'] = "Na serveru TeamSpeak můžete komunikovat s botem Ranksystem pomocí chatu. Ve výchozím nastavení jsou příkazy pro bota označeny vykřičníkem '!'. Předpona se používá k identifikaci příkazů pro bota jako takových.
Tuto předponu lze nahradit libovolnou jinou požadovanou předponou. To může být nezbytné v případě používání jiných botů s podobnými příkazy.
Například výchozí příkaz pro bota by vypadal takto:
!help
Pokud je předpona nahrazena znakem '#', příkaz by vypadal takto:
#help
";
$lang['wits3qnm'] = "Název Bota";
$lang['wits3qnmdesc'] = "Název, s tím spojením dotazu bude vytvořen. Můžete jej pojmenovat zdarma.";
$lang['wits3querpw'] = "TS3 Query-Password";
diff --git a/languages/core_de_Deutsch_de.php b/languages/core_de_Deutsch_de.php
index 0b0d6dc..bd1874f 100644
--- a/languages/core_de_Deutsch_de.php
+++ b/languages/core_de_Deutsch_de.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Errungenschaft";
$lang['adduser'] = "User %s (eindeutige Client-ID: %s; Client-Datenbank-ID: %s) ist bisher unbekannt -> wurde nun zum Ranksystem hinzugefügt.";
$lang['api'] = "API";
$lang['apikey'] = "API Schlüssel";
+$lang['apiperm001'] = "Erlaube den Ranksystem Bot via API zu starten/stoppen";
+$lang['apipermdesc'] = "(ON = erlaubt ; OFF = verboten)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Wähle einen Channel, in dem die Channel-Beschreibung gesetzt werden soll.";
$lang['addonchdesc'] = "Channel Beschreibung";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Passwort ändern";
$lang['pass3'] = "altes Passwort";
$lang['pass4'] = "neues Passwort";
$lang['pass5'] = "Passwort vergessen?";
+$lang['permission'] = "Berechtigungen";
$lang['privacy'] = "Datenschutzerklärung";
$lang['repeat'] = "wiederholen";
$lang['resettime'] = "Setze die online und aktive Zeit des Benutzers %s (eindeutige Client-ID: %s; Client-Datenbank-ID: %s) auf Null zurück, da er aus der Ausnahme entfernt wurde.";
@@ -205,8 +208,8 @@ $lang['stag0016'] = "Verifizierung benötigt!";
$lang['stag0017'] = "Verifiziere dich hier..";
$lang['stag0018'] = "Eine Liste der ausgeschlossenen Servergruppen. Wenn ein User eine dieser Servergruppen besitzt, kann er das Add-on nicht verwenden.";
$lang['stag0019'] = "Du bist von dieser Funktion ausgeschlossen, da du die Servergruppe '%s' (ID: %s) besitzt.";
-$lang['stag0020'] = "Title";
-$lang['stag0021'] = "Geben einen Titel für diese Gruppe ein. Der Titel wird auch auf der Statistikseite angezeigt.";
+$lang['stag0020'] = "Titel";
+$lang['stag0021'] = "Gebe einen Titel für diese Gruppe ein. Der Titel wird auch auf der Statistikseite angezeigt.";
$lang['stix0001'] = "Server Statistiken";
$lang['stix0002'] = "Anzahl User";
$lang['stix0003'] = "zeige Liste aller User";
@@ -369,6 +372,7 @@ $lang['stri0026'] = "%s für die spanische Übersetzung";
$lang['stri0027'] = "%s für die ungarische Übersetzung";
$lang['stri0028'] = "%s für die aserbaidschanische Übersetzung";
$lang['stri0029'] = "%s für die Impressums-Funktion";
+$lang['stri0030'] = "%s für den 'CosmicBlue'-Stil für die Statistik-Seite und das Webinterface";
$lang['stta0001'] = "aller Zeiten";
$lang['sttm0001'] = "des Monats";
$lang['sttw0001'] = "Top User";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "Zeit zurücksetzen";
$lang['wiexresdesc'] = "Es gibt drei Möglichkeiten wie mit den Ausnahmen umgegangen werden kann. In jedem Fall wird die Rangsteigerung deaktiviert (Vergabe der Servergruppe). Als verschiedene Modi kann ausgewählt werden, wie die auf dem Server verbrachte Zeit von Usern (welche ausgeschlossen sind) behandelt werden soll.
1) bewerte Zeit (Standard): Im Standard wertet das Ranksystem auch die online/aktive Zeit von Usern, welche vom Ranksystem ausgeschlossen sind (Client-/Servergruppenausnahme). Mit Ausschluss aus dem Ranksystem ist nur das Setzen des Rangs (Servergruppe) deaktiviert. Das heißt, wenn ein User nicht mehr ausgeschlossen ist, würde er einer Servergruppe abhängig seiner gesammelten Zeit (z.B. Level 3) zugeordnet.
2) pausiere Zeit: Bei dieser Option wird die online/aktive Zeit eingefroren (pausiert) in dem Moment, in dem der User ausgeschlossen wird. Nach Rücknahme der Ausnahme (entfernen der ausgeschlossenen Servergruppe oder entfernen der Ausnahmeregel) läuft die online/aktive Zeit weiter.
3) Zeit zurücksetzen: Mit dieser Funktion wird die gesammelte online/aktive Zeit in dem Moment auf Null zurückgesetzt, in dem der User nicht mehr ausgeschlossen ist (durch Entfernen der ausgeschlossenen Servergruppe oder entfernen der Ausnahmeregel). Die auf dem Server verbrachte Zeit wird hierbei zunächst weiterhin gewertet bis der Reset erfolgt.
Die Channel-Ausnahmen spielen hier keine Rolle, da diese Zeit immer ignoriert wird (entspricht dem Modus pausiere Zeit).";
$lang['wiexuid'] = "Client-Ausnahmen";
$lang['wiexuiddesc'] = "Eine mit Komma getrennte Liste von eindeutigen Client-IDs, welche nicht am Ranksystem teilnehmen sollen.
Aufgelistete User sind von Rangsteigerungen ausgenommen.";
+$lang['wiexregrp'] = "entferne Gruppe";
+$lang['wiexregrpdesc'] = "Wenn ein User vom Ranksystem ausgeschlossen wird, so wird hiermit die vom Ranksystem vergebene Servergruppe entfernt.
Die Gruppe wird nur mit dem '".$lang['wiexres']."' mit '".$lang['wiexres1']."' entfernt. Bei allen anderen Modi wird die Servergruppe nicht entfernt.
Diese Funktion hat also nur Relevanz bei einer Client-Ausnahme oder Servergruppen-Ausnahme in Verbindung mit '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Modus";
$lang['wigrpt1'] = "Zeit in Sekunden";
$lang['wigrpt2'] = "Servergruppe";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "Dadurch wird die Reihenfolge für die Sortierung der
$lang['wishsortdesc'] = "Definiere die Standard-Sortierreihenfolge für die Seite Rank-Liste.";
$lang['wistcodesc'] = "Definiere eine erforderliche Anzahl an Server-Verbindungen, welche zum Erreichen der Errungenschaft benötigt wird.";
$lang['wisttidesc'] = "Definiere eine erforderliche Zeit (in Stunden), welche zum Erreichen der Errungenschaft benötigt wird.";
+$lang['wistyle'] = "abweichender Stil";
+$lang['wistyledesc'] = "Definiere einen abweichenden, benutzerdefinierten Stil (Style) für das Ranksystem. Dieser Stil wird für die Statistik-Seite und das Webinterface verwendet.
Platziere den eigenen Stil im Verzeichnis 'style' in einem eigenen Unterverzeichnis. Der Name des Unterverzeichnis bestimmt den Namen des Stils.
Stile beginnend mit 'TSN_' werden durch das Ranksystem ausgeliefert. Diese werden durch künftige Updates aktualisiert. In diesen sollten also keine Anpassungen vorgenommen werden! Allerdings können diese als Vorlage dienen. Kopiere den Stil in ein eigenes Verzeichnis, um darin dann Anpassungen vorzunehmen.
Es sind zwei CSS Dateien erforderlich. Eine für die Statistik-Seite und eine für das Webinterface. Es kann auch ein eigenes JavaScript eingebunden werden. Dies ist aber optional.
Namenskonvention der CSS:
- Fix 'ST.css' für die Statistik-Seite (/stats/) - Fix 'WI.css' für die Webinterface-Seite (/webinterface/)
Namenskonvention für JavaScript:
- Fix 'ST.js' für die Statistik-Seite (/stats/) - Fix 'WI.js' für die Webinterface-Seite (/webinterface/)
Wenn du deinen Stil auch gerne anderen zur Verfügung stellen möchtest, kannst du diesen an die folgende E-Mail-Adresse senden:
%s
Wir werden ihn mit dem nächsten Release ausliefern!";
$lang['wisupidle'] = "Zeit-Modus";
$lang['wisupidledesc'] = "Es gibt zwei Ausprägungen, wie Zeiten eines Users gewertet werden.
1) online Zeit: Servergruppen werden für online Zeit vergeben. In diesem Fall wird die aktive und inaktive Zeit gewertet. (siehe Spalte 'ges. online Zeit' in der stats/list_rankup.php)
2) aktive Zeit: Servergruppen werden für aktive Zeit vergeben. In diesem Fall wird die inakive Zeite nicht gewertet. Die online Zeit eines Users wird also um die inaktive Zeit (=Idle) bereinigt, um die aktive Zeit zu erhalten. (siehe Spalte 'ges. aktive Zeit' in der stats/list_rankup.php)
Eine Umstellung des 'Zeit-Modus', auch bei bereits länger laufenden Datenbanken, sollte kein Problem darstellen, da das Ranksystem falsche Servergruppen eines Clients bereinigt.";
$lang['wisvconf'] = "speichern";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query Verschlüsselung";
$lang['wits3encryptdesc'] = "Aktiviere diese Option, um die Kommunikation zwischen dem Ranksystem-Bot und dem TeamSpeak 3 Server zu verschlüsseln (SSH). Ist diese Funktion deaktiviert, so erfolgt die Kommunikation unverschlüsselt (RAW). Das könnte ein Sicherheitsrisiko darstellen, insbesondere, wenn der TS3 Server und das Ranksystem auf unterschiedlichen Maschinen betrieben wird.
Es ist auch sicherzustellen, dass der richtige TS3 ServerQuery Port passend zu dieser Funktion hinterlegt wird!
Achtung: Die SSH-Verschlüsselung benötigt mehr CPU und damit mehr System Ressourcen. Das ist der Grund, warum wir empfehlen die RAW Verbindung zu verwenden, wenn der TS3 Server und das Ranksystem auf der gleichen Maschine laufen (localhost / 127.0.0.1). Laufen sie jedoch auf getrennten Maschinen, sollte die SSH Verschlüsselung für die Verbindung aktiviert werden
Voraussetzungen:
1) TS3 Server Version 3.3.0 oder höher.
2) Die PHP Erweiterung (Extension) PHP-SSH2 wird benötigt. Unter Linux kann sie wie folgt installiert werden: %s 3) Die Verschlüsselung (SSH) muss innerhalb des TS3 Servers zuvor aktiviert werden! Aktiviere die folgenden Parameter in der 'ts3server.ini' und passe diese nach Bedarf an: %s Nach Änderung der TS3 Server Konfiguration ist ein Neustart dessen erforderlich.";
$lang['wits3host'] = "TS3 Host-Adresse";
$lang['wits3hostdesc'] = "TeamSpeak 3 Server Adresse (IP oder DNS)";
+$lang['wits3pre'] = "Prefix Bot-command";
+$lang['wits3predesc'] = "Auf dem TeamSpeak Server kann mit dem Ranksystem Bot über den Chat kommuniziert werden. Im Standard werden Bot Commands durch ein führendes Ausrufezeichen '!' gekennzeichnet. Über diese Prefix erkennt der Bot entsprechende Befehle als solche.
Hier kann die Prefix durch eine beliebig andere ausgetauscht werden. Das kann notwendig werden, wenn andere Bots mit gleichen Befehlen genutzt werden.
Im Default ist Bot-Command z.B.
!help
Wird die Prefix beispielsweise durch '#' ersetzt, sieht der Command wie folgt aus:
#help
";
$lang['wits3qnm'] = "Bot-Nickname";
$lang['wits3qnmdesc'] = "Der Nickname, mit welchem die TS3 ServerQuery Verbindung aufgebaut werden soll.
Der Nickname kann frei gewählt werden!
Der gewählte Nickname wir im Channel-Baum angezeigt, wenn man ServerQuery-Benutzer sehen kann (Admin-Rechte nötig) und wird auch als Anzeigename für Chat-Nachrichten verwendet.";
$lang['wits3querpw'] = "TS3 Query-Passwort";
diff --git a/languages/core_en_english_gb.php b/languages/core_en_english_gb.php
index 2bc0527..0a8834f 100644
--- a/languages/core_en_english_gb.php
+++ b/languages/core_en_english_gb.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achieve";
$lang['adduser'] = "Added new user %s (unique Client-ID: %s; Client-database-ID %s) to the Ranksystem database.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Allow to start/stop the Ranksystem Bot via API";
+$lang['apipermdesc'] = "(ON = Allow ; OFF = Deny)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Change password";
$lang['pass3'] = "old password";
$lang['pass4'] = "new password";
$lang['pass5'] = "Forgot password?";
+$lang['permission'] = "Permissions";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "repeat";
$lang['resettime'] = "Reset the online and idle time of user %s (unique Client-ID: %s; Client-database-ID %s) to zero, cause user got removed out of an exception (servergroup or client exception).";
@@ -369,6 +372,7 @@ $lang['stri0026'] = "%s for spanish translation";
$lang['stri0027'] = "%s for hungarian translation";
$lang['stri0028'] = "%s for azerbaijan translation";
$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0030'] = "%s for the CosmicBlue style for the statistics page and the webinterface";
$lang['stta0001'] = "Of all time";
$lang['sttm0001'] = "Of the month";
$lang['sttw0001'] = "Top users";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "reset time";
$lang['wiexresdesc'] = "There are three modes, how to handle an exception. In every case the rank up is disabled (no assigning of servergroups). You can choose different options how the spended time from a user (which is excepted) should be handled.
1) count time (default): By default the Ranksystem also count the online/active time of users, which are excepted (by client/servergroup exception). With an exception only the rank up is disabled. That means if a user is not any more excepted, he would be assigned to the group depending his collected time (e.g. level 3).
2) break time: On this option the spend online and idle time will be frozen (break) to the current value (before the user got excepted). After the exception reason has been removed (after removing the excepted servergroup or remove the expection rule), the 'counting' of online/active time continues to run.
3) reset time: With this function the counted online and idle time will be resetting to zero at the moment the user are not any more excepted (due removing the excepted servergroup or remove the exception rule). The spent time due exception will be still counting till it got reset.
The channel exception doesn't matter in any case, cause the time will always be ignored (like the mode break time).";
$lang['wiexuid'] = "client exception";
$lang['wiexuiddesc'] = "A comma separated list of unique Client-IDs, which should not consider for the Ranksystem. The user in this list will be ignored for the rank up.";
+$lang['wiexregrp'] = "remove group";
+$lang['wiexregrpdesc'] = "If a user is excluded from the Ranksystem, the server group assigned by the Ranksystem will be removed.
The group will only be removed with the '".$lang['wiexres']."' with '".$lang['wiexres1']."'. In all other modes, the server group will not be removed.
This function is only relevant in combination with a '".$lang['wiexuid']."' or '".$lang['wiexgrp']."' in conjunction with '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Define the default sorting order for the List Rankup page.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "custom style";
+$lang['wistyledesc'] = "Define a custom style for the Ranksystem that deviates from the default. This style will be used for the statistics page and the webinterface.
Place your own style in the 'style' directory in its own subdirectory. The name of the subdirectory determines the name of the style.
Styles beginning with 'TSN_' are delivered by the Ranksystem itself. These will be updated by future releases. So, no adjustments should be made in these! However, these can be used as templates. Copy the style into its own directory to make adjustments there.
Two CSS files are required. One for the statistics page and one for the webinterface. A custom JavaScript can also be included. However, this is optional.
Convention of the names of CSS:
- Fixed 'ST.css' for the statistics page (/stats/) - Fixed 'WI.css' for the webinterface page (/webinterface/)
Convention of names of the JavaScript:
- Fixed 'ST.js' for the statistics page (/stats/) - Fixed 'WI.js' for the web interface page (/webinterface/)
If you would also like to make your style available to others, you can send it to the following email address:
%s
We will deliver it with the next release!";
$lang['wisupidle'] = "time mode";
$lang['wisupidledesc'] = "There are two modes, how the time of a user will be rated.
1) online time: Servergroups will be given by online time. In this case the active and the inactive time will be rated. (see column 'sum. online time' in the 'stats/list_rankup.php')
2) active time: Servergroups will be given by active time. In this case the inactive time will not be rated. The online time will be taken and reduced by the inactive time (=idle) to build the active time. (see column 'sum. active time' in the 'stats/list_rankup.php')
A change of the 'time mode', also on longer running Ranksystem instances, should be no problem since the Ranksystem repairs wrong servergroups on a client.";
$lang['wisvconf'] = "save";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH). When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.
Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!
Attention: The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same host / server (localhost / 127.0.0.1). If they are running on separate hosts, you should activate the encrypted connection!
Requirements:
1) TS3 Server version 3.3.0 or above.
2) The PHP extension PHP-SSH2 is necessary. On Linux you can it install with the following command: %s 3) The encryption needs to be enabled on your TS3 server! Activate the following parameters inside your 'ts3server.ini' and customize it for your needs: %s After changing your TS3 server configurations a restart of your TS3 server is necessary.";
$lang['wits3host'] = "TS3 Hostaddress";
$lang['wits3hostdesc'] = "TeamSpeak 3 Server address (IP oder DNS)
Should be the (IP) address of the host system of the TS Server.
When the Ranksystem and the TS Server are running on the same host machine, we recommend to use '127.0.0.1' or 'localhost'.";
+$lang['wits3pre'] = "Prefix Bot-command";
+$lang['wits3predesc'] = "On the TeamSpeak server you can communicate with the Ranksystem bot via chat. By default, bot commands are marked with a leading exclamation point '!'. The prefix is used to identify commands for the bot as such.
This prefix can be replaced with any other desired prefix. This may be necessary if other bots with similar commands are being used.
For example, the default bot command would be:
!help
If the prefix is replaced with '#', the command would look like this:
#help
";
$lang['wits3qnm'] = "Bot name";
$lang['wits3qnmdesc'] = "The name, with this the query-connection will be established. You can name it free.";
$lang['wits3querpw'] = "TS3 Query-Password";
diff --git a/languages/core_es_español_es.php b/languages/core_es_español_es.php
index aa8ccfd..1cfd8ee 100644
--- a/languages/core_es_español_es.php
+++ b/languages/core_es_español_es.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achievement";
$lang['adduser'] = "Usuario %s (ID de cliente unico: %s; ID de base de datos del cliente %s) es desconocida -> agregada a Ranksystem ahora.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Permitir iniciar/detener el bot de Ranksystem a través de API";
+$lang['apipermdesc'] = "(ON = Permitir ; OFF = Denegar)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Cambiar contraseña";
$lang['pass3'] = "Antigua contraseña";
$lang['pass4'] = "Nueva contraseña";
$lang['pass5'] = "¿Se te olvidó tu contraseña?";
+$lang['permission'] = "Permisos";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "repetir";
$lang['resettime'] = "Restablecer el tiempo en línea y inactivo del usuario %s (ID de cliente unica: %s; ID de cliente en base de datos %s) a cero, causa que el usuario sea eliminado de la excepción.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s para traducción al portugués";
$lang['stri0021'] = "%s por la gran ayuda en GitHub y nuestro servidor público, compartiendo sus ideas, pre-probando toda esa mierda y mucho más";
$lang['stri0022'] = "%s para compartir sus ideas y pruebas previas";
$lang['stri0023'] = "Estable desde: 18/04/2016.";
-$lang['stri0024'] = "%s para traducción al checo";
-$lang['stri0025'] = "%s para la traducción polaca";
-$lang['stri0026'] = "%s para la traducción al español";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s para traducción checa";
+$lang['stri0025'] = "%s para traducción polaca";
+$lang['stri0026'] = "%s para traducción española";
+$lang['stri0027'] = "%s para traducción húngara";
+$lang['stri0028'] = "%s para traducción azerbaiyana";
+$lang['stri0029'] = "%s para la función de impresión";
+$lang['stri0030'] = "%s para el estilo 'CosmicBlue' para la página de estadísticas y la interfaz web";
$lang['stta0001'] = "De todos los tiempos";
$lang['sttm0001'] = "Del mes";
$lang['sttw0001'] = "Usuarios principales";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "restablecer el tiempo";
$lang['wiexresdesc'] = "Hay tres modos, cómo manejar una excepción. En todos los casos, el ranking está desactivado (no se asignan grupos de servidores). Puede elegir diferentes opciones para manejar el tiempo dedicado de un usuario (que está exceptuado).
1) contar tiempo (predeterminado): Por defecto, Ranksystem también cuenta el tiempo en línea / activo de los usuarios, que están exceptuados (por excepción de cliente / grupo de servidores). Con una excepción, solo el rango arriba está deshabilitado. Eso significa que si un usuario no está más exceptuado, se le asignaría al grupo según su tiempo acumulado (por ejemplo, nivel 3)..
2) descanso: En esta opción, el gasto en línea y el tiempo de inactividad se congelarán (romperán) en el valor real (antes de que el usuario sea exceptuado). Después de perder el motivo exceptuado (después de eliminar el grupo de servidores exceptuado o eliminar la regla de expection) el 'conteo' continuará.
3) restablecer el tiempo: Con esta función, el tiempo en línea y el tiempo de inactividad contados se restablecerán a cero en el momento en que el usuario ya no esté más exceptuado (debido a que se eliminará el grupo de servidores exceptuado o se eliminará la regla de excepción). La excepción de tiempo gastado seguirá contando hasta que se restablezca.
las excepciónes de canal no importa en ningún caso, porque siempre se ignorará el tiempo (como el tiempo de interrupción del modo).";
$lang['wiexuid'] = "excepción de cliente";
$lang['wiexuiddesc'] = "Una lista separada por comas de identificadores de cliente únicos, que no deberían tenerse en cuenta para Ranksystem. El usuario en esta lista será ignorado por el para subir de rango.";
+$lang['wiexregrp'] = "eliminar grupo";
+$lang['wiexregrpdesc'] = "Si un usuario es excluido del Ranksystem, se eliminará el grupo de servidor asignado por el Ranksystem.
El grupo solo se eliminará con el '".$lang['wiexres']."' con el '".$lang['wiexres1']."'. En todos los demás modos, el grupo de servidor no se eliminará.
Esta función sólo es relevante en combinación con un '".$lang['wiexuid']."' o un '".$lang['wiexgrp']."' en combinación con el '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -657,7 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Define the default sorting order for the List Rankup page.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
-$lang['wisupidle'] = "time Modo";
+$lang['wistyle'] = "estilo personalizado";
+$lang['wistyledesc'] = "Define un estilo personalizado diferente para el sistema de rangos. Este estilo se utilizará para la página de estadísticas y la interfaz web.
Coloca tu estilo en el directorio 'style' en un subdirectorio propio. El nombre del subdirectorio determina el nombre del estilo.
Los estilos que comienzan con 'TSN_' son proporcionados por el sistema de rangos. Estos se actualizarán con futuras actualizaciones. ¡Por lo tanto, no se deben hacer ajustes en ellos! Sin embargo, pueden servir como plantilla. Copia el estilo en un directorio propio para hacer ajustes en él.
Se requieren dos archivos CSS. Uno para la página de estadísticas y otro para la interfaz web. También se puede incluir un JavaScript personalizado, pero esto es opcional.
Convención de nombres de CSS:
- Fijar 'ST.css' para la página de estadísticas (/stats/) - Fijar 'WI.css' para la página de interfaz web (/webinterface/)
Convención de nombres para JavaScript:
- Fijar 'ST.js' para la página de estadísticas (/stats/)
Fijar 'WI.js' para la página de interfaz web (/webinterface/)
Si desea compartir su estilo con otros, puede enviarlo a la siguiente dirección de correo electrónico:
%s
¡Lo incluiremos en la próxima versión!";
$lang['wisupidledesc'] = "Hay dos modos, cómo se puede contar el tiempo.
1) tiempo en línea: Aquí se tiene en cuenta el tiempo puro en línea del usuario (ver columna 'sum. online time' en el 'stats/list_rankup.php')
2) tiempo activo: Aquí se deducirá el tiempo inactivo (inactivo) del tiempo en línea de un usuario y solo cuenta el tiempo activo (see column 'sum. active time' en el 'stats/list_rankup.php').
No se recomienda un cambio de modo con un Ranksystem que ya se está ejecutando, pero debería funcionar sin mayores problemas. Cada usuario individual será reparado al menos con el siguiente ranking.";
$lang['wisvconf'] = "guardar";
$lang['wisvinfo1'] = "¡¡Atención!! Al cambiar el modo de hash de la dirección IP de los usuarios, es necesario que el usuario se conecte de nuevo al servidor TS3 o que el usuario no pueda sincronizarse con la página de estadísticas.";
@@ -673,6 +680,8 @@ $lang['wits3encrypt'] = "Cifrado de consulta TS3";
$lang['wits3encryptdesc'] = "Active esta opción para encriptar la comunicación entre el Ranksystem y el servidor TeamSpeak 3 (SSH). Cuando esta función está desactivada, la comunicación se realizará en texto sin formato (RAW). Esto podría ser un riesgo de seguridad, especialmente cuando el servidor TS3 y el sistema de rangos se ejecutan en diferentes máquinas.
¡También esté seguro de que ha comprobado el puerto de consulta TS3, que necesita (quizás) cambiarse en Ranksystem!!
Atención: Atención El cifrado SSH necesita más tiempo de CPU y con esto realmente más recursos del sistema. Es por eso que recomendamos utilizar una conexión RAW (cifrado desactivado) si el servidor TS3 y Ranksystem se están ejecutando en la misma máquina / servidor (localhost / 127.0.0.1). Si se están ejecutando en máquinas separadas, ¡debe activar la conexión cifrada!
Requisitos:
1) TS3 Server versión 3.3.0 o superior.
2) La extensión PHP PHP-SSH2 es necesaria. En Linux puede instalarlo con el siguiente comando: %s 3) ¡La encriptación debe estar habilitada en su servidor TS3! Active los siguientes parámetros dentro de su 'ts3server.ini' y personalícelo según sus necesidades: %s Después de cambiar las configuraciones de su servidor TS3, es necesario reiniciar su servidor TS3..";
$lang['wits3host'] = "Dirección de host TS3";
$lang['wits3hostdesc'] = "Dirección del servidor TeamSpeak 3 (IP o el DNS)";
+$lang['wits3pre'] = "Prefijo de comando de bot";
+$lang['wits3predesc'] = "En el servidor de TeamSpeak puedes comunicarte con el bot Ranksystem a través del chat. Por defecto, los comandos del bot están marcados con un signo de exclamación '!'. Se usa el prefijo para identificar los comandos del bot como tal.
Este prefijo se puede reemplazar por cualquier otro prefijo deseado. Esto puede ser necesario si se están utilizando otros bots con comandos similares.
Por ejemplo, el comando predeterminado del bot sería:
!help
Si se reemplaza el prefijo con '#', el comando se vería así:
#help
";
$lang['wits3qnm'] = "Nombre del Bot";
$lang['wits3qnmdesc'] = "El nombre, con esto el query-connection se establecerá. Puede nombrarlo gratis.";
$lang['wits3querpw'] = "TS3 Query-Password";
diff --git a/languages/core_fr_français_fr.php b/languages/core_fr_français_fr.php
index 280e5ef..e5d1a47 100644
--- a/languages/core_fr_français_fr.php
+++ b/languages/core_fr_français_fr.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achievement";
$lang['adduser'] = "L'utilisateur %s (Identifiant unique: %s; ID dans la base de donnée: %s) est inconnu -> Il vient d'être ajouté dans le Ranksystem.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Autoriser le démarrage/l'arrêt du Ranksystem Bot via API";
+$lang['apipermdesc'] = "(ON = Autoriser ; OFF = Refuser)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Changer le mot de passe";
$lang['pass3'] = "Ancien mot de passe";
$lang['pass4'] = "Nouveau mot de passe";
$lang['pass5'] = "Mot de passe oublié ?";
+$lang['permission'] = "Autorisations";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "Répéter";
$lang['resettime'] = "Réinitialiser le temps d'inactivité et d'inactivité de l'utilisateur %s (Identifiant unique: %s; ID dans la base de donnée %s) à zéro, parce que l'utilisateur a été supprimé de l'exception.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s for portuguese translation";
$lang['stri0021'] = "%s for the great support on GitHub & our public server, sharing his ideas, pre-testing all that shit & much more";
$lang['stri0022'] = "%s for sharing their ideas & pre-testing";
$lang['stri0023'] = "Stable since: 18/04/2016.";
-$lang['stri0024'] = "%s for czech translation";
-$lang['stri0025'] = "%s for polish translation";
-$lang['stri0026'] = "%s for spanish translation";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s pour la traduction tchèque";
+$lang['stri0025'] = "%s pour la traduction polonaise";
+$lang['stri0026'] = "%s pour la traduction espagnole";
+$lang['stri0027'] = "%s pour la traduction hongroise";
+$lang['stri0028'] = "%s pour la traduction azérie";
+$lang['stri0029'] = "%s pour la fonction d'empreinte";
+$lang['stri0030'] = "%s pour le style 'CosmicBlue' pour la page des statistiques et l'interface web";
$lang['stta0001'] = "De tous les temps";
$lang['sttm0001'] = "Du mois";
$lang['sttw0001'] = "Top des utilisateurs";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "Temps de réinitialisation";
$lang['wiexresdesc'] = "Il existe trois modes, comment gérer une exception. Dans tous les cas, le classement en haut (assign server group) est désactivé. Vous pouvez choisir différentes options comment ils passent le temps d'un utilisateur (qui est accepté) devrait être manipulé.
1) Temps de comptage (Défaut): Par défaut, le système de classement compte également la durée en ligne / active des utilisateurs, qui sont acceptés (groupe client / serveur). Avec une exception, seul le rang supérieur (assign servergroup) est désactivé. Cela signifie que si un utilisateur n'est plus exclu, il serait assigné au groupe en fonction de son temps collecté (par exemple niveau 3).
2) Temps de pause: Sur cette option, la durée de dépensement en ligne et le temps d'inactivité seront gelés (pause) à la valeur réelle (avant que l'utilisateur ne soit exclu). Après une exception, le (après avoir supprimé le groupe de service excepté ou supprimé la règle d'exception) 'comptage' va continuer.
3) Temps de réinitialisation: Avec cette fonction, le temps compté en ligne et le temps d'inactivité seront réinitialisés à zéro au moment où l'utilisateur n'est plus exclu (en supprimant le groupe de serveurs excepté ou en supprimant la règle d'exception). Le temps de dépenser exception due serait encore compter jusqu'à ce qu'il a été réinitialisé.
L'exception de canal n'a pas d'importance ici, car le temps sera toujours ignoré (comme le mode de pause).";
$lang['wiexuid'] = "Exception d'un client";
$lang['wiexuiddesc'] = "Des virgules séparent une liste d'indentifiant unique de client, qui ne doivent pas être prise en considération pour le système de rang (Ranksystem). Les utilisateurs de cette liste seront ignorés pour le classement.";
+$lang['wiexregrp'] = "supprimer le groupe";
+$lang['wiexregrpdesc'] = "Si un utilisateur est exclu du Ranksystem, le groupe de serveur attribué par le Ranksystem sera supprimé.
Le groupe ne sera supprimé qu'avec le '".$lang['wiexres']."' avec le '".$lang['wiexres1']."'. Dans tous les autres modes, le groupe de serveur ne sera pas supprimé.
Cette fonction n'est pertinente que lorsqu'elle est utilisée en combinaison avec un '".$lang['wiexuid']."' ou un '".$lang['wiexgrp']."' en combinaison avec le '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -655,6 +661,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Define the default sorting order for the List Rankup page.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "style personnalisé";
+$lang['wistyledesc'] = "Définissez un style personnalisé pour le système de classement. Ce style sera utilisé pour la page de statistiques et l'interface web.
Placez votre propre style dans le répertoire 'style' dans un sous-répertoire. Le nom du sous-répertoire détermine le nom du style.
Les styles commençant par 'TSN_' sont fournis par le système de classement. Ces styles seront mis à jour lors des mises à jour futures. Il ne devrait donc pas y avoir de modifications apportées à ces styles! Cependant, ils peuvent servir de modèle. Copiez le style dans un répertoire distinct pour y apporter des modifications.
Deux fichiers CSS sont nécessaires. Un pour la page de statistiques et un pour l'interface web. Il est également possible d'inclure un JavaScript personnalisé. Cependant, ceci est facultatif.
Convention de nommage pour CSS:
- Fixer 'ST.css' pour la page de statistiques (/stats/) - Fixer 'WI.css' pour la page de l'interface web (/webinterface/)
Convention de nommage pour JavaScript:
- Fixer 'ST.js' pour la page de statistiques (/stats/) - Fixer 'WI.js' pour la page de l'interface web (/webinterface/)
Si vous souhaitez partager votre style avec d'autres, vous pouvez l'envoyer à cette adresse e-mail:
%s
Nous le fournirons avec la prochaine version!";
$lang['wisupidle'] = "time Mode";
$lang['wisupidledesc'] = "Il y a deux modes, comme le temps peut être compté et peut ensuite demander une augmentation de rang.
1) Temps en ligne: Ici, le temps en ligne pur de l'utilisateur est pris en compte (Voir la colonne 'Temps en ligne ' dans la page 'stats/list_rankup.php')
2) Temps actif: Ceci sera déduit de l'heure en ligne d'un utilisateur, le temps inactif (inactif) (voir la colonne 'Temps actif' dans la page 'stats/list_rankup.php').
Un changement de mode avec une base de données déjà utilisée n'est pas recommandé, mais ça peut fonctionner.";
$lang['wisvconf'] = "Sauvegarder";
@@ -671,6 +679,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH). When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.
Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!
Attention: The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!
Requirements:
1) TS3 Server version 3.3.0 or above.
2) The PHP extension PHP-SSH2 is necessary. On Linux you can it install with the following command: %s 3) The encryption needs to be enabled on your TS3 server! Activate the following parameters inside your 'ts3server.ini' and customize it for your needs: %s After changing your TS3 server configurations a restart of your TS3 server is necessary.";
$lang['wits3host'] = "Adresse de l'hôte TS3";
$lang['wits3hostdesc'] = "Adresse du serveur TeamSpeak 3 (IP ou DNS)";
+$lang['wits3pre'] = "Préfixe de la commande du bot";
+$lang['wits3predesc'] = "Sur le serveur TeamSpeak, vous pouvez communiquer avec le bot Ranksystem via la chat. Par défaut, les commandes du bot sont marquées d'un point d'exclamation '!'. Le préfixe est utilisé pour identifier les commandes pour le bot en tant que tel.
Ce préfixe peut être remplacé par n'importe quel autre préfixe souhaité. Cela peut être nécessaire si d'autres bots avec des commandes similaires sont utilisés.
Par exemple, la commande par défaut du bot ressemblerait à ceci:
!help
Si le préfixe est remplacé par '#', la commande ressemblerait à ceci:
#help
";
$lang['wits3qnm'] = "Nom du robot (bot)";
$lang['wits3qnmdesc'] = "Le nom avec lequel la connexion en query sera établie. Vous pouvez le nommer gratuitement :).";
$lang['wits3querpw'] = "Mot de passe query du TS3";
diff --git a/languages/core_hu_Hungary_hu.php b/languages/core_hu_Hungary_hu.php
index bcb2bae..056f9b8 100644
--- a/languages/core_hu_Hungary_hu.php
+++ b/languages/core_hu_Hungary_hu.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Elérni a(z)";
$lang['adduser'] = "Felhasználó %s (unique Client-ID: %s; Client-database-ID %s) ismeretlen -> hozzáadva a Ranksystemhez.";
$lang['api'] = "API";
$lang['apikey'] = "API Kulcs";
+$lang['apiperm001'] = "Engedélyezze a Ranksystem Bot indítását/leállítását az API segítségével";
+$lang['apipermdesc'] = "(ON = Engedélyez ; OFF = Tilt)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Jelszóváltoztatás";
$lang['pass3'] = "Régi jelszó";
$lang['pass4'] = "Új jelszó";
$lang['pass5'] = "Elfelejtett jelszó?";
+$lang['permission'] = "Engedélyek";
$lang['privacy'] = "Adatvédelmi irányelvek";
$lang['repeat'] = "Ismét";
$lang['resettime'] = "Nullázza a felhasználó online és tétlen idejét %s (unique Client-ID: %s; Client-database-ID %s) nullára, oka, hogy a felhasználót eltávolították egy kivételből (szervercsoport vagy kliens kivétel).";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s a portugál fordításért";
$lang['stri0021'] = "%s segítőkézség a GitHub-on és a nyilvános szerveren, minden gondolatát megosztotta, letesztelt mindent és még sok mást";
$lang['stri0022'] = "%s az ötletelésért és az előzetes tesztelésért";
$lang['stri0023'] = "Stabil verzió elkészülte: 18/04/2016.";
-$lang['stri0024'] = "%s a cseh fordításért";
-$lang['stri0025'] = "%s a lengyel fordításért";
-$lang['stri0026'] = "%s a spanyol fordításért";
-$lang['stri0027'] = "%s a magyar fordításért";
-$lang['stri0028'] = "%s azerbajdzsán fordításért";
-$lang['stri0029'] = "%s az impresszum funkcióért";
+$lang['stri0024'] = "%s a cseh fordításhoz";
+$lang['stri0025'] = "%s a lengyel fordításhoz";
+$lang['stri0026'] = "%s a spanyol fordításhoz";
+$lang['stri0027'] = "%s a magyar fordításhoz";
+$lang['stri0028'] = "%s az azerbajdzsáni fordításhoz";
+$lang['stri0029'] = "%s az impresszum funkcióhoz";
+$lang['stri0030'] = "%s a 'CosmicBlue' stílushoz a statisztika oldalhoz és a web felülethez";
$lang['stta0001'] = "Összesítve";
$lang['sttm0001'] = "A hónapban";
$lang['sttw0001'] = "Toplista";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "reset time";
$lang['wiexresdesc'] = "Három móddal lehet kivételt kezelni. A rangsorolás minden esetben le van tiltva (nincs szervercsoport hozzárendelése). Különféle lehetőségeket választhat a felhasználói igénybe vett idő kezelésére (amely kivételt képez).
1) count time (default): Alapértelmezés szerint a Ranksystem a felhasználók online / aktív idejét is számolja, kivéve (kliens / szervercsoport kivétel). Kivételt képez, kivéve a rangot. Ez azt jelenti, hogy ha a felhasználót már nem menti kivétel, akkor a csoportba sorolják a gyűjtött idő függvényében (pl. 3. szint).
2) break time: Ezen az opción az online és az alapjárati időt befagyasztják (szünet) az aktuális értékre (mielőtt a felhasználó kivételt kapott). A kivétel okának megszüntetése után (az engedélyezett kiszolgálócsoport eltávolítása vagy a várakozási szabály eltávolítása után) az online / aktív idő 'számlálása' folytatódik.
3) reset time: Ezzel a funkcióval a számolt online és tétlen idő nullára kerül visszaállításra abban a pillanatban, amikor a felhasználót már nem kivéve (a kivételes kiszolgálócsoport eltávolítása vagy a kivétel szabályának eltávolítása miatt). A kivételtől függő időbeli kivétel továbbra is számít, amíg vissza nem állítja.
A csatorna kivétele semmilyen esetben sem számít, mert az időt mindig figyelmen kívül hagyják (mint például az üzemmód szünet ideje).";
$lang['wiexuid'] = "Kliens kivétel";
$lang['wiexuiddesc'] = "Vesszővel elválasztott egyedi ügyfél-azonosítók listája, amelyet a Ranksystem vesz figyelembe. A listában szereplő felhasználót a rangsorolás során figyelmen kívül hagyják.";
+$lang['wiexregrp'] = "csoport eltávolítása";
+$lang['wiexregrpdesc'] = "Ha egy felhasználót kizárnak a Ranksystem-ből, a Ranksystem által hozzárendelt szervercsoport eltávolításra kerül.
A csoport csak a '".$lang['wiexres']."' a '".$lang['wiexres1']."'-al lesz eltávolítva. Minden más módban a szervercsoport nem lesz eltávolítva.
Ez a funkció csak akkor releváns, ha '".$lang['wiexuid']."' vagy '".$lang['wiexgrp']."' a '".$lang['wiexres1']."'-al együtt használják.";
$lang['wigrpimp'] = "Importálási Mód";
$lang['wigrpt1'] = "Az idő másodpercekben";
$lang['wigrpt2'] = "Szervercsoport";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "Ez meghatározza a második szintű rendezés sorrend
$lang['wishsortdesc'] = "Adja meg az alapértelmezett rendezési sorrendet a Lista rangsorolása oldalhoz.";
$lang['wistcodesc'] = "Adja meg a szükséges kiszolgáló-összeköttetések számát az eredmény eléréséhez.";
$lang['wisttidesc'] = "Adja meg az eléréshez szükséges időt (órákban).";
+$lang['wistyle'] = "egyéni stílus";
+$lang['wistyledesc'] = "Meghatározzon egy eltérő, egyéni stílust a Ranksystem számára. Ez a stílus az statisztika oldalra és a webes felületre lesz használva.
Helyezze el a saját stílust a 'style' könyvtár alkönyvtárában. Az alkönyvtár neve határozza meg a stílus nevét.
A 'TSN_' -el kezdődő stílusokat a Ranksystem biztosítja. Ezek frissítésekkel frissülnek. Ezekben ne végezzen módosításokat! Azonban ezek mintául szolgálhatnak. Másolja a stílust saját könyvtárba, hogy módosíthassa azt.
Két CSS fájl szükséges. Az egyik a statisztika oldalra, a másik a webes felületre. Tartalmazhat saját JavaScriptet is. De ez opcionális.
A CSS nevek konvenciója:
- Fix 'ST.css' a statisztika oldalra (/stats/) - Fix 'WI.css' a webes felület oldalra (/webinterface/)
A JavaScript nevek konvenciója:
- Fix 'ST.js' a statisztika oldalra (/stats/) - Fix 'WI.js' a webes felület oldalra (/webinterface/)
Ha szeretné elérhetővé tenni a stílusát mások számára is, küldje el az alábbi e-mail címre:
%s
Beleértve a következő kiadásban!";
$lang['wisupidle'] = "Idő mód";
$lang['wisupidledesc'] = "Kétféle mód van, hogyan lehet a felhasználó idejét értékelni.
1) online idő: A szervercsoportokat online idő adja meg. Ebben az esetben az aktív és inaktív időt értékezzük. (lásd az „összes online idő” oszlopot a „stats / list_rankup.php” részben)
2) aktív idő: A szervercsoportokat aktív idő adja meg. Ebben az esetben az inaktív idő nem lesz besorolva. Az online időt az inaktív idő (= alapjárat) csökkenti és csökkenti az aktív idő felépítéséhez. (lásd az „összes aktív idő” oszlopot a „stats / list_rankup.php” részben)
Az „időmód” megváltoztatása, a hosszabb futású Ranksystem példányoknál is nem jelent problémát, mivel a Ranksystem helytelen szervercsoportokat javít az ügyfélen.";
$lang['wisvconf'] = "Mentés";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query titkosítás";
$lang['wits3encryptdesc'] = "Aktiválja ezt a beállítást a Ranksystem és a TeamSpeak 3 szerver (SSH) közötti kommunikáció titkosításához. Ha ez a funkció le van tiltva, a kommunikáció egyszerű szövegben (RAW) zajlik. Ez biztonsági kockázatot jelenthet, különösen akkor, ha a TS3 szerver és a Ranksystem különböző gépeken fut.
Legyen is biztos, ellenőrizte a TS3 lekérdezési portot, amelyet (esetleg) meg kell változtatni a Ranksystem-ben!
Figyelem: Az SSH titkosítás több CPU-időt igényel és ezzel valóban több rendszer erőforrást igényel. Ezért javasoljuk RAW-kapcsolat használatát (letiltott titkosítás), ha a TS3 szerver és a Ranksystem ugyanazon a gazdagépen / kiszolgálón fut (localhost / 127.0.0.1). Ha különálló gazdagépeken futnak, akkor aktiválnia kell a titkosított kapcsolatot!
Követelmények:
1) TS3 Szerver verzió 3.3.0 vagy ez felett.
2) A PHP-PHP-SSH2 kiterjesztésre van szükség. Linuxon telepíthető a következő paranccsal: %s 3) A titkosítást engedélyezni kell a TS3 szerveren! Aktiválja a következő paramétereket a 'ts3server.ini' webhelyen, és testreszabhatja az igényeinek megfelelően: %s A TS3 szerver konfigurációjának megváltoztatása után a TS3 szerver újraindításához szükséges.";
$lang['wits3host'] = "TS3 Kiszolgálónév";
$lang['wits3hostdesc'] = "TeamSpeak 3 szerver címe (IP vagy DNS)";
+$lang['wits3pre'] = "Bot parancs előtag";
+$lang['wits3predesc'] = "A TeamSpeak szerveren a Ranksystem botot csevegés útján tudod elérni. Alapértelmezés szerint a bot parancsokat kiugrójel '!' jelöli. Az előtagot a bot parancsainak azonosítására használjuk.
Ezt az előtagot bármely más kívánt előtaggal lehet helyettesíteni. Erre lehet szükség, ha olyan botokat használnak, amelyek hasonló parancsokkal rendelkeznek.
Például a bot alapértelmezett parancsa így nézne ki:
!help
Ha az előtagot '#'-jelre cserélik, a parancs így nézne ki:
#help
";
$lang['wits3qnm'] = "Bot név";
$lang['wits3qnmdesc'] = "A név, ezzel létrehozva a query-kapcsolatot. Megnevezheti szabadon.";
$lang['wits3querpw'] = "TS3 Query-Jelszó";
diff --git a/languages/core_it_Italiano_it.php b/languages/core_it_Italiano_it.php
index cc17562..259ff9b 100644
--- a/languages/core_it_Italiano_it.php
+++ b/languages/core_it_Italiano_it.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achievement";
$lang['adduser'] = "L'utente %s ( Client-ID: %s; Client-database-ID %s) non è presente nel database -> L'utente è stato aggiunto al sistema.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Consenti di avviare/fermare il bot di Ranksystem tramite API";
+$lang['apipermdesc'] = "(ON = Consenti ; OFF = Nega)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Cambia la password";
$lang['pass3'] = "vecchia password";
$lang['pass4'] = "nuova password";
$lang['pass5'] = "Password Dimenticata?";
+$lang['permission'] = "Permessi";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "ripetere";
$lang['resettime'] = "Resetta il tempo online e in idle dell'utente %s (Client-ID univico: %s; Client-database-ID %s), perchè è stato rimmosso perchè escluso.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s per la traduzione in Portoghese";
$lang['stri0021'] = "%s Per il grande supporto su GitHub e sul nostro server pubblico, per aver condiviso le sue idee, per aver pre-testato tutto ciò e molto altro";
$lang['stri0022'] = "%s per aver condiviso le sue idee e per il pre-testing";
$lang['stri0023'] = "Versione stabile dal: 18/04/2016.";
-$lang['stri0024'] = "%s for czech translation";
-$lang['stri0025'] = "%s for polish translation";
-$lang['stri0026'] = "%s for spanish translation";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s per la traduzione ceca";
+$lang['stri0025'] = "%s per la traduzione polacca";
+$lang['stri0026'] = "%s per la traduzione spagnola";
+$lang['stri0027'] = "%s per la traduzione ungherese";
+$lang['stri0028'] = "%s per la traduzione azera";
+$lang['stri0029'] = "%s per la funzione di stampa";
+$lang['stri0030'] = "%s per lo stile 'CosmicBlue' per la pagina delle statistiche e l'interfaccia web";
$lang['stta0001'] = "Di sempre";
$lang['sttm0001'] = "Del mese";
$lang['sttw0001'] = "Top utenti";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "Resetta il tempo";
$lang['wiexresdesc'] = "Ci sono tre modalità, su come gestire un esclusione. In tutti i casi il rankup (assegnazione di servergroups) è disabilitato. Puoi decidere diverse opzioni su come gestire il tempo speso da un utente (il quale è escluso).
1) Conteggia il tempo (default): Con il Default, il Ranksystem conteggia il tempo online/di attività degli utenti, i quali sono esclusi (client/servergroup). Con l'unica esclusione che il rankup (assegnazione di servergroups) è disabilitato. Questo significa che se un utente non è più escluso, gli verrà assegnato il servergroup in base al suo tempo collezionato (es. Livello 3).
2) Ferma il tempo: Con questa opzione il tempo passato online/in idle viene congelato (fermato) sul valore attuale (prima che l'utente sia stato escluso). Dopo aver rimosso l'esclusione (dopo aver rimosso il servergroup escluso all'utente o la regola di esclusione) il 'conteggio' torna attivo.
3) resetta il tempo: Con questa opzione il tempo online conteggiato dell'utente viene resettato (riportato a 0) dopo aver rimosso l'esclusione (dopo aver rimosso il servergroup escluso all'utente o la regola di esclusione). Il tempo calcolato prima dell'esclusione verrà cancellato.
L'esclusione dei canali non c'entra qui, perchè il tempo sarà sempre ignorato (come la modalità 'Ferma il tempo').";
$lang['wiexuid'] = "Eccezione degli utenti";
$lang['wiexuiddesc'] = "Lista degli utenti (ID Univoco) che non verranno contati dal Ranksystem (separati da virgola. es 5GFxciykQMojlrvugWti835Wdto=,YQf+7x/4LJ2Tw5cuQGItsVEn+S4=) Questi utentiverranno ignorati.";
+$lang['wiexregrp'] = "rimuovi gruppo";
+$lang['wiexregrpdesc'] = "Se un utente viene escluso dal Ranksystem, il gruppo di server assegnato dal Ranksystem verrà rimosso.
Il gruppo verrà rimosso solo con il '".$lang['wiexres']."' con il '".$lang['wiexres1']."'. In tutti gli altri modi, il gruppo di server non verrà rimosso.
Questa funzione è rilevante solo in combinazione con un '".$lang['wiexuid']."' o un '".$lang['wiexgrp']."' in combinazione con il '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Define the default sorting order for the List Rankup page.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "stile personalizzato";
+$lang['wistyledesc'] = "Definisci uno stile personalizzato per il sistema di classifica. Questo stile verrà utilizzato per la pagina statistiche e l'interfaccia web.
Inserisci il tuo stile nella cartella 'style' in una sottocartella. Il nome della sottocartella determinerà il nome dello stile.
Gli stili che iniziano con 'TSN_' sono forniti dal sistema di classifica. Verranno aggiornati con le future versioni. Non dovresti quindi apportare modifiche a questi. Tuttavia, puoi utilizzarli come modello. Copia lo stile in una cartella separata per apportare modifiche.
Sono richiesti due file CSS. Uno per la pagina statistiche e uno per l'interfaccia web. È possibile anche includere un JavaScript personalizzato, ma questo è opzionale.
Convenzione dei nomi per CSS:
- Fissare 'ST.css' per la pagina statistiche (/stats/) - Fissare 'WI.css' per la pagina dell'interfaccia web (/webinterface/)
Convenzione dei nomi per JavaScript:
- Fissare 'ST.js' per la pagina statistiche (/stats/) - Fissare 'WI.js' per la pagina dell'interfaccia web (/webinterface/)
Se vuoi condividere il tuo stile con gli altri, puoi inviarlo all'indirizzo e-mail seguente:
%s
Lo includeremo nella prossima versione!";
$lang['wisupidle'] = "time Modalità";
$lang['wisupidledesc'] = "Ci sono due modalità di conteggio del tempo per applicare un aumento di rank.
1) Tempo Online: Tutto il tempo che l'utente passa in TS in IDLE o meno (Vedi colonna 'sum. online time' in the 'stats/list_rankup.php')
2) Tempo di attività: Al tempo online dell'utente viene sottratto il tempo in IDLE (AFK) (Vedi colonna 'sum. active time' in the 'stats/list_rankup.php').
Il cambiamento di modalità dopo lungo tempo non è consigliato ma dovrebbe funzionare comunque.";
$lang['wisvconf'] = "Salva";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH). When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.
Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!
Attention: The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!
Requirements:
1) TS3 Server version 3.3.0 or above.
2) The PHP extension PHP-SSH2 is necessary. On Linux you can it install with the following command: %s 3) The encryption needs to be enabled on your TS3 server! Activate the following parameters inside your 'ts3server.ini' and customize it for your needs: %s After changing your TS3 server configurations a restart of your TS3 server is necessary.";
$lang['wits3host'] = "Indirizzo TS3";
$lang['wits3hostdesc'] = "Indirizzo del vostro server Teamspeak (IP o DNS)";
+$lang['wits3pre'] = "Prefisso del comando del bot";
+$lang['wits3predesc'] = "Sul server di TeamSpeak puoi comunicare con il bot Ranksystem tramite chat. Di default, i comandi del bot sono contrassegnati con un punto esclamativo '!'. Il prefisso viene utilizzato per identificare i comandi del bot come tali.
Questo prefisso può essere sostituito con qualsiasi altro prefisso desiderato. Ciò può essere necessario se si stanno utilizzando altri bot con comandi simili.
Ad esempio, il comando predefinito del bot sarebbe:
!help
Se si sostituisce il prefisso con '#', il comando apparirà come segue:
#help
";
$lang['wits3qnm'] = "Nome del Bot";
$lang['wits3qnmdesc'] = "Il nome con il quale la query si conneterà al TS3. Potrai dare il nome che preferisci. Ricorda che sarà anche il nome con il quale gli utenti riceveranno i messaggi su Teamspeak.";
$lang['wits3querpw'] = "TS3 - Password della Query";
diff --git a/languages/core_nl_Nederlands_nl.php b/languages/core_nl_Nederlands_nl.php
index 2c39bb0..5b7b45a 100644
--- a/languages/core_nl_Nederlands_nl.php
+++ b/languages/core_nl_Nederlands_nl.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achievement";
$lang['adduser'] = "Gebruiker %s (unieke Client-ID: %s; Client-database-ID %s) is onbekend -> zojuist toegevoegd aan ranksysteem.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Sta het starten/stoppen van de Ranksystem Bot via API toe";
+$lang['apipermdesc'] = "(ON = Toestaan ; OFF = Weigeren)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Verander wachtwoord";
$lang['pass3'] = "oud wachtwoord";
$lang['pass4'] = "nieuw wachtwoord";
$lang['pass5'] = "Wachtwoord Vergeten?";
+$lang['permission'] = "Machtigingen";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "herhalen";
$lang['resettime'] = "Reset the online and idle time of user %s (unique Client-ID: %s; Client-database-ID %s) to zero, cause user got removed out of exception.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s for portuguese translation";
$lang['stri0021'] = "%s for the great support on GitHub & our public server, sharing his ideas, pre-testing all that shit & much more";
$lang['stri0022'] = "%s for sharing their ideas & pre-testing";
$lang['stri0023'] = "Stable since: 18/04/2016.";
-$lang['stri0024'] = "%s for czech translation";
-$lang['stri0025'] = "%s for polish translation";
-$lang['stri0026'] = "%s for spanish translation";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s voor Tsjechische vertaling";
+$lang['stri0025'] = "%s voor Poolse vertaling";
+$lang['stri0026'] = "%s voor Spaanse vertaling";
+$lang['stri0027'] = "%s voor Hongaarse vertaling";
+$lang['stri0028'] = "%s voor Azerbeidzjaanse vertaling";
+$lang['stri0029'] = "%s voor de imprint-functie";
+$lang['stri0030'] = "%s voor de 'CosmicBlue'-stijl voor de statistiekenpagina en de webinterface";
$lang['stta0001'] = "Of all time";
$lang['sttm0001'] = "Of the month";
$lang['sttw0001'] = "Top users";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "reset time";
$lang['wiexresdesc'] = "There are three modes, how to handle an exception. In every case the rank up is disabled (no assigning of servergroups). You can choose different options how the spended time from a user (which is excepted) should be handled.
1) count time (default): At default the Ranksystem also count the online/active time of users, which are excepted (by client/servergroup exception). With an exception only the rank up is disabled. That means if a user is not any more excepted, he would be assigned to the group depending his collected time (e.g. level 3).
2) break time: On this option the spend online and idle time will be frozen (break) to the actual value (before the user got excepted). After loosing the excepted reason (after removing the excepted servergroup or remove the expection rule) the 'counting' will go on.
3) reset time: With this function the counted online and idle time will be resetting to zero at the moment the user are not any more excepted (due removing the excepted servergroup or remove the exception rule). The spent time due exception will be still counting till it got reset.
The channel exception doesn't matter in any case, cause the time will always be ignored (like the mode break time).";
$lang['wiexuid'] = "client exception";
$lang['wiexuiddesc'] = "A comma seperated list of unique Client-IDs, which should not conside for the Ranksystem. User in this list will be ignored for the rank up.";
+$lang['wiexregrp'] = "verwijder groep";
+$lang['wiexregrpdesc'] = "Als een gebruiker uitgesloten is van Ranksystem, wordt de door Ranksystem toegewezen servergroep verwijderd.
De groep wordt alleen verwijderd met de '".$lang['wiexres']."' met de '".$lang['wiexres1']."'. In alle andere modi wordt de servergroep niet verwijderd.
Deze functie is alleen relevant in combinatie met een '".$lang['wiexuid']."' of een '".$lang['wiexgrp']."' in combinatie met de '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Define the default sorting order for the List Rankup page.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "aangepaste stijl";
+$lang['wistyledesc'] = "Definieer een aangepaste stijl voor het Ranksysteem. Deze stijl wordt gebruikt voor de statistiekenpagina en het webinterface.
Plaats je eigen stijl in de map 'style' in een submap. De naam van de submap bepaalt de naam van de stijl.
Stijlen die beginnen met 'TSN_' worden geleverd door het Ranksysteem. Deze worden bijgewerkt in toekomstige updates. Maak geen aanpassingen aan deze stijlen! Maar je kunt ze gebruiken als sjabloon. Kopieer de stijl naar een eigen map om aanpassingen te maken.
Er zijn twee CSS-bestanden vereist. Een voor de statistiekenpagina en een voor het webinterface. Je kunt ook een eigen JavaScript toevoegen, maar dit is optioneel.
Naamgevingsconventie voor CSS:
- Vaste 'ST.css' voor de statistiekenpagina (/stats/) - Vaste 'WI.css' voor de webinterfacepagina (/webinterface/)
Naamgevingsconventie voor JavaScript:
- Vaste 'ST.js' voor de statistiekenpagina (/stats/) - Vaste 'WI.js' voor de webinterfacepagina (/webinterface/)
Als je je stijl ook met anderen wilt delen, kun je deze sturen naar het volgende e-mailadres:
%s
We zullen deze in de volgende release leveren!";
$lang['wisupidle'] = "time Mode";
$lang['wisupidledesc'] = "There are two modes, how the time of a user will be rated.
1) online time: Servergroups will be given by online time. In this case the active and the inactive time will be rated. (see column 'sum. online time' in the 'stats/list_rankup.php')
2) active time: Servergroups will be given by active time. In this case the inactive time will not be rated. The online time will be taken and reduced by the inactive time (=idle) to build the active time. (see column 'sum. active time' in the 'stats/list_rankup.php')
A change of the 'time mode', also on longer running Ranksystem instances, should be no problem since the Ranksystem repairs wrong servergroups on a client.";
$lang['wisvconf'] = "save";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH). When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.
Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!
Attention: The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!
Requirements:
1) TS3 Server version 3.3.0 or above.
2) The PHP extension PHP-SSH2 is necessary. On Linux you can it install with the following command: %s 3) The encryption needs to be enabled on your TS3 server! Activate the following parameters inside your 'ts3server.ini' and customize it for your needs: %sAfter changing your TS3 server configurations a restart of your TS3 server is necessary.";
$lang['wits3host'] = "TS3 Hostaddress";
$lang['wits3hostdesc'] = "TeamSpeak 3 Server address (IP oder DNS)";
+$lang['wits3pre'] = "Voorvoegsel van bot-commando";
+$lang['wits3predesc'] = "Op de TeamSpeak-server kun je communiceren met de Ranksystem-bot via de chat. Standaard zijn bot-commando's gemarkeerd met een uitroepteken '!'. De voorvoegsel wordt gebruikt om commando's voor de bot te identificeren als zodanig.
Dit voorvoegsel kan worden vervangen door een ander gewenst voorvoegsel. Dit kan nodig zijn als er andere bots worden gebruikt met vergelijkbare commando's.
Bijvoorbeeld, het standaard bot-commando zou er als volgt uitzien:
!help
Als het voorvoegsel wordt vervangen door '#', zou het commando er als volgt uitzien:
#help
";
$lang['wits3qnm'] = "Botname";
$lang['wits3qnmdesc'] = "The name, with this the query-connection will be established. You can name it free.";
$lang['wits3querpw'] = "TS3 Query-Password";
diff --git a/languages/core_pl_polski_pl.php b/languages/core_pl_polski_pl.php
index 8dcfa17..8f83e9a 100644
--- a/languages/core_pl_polski_pl.php
+++ b/languages/core_pl_polski_pl.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Osiągnięcia";
$lang['adduser'] = "Użytkownik %s (unique Client-ID: %s; Client-database-ID %s) jest nieznany -> dodany do Ranksystemu teraz.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Zezwalaj na uruchamianie/zatrzymywanie bota Ranksystem za pomocą API";
+$lang['apipermdesc'] = "(ON = Zezwalaj ; OFF = Zabroń)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Zmień hasło";
$lang['pass3'] = "Stare hasło";
$lang['pass4'] = "Nowe hasło";
$lang['pass5'] = "Zapomniałeś hasła?";
+$lang['permission'] = "Uprawnienia";
$lang['privacy'] = "Polityka prywatności";
$lang['repeat'] = "Powtórz";
$lang['resettime'] = "Zresetuj czas online i czas bezczynnosci użytkownika %s (unique Client-ID: %s; Client-database-ID %s) na zero, poniewaz uzytkownik został usuniety z wyjątku.";
@@ -369,6 +372,7 @@ $lang['stri0026'] = "%s za hiszpańskie tłumaczenie";
$lang['stri0027'] = "%s za węgierskie tłumaczenie";
$lang['stri0028'] = "%s za azerbejdżańskie tłumaczenie";
$lang['stri0029'] = "%s za funkjcę imprintu";
+$lang['stri0030'] = "%s dla stylu 'CosmicBlue' dla strony statystyk i interfejsu web";
$lang['stta0001'] = "Cały czas";
$lang['sttm0001'] = "Miesiąca";
$lang['sttw0001'] = "Najlepsi użytkownicy";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "Zresetuj czas";
$lang['wiexresdesc'] = "Istnieją trzy tryby radzenia sobie z wyjątkami. W kazdym przypadku ranking (przypisanie grupy serwerow) jest wyłączony. Mozesz wybrac rozne opcje, w jaki sposob nalezy obchodzic spedzony czas od użytkownika (ktory jest wyjątkiem).
1) czas zliczania (domyslny): Domyslnie system rol rowniez liczy czas online / aktywny uzytkownikow, ktore są wyłączone (klient / grupa serwerow). Z wyjątkiem tylko ranking (przypisanie grupy serwerow) jest wyłączony. Oznacza to, ze jesli uzytkownik nie jest juz wykluczony, byłby przypisany do grupy w zaleznosci od jego zebranego czasu (np. Poziom 3).
2) przerwa: OW tej opcji wydatki online i czas bezczynnosci zostaną zamrozone (przerwane) na rzeczywistą wartosc (przed wyłączeniem użytkownika). Po wystąpieniu wyjątku (po usunieciu wyłączonej grupy serwerow lub usunieciu reguły wygasniecia) 'liczenie' bedzie kontynuowane.
3) Zresetuj czas: Dzieki tej funkcji liczony czas online i czas bezczynnosci zostaną zresetowane do zera w momencie, gdy uzytkownik nie bedzie juz wiecej wyłączony (z powodu usuniecia wyłączonej grupy serwerow lub usuniecia reguły wyjątku). Spedzony wyjątek bedzie nadal liczony do czasu zresetowania.
Wyjątek kanału nie ma tutaj znaczenia, poniewaz czas bedzie zawsze ignorowany (jak tryb przerwy).";
$lang['wiexuid'] = "wyjątek klienta";
$lang['wiexuiddesc'] = "Rozdzielona przecinkiem lista unikalnych identyfikatorow klientów, ktorych nie nalezy uwzgledniac w systemie Ranksystem. Uzytkownik na tej liscie zostanie zignorowany w rankingu.";
+$lang['wiexregrp'] = "usuń grupę";
+$lang['wiexregrpdesc'] = "Jeśli użytkownik jest wykluczony z Ranksystem, grupa serwera przypisana przez Ranksystem zostanie usunięta.
Grupa zostanie usunięta tylko z '".$lang['wiexres']."' z '".$lang['wiexres1']."'. W pozostałych trybach grupa serwera nie zostanie usunięta.
Ta funkcja jest relevantna tylko w połączeniu z '".$lang['wiexuid']."' lub '".$lang['wiexgrp']."' w połączeniu z '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Czas w sekundach";
$lang['wigrpt2'] = "Grupa serwerowa";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Zdefiniuj domyślną kolejność sortowania dla strony Rankup.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "niestandardowy styl";
+$lang['wistyledesc'] = "Określ alternatywny, niestandardowy styl dla systemu rang. Ten styl będzie używany na stronie statystyk i interfejsie webowym.
Umieść swój styl w katalogu 'style' w podkatalogu. Nazwa podkatalogu określa nazwę stylu.
Style zaczynające się od 'TSN_' są dostarczane przez system rang. Są one aktualizowane przez przyszłe aktualizacje. Nie powinno się więc dokonywać w nich żadnych dostosowań! Jednak mogą one służyć jako wzór. Skopiuj styl do własnego katalogu, aby dokonać w nim dostosowań.
Potrzebne są dwa pliki CSS. Jeden dla strony statystyk i jeden dla interfejsu webowego. Można również załączyć własne skrypty JavaScript. Jest to jednak opcjonalne.
Konwencja nazw dla CSS:
- Stałe 'ST.css' dla strony statystyk (/stats/) - Stałe 'WI.css' dla strony interfejsu webowego (/webinterface/)
Konwencja nazw dla JavaScript:
- Stałe 'ST.js' dla strony statystyk (/stats/) - Stałe 'WI.js' dla strony interfejsu webowego (/webinterface/)
Jeśli chcesz udostępnić swój styl innym, możesz wysłać go na poniższy adres e-mail:
%s
Wyślemy go z następnym wydaniem!";
$lang['wisupidle'] = "time Tryb";
$lang['wisupidledesc'] = "Istnieją dwa tryby, ponieważ czas może być policzony, a następnie można ubiegać się o podwyzszenie rangi.
1) czas online: bierze się pod uwage czysty czas online użytkownika (see column 'sum. online time' in the 'stats/list_rankup.php')
2) czas aktywny: zostanie odjety od czasu online użytkownika, nieaktywny czas (bezczynnosc) (patrz kolumna 'suma aktywnego czasu' w 'stats / list_rankup.php').
Zmiana trybu z juz działającą bazą danych nie jest zalecana, ale może zadziałać.";
$lang['wisvconf'] = "Zapisz";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH). When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.
Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!
Attention: The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!
Requirements:
1) TS3 Server version 3.3.0 or above.
2) The PHP extension PHP-SSH2 is necessary. On Linux you can it install with the following command: %s 3) The encryption needs to be enabled on your TS3 server! Activate the following parameters inside your 'ts3server.ini' and customize it for your needs: %s After changing your TS3 server configurations a restart of your TS3 server is necessary.";
$lang['wits3host'] = "Adres TS3";
$lang['wits3hostdesc'] = "Adres serwera TeamSpeak 3 (IP oder DNS)";
+$lang['wits3pre'] = "Prefiks polecenia bota";
+$lang['wits3predesc'] = "Na serwerze TeamSpeak możesz porozumiewać się z botem Ranksystem za pośrednictwem czatu. Domyślnie polecenia bota są oznaczone wykrzyknikiem '!'. Prefiks jest używany do identyfikacji poleceń dla bota jako takich.
Ten prefiks można zastąpić dowolnym innym pożądanym prefiksem. Może to być konieczne, jeśli używane są inne boti z podobnymi poleceniami.
Na przykład domyślne polecenie bota wyglądałoby tak:
!help
Jeśli prefiks zostanie zastąpiony znakiem '#', polecenie wyglądać będzie następująco:
#help
";
$lang['wits3qnm'] = "Nazwa bota";
$lang['wits3qnmdesc'] = "Nazwa, z tym połączeniem zapytania, zostanie ustanowiona. Mozesz nazwac to za darmo.";
$lang['wits3querpw'] = "Hasło query TS3";
diff --git a/languages/core_pt_Português_pt.php b/languages/core_pt_Português_pt.php
index 595ff05..a52ad35 100644
--- a/languages/core_pt_Português_pt.php
+++ b/languages/core_pt_Português_pt.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Realização";
$lang['adduser'] = "O usuário %s (ID-Ùnica: %s; Cliente-banco de dados-ID %s) é desconhecido -> adicionado ao sistema de ranking agora.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Permitir iniciar/parar o bot do Ranksystem através da API";
+$lang['apipermdesc'] = "(ON = Permitir ; OFF = Negar)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Alterar a senha";
$lang['pass3'] = "Senha antiga";
$lang['pass4'] = "Nova senha";
$lang['pass5'] = "Esqueceu a senha?";
+$lang['permission'] = "Permissões";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "repetir";
$lang['resettime'] = "Redefinir o tempo de inatividade e tempo livre do usuário %s (ID-Ùnica: %s; Cliente-database-ID %s) para zero, porque o usuário foi removido fora da exceção.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s pela tradução em português";
$lang['stri0021'] = "%s pelo excelente suporte no GitHub e no nosso servidor público, compartilhando suas idéias, testando antes toda merda e muito mais";
$lang['stri0022'] = "%s por compartilhar suas idéias e pré-teste";
$lang['stri0023'] = "Estável desde: 18/04/2016.";
-$lang['stri0024'] = "%s for czech translation";
-$lang['stri0025'] = "%s for polish translation";
-$lang['stri0026'] = "%s for spanish translation";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s para tradução tcheca";
+$lang['stri0025'] = "%s para tradução polonesa";
+$lang['stri0026'] = "%s para tradução espanhola";
+$lang['stri0027'] = "%s para tradução húngara";
+$lang['stri0028'] = "%s para tradução azeri";
+$lang['stri0029'] = "%s para a função de impressão";
+$lang['stri0030'] = "%s para o estilo 'CosmicBlue' para a página de estatísticas e a interface web";
$lang['stta0001'] = "De Todos os Tempos";
$lang['sttm0001'] = "Do Mês";
$lang['sttw0001'] = "Top Usuários";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "Redefinir o tempo";
$lang['wiexresdesc'] = "Existem três modos, como lidar com uma exceção. Em todos os casos, a classificação (atribuir grupo de servidores) está desativado. Você pode escolher diferentes opções de como o tempo gasto de um usuário (que é excecionado) deve ser tratado.
1) tempo de contagem (padrão) : Por padrão, o Sistema de ranking conta também o on-line / tempo ativo dos usuários, exceto (cliente / grupo de servidores). Com uma exceção, apenas a classificação (atribuir grupo de servidores) está desativado. Isso significa que se um usuário não for mais salvo, ele seria atribuído ao grupo dependendo do tempo coletado (por exemplo, nível 3).
2) tempo de pausa : nesta opção o gastar online e tempo ocioso será congelado (intervalo) para o valor real (antes do usuário ter sido salvo). Após uma exceção (após remover o grupo de servidores excecionado ou remover a regra de expectativa), 'contagem' continuará.
3) tempo de reinicialização : Com esta função, o tempo contado online e ocioso será redefinir para zero no momento em que o usuário não seja mais salvo (removendo o grupo de servidores excecionado ou remova a regra de exceção). A exceção de tempo de tempo gasto seria ainda contabilizada até que ela fosse reiniciada.
A exceção do canal não importa aqui, porque o tempo sempre será ignorado (como o modo de interrupção).";
$lang['wiexuid'] = "Exceção de cliente";
$lang['wiexuiddesc'] = "Uma lista separada de vírgulas de ID-Ùnica, que não deve considerar para o Sistema de Rank. O usuário nesta lista será ignorado e não vai participar do ranking.";
+$lang['wiexregrp'] = "remover grupo";
+$lang['wiexregrpdesc'] = "Se um usuário for excluído do Ranksystem, o grupo de servidor atribuído pelo Ranksystem será removido.
O grupo só será removido com o '".$lang['wiexres']."' com o '".$lang['wiexres1']."'. Em todos os outros modos, o grupo de servidor não será removido.
Esta função é relevante apenas em combinação com um '".$lang['wiexuid']."' ou um '".$lang['wiexgrp']."' em combinação com o '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Modo de Importação";
$lang['wigrpt1'] = "Tempo em Segundos";
$lang['wigrpt2'] = "Grupo do servidor";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Defina a ordem de classificação padrão para a página Classificação da lista.";
$lang['wistcodesc'] = "Especifique uma contagem necessária de conexões do servidor para atender à conquista.";
$lang['wisttidesc'] = "Especifique um tempo necessário (em horas) para cumprir a conquista.";
+$lang['wistyle'] = "estilo personalizado";
+$lang['wistyledesc'] = "Defina um estilo personalizado diferente para o sistema de classificação. Este estilo será usado para a página de estatísticas e a interface web.
Coloque seu próprio estilo na pasta 'style' em uma pasta subjacente. O nome da pasta subjacente determina o nome do estilo.
Os estilos que começam com 'TSN_' são fornecidos pelo sistema de classificação. Esses serão atualizados em futuras atualizações. Portanto, nenhuma modificação deve ser feita neles! No entanto, eles podem ser usados como modelo. Copie o estilo para uma pasta própria para fazer modificações nela.
São necessários dois arquivos CSS. Um para a página de estatísticas e outro para a interface web. Também é possível incluir seu próprio JavaScript, mas isso é opcional.
Convenção de nomes do CSS:
- Fixar 'ST.css' para a página de estatísticas (/stats/) - Fixar 'WI.css' para a página de interface web (/webinterface/)
Convenção de nomes para JavaScript:
- Fixar 'ST.js' para a página de estatísticas (/stats/) - Fixar 'WI.js' para a página de interface web (/webinterface/)
Se você quiser disponibilizar seu estilo para outras pessoas, pode enviá-lo para o seguinte endereço de e-mail:
%s
Nós o incluiremos na próxima versão!";
$lang['wisupidle'] = "time Modo";
$lang['wisupidledesc'] = "Existem dois modos, pois o tempo pode ser contado e pode então se inscrever para um aumento de classificação.
1) Tempo online: Aqui, o tempo online do usuário é levado em consideração (ver coluna 'tempo online' na 'stats/list_rankup.php')
2) tempo ativo: isso será deduzido do tempo online de um usuário, o tempo inativo.o ranking classifica quem tem o maior tempo ativo no servidor.
Não é recomendada uma mudança de modo com um banco de dados já executado mais longo, mas pode funcionar.";
$lang['wisvconf'] = "Salvar";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Ative esta opção para criptografar a comunicação entre o Sistema de ranking e o servidor TeamSpeak 3.(SSH). Quando essa função estiver desativada, a comunicação será feita em texto sem formatação (RAW).Isso pode ser um risco à segurança, especialmente quando o servidor TS3 e o sistema Ranks estão sendo executados em máquinas diferentes.
Verifique também se você verificou a porta de consulta TS3, que precisa(talvez) ser alterada no sistema de ranking !
Atenção: A criptografia SSH precisa de mais tempo de CPU e com esse verdadeiramente mais recursos do sistema. É por isso que recomendamos usar uma conexão RAW (criptografia desativada) se o servidor TS3 e o sistema Ranks estiverem em execução na mesma máquina/servidor (localhost / 127.0.0.1). Se eles estiverem sendo executados em máquinas separadas, você deverá ativar a conexão criptografada!
Requisitos:
1) TS3 Server versão 3.3.0 ou superior.
2) A extensão PHP PHP-SSH2 é necessária. No Linux, você pode instalar com o seguinte comando: %s 3) A criptografia precisa ser ativada no servidor TS3! < br> Ative os seguintes parâmetros dentro do seu 'ts3server.ini' e personalize-o de acordo com as suas necessidades: %s Após alterar as configurações do servidor TS3, é necessário reiniciar o servidor TS3.";
$lang['wits3host'] = "TS3 Endereço do host";
$lang['wits3hostdesc'] = "Endereço do servidor TeamSpeak 3 (IP ou DNS)";
+$lang['wits3pre'] = "Prefixo do comando do bot";
+$lang['wits3predesc'] = "No servidor TeamSpeak, você pode se comunicar com o bot Ranksystem através do chat. Por padrão, os comandos do bot são marcados com um ponto de exclamação '!'. O prefixo é usado para identificar os comandos do bot como tal.
Este prefixo pode ser substituído por qualquer outro prefixo desejado. Isso pode ser necessário se estiverem sendo usados outros bots com comandos semelhantes.
Por exemplo, o comando padrão do bot seria:
!help
Se o prefixo for substituído por '#', o comando ficará assim:
#help
";
$lang['wits3qnm'] = "Nome do bot";
$lang['wits3qnmdesc'] = "O nome, com isso, a conexão de consulta será estabelecida. Você pode nomeá-lo livremente.";
$lang['wits3querpw'] = "TS3 Query-senha";
diff --git a/languages/core_ro_Română_ro.php b/languages/core_ro_Română_ro.php
index 81cd018..daa01f7 100644
--- a/languages/core_ro_Română_ro.php
+++ b/languages/core_ro_Română_ro.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Achievement";
$lang['adduser'] = "Userul %s (unique Client-ID: %s; Client-database-ID %s) este necunoscut -> adaugat la Sistem Rank acum.";
$lang['api'] = "API";
$lang['apikey'] = "API Key";
+$lang['apiperm001'] = "Permiteți pornirea/oprirea Ranksystem Bot prin API";
+$lang['apipermdesc'] = "(ON = Permiteți ; OFF = Refuzați)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Schimba parola";
$lang['pass3'] = "parola veche";
$lang['pass4'] = "noua parola";
$lang['pass5'] = "Ai uitat parola?";
+$lang['permission'] = "Permisiuni";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "reptere";
$lang['resettime'] = "Reset timp online si idle pentru userul: %s (ID: %s; ID baza de date %s), motiv: a fost sters din lista de exceptie.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s for portuguese translation";
$lang['stri0021'] = "%s for the great support on GitHub & our public server, sharing his ideas, pre-testing all that shit & much more";
$lang['stri0022'] = "%s for sharing their ideas & pre-testing";
$lang['stri0023'] = "Stable since: 18/04/2016.";
-$lang['stri0024'] = "%s for czech translation";
-$lang['stri0025'] = "%s for polish translation";
-$lang['stri0026'] = "%s for spanish translation";
-$lang['stri0027'] = "%s for initialisation hungarian translation";
-$lang['stri0028'] = "%s for azerbaijan translation";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s pentru traducerea cehă";
+$lang['stri0025'] = "%s pentru traducerea poloneză";
+$lang['stri0026'] = "%s pentru traducerea spaniolă";
+$lang['stri0027'] = "%s pentru traducerea maghiară";
+$lang['stri0028'] = "%s pentru traducerea azeră";
+$lang['stri0029'] = "%s pentru funcția de imprimare";
+$lang['stri0030'] = "%s pentru stilul 'CosmicBlue' pentru pagina de statistici și interfața web";
$lang['stta0001'] = "tot timpul";
$lang['sttm0001'] = "luna";
$lang['sttw0001'] = "Top useri";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "reseteaza timp";
$lang['wiexresdesc'] = "There are three modes, how to handle an exception. In every case the rank up is disabled (no assigning of servergroups). You can choose different options how the spended time from a user (which is excepted) should be handled.
1) contorizeaza timp (implicit): At default the Ranksystem also count the online/active time of users, which are excepted (by client/servergroup exception). With an exception only the rank up is disabled. That means if a user is not any more excepted, he would be assigned to the group depending his collected time (e.g. level 3).
2) pauza timp: On this option the spend online and idle time will be frozen (break) to the actual value (before the user got excepted). After loosing the excepted reason (after removing the excepted servergroup or remove the expection rule) the 'counting' will go on.
3) reseteaza timp: With this function the counted online and idle time will be resetting to zero at the moment the user are not any more excepted (due removing the excepted servergroup or remove the exception rule). The spent time due exception will be still counting till it got reset.
The channel exception doesn't matter in any case, cause the time will always be ignored (like the mode break time).";
$lang['wiexuid'] = "client exceptie";
$lang['wiexuiddesc'] = "A comma seperated list of unique Client-IDs, which should not conside for the Ranksystem. User in this list will be ignored for the rank up.";
+$lang['wiexregrp'] = "elimină grupul";
+$lang['wiexregrpdesc'] = "Dacă un utilizator este exclus din Ranksystem, grupul de server atribuit de Ranksystem va fi eliminat.
Grupul va fi eliminat doar cu '".$lang['wiexres']."' cu '".$lang['wiexres1']."'. În toate celelalte moduri, grupul de server nu va fi eliminat.
Această funcție este relevantă doar în combinație cu un '".$lang['wiexuid']."' sau un '".$lang['wiexgrp']."' în combinație cu '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Import Mode";
$lang['wigrpt1'] = "Time in Seconds";
$lang['wigrpt2'] = "Servergroup";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Define the default sorting order for the List Rankup page.";
$lang['wistcodesc'] = "Specify a required count of server-connects to meet the achievement.";
$lang['wisttidesc'] = "Specify a required time (in hours) to meet the achievement.";
+$lang['wistyle'] = "stil personalizat";
+$lang['wistyledesc'] = "Definiți un stil personalizat diferit pentru sistemul de ranguri. Acest stil va fi utilizat pentru pagina de statistici și interfața web.
Plasați propriul stil în directorul 'style' într-un subdirector propriu. Numele subdirectorului determină numele stilului.
Stilurile care încep cu 'TSN_' sunt furnizate de către sistemul de ranguri. Acestea vor fi actualizate prin actualizări viitoare. Prin urmare, nu ar trebui să se facă modificări în acestea! Cu toate acestea, acestea pot fi utilizate ca șabloane. Copiați stilul într-un director propriu pentru a face modificări.
Sunt necesare două fișiere CSS. Unul pentru pagina de statistici și unul pentru interfața web. De asemenea, se poate include un JavaScript propriu. Acest lucru este opțional.
Convenția de nume pentru CSS:
- Fix 'ST.css' pentru pagina de statistici (/stats/) - Fix 'WI.css' pentru pagina de interfață web (/webinterface/)
Convenția de nume pentru JavaScript:
- Fix 'ST.js' pentru pagina de statistici (/stats/) - Fix 'WI.js' pentru pagina de interfață web (/webinterface/)
Dacă doriți să oferiți și altora stilul dvs., puteți trimite la următoarea adresă de e-mail:
%s
Vom furniza cu următoarea versiune!";
$lang['wisupidle'] = "time Mod";
$lang['wisupidledesc'] = "Exista doua moduri, pentru ca timpul poate fi calculat si se poate aplica pentru o crestere a rangului.
1) timp online: Aici se tine cont de timpul online pur al utilizatorului (a se vedea coloana 'suma' in 'stats/list_rankup.php')
2) timp activ: va fi dedus din timpul online al unui utilizator, timpul inactiv (a se vedea coloana 'suma activa' 'stats/list_rankup.php').
O schimbare a modului cu o baza de date deja in desfasurare nu este recomandata, dar poate functiona.";
$lang['wisvconf'] = "salveaza";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "TS3 Query encryption";
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH). When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.
Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!
Attention: The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!
Requirements:
1) TS3 Server version 3.3.0 or above.
2) The PHP extension PHP-SSH2 is necessary. On Linux you can it install with the following command: %s 3) The encryption needs to be enabled on your TS3 server! Activate the following parameters inside your 'ts3server.ini' and customize it for your needs: %s After changing your TS3 server configurations a restart of your TS3 server is necessary.";
$lang['wits3host'] = "TS3 adresa";
$lang['wits3hostdesc'] = "TS3 adresa (IP sau DNS)";
+$lang['wits3pre'] = "Prefixul comenzii botului";
+$lang['wits3predesc'] = "Pe serverul TeamSpeak poți comunica cu botul Ranksystem prin intermediul chat-ului. În mod implicit, comenzile botului sunt marcate cu un semn de exclamare '!'. Prefixul este folosit pentru a identifica comenzile pentru bot ca atare.
Acest prefix poate fi înlocuit cu orice alt prefix dorit. Acest lucru poate fi necesar dacă se utilizează alți boturi cu comenzi similare.
De exemplu, comanda pentru botul implicit ar arăta astfel:
!help
Dacă prefixul este înlocuit cu '#', comanda ar arăta astfel:
#help
";
$lang['wits3qnm'] = "Nume";
$lang['wits3qnmdesc'] = "Se va stabili numele, cu aceasta conexiune de interogare. Puteti sa-l numiti gratuit.";
$lang['wits3querpw'] = "TS3 parola query";
diff --git a/languages/core_ru_Pусский_ru.php b/languages/core_ru_Pусский_ru.php
index a53186b..8de620d 100644
--- a/languages/core_ru_Pусский_ru.php
+++ b/languages/core_ru_Pусский_ru.php
@@ -4,6 +4,8 @@ $lang['achieve'] = "Достижение";
$lang['adduser'] = "Пользователь %s (UID: %s; DBID: %s) неизвестен и был успешно добавлен в базу данных системы рангов.";
$lang['api'] = "API";
$lang['apikey'] = "Ключ API";
+$lang['apiperm001'] = "Разрешить запуск/остановку Ranksystem Bot через API";
+$lang['apipermdesc'] = "(ON = Разрешить ; OFF = Запретить)";
$lang['addonchch'] = "Channel";
$lang['addonchchdesc'] = "Select a channel where you want to set the channel description.";
$lang['addonchdesc'] = "Channel description";
@@ -164,6 +166,7 @@ $lang['pass2'] = "Изменить пароль";
$lang['pass3'] = "Старый пароль";
$lang['pass4'] = "Новый пароль";
$lang['pass5'] = "Забыли пароль?";
+$lang['permission'] = "Разрешения";
$lang['privacy'] = "Privacy Policy";
$lang['repeat'] = "Повтор нового пароля";
$lang['resettime'] = "Сбрасываем онлайн и время простоя пользователя %s (UID: %s; DBID %s), так как пользователь был удален из исключений.";
@@ -363,12 +366,13 @@ $lang['stri0020'] = "%s За перевод интерфейса на Порт
$lang['stri0021'] = "%s за отличную поддержку на GitHub и нашем публичном сервере, за его идеи, тестирование перед релизом и многое другое";
$lang['stri0022'] = "%s за его идеи и тестирование перед релизом";
$lang['stri0023'] = "Стабильный релиз: 18/04/2016.";
-$lang['stri0024'] = "%s За перевод интерфейса на Чешский язык";
-$lang['stri0025'] = "%s За перевод интерфейса на Польский язык";
-$lang['stri0026'] = "%s За перевод интерфейса на Испанский язык";
-$lang['stri0027'] = "%s За перевод интерфейса на Венгерский язык";
-$lang['stri0028'] = "%s За перевод интерфейса на Азербайджанский язык";
-$lang['stri0029'] = "%s for the imprint function";
+$lang['stri0024'] = "%s для перевода на чешский язык";
+$lang['stri0025'] = "%s для перевода на польский язык";
+$lang['stri0026'] = "%s для перевода на испанский язык";
+$lang['stri0027'] = "%s для перевода на венгерский язык";
+$lang['stri0028'] = "%s для перевода на азербайджанский язык";
+$lang['stri0029'] = "%s для функции 'Imprint'";
+$lang['stri0030'] = "%s для стиля 'CosmicBlue' для страницы статистики и веб-интерфейса";
$lang['stta0001'] = "За все время";
$lang['sttm0001'] = "За месяц";
$lang['sttw0001'] = "Топ-10 пользователей";
@@ -477,6 +481,8 @@ $lang['wiexres3'] = "сброс времени";
$lang['wiexresdesc'] = "Существует три режима работы с исключенными пользователями. Во всех случаях время не начисляется, а ранги не выдаются. Вы можете выбрать разные варианты того, как накопленное пользователем время будет обрабатываться после того как он будет удален из исключений.
1) всегда считать время (стандартный): По умолчанию, система рангов всегда считает время онлайн/активных пользователей, которые исключены из системы рангов (клиент/серверная группа). В данном режиме не работает только повышение ранга. Это означает, что как только пользователь удалится из исключений, ему будут выданы группы из системы рангов основываясь на времени его активности (например, уровень 3).
2) заморозка времени: С этой опцией онлайн и время простоя будут заморожены на текущем значении (до того как пользователь был исключен). После того как пользователь будет удален из исключений его время онлайн и неактивности будут снова накапливаться.
3) сброс времени: С этой опцией при исключении пользователя время его активности и неактивности будут учитываться, однако после того как пользователь будет удален из исключений его время активности и неактивности будут сброшены.
Исключения по каналам не играют никакой роли, так как время всегда будет игнорироваться (как в режиме заморозки).";
$lang['wiexuid'] = "Исключенные пользователи";
$lang['wiexuiddesc'] = "Укажите через запятую уникальные идентификаторы пользователей (UID), которых система рангов будет игнорировать и им не будет засчитываться время, проведенное на сервере. ";
+$lang['wiexregrp'] = "удалить группу";
+$lang['wiexregrpdesc'] = "Если пользователь исключен из Ranksystem, то группа сервера, назначенная Ranksystem, будет удалена.
Группа будет удалена только с '".$lang['wiexres']."' с '".$lang['wiexres1']."'. В других режимах группа сервера не будет удалена.
Эта функция релевантна только в комбинации с '".$lang['wiexuid']."' или '".$lang['wiexgrp']."' в сочетании с '".$lang['wiexres1']."'";
$lang['wigrpimp'] = "Режим импорта";
$lang['wigrpt1'] = "Время в секундах";
$lang['wigrpt2'] = "Группа сервера";
@@ -657,6 +663,8 @@ $lang['wishsort2desc'] = "This will define the order for the second level sorti
$lang['wishsortdesc'] = "Выберите нужный тип сортировки для страницы общей статистики.";
$lang['wistcodesc'] = "Укажите необходимое количество подключений к серверу для получения достижения.";
$lang['wisttidesc'] = "Укажите необходимое время (в часах), необходимое для получения достижения.";
+$lang['wistyle'] = "пользовательский стиль";
+$lang['wistyledesc'] = "Определите отличный, пользовательский стиль (стиль) для системы рангов. Этот стиль будет использоваться на странице статистики и веб-интерфейсе.
Разместите свой собственный стиль в каталоге 'style' в собственном подкаталоге. Имя подкаталога определяет имя стиля.
Стили, начинающиеся с 'TSN_', поставляются системой рангов. Они будут обновляться в будущих версиях. В них не следует делать никаких изменений! Однако они могут использоваться как шаблон. Скопируйте стиль в собственный каталог, чтобы внести изменения в нем.
Требуются два файла CSS. Один для страницы статистики и один для веб-интерфейса. Также может быть включен собственный JavaScript. Это необязательно.
Конвенция именования CSS:
- Фиксированный 'ST.css' для страницы статистики (/stats/) - Фиксированный 'WI.css' для страницы веб-интерфейса (/webinterface/)
Название папки со стилем определяет имя стиля.
Стили, начинающиеся с 'TSN_', поставляются системой рангов. Они будут обновляться в будущих обновлениях. Не рекомендуется вносить изменения в эти стили! Однако они могут служить шаблоном. Скопируйте стиль в отдельную папку, чтобы вносить изменения.
Требуются два файла CSS. Один для страницы статистики, другой для веб-интерфейса. Также может быть включен собственный JavaScript. Но это необязательно.
Конвенция именования JavaScript:
- Фиксированное 'ST.js' для страницы статистики (/stats/) - Фиксированное 'WI.js' для страницы веб-интерфейса (/webinterface/)
Если вы хотите предоставить свой стиль другим людям, вы можете отправить его на следующую электронную почту:
%s
Мы включим его в следующем выпуске!";
$lang['wisupidle'] = "Режим времени";
$lang['wisupidledesc'] = "Предоставлены два режима, по которым будет высчиваться ранг пользователей:
1) Время подключения(Общее время): Общее время подключения на сервере, складывается из \"Активного времени\" и \"времени бездействия\"(колонка 'Сумм. время подключения' в 'stats/list_rankup.php')
2) Активное время(Время активности): Время, которое пользователь не находился в бездействии. Значение этого времени высчитывается путем вычитания \"времени бездействия из\" из \"Общего времени подключения на сервере\" (Колонка 'Сумм. время активности' в 'stats/list_rankup.php').
Не рекомендуется смена режима при уже отработавшем долгий срок старом режиме, но допустимо.";
$lang['wisvconf'] = "Сохранить";
@@ -673,6 +681,8 @@ $lang['wits3encrypt'] = "Шифрование TS3-Query";
$lang['wits3encryptdesc'] = "Включите данную опцию для активации шифрования между системой рангов и сервером TS3 (SSH). Когда эта опция отключена - система рангов осуществляет соединение с сервером TS3 используя Telnet (без шифрования, RAW). Это может быть риском безопасности, особенно нсли сервер TS3 и система рангов запущены на разных машинах.
Так же убедилесь что вы проверили TS3 Query порт, который (возможно) необходимо изменить в настройках системы рангов!
Внимание: Шифрование по SSH нагружает процессор! Мы рекомендуем использовать соединение без шифрования (RAW) если сервер TS3 и система рангов запущены на одной и той же машине (localhost / 127.0.0.1). Если они запущены на разных машинахх - используйте шифрование!
Системные требования:
1) TS3 Сервер версии 3.3.0 или выше.
2) Расширение PHP-SSH2. На Linux вы можете установить его командой: %s 3) Шифрование необходимо включить в конфигурации сервера TS3! Активируйте следующие параметры в вашем конфиге 'ts3server.ini' и настройте их под свои нужды: %s После того как закончите - необходимо так же перезагрузить сервер TS3 для применения настроек.";
$lang['wits3host'] = "Адрес TS3";
$lang['wits3hostdesc'] = "Адрес сервера TeamSpeak 3 (IP или DNS)";
+$lang['wits3pre'] = "Префикс команды бота";
+$lang['wits3predesc'] = "На сервере TeamSpeak вы можете связаться с ботом Ranksystem через чат. По умолчанию команды бота отмечены восклицательным знаком '!'. Префикс используется для идентификации команд для бота как таковых.
Этот префикс можно заменить любым другим желаемым префиксом. Это может понадобиться, если используются другие боты с похожими командами.
Например, команда бота по умолчанию будет выглядеть так:
!help
Если префикс заменить на '#', команда будет выглядеть так:
"},labels:["Clients"],goals:m,resize:!0}),$("#period").on("change",function(){var e=$(this).val();$.ajax({type:"POST",url:"update_graph.php?serverusagechart="+e,data:0,dataType:"json",success:function(e){console.log(e),t.setData(e)}})})}),$(document).ready(function(e){$("#period").trigger("change")});var a=document.getElementById("days"),b=document.getElementById("hours"),c=document.getElementById("minutes"),d=document.getElementById("seconds"),e=document.getElementById("sut").value;function setTime(){++e,d.innerHTML=pad(e%60),c.innerHTML=pad(parseInt(e/60)%60),b.innerHTML=pad(parseInt(e/3600)%24),a.innerHTML=pad(parseInt(e/86400))}function pad(e){var t=e+"";return t.length<2?"0"+t:t}setInterval(setTime,1e3);
\ No newline at end of file
+const donut_time_color_1=window.getComputedStyle(document.getElementById("donut_time_color_1")).getPropertyValue("color"),donut_time_color_2=window.getComputedStyle(document.getElementById("donut_time_color_2")).getPropertyValue("color"),donut_version_color_1=window.getComputedStyle(document.getElementById("donut_version_color_1")).getPropertyValue("color"),donut_version_color_2=window.getComputedStyle(document.getElementById("donut_version_color_2")).getPropertyValue("color"),donut_version_color_3=window.getComputedStyle(document.getElementById("donut_version_color_3")).getPropertyValue("color"),donut_version_color_4=window.getComputedStyle(document.getElementById("donut_version_color_4")).getPropertyValue("color"),donut_version_color_5=window.getComputedStyle(document.getElementById("donut_version_color_5")).getPropertyValue("color"),donut_version_color_6=window.getComputedStyle(document.getElementById("donut_version_color_6")).getPropertyValue("color"),donut_nation_color_1=window.getComputedStyle(document.getElementById("donut_nation_color_1")).getPropertyValue("color"),donut_nation_color_2=window.getComputedStyle(document.getElementById("donut_nation_color_2")).getPropertyValue("color"),donut_nation_color_3=window.getComputedStyle(document.getElementById("donut_nation_color_3")).getPropertyValue("color"),donut_nation_color_4=window.getComputedStyle(document.getElementById("donut_nation_color_4")).getPropertyValue("color"),donut_nation_color_5=window.getComputedStyle(document.getElementById("donut_nation_color_5")).getPropertyValue("color"),donut_nation_color_6=window.getComputedStyle(document.getElementById("donut_nation_color_6")).getPropertyValue("color"),donut_platform_color_1=window.getComputedStyle(document.getElementById("donut_platform_color_1")).getPropertyValue("color"),donut_platform_color_2=window.getComputedStyle(document.getElementById("donut_platform_color_2")).getPropertyValue("color"),donut_platform_color_3=window.getComputedStyle(document.getElementById("donut_platform_color_3")).getPropertyValue("color"),donut_platform_color_4=window.getComputedStyle(document.getElementById("donut_platform_color_4")).getPropertyValue("color"),donut_platform_color_5=window.getComputedStyle(document.getElementById("donut_platform_color_5")).getPropertyValue("color"),donut_platform_color_6=window.getComputedStyle(document.getElementById("donut_platform_color_6")).getPropertyValue("color"),graph_lineColors_1=window.getComputedStyle(document.getElementById("graph_lineColors_1")).getPropertyValue("color"),graph_lineColors_2=window.getComputedStyle(document.getElementById("graph_lineColors_2")).getPropertyValue("color"),graph_pointFillColors_1=window.getComputedStyle(document.getElementById("graph_pointFillColors_1")).getPropertyValue("color"),graph_pointFillColors_2=window.getComputedStyle(document.getElementById("graph_pointFillColors_2")).getPropertyValue("color"),graph_pointStrokeColors_1=window.getComputedStyle(document.getElementById("graph_pointStrokeColors_1")).getPropertyValue("color"),graph_pointStrokeColors_2=window.getComputedStyle(document.getElementById("graph_pointStrokeColors_2")).getPropertyValue("color"),graph_fillOpacity=window.getComputedStyle(document.getElementById("graph_fillOpacity")).getPropertyValue("opacity");for(var m,tsn=new Array,i=1;i<36;i++)tsn[i]=document.getElementById("tsn"+i).value;m="0"===tsn[35]||"2"===tsn[35]?[0,0,tsn[34]]:0,Morris.Donut({element:"time-gap-donut",data:[{label:tsn[1],value:tsn[4]},{label:tsn[2],value:tsn[5]}],colors:[donut_time_color_1,donut_time_color_2]}),Morris.Donut({element:"client-version-donut",data:[{label:tsn[6],value:tsn[11]},{label:tsn[7],value:tsn[12]},{label:tsn[8],value:tsn[13]},{label:tsn[9],value:tsn[14]},{label:tsn[10],value:tsn[15]},{label:tsn[3],value:tsn[16]}],colors:[donut_version_color_1,donut_version_color_2,donut_version_color_3,donut_version_color_4,donut_version_color_5,donut_version_color_6]}),Morris.Donut({element:"user-descent-donut",data:[{label:tsn[17],value:tsn[22]},{label:tsn[18],value:tsn[23]},{label:tsn[19],value:tsn[24]},{label:tsn[20],value:tsn[25]},{label:tsn[21],value:tsn[26]},{label:tsn[3],value:tsn[27]}],colors:[donut_nation_color_1,donut_nation_color_2,donut_nation_color_3,donut_nation_color_4,donut_nation_color_5,donut_nation_color_6]}),Morris.Donut({element:"user-platform-donut",data:[{label:"Windows",value:tsn[28]},{label:"iOS",value:tsn[29]},{label:"Linux",value:tsn[30]},{label:"Android",value:tsn[31]},{label:"OSX",value:tsn[32]},{label:tsn[3],value:tsn[33]}],colors:[donut_platform_color_1,donut_platform_color_2,donut_platform_color_3,donut_platform_color_4,donut_platform_color_5,donut_platform_color_6]}),$(function(){var e="0"===tsn[35]||"1"===tsn[35]?Morris.Area({element:"serverusagechart",behaveLikeLine:!0,data:[],xkey:"y",ykeys:["a","b"],hideHover:"auto",fillOpacity:graph_fillOpacity,hoverCallback:function(o,e,t,l){return""+l.y+"