release 1.2.12
This commit is contained in:
35
install.php
35
install.php
@@ -1,5 +1,6 @@
|
||||
<?PHP
|
||||
<?PHP
|
||||
require_once('other/config.php');
|
||||
$rsversion = '1.2.12';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -36,7 +37,7 @@ require_once('other/config.php');
|
||||
<div id="wrapper">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="index.php">TSN Ranksystem - <?PHP echo $lang['install']; ?></a>
|
||||
<a class="navbar-brand" href="index.php">TSN Ranksystem - <?PHP echo $lang['install'],' (',$rsversion,')'; ?></a>
|
||||
</div>
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<li class="dropdown">
|
||||
@@ -54,6 +55,9 @@ require_once('other/config.php');
|
||||
<li>
|
||||
<a href="?lang=en"><span class="flag-icon flag-icon-us"></span> EN - English</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=es"><span class="flag-icon flag-icon-es"></span> ES - español</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=fr"><span class="flag-icon flag-icon-fr"></span> FR - français</a>
|
||||
</li>
|
||||
@@ -123,7 +127,7 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`cldbid` int(10) NOT NULL default '0',`count` int(10) NOT NULL default '0',`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`lastseen` bigint(11) NOT NULL default '0',`grpid` int(10) NOT NULL default '0',`nextup` int(10) NOT NULL default '0',`idle` int(10) NOT NULL default '0',`cldgroup` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`online` tinyint(1) NOT NULL default '0',`boosttime` int(10) NOT NULL default '0',`rank` int(10) NOT NULL default '0',`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`nation` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`firstcon` bigint(11) NOT NULL default '0',`except` tinyint(1) NOT NULL default '0',`grpsince` bigint(11) NOT NULL default '0',`cid` int(10) NOT NULL default '0')") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user` (`uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`cldbid` int(10) NOT NULL default '0',`count` int(10) NOT NULL default '0',`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`lastseen` bigint(11) NOT NULL default '0',`grpid` int(10) NOT NULL default '0',`nextup` int(10) NOT NULL default '0',`idle` int(10) NOT NULL default '0',`cldgroup` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`online` tinyint(1) NOT NULL default '0',`boosttime` int(10) NOT NULL default '0',`rank` int(10) NOT NULL default '0',`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`nation` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`firstcon` bigint(11) NOT NULL default '0',`except` tinyint(1) NOT NULL default '0',`grpsince` bigint(11) NOT NULL default '0',`cid` int(10) NOT NULL default '0')") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
} else {
|
||||
@@ -146,7 +150,7 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`config` (`webuser` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`webpass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tshost` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tsquery` smallint(5) UNSIGNED NOT NULL default '0',`tsvoice` smallint(5) UNSIGNED NOT NULL default '0',`tsuser` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tspass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`language` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`queryname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`grouptime` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`resetbydbchange` tinyint(1) NOT NULL default '0',`msgtouser` tinyint(1) NOT NULL default '0',`currvers` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`substridle` tinyint(1) NOT NULL default '0',`exceptuuid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`exceptgroup` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`dateformat` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`showexcld` tinyint(1) NOT NULL default '0',`showcolcld` tinyint(1) NOT NULL default '0',`showcoluuid` tinyint(1) NOT NULL default '0',`showcoldbid` tinyint(1) NOT NULL default '0',`showcolot` tinyint(1) NOT NULL default '0',`showcolit` tinyint(1) NOT NULL default '0',`showcolat` tinyint(1) NOT NULL default '0',`showcolnx` tinyint(1) NOT NULL default '0',`showcolsg` tinyint(1) NOT NULL default '0',`showcolrg` tinyint(1) NOT NULL default '0',`showcolls` tinyint(1) NOT NULL default '0',`slowmode` mediumint(9) NOT NULL default '0',`cleanclients` tinyint(1) NOT NULL default '0',`cleanperiod` mediumint(9) NOT NULL default '0',`showhighest` tinyint(1) NOT NULL default '0',`boost` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`showcolas` tinyint(1) NOT NULL default '0',`defchid` int(10) NOT NULL default '0',`timezone` varchar(35) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`logpath` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`advancemode` tinyint(1) NOT NULL default '0',`count_access` tinyint(2) NOT NULL default '0',`last_access` bigint(11) NOT NULL default '0',`ignoreidle` smallint(5) NOT NULL default '0',`exceptcid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`rankupmsg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`boost_mode` tinyint(1) NOT NULL default '0',`newversion` varchar(25) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`servernews` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`adminuuid` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`nextupinfo` tinyint(1) NOT NULL default '0',`nextupinfomsg1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`nextupinfomsg2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`nextupinfomsg3` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`shownav` tinyint(1) NOT NULL default '0',`showgrpsince` tinyint(1) NOT NULL default '0',`resetexcept` tinyint(1) NOT NULL default '0',`upchannel` varchar(20) NOT NULL default '0',`avatar_delay` smallint(5) UNSIGNED NOT NULL default '0',`registercid` mediumint(8) UNSIGNED NOT NULL default '0',`iphash` tinyint(1) NOT NULL default '0',`tsencrypt` tinyint(1) NOT NULL default '0')") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`cfg_params` (`param` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `value` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
@@ -161,7 +165,7 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
}
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_snapshot` (`timestamp` bigint(11) NOT NULL default '0',`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`count` int(10) NOT NULL default '0',`idle` int(10) NOT NULL default '0',PRIMARY KEY (`timestamp`,`uuid`))") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_snapshot` (`timestamp` bigint(11) NOT NULL default '0',`uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`count` int(10) NOT NULL default '0',`idle` int(10) NOT NULL default '0',PRIMARY KEY (`timestamp`,`uuid`))") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
} else {
|
||||
@@ -176,7 +180,7 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_user` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`removed` tinyint(1) NOT NULL default '0',`rank` int(10) NOT NULL default '0',`total_connections` smallint(5) NOT NULL default '0',`count_week` int(10) NOT NULL default '0',`count_month` int(10) NOT NULL default '0',`idle_week` int(10) NOT NULL default '0',`idle_month` int(10) NOT NULL default '0',`achiev_count` tinyint(1) NOT NULL default '0',`achiev_time` int(10) NOT NULL default '0',`achiev_connects` smallint(5) NOT NULL default '0',`achiev_battles` tinyint(3) NOT NULL default '0',`achiev_time_perc` tinyint(3) NOT NULL default '0',`achiev_connects_perc` tinyint(3) NOT NULL default '0',`achiev_battles_perc` tinyint(3) NOT NULL default '0',`battles_total` tinyint(3) NOT NULL default '0',`battles_won` tinyint(3) NOT NULL default '0',`battles_lost` tinyint(3) NOT NULL default '0',`client_description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`base64hash` varchar(58) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`client_total_up` bigint(15) NOT NULL default '0',`client_total_down` bigint(15) NOT NULL default '0',`active_week` int(10) NOT NULL default '0',`active_month` int(10) NOT NULL default '0')") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_user` (`uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`removed` tinyint(1) NOT NULL default '0',`rank` int(10) NOT NULL default '0',`total_connections` smallint(5) NOT NULL default '0',`count_week` int(10) NOT NULL default '0',`count_month` int(10) NOT NULL default '0',`idle_week` int(10) NOT NULL default '0',`idle_month` int(10) NOT NULL default '0',`achiev_count` tinyint(1) NOT NULL default '0',`achiev_time` int(10) NOT NULL default '0',`achiev_connects` smallint(5) NOT NULL default '0',`achiev_battles` tinyint(3) NOT NULL default '0',`achiev_time_perc` tinyint(3) NOT NULL default '0',`achiev_connects_perc` tinyint(3) NOT NULL default '0',`achiev_battles_perc` tinyint(3) NOT NULL default '0',`battles_total` tinyint(3) NOT NULL default '0',`battles_won` tinyint(3) NOT NULL default '0',`battles_lost` tinyint(3) NOT NULL default '0',`client_description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`base64hash` char(58) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`client_total_up` bigint(15) NOT NULL default '0',`client_total_down` bigint(15) NOT NULL default '0',`active_week` int(10) NOT NULL default '0',`active_month` int(10) NOT NULL default '0')") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
@@ -186,12 +190,12 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`admin_addtime` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`timestamp` bigint(11) NOT NULL default '0',`timecount` int(10) NOT NULL default '0', PRIMARY KEY (`uuid`,`timestamp`))") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`admin_addtime` (`uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`timestamp` bigint(11) NOT NULL default '0',`timecount` int(10) NOT NULL default '0', PRIMARY KEY (`uuid`,`timestamp`))") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_iphash` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`iphash` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`ip` varchar(39) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_iphash` (`uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`iphash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`ip` varchar(39) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
@@ -206,11 +210,6 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`csrf_token` (`token` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `timestamp` bigint(11) NOT NULL default '0', `sessionid` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_nations` (`nation` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`count` int(10) NOT NULL default '0')") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
@@ -236,7 +235,12 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`addon_assign_groups` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`grpids` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`addon_assign_groups` (`uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`grpids` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`csrf_token` (`token` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `timestamp` bigint(11) NOT NULL default '0', `sessionid` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
@@ -319,12 +323,13 @@ if(isset($_POST['confweb'])) {
|
||||
}
|
||||
}
|
||||
if(!isset($err_lvl) || $err_lvl != 1) {
|
||||
$dateformat = $mysqlcon->quote("%a days, %h hours, %i mins, %s secs");
|
||||
$nextupinfomsg1 = $mysqlcon->quote("Your next rank up will be in %1\$s days, %2\$s hours, %3\$s minutes and %4\$s seconds. The next servergroup you will reach is [B]%5\$s[/B].");
|
||||
$nextupinfomsg2 = $mysqlcon->quote("You have already reached the highest rank.");
|
||||
$nextupinfomsg3 = $mysqlcon->quote("You are excepted from the Ranksystem. If you wish to rank contact an admin on the TS3 server.");
|
||||
$servernews = $mysqlcon->quote("<strong>Message</strong><br>This is an example Message.<br>Change this Message inside the webinterface.");
|
||||
$rankupmsg = $mysqlcon->quote('Hey, you reached a higher rank, since you already connected for %1$s days, %2$s hours and %3$s minutes to our TS3 server.[B]Keep it up![/B] ;-) ');
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`config` (`webuser`,`webpass`,`tshost`,`tsquery`,`tsvoice`,`tsuser`,`language`,`queryname`,`grouptime`,`resetbydbchange`,`msgtouser`,`currvers`,`exceptuuid`,`exceptgroup`,`dateformat`,`showexcld`,`showcolcld`,`showcoluuid`,`showcoldbid`,`showcolot`,`showcolit`,`showcolat`,`showcolnx`,`showcolsg`,`showcolrg`,`showcolls`,`slowmode`,`cleanclients`,`cleanperiod`,`showhighest`,`showcolas`,`defchid`,`timezone`,`logpath`,`ignoreidle`,`rankupmsg`,`newversion`,`servernews`,`nextupinfo`,`nextupinfomsg1`,`nextupinfomsg2`,`nextupinfomsg3`,`shownav`,`showgrpsince`,`resetexcept`,`upchannel`,`avatar_delay`,`iphash`,`tsencrypt`) VALUES ('$user','$pass','localhost','10011','9987','serveradmin','en','Ranksystem','31536000=>47,31536060=>50','1','1','1.2.11','xrTKhT/HDl4ea0WoFDQH2zOpmKg=','2,6','%a days, %h hours, %i mins, %s secs','1','1','1','1','1','1','1','1','1','1','1','0','1','86400','1','1','0','Europe/Berlin','$logpath','600',$rankupmsg,'1.2.11',$servernews,'1',$nextupinfomsg1,$nextupinfomsg2,$nextupinfomsg3,'1','1','0','version','0','0','0')") === false) {
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('default_date_format', $dateformat), ('default_language', 'en'), ('logs_path', '{$logpath}'), ('logs_timezone', 'Europe/Berlin'), ('rankup_boost_definition', ''), ('rankup_clean_clients_period', '86400'), ('rankup_clean_clients_switch', '1'), ('rankup_client_database_id_change_switch', '0'), ('rankup_definition', '31536000=>47,31536060=>50'), ('rankup_excepted_channel_id_list', ''), ('rankup_excepted_group_id_list', '2,6'), ('rankup_excepted_mode', '0'), ('rankup_excepted_unique_client_id_list', 'xrTKhT/HDL4ea0WoFDQH2zOpmKg='), ('rankup_hash_ip_addresses_mode', '2'), ('rankup_ignore_idle_time', '600'), ('rankup_message_to_user', $rankupmsg), ('rankup_message_to_user_switch', '1'), ('rankup_next_message_1', $nextupinfomsg1), ('rankup_next_message_2', $nextupinfomsg2), ('rankup_next_message_3', $nextupinfomsg3), ('rankup_next_message_mode', '1'), ('rankup_time_assess_mode', '0'), ('stats_column_active_time_switch', '0'), ('stats_column_current_group_since_switch', '1'), ('stats_column_current_server_group_switch', '1'), ('stats_column_client_db_id_switch', '0'), ('stats_column_client_name_switch', '1'), ('stats_column_idle_time_switch', '1'), ('stats_column_last_seen_switch', '1'), ('stats_column_next_rankup_switch', '1'), ('stats_column_next_server_group_switch', '1'), ('stats_column_online_time_switch', '1'), ('stats_column_rank_switch', '1'), ('stats_column_unique_id_switch', '0'), ('stats_server_news', $servernews), ('stats_show_clients_in_highest_rank_switch', '1'), ('stats_show_excepted_clients_switch', '1'), ('stats_show_site_navigation_switch', '1'), ('teamspeak_avatar_download_delay', '0'), ('teamspeak_default_channel_id', '0'), ('teamspeak_host_address', '127.0.0.1'), ('teamspeak_query_command_delay', '0'), ('teamspeak_query_encrypt_switch', '0'), ('teamspeak_query_nickname', 'Ranksystem'), ('teamspeak_query_pass', ''), ('teamspeak_query_port', '10011'), ('teamspeak_query_user', 'serveradmin'), ('teamspeak_verification_channel_id', '0'), ('teamspeak_voice_port', '9987'), ('version_current_using', '{$rsversion}'), ('version_latest_available', '{$rsversion}'), ('version_update_channel', 'stable'), ('webinterface_access_count', '0'), ('webinterface_access_last', '0'), ('webinterface_admin_client_unique_id_list', ''), ('webinterface_advanced_mode', '0'), ('webinterface_pass', '{$pass}'), ('webinterface_user', '{$user}');") === false) {
|
||||
$err_msg = $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true); $err_lvl = 2;
|
||||
} else {
|
||||
$err_msg = $lang['isntwiusr'].'<br><br>';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?PHP
|
||||
function addon_assign_groups($addons_config,$ts3,$dbname,$slowmode,$timezone,$logpath,$allclients,$select_arr) {
|
||||
function addon_assign_groups($addons_config,$ts3,$cfg,$dbname,$allclients,$select_arr) {
|
||||
$sqlexec = '';
|
||||
|
||||
if(isset($select_arr['addon_assign_groups']) && count($select_arr['addon_assign_groups']) != 0) {
|
||||
@@ -16,20 +16,20 @@ function addon_assign_groups($addons_config,$ts3,$dbname,$slowmode,$timezone,$lo
|
||||
if(isset($cldbid)) {
|
||||
if(strstr($group, '-')) {
|
||||
$group = str_replace('-','',$group);
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$ts3->serverGroupClientDel($group, $cldbid);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"addon_assign_groups:".$e->getCode().': '."Error while removing group: ".$e->getMessage());
|
||||
enter_logfile($cfg,2,"addon_assign_groups:".$e->getCode().': '."Error while removing group: ".$e->getMessage());
|
||||
}
|
||||
} else {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$ts3->serverGroupClientAdd($group, $cldbid);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"addon_assign_groups:".$e->getCode().': '."Error while adding group: ".$e->getMessage());
|
||||
enter_logfile($cfg,2,"addon_assign_groups:".$e->getCode().': '."Error while adding group: ".$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
248
jobs/bot.php
248
jobs/bot.php
@@ -5,22 +5,22 @@ ini_set('default_charset', 'UTF-8');
|
||||
setlocale(LC_ALL, 'UTF-8');
|
||||
error_reporting(0);
|
||||
|
||||
function shutdown($mysqlcon = NULL, $logpath, $timezone, $loglevel, $reason, $nodestroypid = TRUE) {
|
||||
function shutdown($mysqlcon = NULL,$cfg,$loglevel,$reason,$nodestroypid = TRUE) {
|
||||
if($nodestroypid === TRUE) {
|
||||
if (file_exists(substr(__DIR__,0,-4).'logs/pid')) {
|
||||
unlink(substr(__DIR__,0,-4).'logs/pid');
|
||||
}
|
||||
}
|
||||
enter_logfile($logpath,$timezone,$loglevel,$reason." Shutting down!");
|
||||
enter_logfile($cfg,$loglevel,$reason." Shutting down!");
|
||||
if(isset($mysqlcon)) {
|
||||
$mysqlcon->close();
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
function enter_logfile($logpath,$timezone,$loglevel,$logtext,$norotate = false) {
|
||||
function enter_logfile($cfg,$loglevel,$logtext,$norotate = false) {
|
||||
global $phpcommand;
|
||||
$file = $logpath.'ranksystem.log';
|
||||
$file = $cfg['logs_path'].'ranksystem.log';
|
||||
if ($loglevel == 1) {
|
||||
$loglevel = " CRITICAL ";
|
||||
} elseif ($loglevel == 2) {
|
||||
@@ -35,11 +35,11 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext,$norotate = false)
|
||||
$loglevel = " DEBUG ";
|
||||
}
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n");
|
||||
fclose($loghandle);
|
||||
if($norotate == false && filesize($file) > 5242880) {
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fclose($loghandle);
|
||||
$file2 = "$file.old";
|
||||
if (file_exists($file2)) {
|
||||
@@ -47,7 +47,7 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext,$norotate = false)
|
||||
}
|
||||
rename($file, $file2);
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
fclose($loghandle);
|
||||
}
|
||||
}
|
||||
@@ -56,28 +56,28 @@ require_once(substr(__DIR__,0,-4).'other/config.php');
|
||||
require_once(substr(__DIR__,0,-4).'other/phpcommand.php');
|
||||
|
||||
if(isset($_SERVER['HTTP_HOST']) || isset($_SERVER['REMOTE_ADDR'])) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Request to start the Ranksystem from ".$_SERVER['REMOTE_ADDR'].". It seems the request came not from the command line!");
|
||||
shutdown($mysqlcon,$cfg,1,"Request to start the Ranksystem from ".$_SERVER['REMOTE_ADDR'].". It seems the request came not from the command line!");
|
||||
}
|
||||
if(version_compare(phpversion(), '5.5.0', '<')) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Your PHP version (".phpversion().") is below 5.5.0. Update of PHP is required!");
|
||||
shutdown($mysqlcon,$cfg,1,"Your PHP version (".phpversion().") is below 5.5.0. Update of PHP is required!");
|
||||
}
|
||||
if(!function_exists('simplexml_load_file')) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "SimpleXML is missed. Installation of SimpleXML is required!");
|
||||
shutdown($mysqlcon,$cfg,1,"SimpleXML is missed. Installation of SimpleXML is required!");
|
||||
}
|
||||
if(!in_array('curl', get_loaded_extensions())) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "PHP cURL is missed. Installation of PHP cURL is required!");
|
||||
shutdown($mysqlcon,$cfg,1,"PHP cURL is missed. Installation of PHP cURL is required!");
|
||||
}
|
||||
if(!in_array('zip', get_loaded_extensions())) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "PHP Zip is missed. Installation of PHP Zip is required!");
|
||||
shutdown($mysqlcon,$cfg,1,"PHP Zip is missed. Installation of PHP Zip is required!");
|
||||
}
|
||||
if(!in_array('ssh2', get_loaded_extensions()) && $ts['tsencrypt'] == 1) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "PHP SSH2 is missed. Installation of PHP SSH2 is required, when using secured (SSH) connection to TeamSpeak! If you are not able to install PHP SSH2 (i.e. hosted webspace), you need to deactivate the TS3 Query encryption inside the Webinterface.");
|
||||
if(!in_array('ssh2', get_loaded_extensions()) && $cfg['teamspeak_query_encrypt_switch'] == 1) {
|
||||
shutdown($mysqlcon,$cfg,1,"PHP SSH2 is missed. Installation of PHP SSH2 is required, when using secured (SSH) connection to TeamSpeak! If you are not able to install PHP SSH2 (i.e. hosted webspace), you need to deactivate the TS3 Query encryption inside the Webinterface.");
|
||||
}
|
||||
|
||||
enter_logfile($logpath,$timezone,5,"###################################################################");
|
||||
enter_logfile($logpath,$timezone,5,"");
|
||||
enter_logfile($logpath,$timezone,5,"###################################################################");
|
||||
enter_logfile($logpath,$timezone,5,"Initialize Bot...");
|
||||
enter_logfile($cfg,5,"###################################################################");
|
||||
enter_logfile($cfg,5,"");
|
||||
enter_logfile($cfg,5,"###################################################################");
|
||||
enter_logfile($cfg,5,"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');
|
||||
@@ -90,82 +90,83 @@ 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');
|
||||
|
||||
enter_logfile($logpath,$timezone,6,"Running on OS: ".php_uname("s")." ".php_uname("r"));
|
||||
enter_logfile($logpath,$timezone,6,"Using PHP Version: ".phpversion());
|
||||
enter_logfile($logpath,$timezone,6,"Database Version: ".$mysqlcon->getAttribute(PDO::ATTR_SERVER_VERSION));
|
||||
enter_logfile($cfg,6,"Running on OS: ".php_uname("s")." ".php_uname("r"));
|
||||
enter_logfile($cfg,6,"Using PHP Version: ".phpversion());
|
||||
enter_logfile($cfg,6,"Database Version: ".$mysqlcon->getAttribute(PDO::ATTR_SERVER_VERSION));
|
||||
|
||||
$currvers = check_db($mysqlcon,$lang,$dbname,$timezone,$currvers,$logpath);
|
||||
enter_logfile($logpath,$timezone,5,"Check Ranksystem files for updates...");
|
||||
if(isset($currvers) && isset($newversion) && $newversion != NULL && version_compare($newversion, $currvers, '>')) {
|
||||
update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpcommand);
|
||||
$cfg = check_db($mysqlcon,$lang,$cfg,$dbname);
|
||||
enter_logfile($cfg,5,"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);
|
||||
}
|
||||
enter_logfile($logpath,$timezone,5,"Check Ranksystem files for updates [done]");
|
||||
enter_logfile($cfg,5,"Check Ranksystem files for updates [done]");
|
||||
|
||||
function check_shutdown($timezone,$logpath) {
|
||||
function check_shutdown($cfg) {
|
||||
if(!is_file(substr(__DIR__,0,-4).'logs/pid')) {
|
||||
shutdown(NULL, $logpath, $timezone, 5, "Received signal to stop!");
|
||||
shutdown(NULL,$cfg,5,"Received signal to stop!");
|
||||
}
|
||||
}
|
||||
|
||||
enter_logfile($logpath,$timezone,5,"Ranksystem Version: ".$currvers);
|
||||
enter_logfile($logpath,$timezone,5,"Loading addons...");
|
||||
enter_logfile($cfg,5,"Ranksystem Version: ".$cfg['version_current_using']);
|
||||
enter_logfile($cfg,5,"Loading addons...");
|
||||
require_once(substr(__DIR__,0,-4).'other/load_addons_config.php');
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
if($addons_config['assign_groups_active']['value'] == '1') {
|
||||
enter_logfile($logpath,$timezone,5," Addon: 'assign_groups' [ON]");
|
||||
enter_logfile($cfg,5," Addon: 'assign_groups' [ON]");
|
||||
include(substr(__DIR__,0,-4).'jobs/addon_assign_groups.php');
|
||||
define('assign_groups',1);
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5," Addon: 'assign_groups' [OFF]");
|
||||
enter_logfile($cfg,5," Addon: 'assign_groups' [OFF]");
|
||||
}
|
||||
enter_logfile($logpath,$timezone,5,"Loading addons [done]");
|
||||
enter_logfile($cfg,5,"Loading addons [done]");
|
||||
|
||||
enter_logfile($cfg,5,"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']."\").");
|
||||
|
||||
enter_logfile($logpath,$timezone,5,"Connect to TS3 Server (Address: \"".$ts['host']."\" Voice-Port: \"".$ts['voice']."\" Query-Port: \"".$ts['query']."\" SSH: \"".$ts['tsencrypt']."\").");
|
||||
try {
|
||||
if($ts['tsencrypt'] == 1) {
|
||||
$ts3host = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?ssh=1");
|
||||
if($cfg['teamspeak_query_encrypt_switch'] == 1) {
|
||||
$ts3host = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?ssh=1");
|
||||
} else {
|
||||
$ts3host = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?blocking=0");
|
||||
$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($logpath,$timezone,5,"Connection to TS3 Server established.");
|
||||
enter_logfile($cfg,5,"Connection to TS3 Server established.");
|
||||
try{
|
||||
$ts3version = $ts3host->version();
|
||||
enter_logfile($logpath,$timezone,5," TS3 Server version: ".$ts3version['version']." on ".$ts3version['platform']." [Build: ".$ts3version['build']." from ".date("Y-m-d H:i:s",$ts3version['build'])."]");
|
||||
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'])."]");
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2," Error due getting TS3 server version - ".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2," Error due getting TS3 server version - ".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
|
||||
enter_logfile($logpath,$timezone,5," Select virtual server...");
|
||||
enter_logfile($cfg,5," Select virtual server...");
|
||||
try {
|
||||
if(version_compare($ts3version['version'],'3.4.0','>=')) {
|
||||
usleep($slowmode);
|
||||
$ts3server = $ts3host->serverGetByPort($ts['voice'], $queryname);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3server = $ts3host->serverGetByPort($cfg['teamspeak_voice_port'], $cfg['teamspeak_query_nickname']);
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,3," Your TS3 server is outdated, please update it!");
|
||||
usleep($slowmode);
|
||||
$ts3server = $ts3host->serverGetByPort($ts['voice']);
|
||||
enter_logfile($cfg,3," Your TS3 server is outdated, please update it!");
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3server = $ts3host->serverGetByPort($cfg['teamspeak_voice_port']);
|
||||
for ($updcld = 0; $updcld < 10; $updcld++) {
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
if($updcld == 0) {
|
||||
$ts3server->selfUpdate(array('client_nickname' => $queryname));
|
||||
$ts3server->selfUpdate(array('client_nickname' => $cfg['teamspeak_query_nickname']));
|
||||
} else {
|
||||
$ts3server->selfUpdate(array('client_nickname' => $queryname.$updcld));
|
||||
$ts3server->selfUpdate(array('client_nickname' => $cfg['teamspeak_query_nickname'].$updcld));
|
||||
}
|
||||
break;
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,3,' '.$lang['errorts3'].$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,3,' '.$lang['errorts3'].$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
enter_logfile($logpath,$timezone,5," Select virtual server [done]");
|
||||
enter_logfile($cfg,5," Select virtual server [done]");
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2," Error due selecting virtual server - ".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2," Error due selecting virtual server - ".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3server->notifyRegister("server");
|
||||
$ts3server->notifyRegister("textprivate");
|
||||
$ts3server->notifyRegister("textchannel");
|
||||
@@ -173,50 +174,50 @@ try {
|
||||
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyTextmessage", "handle_messages");
|
||||
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyCliententerview", "event_userenter");
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2," Error due notifyRegister on TS3 server - ".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2," Error due notifyRegister on TS3 server - ".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
|
||||
$whoami = $ts3server->whoami();
|
||||
if($defchid != 0) {
|
||||
if($cfg['teamspeak_default_channel_id'] != 0) {
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$ts3server->clientMove($whoami['client_id'],$defchid);
|
||||
enter_logfile($logpath,$timezone,5," Joined to specified Channel.");
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3server->clientMove($whoami['client_id'],$cfg['teamspeak_default_channel_id']);
|
||||
enter_logfile($cfg,5," Joined to specified Channel.");
|
||||
} catch (Exception $e) {
|
||||
if($e->getCode() != 770) {
|
||||
enter_logfile($logpath,$timezone,2," Could not join specified channel (Channel ID: ".$defchid.") - ".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2," Could not join specified channel (Channel ID: ".$cfg['teamspeak_default_channel_id'].") - ".$e->getCode().': '.$e->getMessage());
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5," Joined to specified channel (already member of it).");
|
||||
enter_logfile($cfg,5," Joined to specified channel (already member of it).");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," No channel defined where the Ranksystem Bot should be entered.");
|
||||
enter_logfile($cfg,4," No channel defined where the Ranksystem Bot should be entered.");
|
||||
}
|
||||
|
||||
enter_logfile($logpath,$timezone,5,"Config check started...");
|
||||
enter_logfile($cfg,5,"Config check started...");
|
||||
|
||||
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
|
||||
enter_logfile($logpath,$timezone,1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
|
||||
$checkgroups = 0;
|
||||
if(isset($groupslist) && $groupslist != NULL) {
|
||||
if(isset($grouptime) && $grouptime != NULL) {
|
||||
foreach($grouptime as $time => $groupid) {
|
||||
if(isset($cfg['rankup_definition']) && $cfg['rankup_definition'] != NULL) {
|
||||
foreach($cfg['rankup_definition'] as $time => $groupid) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
$checkgroups++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($boostarr) && $boostarr != NULL) {
|
||||
foreach($boostarr as $groupid => $value) {
|
||||
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) {
|
||||
$checkgroups++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($exceptgroup) && $exceptgroup != NULL) {
|
||||
foreach($exceptgroup as $groupid => $value) {
|
||||
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) {
|
||||
$checkgroups++;
|
||||
}
|
||||
@@ -224,70 +225,69 @@ try {
|
||||
}
|
||||
}
|
||||
if($checkgroups > 0) {
|
||||
enter_logfile($logpath,$timezone,4," Found servergroups in config, which are unknown. Redownload all servergroups from TS3 server.");
|
||||
enter_logfile($cfg,4," Found servergroups in config, which are unknown. Redownload all servergroups from TS3 server.");
|
||||
if($mysqlcon->exec("DELETE FROM groups;") === false) {
|
||||
enter_logfile($logpath,$timezone,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2," Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
$nobreak = 1;
|
||||
$sqlexec = '';
|
||||
$serverinfo = $ts3server->serverInfo();
|
||||
$select_arr = array();
|
||||
$sqlexec .= update_groups($ts3server,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$serverinfo,$logpath,$grouptime,$boostarr,$exceptgroup,$select_arr,$adminuuid,$nobreak);
|
||||
$sqlexec .= update_groups($ts3server,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,$select_arr,$nobreak);
|
||||
if($mysqlcon->exec($sqlexec) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
unset($sqlexec, $select_arr, $groupslist);
|
||||
$errcnf = 0;
|
||||
enter_logfile($logpath,$timezone,4," Downloading of servergroups finished. Recheck the config.");
|
||||
enter_logfile($cfg,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($logpath,$timezone,1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,1," Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
|
||||
if(isset($groupslist) && $groupslist != NULL) {
|
||||
if(isset($grouptime) && $grouptime != NULL) {
|
||||
foreach($grouptime as $time => $groupid) {
|
||||
if(isset($cfg['rankup_definition']) && $cfg['rankup_definition'] != NULL) {
|
||||
foreach($cfg['rankup_definition'] as $time => $groupid) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
enter_logfile($logpath,$timezone,1,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wigrptime']));
|
||||
enter_logfile($cfg,1,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wigrptime']));
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($boostarr) && $boostarr != NULL) {
|
||||
foreach($boostarr as $groupid => $value) {
|
||||
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($logpath,$timezone,2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiboost']));
|
||||
enter_logfile($cfg,2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiboost']));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($exceptgroup) && $exceptgroup != NULL) {
|
||||
foreach($exceptgroup as $groupid => $value) {
|
||||
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($logpath,$timezone,2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiexgrp']));
|
||||
enter_logfile($cfg,2,' '.sprintf($lang['upgrp0001'], $groupid, $lang['wiexgrp']));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($errcnf > 0) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Critical Config error!");
|
||||
shutdown($mysqlcon,$cfg,1,"Critical Config error!");
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," No critical problems found! All seems to be fine...");
|
||||
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($logpath,$timezone,1," Select on DB failed for job check: ".print_r($mysqlcon->errorInfo(), true));
|
||||
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($adminuuid) && $adminuuid != NULL) {
|
||||
foreach ($adminuuid as $clientid) {
|
||||
usleep($slowmode);
|
||||
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 {
|
||||
$ts3server->clientGetByUid($clientid)->message(sprintf($lang['upmsg2'], $currvers));
|
||||
enter_logfile($logpath,$timezone,4," ".sprintf($lang['upusrinf'], $clientid));
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
$ts3server->clientGetByUid($clientid)->message(sprintf($lang['upmsg2'], $cfg['version_current_using']));
|
||||
enter_logfile($cfg,4," ".sprintf($lang['upusrinf'], $clientid));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -295,9 +295,9 @@ try {
|
||||
}
|
||||
|
||||
unset($groupslist,$errcnf,$checkgroups);
|
||||
enter_logfile($logpath,$timezone,5,"Config check [done]");
|
||||
enter_logfile($cfg,5,"Config check [done]");
|
||||
|
||||
enter_logfile($logpath,$timezone,5,"Bot starts now his work!");
|
||||
enter_logfile($cfg,5,"Bot starts now his work!");
|
||||
$looptime = $rotated_cnt = 0; $rotated = '';
|
||||
usleep(3000000);
|
||||
while(1) {
|
||||
@@ -307,7 +307,7 @@ try {
|
||||
$monthago = time() - 2592000;
|
||||
|
||||
if(($get_db_data = $mysqlcon->query("SELECT * FROM `$dbname`.`user`; SELECT MAX(`timestamp`) AS `timestamp` FROM `$dbname`.`user_snapshot`; SELECT `version`, COUNT(`version`) AS `count` FROM `$dbname`.`user` GROUP BY `version` ORDER BY `count` DESC; SELECT MAX(`timestamp`) AS `timestamp` FROM `$dbname`.`server_usage`; SELECT * FROM `$dbname`.`job_check`; SELECT `uuid` FROM `$dbname`.`stats_user`; SELECT `timestamp` FROM `$dbname`.`user_snapshot` WHERE `timestamp`>$weekago ORDER BY `timestamp` ASC LIMIT 1; SELECT `timestamp` FROM `$dbname`.`user_snapshot` WHERE `timestamp`>$monthago ORDER BY `timestamp` ASC LIMIT 1; SELECT * FROM `$dbname`.`groups`; SELECT * FROM `$dbname`.`addon_assign_groups`; SELECT * FROM `$dbname`.`admin_addtime`; ")) === false) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
shutdown($mysqlcon,$cfg,1,"Select on DB failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
|
||||
$count_select = 0;
|
||||
@@ -355,35 +355,35 @@ try {
|
||||
}
|
||||
unset($get_db_data, $fetched_array, $single_select);
|
||||
|
||||
check_shutdown($timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
check_shutdown($cfg);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
$ts3server->clientListReset();
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$allclients = $ts3server->clientList();
|
||||
$ts3server->serverInfoReset();
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$serverinfo = $ts3server->serverInfo();
|
||||
$sqlexec .= calc_user($ts3server,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$boostarr,$resetbydbchange,$msgtouser,$currvers,$substridle,$exceptuuid,$exceptgroup,$allclients,$logpath,$rankupmsg,$ignoreidle,$exceptcid,$resetexcept,$phpcommand,$select_arr);
|
||||
get_avatars($ts3server,$slowmode,$timezone,$logpath,$avatar_delay);
|
||||
$sqlexec .= clean($ts3server,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$cleanclients,$cleanperiod,$logpath,$select_arr);
|
||||
$sqlexec .= calc_serverstats($ts3server,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$serverinfo,$substridle,$grouptime,$logpath,$ts,$currvers,$upchannel,$select_arr,$phpcommand,$adminuuid);
|
||||
$sqlexec .= calc_userstats($ts3server,$mysqlcon,$dbname,$slowmode,$timezone,$logpath,$select_arr);
|
||||
$sqlexec .= update_groups($ts3server,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$serverinfo,$logpath,$grouptime,$boostarr,$exceptgroup,$select_arr,$adminuuid);
|
||||
$sqlexec .= calc_user($ts3server,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,$select_arr);
|
||||
get_avatars($ts3server,$cfg);
|
||||
$sqlexec .= clean($ts3server,$mysqlcon,$lang,$cfg,$dbname,$select_arr);
|
||||
$sqlexec .= calc_serverstats($ts3server,$mysqlcon,$cfg,$dbname,$dbtype,$serverinfo,$ts,$select_arr,$phpcommand);
|
||||
$sqlexec .= calc_userstats($ts3server,$mysqlcon,$cfg,$dbname,$select_arr);
|
||||
$sqlexec .= update_groups($ts3server,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,$select_arr);
|
||||
$sqlexec .= $sqlexec2;
|
||||
|
||||
if($addons_config['assign_groups_active']['value'] == '1') {
|
||||
if(!defined('assign_groups')) {
|
||||
enter_logfile($logpath,$timezone,5,"Loading new addon...");
|
||||
enter_logfile($logpath,$timezone,5," Addon: 'assign_groups' [ON]");
|
||||
enter_logfile($cfg,5,"Loading new addon...");
|
||||
enter_logfile($cfg,5," Addon: 'assign_groups' [ON]");
|
||||
include(substr(__DIR__,0,-4).'jobs/addon_assign_groups.php');
|
||||
define('assign_groups',1);
|
||||
enter_logfile($logpath,$timezone,5,"Loading new addon [done]");
|
||||
enter_logfile($cfg,5,"Loading new addon [done]");
|
||||
}
|
||||
$sqlexec .= addon_assign_groups($addons_config,$ts3server,$dbname,$slowmode,$timezone,$logpath,$allclients,$select_arr);
|
||||
$sqlexec .= addon_assign_groups($addons_config,$ts3server,$cfg,$dbname,$allclients,$select_arr);
|
||||
}
|
||||
|
||||
if($mysqlcon->exec($sqlexec) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"Executing SQL commands failed: ".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
unset($sqlexec, $sqlexec2, $select_arr);
|
||||
|
||||
@@ -392,10 +392,10 @@ try {
|
||||
|
||||
if($looptime < 1) {
|
||||
$loopsleep = (1 - $looptime) * 1000000;
|
||||
#enter_logfile($logpath,$timezone,6,"last loop: ".round($looptime, 5)." sec.");
|
||||
#enter_logfile($cfg,6,"last loop: ".round($looptime, 5)." sec.");
|
||||
usleep($loopsleep);
|
||||
} elseif($slowmode == 0) {
|
||||
#enter_logfile($logpath,$timezone,6,"last loop: ".round($looptime, 5)." sec.");
|
||||
} elseif($cfg['teamspeak_query_command_delay'] == 0) {
|
||||
#enter_logfile($cfg,6,"last loop: ".round($looptime, 5)." sec.");
|
||||
$rotated_cnt++;
|
||||
if($rotated_cnt > 3600) {
|
||||
$rotated_arr = explode(';', $rotated);
|
||||
@@ -405,11 +405,11 @@ try {
|
||||
}
|
||||
if(($sum_time / 10) > 1) {
|
||||
$rotated_cnt = 0;
|
||||
enter_logfile($logpath,$timezone,4," Your Ranksystem seems to be slow. This is not a big deal, but it needs more ressources then necessary.");
|
||||
enter_logfile($logpath,$timezone,4," Here you'll find some information to optimize it: https://ts-n.net/ranksystem.php#optimize");
|
||||
enter_logfile($logpath,$timezone,4," Last 10 runtimes in seconds (lower values are better): ".$rotated);
|
||||
enter_logfile($cfg,4," Your Ranksystem seems to be slow. This is not a big deal, but it needs more ressources then necessary.");
|
||||
enter_logfile($cfg,4," Here you'll find some information to optimize it: https://ts-n.net/ranksystem.php#optimize");
|
||||
enter_logfile($cfg,4," Last 10 runtimes in seconds (lower values are better): ".$rotated);
|
||||
foreach ($uniqueid as $clientid) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$ts3server->clientGetByUid($clientid)->message("\nYour Ranksystem seems to be slow. This is not a big deal, but it needs more ressources then necessary.\nHere you'll find some information to optimize it: [URL]https://ts-n.net/ranksystem.php#optimize[/URL]\nLast 10 runtimes in seconds (lower values are better):\n".$rotated);
|
||||
} catch (Exception $e) { }
|
||||
@@ -419,13 +419,13 @@ try {
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['errorts3'].$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.$e->getMessage());
|
||||
$offline_status = array(110,257,258,1024,1026,1031,1032,1033,1034,1280,1793);
|
||||
if(in_array($e->getCode(), $offline_status)) {
|
||||
if($mysqlcon->exec("UPDATE $dbname.stats_server SET server_status='0'") === false) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['error'].print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,$lang['error'].print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
}
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Critical TS3 error on core function!");
|
||||
shutdown($mysqlcon,$cfg,1,"Critical TS3 error on core function!");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?PHP
|
||||
function calc_serverstats($ts3,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$serverinfo,$substridle,$grouptime,$logpath,$ts,$currvers,$upchannel,$select_arr,$phpcommand,$adminuuid) {
|
||||
function calc_serverstats($ts3,$mysqlcon,$cfg,$dbname,$dbtype,$serverinfo,$ts,$select_arr,$phpcommand) {
|
||||
$nowtime = time();
|
||||
$sqlexec = '';
|
||||
|
||||
@@ -190,16 +190,16 @@ function calc_serverstats($ts3,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$se
|
||||
// Stats for Server Usage
|
||||
if(key($select_arr['max_timestamp_server_usage']) == 0 || ($nowtime - key($select_arr['max_timestamp_server_usage'])) > 898) { // every 15 mins
|
||||
//Calc time next rankup
|
||||
//enter_logfile($logpath,$timezone,6,"Calc next rankup for offline user");
|
||||
//enter_logfile($cfg,6,"Calc next rankup for offline user");
|
||||
$upnextuptime = $nowtime - 1800;
|
||||
if(($uuidsoff = $mysqlcon->query("SELECT `uuid`,`idle`,`count` FROM `$dbname`.`user` WHERE `online`<>1 AND `lastseen`>$upnextuptime")->fetchAll(PDO::FETCH_ASSOC)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"calc_serverstats 13:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"calc_serverstats 13:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
if(count($uuidsoff) != 0) {
|
||||
krsort($grouptime);
|
||||
krsort($cfg['rankup_definition']);
|
||||
foreach($uuidsoff as $uuid) {
|
||||
$count = $uuid['count'];
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$activetime = $count - $uuid['idle'];
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@$activetime");
|
||||
@@ -209,7 +209,7 @@ function calc_serverstats($ts3,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$se
|
||||
$dtT = new DateTime("@$count");
|
||||
}
|
||||
$grpcount=0;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
$grpcount++;
|
||||
if ($activetime > $time) {
|
||||
if($grpcount == 1) {
|
||||
@@ -240,18 +240,18 @@ function calc_serverstats($ts3,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$se
|
||||
} else {
|
||||
$sqlexec .= "INSERT INTO `$dbname`.`server_usage` (`timestamp`,`clients`,`channel`) VALUES ($nowtime,$server_used_slots,$server_channel_amount); ";
|
||||
}
|
||||
//enter_logfile($logpath,$timezone,6,"Calc next rankup for offline user [DONE]");
|
||||
//enter_logfile($cfg,6,"Calc next rankup for offline user [DONE]");
|
||||
}
|
||||
|
||||
// Calc Values for server stats
|
||||
if($select_arr['job_check']['calc_server_stats']['timestamp'] < ($nowtime-900)) {
|
||||
if($select_arr['job_check']['calc_server_stats']['timestamp'] < ($nowtime - 900)) {
|
||||
if(($entry_snapshot_count = $mysqlcon->query("SELECT count(DISTINCT(`timestamp`)) AS `timestamp` FROM `$dbname`.`user_snapshot`")->fetch(PDO::FETCH_ASSOC)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"calc_serverstats 19:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"calc_serverstats 19:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
if ($entry_snapshot_count['timestamp'] > 27) {
|
||||
// Calc total_online_week
|
||||
if(($snapshot_count_week = $mysqlcon->query("SELECT (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `timestamp`=(SELECT MAX(`s2`.`timestamp`) AS `value1` FROM (SELECT DISTINCT(`timestamp`) FROM `$dbname`.`user_snapshot` ORDER BY `timestamp` DESC LIMIT 28) AS `s2`, `$dbname`.`user_snapshot` AS `s1` WHERE `s1`.`timestamp`=`s2`.`timestamp`)) - (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `timestamp`=(SELECT MIN(`s2`.`timestamp`) AS `value2` FROM (SELECT DISTINCT(`timestamp`) FROM `$dbname`.`user_snapshot` ORDER BY `timestamp` DESC LIMIT 28) AS `s2`, `$dbname`.`user_snapshot` AS `s1` WHERE `s1`.`timestamp`=`s2`.`timestamp`) AND `uuid` IN (SELECT `uuid` FROM `$dbname`.`user`)) AS `count`")->fetch(PDO::FETCH_ASSOC)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"calc_serverstats 20:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"calc_serverstats 20:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
if($snapshot_count_week['count'] == NULL) {
|
||||
$total_online_week = 0;
|
||||
@@ -264,7 +264,7 @@ function calc_serverstats($ts3,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$se
|
||||
if ($entry_snapshot_count['timestamp'] > 119) {
|
||||
// Calc total_online_month
|
||||
if(($snapshot_count_month = $mysqlcon->query("SELECT (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `timestamp`=(SELECT MAX(`s2`.`timestamp`) AS `value1` FROM (SELECT DISTINCT(`timestamp`) FROM `$dbname`.`user_snapshot` ORDER BY `timestamp` DESC LIMIT 120) AS `s2`, `$dbname`.`user_snapshot` AS `s1` WHERE `s1`.`timestamp`=`s2`.`timestamp`)) - (SELECT SUM(`count`) FROM `$dbname`.`user_snapshot` WHERE `timestamp`=(SELECT MIN(`s2`.`timestamp`) AS `value2` FROM (SELECT DISTINCT(`timestamp`) FROM `$dbname`.`user_snapshot` ORDER BY `timestamp` DESC LIMIT 120) AS `s2`, `$dbname`.`user_snapshot` AS `s1` WHERE `s1`.`timestamp`=`s2`.`timestamp`) AND `uuid` IN (SELECT `uuid` FROM `$dbname`.`user`)) AS `count`")->fetch(PDO::FETCH_ASSOC)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"calc_serverstats 21:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"calc_serverstats 21:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
if($snapshot_count_month['count'] == NULL) {
|
||||
$total_online_month = 0;
|
||||
@@ -278,16 +278,16 @@ function calc_serverstats($ts3,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$se
|
||||
|
||||
if ($select_arr['job_check']['get_version']['timestamp'] < ($nowtime - 43200)) {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://ts-n.net/ranksystem/'.$upchannel);
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://ts-n.net/ranksystem/'.$cfg['version_update_channel']);
|
||||
curl_setopt($ch, CURLOPT_REFERER, 'TSN Ranksystem');
|
||||
curl_setopt($ch, CURLOPT_USERAGENT,
|
||||
$currvers.";".
|
||||
$cfg['version_current_using'].";".
|
||||
php_uname("s").";".
|
||||
php_uname("r").";".
|
||||
phpversion().";".
|
||||
$dbtype.";".
|
||||
$ts['host'].";".
|
||||
$ts['voice'].";".
|
||||
$cfg['teamspeak_host_address'].";".
|
||||
$cfg['teamspeak_voice_port'].";".
|
||||
__DIR__.";".
|
||||
$total_user.";".
|
||||
$user_today.";".
|
||||
@@ -305,29 +305,29 @@ function calc_serverstats($ts3,$mysqlcon,$dbname,$dbtype,$slowmode,$timezone,$se
|
||||
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
$newversion = curl_exec($ch);
|
||||
$cfg['version_latest_available'] = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
if(version_compare($newversion, $currvers, '>') && $newversion != NULL) {
|
||||
enter_logfile($logpath,$timezone,4,$lang['upinf']);
|
||||
if(isset($adminuuid) && $adminuuid != NULL) {
|
||||
foreach ($adminuuid as $clientid) {
|
||||
usleep($slowmode);
|
||||
if(version_compare($cfg['version_latest_available'], $cfg['version_current_using'], '>') && $cfg['version_latest_available'] != NULL) {
|
||||
enter_logfile($cfg,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'], $currvers, $newversion));
|
||||
enter_logfile($logpath,$timezone,4," ".sprintf($lang['upusrinf'], $clientid));
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
$ts3->clientGetByUid($clientid)->message(sprintf($lang['upmsg'], $cfg['version_current_using'], $cfg['version_latest_available']));
|
||||
enter_logfile($cfg,4," ".sprintf($lang['upusrinf'], $clientid));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
}
|
||||
}
|
||||
}
|
||||
update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpcommand);
|
||||
update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand);
|
||||
}
|
||||
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='get_version'; ";
|
||||
}
|
||||
|
||||
//Calc Rank
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$sqlexec .= "SET @a:=0; UPDATE `$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`; ";
|
||||
} else {
|
||||
$sqlexec .= "SET @a:=0; UPDATE `$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`; ";
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?PHP
|
||||
function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$boostarr,$resetbydbchange,$msgtouser,$currvers,$substridle,$exceptuuid,$exceptgroup,$allclients,$logpath,$rankupmsg,$ignoreidle,$exceptcid,$resetexcept,$phpcommand,$select_arr) {
|
||||
function calc_user($ts3,$mysqlcon,$lang,$cfg,$dbname,$allclients,$phpcommand,$select_arr) {
|
||||
$nowtime = time();
|
||||
$sqlexec = '';
|
||||
|
||||
if(empty($grouptime)) {
|
||||
enter_logfile($logpath,$timezone,1,"calc_user:".$lang['wiconferr']."Shuttin down!\n\n");
|
||||
if(empty($cfg['rankup_definition'])) {
|
||||
enter_logfile($cfg,1,"calc_user:".$lang['wiconferr']."Shuttin down!\n\n");
|
||||
exit;
|
||||
}
|
||||
if($select_arr['job_check']['calc_user_lastscan']['timestamp'] < ($nowtime - 1800)) {
|
||||
enter_logfile($logpath,$timezone,4,"Much time gone since last scan.. reset time difference to zero.");
|
||||
enter_logfile($cfg,4,"Much time gone since last scan.. reset time difference to zero.");
|
||||
$select_arr['job_check']['calc_user_lastscan']['timestamp'] = $nowtime;
|
||||
} elseif($select_arr['job_check']['calc_user_lastscan']['timestamp'] > $nowtime) {
|
||||
enter_logfile($logpath,$timezone,4,"Negative time between now and last scan (Error in your server time!).. reset time difference to zero.");
|
||||
enter_logfile($cfg,4,"Negative time between now and last scan (Error in your server time!).. reset time difference to zero.");
|
||||
$select_arr['job_check']['calc_user_lastscan']['timestamp'] = $nowtime;
|
||||
}
|
||||
|
||||
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='calc_user_lastscan'; ";
|
||||
|
||||
krsort($grouptime);
|
||||
krsort($cfg['rankup_definition']);
|
||||
$yetonline = array();
|
||||
$updatedata = array();
|
||||
|
||||
@@ -36,7 +36,7 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
}
|
||||
$sqlexec .= "DELETE FROM `$dbname`.`admin_addtime` WHERE `timestamp`=".$value['timestamp']." AND `uuid`='$uuid'; ";
|
||||
$sqlexec .= "UPDATE `$dbname`.`user_snapshot` SET `count`=`count` + ".$value['timecount']." WHERE `uuid`='$uuid'; ";
|
||||
enter_logfile($logpath,$timezone,4,sprintf($lang['sccupcount2'],$value['timecount'],$uuid));
|
||||
enter_logfile($cfg,4,sprintf($lang['sccupcount2'],$value['timecount'],$uuid));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,19 +48,19 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
$sgroups = array_flip(explode(",", $client['client_servergroups']));
|
||||
if (!isset($yetonline[$uid]) && $client['client_version'] != "ServerQuery") {
|
||||
$clientidle = floor($client['client_idle_time'] / 1000);
|
||||
if(isset($ignoreidle) && $clientidle < $ignoreidle) {
|
||||
if(isset($cfg['rankup_ignore_idle_time']) && $clientidle < $cfg['rankup_ignore_idle_time']) {
|
||||
$clientidle = 0;
|
||||
}
|
||||
$yetonline[$uid] = 0;
|
||||
if(isset($exceptuuid[$uid])) {
|
||||
if(isset($cfg['rankup_excepted_unique_client_id_list'][$uid])) {
|
||||
$except = 3;
|
||||
} elseif(array_intersect_key($sgroups, $exceptgroup)) {
|
||||
} elseif(array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
$except = 2;
|
||||
} else {
|
||||
if(isset($select_arr['all_user'][$uid]['except']) && ($select_arr['all_user'][$uid]['except'] == 3 || $select_arr['all_user'][$uid]['except'] == 2) && $resetexcept == 2) {
|
||||
if(isset($select_arr['all_user'][$uid]['except']) && ($select_arr['all_user'][$uid]['except'] == 3 || $select_arr['all_user'][$uid]['except'] == 2) && $cfg['rankup_excepted_mode'] == 2) {
|
||||
$select_arr['all_user'][$uid]['count'] = 0;
|
||||
$select_arr['all_user'][$uid]['idle'] = 0;
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['resettime'], $name, $uid, $cldbid));
|
||||
enter_logfile($cfg,5,sprintf($lang['resettime'], $name, $uid, $cldbid));
|
||||
$sqlexec .= "DELETE FROM `$dbname`.`user_snapshot` WHERE `uuid`='$uid'; ";
|
||||
}
|
||||
$except = 0;
|
||||
@@ -70,29 +70,29 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
$grpid = $select_arr['all_user'][$uid]['grpid'];
|
||||
$nextup = $select_arr['all_user'][$uid]['nextup'];
|
||||
$grpsince = $select_arr['all_user'][$uid]['grpsince'];
|
||||
if ($select_arr['all_user'][$uid]['cldbid'] != $cldbid && $resetbydbchange == 1) {
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['changedbid'], $name, $uid, $cldbid, $select_arr['all_user'][$uid]['cldbid']));
|
||||
if ($select_arr['all_user'][$uid]['cldbid'] != $cldbid && $cfg['rankup_client_database_id_change_switch'] == 1) {
|
||||
enter_logfile($cfg,5,sprintf($lang['changedbid'], $name, $uid, $cldbid, $select_arr['all_user'][$uid]['cldbid']));
|
||||
$count = 1;
|
||||
$idle = 0;
|
||||
} else {
|
||||
$hitboost = 0;
|
||||
$boosttime = $select_arr['all_user'][$uid]['boosttime'];
|
||||
if($boostarr!=0) {
|
||||
foreach($boostarr as $boost) {
|
||||
if(isset($cfg['rankup_boost_definition']) && $cfg['rankup_boost_definition'] != NULL) {
|
||||
foreach($cfg['rankup_boost_definition'] as $boost) {
|
||||
if(isset($sgroups[$boost['group']])) {
|
||||
$hitboost = 1;
|
||||
if($select_arr['all_user'][$uid]['boosttime']==0) {
|
||||
$boosttime = $nowtime;
|
||||
} else {
|
||||
if ($nowtime > $select_arr['all_user'][$uid]['boosttime'] + $boost['time']) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$ts3->serverGroupClientDel($boost['group'], $cldbid);
|
||||
$boosttime = 0;
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['sgrprm'], $select_arr['groups'][$select_arr['all_user'][$uid]['grpid']]['sgidname'], $select_arr['all_user'][$uid]['grpid'], $name, $uid, $cldbid));
|
||||
enter_logfile($cfg,5,sprintf($lang['sgrprm'], $select_arr['groups'][$boost['group']]['sgidname'], $boost['group'], $name, $uid, $cldbid));
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$select_arr['all_user'][$uid]['grpid']]['sgidname'], $select_arr['all_user'][$uid]['grpid']));
|
||||
enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$select_arr['all_user'][$uid]['grpid']]['sgidname'], $select_arr['all_user'][$uid]['grpid']));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
}
|
||||
}
|
||||
}
|
||||
if($boostarr == 0 or $hitboost == 0) {
|
||||
if($cfg['rankup_boost_definition'] == 0 or $hitboost == 0) {
|
||||
$count = $nowtime - $select_arr['job_check']['calc_user_lastscan']['timestamp'] + $select_arr['all_user'][$uid]['count'];
|
||||
if ($clientidle > ($nowtime - $select_arr['job_check']['calc_user_lastscan']['timestamp'])) {
|
||||
$idle = $nowtime - $select_arr['job_check']['calc_user_lastscan']['timestamp'] + $select_arr['all_user'][$uid]['idle'];
|
||||
@@ -111,61 +111,61 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
}
|
||||
}
|
||||
$dtF = new DateTime("@0");
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$activetime = $count - $idle;
|
||||
} else {
|
||||
$activetime = $count;
|
||||
}
|
||||
$dtT = new DateTime("@$activetime");
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
if (isset($sgroups[$groupid])) {
|
||||
$grpid = $groupid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$grpcount=0;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
$grpcount++;
|
||||
if(isset($exceptcid[$client['cid']]) || (($select_arr['all_user'][$uid]['except'] == 3 || $select_arr['all_user'][$uid]['except'] == 2) && $resetexcept == 1)) {
|
||||
if(isset($cfg['rankup_excepted_channel_id_list'][$client['cid']]) || (($select_arr['all_user'][$uid]['except'] == 3 || $select_arr['all_user'][$uid]['except'] == 2) && $cfg['rankup_excepted_mode'] == 1)) {
|
||||
$count = $select_arr['all_user'][$uid]['count'];
|
||||
$idle = $select_arr['all_user'][$uid]['idle'];
|
||||
if($except != 2 && $except != 3) {
|
||||
$except = 1;
|
||||
}
|
||||
} elseif ($activetime > $time && !isset($exceptuuid[$uid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
} elseif ($activetime > $time && !isset($cfg['rankup_excepted_unique_client_id_list'][$uid]) && !array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
if ($select_arr['all_user'][$uid]['grpid'] != $groupid) {
|
||||
if ($select_arr['all_user'][$uid]['grpid'] != NULL && isset($sgroups[$select_arr['all_user'][$uid]['grpid']])) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$ts3->serverGroupClientDel($select_arr['all_user'][$uid]['grpid'], $cldbid);
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['sgrprm'], $select_arr['groups'][$select_arr['all_user'][$uid]['grpid']]['sgidname'], $select_arr['all_user'][$uid]['grpid'], $name, $uid, $cldbid));
|
||||
enter_logfile($cfg,5,sprintf($lang['sgrprm'], $select_arr['groups'][$select_arr['all_user'][$uid]['grpid']]['sgidname'], $select_arr['all_user'][$uid]['grpid'], $name, $uid, $cldbid));
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$groupid]['sgidname'], $groupid));
|
||||
enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$groupid]['sgidname'], $groupid));
|
||||
}
|
||||
}
|
||||
if (!isset($sgroups[$groupid])) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$ts3->serverGroupClientAdd($groupid, $cldbid);
|
||||
$grpsince = $nowtime;
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['sgrpadd'], $select_arr['groups'][$groupid]['sgidname'], $groupid, $name, $uid, $cldbid));
|
||||
enter_logfile($cfg,5,sprintf($lang['sgrpadd'], $select_arr['groups'][$groupid]['sgidname'], $groupid, $name, $uid, $cldbid));
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$groupid]['sgidname'], $groupid));
|
||||
enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$groupid]['sgidname'], $groupid));
|
||||
}
|
||||
}
|
||||
$grpid = $groupid;
|
||||
if ($msgtouser == 1) {
|
||||
usleep($slowmode);
|
||||
if ($cfg['rankup_message_to_user_switch'] == 1) {
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$days = $dtF->diff($dtT)->format('%a');
|
||||
$hours = $dtF->diff($dtT)->format('%h');
|
||||
$mins = $dtF->diff($dtT)->format('%i');
|
||||
$secs = $dtF->diff($dtT)->format('%s');
|
||||
try {
|
||||
$ts3->clientGetByUid($uid)->message(sprintf($rankupmsg, $days, $hours, $mins, $secs, $select_arr['groups'][$groupid]['sgidname'], $client['client_nickname']));
|
||||
$ts3->clientGetByUid($uid)->message(sprintf($cfg['rankup_message_to_user'], $days, $hours, $mins, $secs, $select_arr['groups'][$groupid]['sgidname'], $client['client_nickname']));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$groupid]['sgidname'], $groupid));
|
||||
enter_logfile($cfg,2,"TS3 error: ".$e->getCode().': '.$e->getMessage()." ; ".sprintf($lang['sgrprerr'], $name, $uid, $cldbid, $select_arr['groups'][$groupid]['sgidname'], $groupid));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,7 +197,7 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
);
|
||||
} else {
|
||||
$grpid = '0';
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
if (isset($sgroups[$groupid])) {
|
||||
$grpid = $groupid;
|
||||
break;
|
||||
@@ -210,7 +210,7 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
"name" => $name,
|
||||
"lastseen" => $nowtime,
|
||||
"grpid" => $grpid,
|
||||
"nextup" => (key($grouptime) - 1),
|
||||
"nextup" => (key($cfg['rankup_definition']) - 1),
|
||||
"idle" => "0",
|
||||
"cldgroup" => $client['client_servergroups'],
|
||||
"boosttime" => "0",
|
||||
@@ -222,7 +222,7 @@ function calc_user($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$grouptime,$
|
||||
"grpsince" => "0",
|
||||
"cid" => $client['cid']
|
||||
);
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['adduser'], $name, $uid, $cldbid));
|
||||
enter_logfile($cfg,5,sprintf($lang['adduser'], $name, $uid, $cldbid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?PHP
|
||||
function calc_userstats($ts3,$mysqlcon,$dbname,$slowmode,$timezone,$logpath,$select_arr) {
|
||||
function calc_userstats($ts3,$mysqlcon,$cfg,$dbname,$select_arr) {
|
||||
$sqlexec = '';
|
||||
$max_timestamp = key($select_arr['max_timestamp_user_snapshot']);
|
||||
$min_timestamp_week = key($select_arr['usersnap_min_week']);
|
||||
@@ -23,21 +23,21 @@ function calc_userstats($ts3,$mysqlcon,$dbname,$slowmode,$timezone,$logpath,$sel
|
||||
$uuids = substr($uuids, 0, -1);
|
||||
|
||||
if(isset($sqlhis) && $max_timestamp != NULL && $min_timestamp_week != NULL && $min_timestamp_month != NULL) {
|
||||
#enter_logfile($logpath,$timezone,6,"Update User Stats between ".$job_begin." and ".$job_end.":");
|
||||
#enter_logfile($cfg,6,"Update User Stats between ".$job_begin." and ".$job_end.":");
|
||||
if(($userdataweekbegin = $mysqlcon->query("SELECT `uuid`,`count`,`idle` FROM `$dbname`.`user_snapshot` WHERE `timestamp`=$min_timestamp_week AND `uuid` IN ($uuids)")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"calc_userstats 6:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"calc_userstats 6:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
if(($userdatamonthbegin = $mysqlcon->query("SELECT `uuid`,`count`,`idle` FROM `$dbname`.`user_snapshot` WHERE `timestamp`=$min_timestamp_month AND `uuid` IN ($uuids)")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"calc_userstats 8:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"calc_userstats 8:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
if(($userdataend = $mysqlcon->query("SELECT `uuid`,`count`,`idle` FROM `$dbname`.`user_snapshot` WHERE `timestamp`=$max_timestamp AND `uuid` IN ($uuids)")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"calc_userstats 7:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"calc_userstats 7:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
|
||||
$allupdateuuid = '';
|
||||
|
||||
foreach ($sqlhis as $uuid => $userstats) {
|
||||
check_shutdown($timezone,$logpath); usleep($slowmode);
|
||||
check_shutdown($cfg); usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$clientinfo = $ts3->clientInfoDb($userstats['cldbid']);
|
||||
|
||||
@@ -62,7 +62,7 @@ function calc_userstats($ts3,$mysqlcon,$dbname,$slowmode,$timezone,$logpath,$sel
|
||||
$clientdesc = $mysqlcon->quote($clientinfo['client_description'], ENT_QUOTES);;
|
||||
$allupdateuuid .= "('" . $uuid . "','" .$userstats['rank'] . "','" . $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 . "),";
|
||||
} catch (Exception $e) {
|
||||
#enter_logfile($logpath,$timezone,6,$e->getCode() . ': ' . $e->getMessage()."; Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") was missing in TS database, perhaps its already deleted");
|
||||
#enter_logfile($cfg,6,$e->getCode() . ': ' . $e->getMessage()."; Client (uuid: ".$uuid." cldbid: ".$userstats['cldbid'].") was missing in TS database, perhaps its already deleted");
|
||||
}
|
||||
}
|
||||
unset($sqlhis, $userdataweekbegin, $userdataend, $userdatamonthbegin);
|
||||
|
||||
@@ -1,118 +1,109 @@
|
||||
<?PHP
|
||||
function check_db($mysqlcon,$lang,$dbname,$timezone,$currvers,$logpath) {
|
||||
$newversion = '1.2.11';
|
||||
enter_logfile($logpath,$timezone,5,"Check Ranksystem database for updates...");
|
||||
function check_db($mysqlcon,$lang,$cfg,$dbname) {
|
||||
$cfg['version_latest_available'] = '1.2.12';
|
||||
enter_logfile($cfg,5,"Check Ranksystem database for updates...");
|
||||
|
||||
function set_new_version($mysqlcon,$dbname,$timezone,$newversion,$logpath) {
|
||||
if($mysqlcon->exec("UPDATE $dbname.config set currvers='$newversion'") === false) {
|
||||
enter_logfile($logpath,$timezone,1," An error happens due updating the Ranksystem Database:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($logpath,$timezone,1," Check the database connection and properties in other/dbconfig.php and check also the database permissions.");
|
||||
exit;
|
||||
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.");
|
||||
} else {
|
||||
$currvers = $newversion;
|
||||
enter_logfile($logpath,$timezone,4," Database successfully updated!");
|
||||
return $currvers;
|
||||
$cfg['version_current_using'] = $cfg['version_latest_available'];
|
||||
enter_logfile($cfg,4," Database successfully updated!");
|
||||
return $cfg;
|
||||
}
|
||||
}
|
||||
|
||||
function check_chmod($timezone,$logpath,$lang) {
|
||||
function check_chmod($cfg,$lang) {
|
||||
if(substr(sprintf('%o', fileperms(substr(__DIR__,0,-4).'tsicons/')), -3, 1)!='7') {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['isntwichm'],'tsicons'));
|
||||
enter_logfile($cfg,2,sprintf($lang['isntwichm'],'tsicons'));
|
||||
}
|
||||
if(substr(sprintf('%o', fileperms($logpath)), -3, 1)!='7') {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['isntwichm'],'logs'));
|
||||
if(substr(sprintf('%o', fileperms($cfg['logs_path'])), -3, 1)!='7') {
|
||||
enter_logfile($cfg,2,sprintf($lang['isntwichm'],'logs'));
|
||||
}
|
||||
if(substr(sprintf('%o', fileperms(substr(__DIR__,0,-4).'avatars/')), -3, 1)!='7') {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['isntwichm'],'avatars'));
|
||||
enter_logfile($cfg,2,sprintf($lang['isntwichm'],'avatars'));
|
||||
}
|
||||
if(substr(sprintf('%o', fileperms(substr(__DIR__,0,-4).'update/')), -3, 1)!='7') {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['isntwichm'],'update'));
|
||||
enter_logfile($cfg,2,sprintf($lang['isntwichm'],'update'));
|
||||
}
|
||||
}
|
||||
|
||||
function check_config($mysqlcon,$dbname) {
|
||||
if(($dbdata = $mysqlcon->query("SELECT * FROM `$dbname`.`config`")->fetchAll()) === false) { } else {
|
||||
if(count($dbdata) > 1) {
|
||||
if($mysqlcon->exec("DELETE FROM `$dbname`.`config` WHERE `webuser` IS NULL") === false) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function old_files($timezone,$logpath) {
|
||||
function old_files($cfg) {
|
||||
if(is_file(substr(__DIR__,0,-4).'install.php')) {
|
||||
if(!unlink('install.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: install.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: install.php");
|
||||
}
|
||||
}
|
||||
if(is_dir(substr(__DIR__,0,-4).'icons/')) {
|
||||
if(!rmdir(substr(__DIR__,0,-4).'icons/')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary folder, please delete it from your webserver: icons/");
|
||||
enter_logfile($cfg,4,"Unnecessary folder, please delete it from your webserver: icons/");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/combined_stats.css')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/combined_stats.css')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/combined_stats.css");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/combined_stats.css");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/combined_stats.js')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/combined_stats.js')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/combined_stats.js");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/combined_stats.js");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'webinterface/admin.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'webinterface/admin.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: webinterface/admin.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: webinterface/admin.php");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/Exception.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/Exception.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist/Exception.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist/Exception.php");
|
||||
}
|
||||
}
|
||||
if(is_dir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/')) {
|
||||
if(!rmdir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist/");
|
||||
enter_logfile($cfg,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist/");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/Exception.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/Exception.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS/Exception.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS/Exception.php");
|
||||
}
|
||||
}
|
||||
if(is_dir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/')) {
|
||||
if(!rmdir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS/");
|
||||
enter_logfile($cfg,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS/");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/Exception.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/Exception.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Update/Exception.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Update/Exception.php");
|
||||
}
|
||||
}
|
||||
if(is_dir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/')) {
|
||||
if(!rmdir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/Update/");
|
||||
enter_logfile($cfg,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/Update/");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist.php");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS.php");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Update.php");
|
||||
enter_logfile($cfg,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Update.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function check_writable($timezone,$logpath) {
|
||||
enter_logfile($logpath,$timezone,5," Check files permissions...");
|
||||
function check_writable($cfg) {
|
||||
enter_logfile($cfg,5," Check files permissions...");
|
||||
$counterr=0;
|
||||
$scandir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(substr(__DIR__,0,-4)));
|
||||
$files = array();
|
||||
@@ -120,211 +111,241 @@ function check_db($mysqlcon,$lang,$dbname,$timezone,$currvers,$logpath) {
|
||||
if(!strstr($object, '/.') && !strstr($object, '\.')) {
|
||||
if (!$object->isDir()) {
|
||||
if(!is_writable($object->getPathname())) {
|
||||
enter_logfile($logpath,$timezone,3," File is not writeable ".$object);
|
||||
enter_logfile($cfg,3," File is not writeable ".$object);
|
||||
$counterr++;
|
||||
}
|
||||
} else {
|
||||
if(!is_writable($object->getPathname())) {
|
||||
enter_logfile($logpath,$timezone,3," Folder is not writeable ".$object);
|
||||
enter_logfile($cfg,3," Folder is not writeable ".$object);
|
||||
$counterr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($counterr!=0) {
|
||||
enter_logfile($logpath,$timezone,1,"Please check the files pemissions. Shutting down!\n\n");
|
||||
enter_logfile($cfg,1,"Please check the files pemissions. Shutting down!\n\n");
|
||||
exit;
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5," Check files permissions [done]");
|
||||
enter_logfile($cfg,5," Check files permissions [done]");
|
||||
}
|
||||
}
|
||||
|
||||
if($currvers==$newversion) {
|
||||
enter_logfile($logpath,$timezone,5," No newer version detected; Database check finished.");
|
||||
old_files($timezone,$logpath);
|
||||
check_chmod($timezone,$logpath,$lang);
|
||||
check_config($mysqlcon,$dbname);
|
||||
check_writable($timezone,$logpath);
|
||||
if($cfg['version_current_using'] == $cfg['version_latest_available']) {
|
||||
enter_logfile($cfg,5," No newer version detected; Database check finished.");
|
||||
old_files($cfg);
|
||||
check_chmod($cfg,$lang);
|
||||
check_writable($cfg);
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," Update the Ranksystem Database to new version...");
|
||||
if(version_compare($currvers, '1.2.1', '<')) {
|
||||
enter_logfile($cfg,4," Update the Ranksystem Database to new version...");
|
||||
if(version_compare($cfg['version_current_using'], '1.2.1', '<')) {
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_server` MODIFY COLUMN `server_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `server_platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `server_weblist` tinyint(1) NOT NULL default '0', MODIFY COLUMN `server_version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `total_user` int(10) NOT NULL default '0', MODIFY COLUMN `country_nation_1` int(10) NOT NULL default '0', MODIFY COLUMN `country_nation_2` int(10) NOT NULL default '0', MODIFY COLUMN `country_nation_3` int(10) NOT NULL default '0', MODIFY COLUMN `country_nation_4` int(10) NOT NULL default '0', MODIFY COLUMN `country_nation_5` int(10) NOT NULL default '0', MODIFY COLUMN `country_nation_other` int(10) NOT NULL default '0', MODIFY COLUMN `platform_1` int(10) NOT NULL default '0', MODIFY COLUMN `platform_2` int(10) NOT NULL default '0', MODIFY COLUMN `platform_3` int(10) NOT NULL default '0', MODIFY COLUMN `platform_4` int(10) NOT NULL default '0', MODIFY COLUMN `platform_5` int(10) NOT NULL default '0', MODIFY COLUMN `platform_other` int(10) NOT NULL default '0', MODIFY COLUMN `version_1` int(10) NOT NULL default '0', MODIFY COLUMN `version_2` int(10) NOT NULL default '0', MODIFY COLUMN `version_3` int(10) NOT NULL default '0', MODIFY COLUMN `version_4` int(10) NOT NULL default '0', MODIFY COLUMN `version_5` int(10) NOT NULL default '0', MODIFY COLUMN `version_other` int(10) NOT NULL default '0', MODIFY COLUMN `server_status` tinyint(1) NOT NULL default '0', MODIFY COLUMN `server_free_slots` smallint(5) NOT NULL default '0', MODIFY COLUMN `server_used_slots` smallint(5) NOT NULL default '0', MODIFY COLUMN `server_channel_amount` smallint(5) NOT NULL default '0', MODIFY COLUMN `server_ping` smallint(5) NOT NULL default '0', MODIFY COLUMN `server_id` smallint(5) NOT NULL default '0', MODIFY COLUMN `server_pass` tinyint(1) NOT NULL default '0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table stats_server (part1) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table stats_server (part1) successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_server` ADD (`user_today` int(10) NOT NULL default '0',`user_week` int(10) NOT NULL default '0',`user_month` int(10) NOT NULL default '0',`user_quarter` int(10) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table stats_server (part2) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table stats_server (part2) successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` MODIFY COLUMN `removed` tinyint(1) NOT NULL default '0', MODIFY COLUMN `rank` int(10) NOT NULL default '0', MODIFY COLUMN `count_week` int(10) NOT NULL default '0', MODIFY COLUMN `count_month` int(10) NOT NULL default '0', MODIFY COLUMN `idle_week` int(10) NOT NULL default '0', MODIFY COLUMN `idle_month` int(10) NOT NULL default '0', MODIFY COLUMN `achiev_count` tinyint(1) NOT NULL default '0', MODIFY COLUMN `achiev_time` int(10) NOT NULL default '0', MODIFY COLUMN `achiev_connects` smallint(5) NOT NULL default '0', MODIFY COLUMN `achiev_battles` tinyint(3) NOT NULL default '0', MODIFY COLUMN `achiev_time_perc` tinyint(3) NOT NULL default '0', MODIFY COLUMN `achiev_connects_perc` tinyint(3) NOT NULL default '0', MODIFY COLUMN `achiev_battles_perc` tinyint(3) NOT NULL default '0', MODIFY COLUMN `battles_total` tinyint(3) NOT NULL default '0', MODIFY COLUMN `battles_won` tinyint(3) NOT NULL default '0', MODIFY COLUMN `battles_lost` tinyint(3) NOT NULL default '0', MODIFY COLUMN `total_connections` smallint(5) NOT NULL default '0', MODIFY COLUMN `client_description` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table stats_user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table stats_user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` MODIFY COLUMN `cldbid` int(10) NOT NULL default '0', MODIFY COLUMN `count` int(10) NOT NULL default '0', MODIFY COLUMN `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `grpid` int(10) NOT NULL default '0', MODIFY COLUMN `nextup` int(10) NOT NULL default '0', MODIFY COLUMN `idle` int(10) NOT NULL default '0', MODIFY COLUMN `cldgroup` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `online` tinyint(1) NOT NULL default '0', MODIFY COLUMN `boosttime` int(10) NOT NULL default '0', MODIFY COLUMN `rank` int(10) NOT NULL default '0', MODIFY COLUMN `platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `nation` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `except` tinyint(1) NOT NULL default '0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` MODIFY COLUMN `webuser` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `webpass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `tshost` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `tsquery` smallint(5) NOT NULL default '0', MODIFY COLUMN `tsvoice` smallint(5) NOT NULL default '0', MODIFY COLUMN `tsuser` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `tspass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `language` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `queryname` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `queryname2` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `grouptime` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `resetbydbchange` tinyint(1) NOT NULL default '0', MODIFY COLUMN `msgtouser` tinyint(1) NOT NULL default '0', MODIFY COLUMN `upcheck` tinyint(1) NOT NULL default '0', MODIFY COLUMN `uniqueid` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `updateinfotime` mediumint(6) NOT NULL default '0', MODIFY COLUMN `currvers` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `substridle` tinyint(1) NOT NULL default '0', MODIFY COLUMN `exceptuuid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `exceptgroup` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `dateformat` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `showexcld` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolcld` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcoluuid` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcoldbid` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolot` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolit` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolat` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolnx` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolsg` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolrg` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showcolls` tinyint(1) NOT NULL default '0', MODIFY COLUMN `slowmode` mediumint(9) NOT NULL default '0', MODIFY COLUMN `cleanclients` tinyint(1) NOT NULL default '0', MODIFY COLUMN `cleanperiod` mediumint(9) NOT NULL default '0', MODIFY COLUMN `showhighest` tinyint(1) NOT NULL default '0', MODIFY COLUMN `boost` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `showcolas` tinyint(1) NOT NULL default '0', MODIFY COLUMN `defchid` int(10) NOT NULL default '0', MODIFY COLUMN `advancemode` tinyint(1) NOT NULL default '0', MODIFY COLUMN `count_access` tinyint(2) NOT NULL default '0', MODIFY COLUMN `ignoreidle` smallint(5) NOT NULL default '0', MODIFY COLUMN `exceptcid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `rankupmsg` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `boost_mode` tinyint(1) NOT NULL default '0', MODIFY COLUMN `servernews` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `nextupinfo` tinyint(1) NOT NULL default '0', MODIFY COLUMN `nextupinfomsg1` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `nextupinfomsg2` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `nextupinfomsg3` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `shownav` tinyint(1) NOT NULL default '0', MODIFY COLUMN `showgrpsince` tinyint(1) NOT NULL default '0', MODIFY COLUMN `resetexcept` tinyint(1) NOT NULL default '0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table config successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table config successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`server_usage` MODIFY COLUMN `clients` smallint(5) NOT NULL default '0', MODIFY COLUMN `channel` smallint(5) NOT NULL default '0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table server_usage successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table server_usage successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user_snapshot` MODIFY COLUMN `count` int(10) NOT NULL default '0', MODIFY COLUMN `idle` int(10) NOT NULL default '0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table user_snapshot successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table user_snapshot successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` MODIFY COLUMN `sgid` int(10) NOT NULL default '0' PRIMARY KEY, MODIFY COLUMN `sgidname` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Adjusted table groups successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Adjusted table groups successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_nations` (`nation` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`count` int(10) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Created table stats_nations successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Created table stats_nations successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_versions` (`version` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`count` int(10) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Created table stats_versions successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Created table stats_versions successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`stats_platforms` (`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`count` int(10) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.1] Created table stats_platforms successfully.");
|
||||
enter_logfile($cfg,4," [1.2.1] Created table stats_platforms successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.2', '<')) {
|
||||
if(version_compare($cfg['version_current_using'], '1.2.2', '<')) {
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` ADD (`active_week` int(10) NOT NULL default '0',`active_month` int(10) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.2] Adjusted table stats_user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.2] Adjusted table stats_user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` ADD (`avatar_delay` smallint(5) UNSIGNED NOT NULL default '0')") === false) { } else {
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` set `avatar_delay`='0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.2] Adjusted table config (part 1) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.2] Adjusted table config (part 1) successfully.");
|
||||
}
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` MODIFY COLUMN `tsquery` smallint(5) UNSIGNED NOT NULL default '0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.2] Adjusted table config (part 2) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.2] Adjusted table config (part 2) successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`addons_config` (`param` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci UNIQUE,`value` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { } else {
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('assign_groups_active','0'),('assign_groups_groupids',''),('assign_groups_limit','')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.2] Created table addons_config successfully.");
|
||||
enter_logfile($cfg,4," [1.2.2] Created table addons_config successfully.");
|
||||
}
|
||||
}
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`addon_assign_groups` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`grpids` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.2] Created table addon_assign_groups successfully.");
|
||||
enter_logfile($cfg,4," [1.2.2] Created table addon_assign_groups successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.3', '<')) {
|
||||
if(version_compare($cfg['version_current_using'], '1.2.3', '<')) {
|
||||
if($mysqlcon->exec("DELETE FROM `$dbname`.`groups`") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.3] Cleaned table groups successfully. (cause new icon folder tsicons - redownload)");
|
||||
enter_logfile($cfg,4," [1.2.3] Cleaned table groups successfully. (cause new icon folder tsicons - redownload)");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` MODIFY COLUMN `tsvoice` smallint(5) UNSIGNED NOT NULL default '0'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.3] Adjusted table config successfully.");
|
||||
enter_logfile($cfg,4," [1.2.3] Adjusted table config successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE INDEX `snapshot_timestamp` ON `$dbname`.`user_snapshot` (`timestamp`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.3] Recreated index on table user_snapshot successfully.");
|
||||
enter_logfile($cfg,4," [1.2.3] Recreated index on table user_snapshot successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE INDEX `serverusage_timestamp` ON `$dbname`.`server_usage` (`timestamp`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.3] Recreated index on table server_usage successfully.");
|
||||
enter_logfile($cfg,4," [1.2.3] Recreated index on table server_usage successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.4', '<')) {
|
||||
if(version_compare($cfg['version_current_using'], '1.2.4', '<')) {
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` MODIFY COLUMN `adminuuid` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Adjusted table config (part 1) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Adjusted table config (part 1) successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` ADD (`registercid` mediumint(8) UNSIGNED NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Adjusted table config (part 2) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Adjusted table config (part 2) successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` ADD (`cid` int(10) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Adjusted table user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Adjusted table user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE INDEX `user_version` ON `$dbname`.`user` (`version`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Create index 'user_version' on table user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Create index 'user_version' on table user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE INDEX `user_cldbid` ON `$dbname`.`user` (`cldbid` ASC,`uuid`,`rank`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Create index 'user_cldbid' on table user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Create index 'user_cldbid' on table user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE INDEX `user_online` ON `$dbname`.`user` (`online`,`lastseen`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Create index 'user_online' on table user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Create index 'user_online' on table user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`job_check` (`job_name`) VALUES ('clean_db'),('clean_clients'),('calc_server_stats'),('runtime_check'),('last_update')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Set new values to table job_check successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Set new values to table job_check successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("DELETE FROM `$dbname`.`job_check` WHERE `job_name`='check_clean'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Removed old value 'check_clean' from table job_check successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Removed old value 'check_clean' from table job_check successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user_snapshot` ADD PRIMARY KEY (`timestamp`,`uuid`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Added new primary key on table user_snapshot successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Added new primary key on table user_snapshot successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_nations` ADD PRIMARY KEY (`nation`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Added new primary key on table stats_nations successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Added new primary key on table stats_nations successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_platforms` ADD PRIMARY KEY (`platform`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Added new primary key on table stats_platforms successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Added new primary key on table stats_platforms successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_versions` ADD PRIMARY KEY (`version`)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.4] Added new primary key on table stats_versions successfully.");
|
||||
enter_logfile($cfg,4," [1.2.4] Added new primary key on table stats_versions successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.5', '<')) {
|
||||
if(version_compare($cfg['version_current_using'], '1.2.5', '<')) {
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` MODIFY COLUMN `sgidname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.5] Adjusted table groups successfully.");
|
||||
enter_logfile($cfg,4," [1.2.5] Adjusted table groups successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.6', '<')) {
|
||||
if(version_compare($cfg['version_current_using'], '1.2.6', '<')) {
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`job_check` (`job_name`) VALUES ('last_update')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.6] Set missed value to table job_check successfully.");
|
||||
enter_logfile($cfg,4," [1.2.6] Set missed value to table job_check successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` DROP COLUMN `upcheck`, DROP COLUMN `uniqueid`, DROP COLUMN `updateinfotime`") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.6] Dropped old values from table config sucessfully.");
|
||||
enter_logfile($cfg,4," [1.2.6] Dropped old values from table config sucessfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.7', '<')) {
|
||||
if(version_compare($cfg['version_current_using'], '1.2.7', '<')) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`admin_addtime` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`timestamp` bigint(11) NOT NULL default '0',`timecount` int(10) NOT NULL default '0', PRIMARY KEY (`uuid`,`timestamp`))") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Created table admin_addtime successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Created table admin_addtime successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` DROP COLUMN `ip`") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Dropped client ip from table user sucessfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Dropped client ip from table user sucessfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` MODIFY COLUMN `timezone` varchar(35) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY COLUMN `queryname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY COLUMN `queryname2` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY COLUMN `rankupmsg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY COLUMN `servernews` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY COLUMN `nextupinfomsg1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY COLUMN `nextupinfomsg2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY COLUMN `nextupinfomsg3` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Adjusted table config (part 1) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Adjusted table config (part 1) successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` ADD (`iphash` tinyint(1) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Adjusted table config (part 2) successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Adjusted table config (part 2) successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`groups` MODIFY COLUMN `sgidname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Adjusted table groups successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Adjusted table groups successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_server` MODIFY COLUMN `server_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Adjusted table stats_server successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Adjusted table stats_server successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` MODIFY COLUMN `client_description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Adjusted table stats_user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Adjusted table stats_user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` MODIFY COLUMN `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Adjusted table user successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Adjusted table user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_iphash` (`uuid` varchar(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,`iphash` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`ip` varchar(39) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Created table user_iphash successfully.");
|
||||
enter_logfile($cfg,4," [1.2.7] Created table user_iphash successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.10', '<')) {
|
||||
if(version_compare($cfg['version_current_using'], '1.2.10', '<')) {
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` ADD (`tsencrypt` tinyint(1) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.10] Adjusted table config successfully.");
|
||||
enter_logfile($cfg,4," [1.2.10] Adjusted table config successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.11', '<')) {
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='".time()."' WHERE `job_name`='last_update'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.11] Stored timestamp of last update successfully.");
|
||||
}
|
||||
if(version_compare($cfg['version_current_using'], '1.2.11', '<')) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`csrf_token` (`token` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `timestamp` bigint(11) NOT NULL default '0', `sessionid` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.11] Created table csrf_token successfully.");
|
||||
enter_logfile($cfg,4," [1.2.11] Created table csrf_token successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` DROP COLUMN `queryname2`") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.11] Dropped old value from table config successfully.");
|
||||
enter_logfile($cfg,4," [1.2.11] Dropped old value from table config successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("DELETE FROM `$dbname`.`admin_addtime`") === false) { }
|
||||
if($mysqlcon->exec("DELETE FROM `$dbname`.`addon_assign_groups`") === false) { }
|
||||
if($mysqlcon->exec("DROP TABLE `$dbname`.`bak_stats_nations`") === false) { }
|
||||
if($mysqlcon->exec("DROP TABLE `$dbname`.`bak_stats_platforms`") === false) { }
|
||||
if($mysqlcon->exec("DROP TABLE `$dbname`.`bak_stats_versions`") === false) { }
|
||||
if($mysqlcon->exec("DROP TABLE `$dbname`.`bak_addon_assign_groups`") === false) { }
|
||||
}
|
||||
$currvers = set_new_version($mysqlcon,$dbname,$timezone,$newversion,$logpath);
|
||||
old_files($timezone,$logpath);
|
||||
check_chmod($timezone,$logpath,$lang);
|
||||
check_config($mysqlcon,$dbname);
|
||||
if(version_compare($cfg['version_current_using'], '1.2.12', '<')) {
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='".time()."' WHERE `job_name`='last_update'") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Stored timestamp of last update successfully.");
|
||||
}
|
||||
enter_logfile($logpath,$timezone,5,"Check Ranksystem database for updates [done]");
|
||||
return $currvers;
|
||||
if($mysqlcon->exec("DELETE FROM `$dbname`.`admin_addtime`") === false) { }
|
||||
if($mysqlcon->exec("DELETE FROM `$dbname`.`addon_assign_groups`") === false) { }
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user_iphash` MODIFY COLUMN `uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `iphash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Adjusted table user_iphash successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`cfg_params` (`param` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `value` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci)") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Created table cfg_params successfully.");
|
||||
$oldconfigs = $mysqlcon->query("SELECT * FROM `$dbname`.`config`")->fetch();
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('default_date_format', '".$oldconfigs['dateformat']."'), ('default_language', '".$oldconfigs['language']."'), ('logs_path', '".$oldconfigs['logpath']."'), ('logs_timezone', '".$oldconfigs['timezone']."'), ('rankup_boost_definition', '".$oldconfigs['boost']."'), ('rankup_clean_clients_period', '".$oldconfigs['cleanperiod']."'), ('rankup_clean_clients_switch', '".$oldconfigs['cleanclients']."'), ('rankup_client_database_id_change_switch', '".$oldconfigs['resetbydbchange']."'), ('rankup_definition', '".$oldconfigs['grouptime']."'), ('rankup_excepted_channel_id_list', '".$oldconfigs['exceptcid']."'), ('rankup_excepted_group_id_list', '".$oldconfigs['exceptgroup']."'), ('rankup_excepted_mode', '".$oldconfigs['resetexcept']."'), ('rankup_excepted_unique_client_id_list', '".$oldconfigs['exceptuuid']."'), ('rankup_hash_ip_addresses_mode', '".$oldconfigs['iphash']."'), ('rankup_ignore_idle_time', '".$oldconfigs['ignoreidle']."'), ('rankup_message_to_user', '".$oldconfigs['rankupmsg']."'), ('rankup_message_to_user_switch', '".$oldconfigs['msgtouser']."'), ('rankup_next_message_1', '".$oldconfigs['nextupinfomsg1']."'), ('rankup_next_message_2', '".$oldconfigs['nextupinfomsg2']."'), ('rankup_next_message_3', '".$oldconfigs['nextupinfomsg3']."'), ('rankup_next_message_mode', '".$oldconfigs['nextupinfo']."'), ('rankup_time_assess_mode', '".$oldconfigs['substridle']."'), ('stats_column_active_time_switch', '".$oldconfigs['showcolat']."'), ('stats_column_current_group_since_switch', '".$oldconfigs['showgrpsince']."'), ('stats_column_current_server_group_switch', '".$oldconfigs['showcolas']."'), ('stats_column_client_db_id_switch', '".$oldconfigs['showcoldbid']."'), ('stats_column_client_name_switch', '".$oldconfigs['showcolcld']."'), ('stats_column_idle_time_switch', '".$oldconfigs['showcolit']."'), ('stats_column_last_seen_switch', '".$oldconfigs['showcolls']."'), ('stats_column_next_rankup_switch', '".$oldconfigs['showcolnx']."'), ('stats_column_next_server_group_switch', '".$oldconfigs['showcolsg']."'), ('stats_column_online_time_switch', '".$oldconfigs['showcolot']."'), ('stats_column_rank_switch', '".$oldconfigs['showcolrg']."'), ('stats_column_unique_id_switch', '".$oldconfigs['showcoluuid']."'), ('stats_server_news', '".$oldconfigs['servernews']."'), ('stats_show_clients_in_highest_rank_switch', '".$oldconfigs['showhighest']."'), ('stats_show_excepted_clients_switch', '".$oldconfigs['showexcld']."'), ('stats_show_site_navigation_switch', '".$oldconfigs['shownav']."'), ('teamspeak_avatar_download_delay', '".$oldconfigs['avatar_delay']."'), ('teamspeak_default_channel_id', '".$oldconfigs['defchid']."'), ('teamspeak_host_address', '".$oldconfigs['tshost']."'), ('teamspeak_query_command_delay', '".$oldconfigs['slowmode']."'), ('teamspeak_query_encrypt_switch', '".$oldconfigs['tsencrypt']."'), ('teamspeak_query_nickname', '".$oldconfigs['queryname']."'), ('teamspeak_query_pass', '".$oldconfigs['tspass']."'), ('teamspeak_query_port', '".$oldconfigs['tsquery']."'), ('teamspeak_query_user', '".$oldconfigs['tsuser']."'), ('teamspeak_verification_channel_id', '".$oldconfigs['registercid']."'), ('teamspeak_voice_port', '".$oldconfigs['tsvoice']."'), ('version_current_using', '".$oldconfigs['currvers']."'), ('version_latest_available', '".$oldconfigs['newversion']."'), ('version_update_channel', '".$oldconfigs['upchannel']."'), ('webinterface_access_count', '".$oldconfigs['count_access']."'), ('webinterface_access_last', '".$oldconfigs['last_access']."'), ('webinterface_admin_client_unique_id_list', '".$oldconfigs['adminuuid']."'), ('webinterface_advanced_mode', '".$oldconfigs['advancemode']."'), ('webinterface_pass', '".$oldconfigs['webpass']."'), ('webinterface_user', '".$oldconfigs['webuser']."')") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Set new values to table cfg_params successfully.");
|
||||
}
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user` MODIFY COLUMN `uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Adjusted table user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`stats_user` MODIFY COLUMN `uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY, `base64hash` char(58) CHARACTER SET utf8 COLLATE utf8_unicode_ci") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Adjusted table stats_user successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user_snapshot` MODIFY COLUMN `uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Adjusted table user_snapshot successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`addon_assign_groups` MODIFY COLUMN `uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Adjusted table addon_assign_groups successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`admin_addtime` MODIFY COLUMN `uuid` char(29) CHARACTER SET utf8 COLLATE utf8_unicode_ci") === false) { } else {
|
||||
enter_logfile($cfg,4," [1.2.12] Adjusted table admin_addtime successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("CREATE INDEX `snapshot_timestamp` ON `$dbname`.`user_snapshot` (`timestamp`)") === false) { }
|
||||
if($mysqlcon->exec("CREATE INDEX `serverusage_timestamp` ON `$dbname`.`server_usage` (`timestamp`)") === false) { }
|
||||
if($mysqlcon->exec("CREATE INDEX `user_version` ON `$dbname`.`user` (`version`)") === false) { }
|
||||
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) { }
|
||||
}
|
||||
$cfg = set_new_version($mysqlcon,$cfg,$dbname);
|
||||
old_files($cfg);
|
||||
check_chmod($cfg,$lang);
|
||||
}
|
||||
enter_logfile($cfg,5,"Check Ranksystem database for updates [done]");
|
||||
return $cfg;
|
||||
}
|
||||
?>
|
||||
@@ -1,30 +1,30 @@
|
||||
<?PHP
|
||||
function clean($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$cleanclients,$cleanperiod,$logpath,$select_arr) {
|
||||
function clean($ts3,$mysqlcon,$lang,$cfg,$dbname,$select_arr) {
|
||||
$nowtime = time();
|
||||
$sqlexec = '';
|
||||
|
||||
// clean old clients out of the database
|
||||
if($select_arr['job_check']['clean_clients']['timestamp'] < ($nowtime - $cleanperiod)) {
|
||||
if ($cleanclients == 1) {
|
||||
enter_logfile($logpath,$timezone,4,$lang['clean']);
|
||||
if($select_arr['job_check']['clean_clients']['timestamp'] < ($nowtime - $cfg['rankup_clean_clients_period'])) {
|
||||
if ($cfg['rankup_clean_clients_switch'] == 1) {
|
||||
enter_logfile($cfg,4,$lang['clean']);
|
||||
$start = $countdel = $countts = 0;
|
||||
$break=200;
|
||||
$count_tsuser['count'] = 0;
|
||||
$clientdblist=array();
|
||||
enter_logfile($logpath,$timezone,5," Get TS3 Clientlist...");
|
||||
enter_logfile($cfg,5," Get TS3 Clientlist...");
|
||||
while($getclientdblist=$ts3->clientListDb($start, $break)) {
|
||||
check_shutdown($timezone,$logpath);
|
||||
check_shutdown($cfg);
|
||||
$dummy = $mysqlcon->query("SELECT * FROM `$dbname`.`job_check`"); //TeamSpeak became very slow on sending dblist with 3.3.0.. needs to hold the connection
|
||||
$clientdblist=array_merge($clientdblist, $getclientdblist);
|
||||
$start=$start+$break;
|
||||
$count_tsuser=array_shift($getclientdblist);
|
||||
enter_logfile($logpath,$timezone,6," Got TS3 Clientlist ".count($clientdblist)." of ".$count_tsuser['count']." Clients.");
|
||||
enter_logfile($cfg,6," Got TS3 Clientlist ".count($clientdblist)." of ".$count_tsuser['count']." Clients.");
|
||||
if($count_tsuser['count'] <= $start) {
|
||||
break;
|
||||
}
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
}
|
||||
enter_logfile($logpath,$timezone,5," Get TS3 Clientlist [DONE]");
|
||||
enter_logfile($cfg,5," Get TS3 Clientlist [DONE]");
|
||||
foreach($clientdblist as $uuidts) {
|
||||
$single_uuid = $uuidts['client_unique_identifier']->toString();
|
||||
$uidarrts[$single_uuid]= 1;
|
||||
@@ -40,8 +40,8 @@ function clean($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$cleanclients,$c
|
||||
}
|
||||
}
|
||||
unset($uidarrts);
|
||||
enter_logfile($logpath,$timezone,4," ".sprintf($lang['cleants'], $countts, $count_tsuser['count']));
|
||||
enter_logfile($logpath,$timezone,4," ".sprintf($lang['cleanrs'], count($select_arr['all_user'])));
|
||||
enter_logfile($cfg,4," ".sprintf($lang['cleants'], $countts, $count_tsuser['count']));
|
||||
enter_logfile($cfg,4," ".sprintf($lang['cleanrs'], count($select_arr['all_user'])));
|
||||
|
||||
if(isset($deleteuuids)) {
|
||||
$alldeldata = '';
|
||||
@@ -64,9 +64,9 @@ function clean($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$cleanclients,$c
|
||||
}
|
||||
if (isset($fsfilelistarray[$uuidasbase16.'.png'])) {
|
||||
if(unlink($avatarfilepath.$uuidasbase16.'.png') === false) {
|
||||
enter_logfile($logpath,$timezone,2," ".sprintf($lang['clean0002'], $uuidasbase16, $uuid).' '.sprintf($lang['errperm'], 'avatars'));
|
||||
enter_logfile($cfg,2," ".sprintf($lang['clean0002'], $uuidasbase16, $uuid).' '.sprintf($lang['errperm'], 'avatars'));
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," ".sprintf($lang['clean0001'], $uuidasbase16, $uuid));
|
||||
enter_logfile($cfg,4," ".sprintf($lang['clean0001'], $uuidasbase16, $uuid));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,15 +75,15 @@ function clean($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$cleanclients,$c
|
||||
$alldeldata = "(".$alldeldata.")";
|
||||
if ($alldeldata != '') {
|
||||
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_clients'; UPDATE `$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; DELETE FROM `$dbname`.`user` WHERE `uuid` IN $alldeldata; ";
|
||||
enter_logfile($logpath,$timezone,4," ".sprintf($lang['cleandel'], $countdel));
|
||||
enter_logfile($cfg,4," ".sprintf($lang['cleandel'], $countdel));
|
||||
unset($$alldeldata);
|
||||
}
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," ".$lang['cleanno']);
|
||||
enter_logfile($cfg,4," ".$lang['cleanno']);
|
||||
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_clients'; ";
|
||||
}
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4,$lang['clean0004']);
|
||||
enter_logfile($cfg,4,$lang['clean0004']);
|
||||
$sqlexec .= "UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_clients'; ";
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ function clean($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$cleanclients,$c
|
||||
// clean usersnaps older then 1 month + clean old server usage - older then a year
|
||||
if ($select_arr['job_check']['clean_db']['timestamp'] < ($nowtime - 86400)) {
|
||||
$sqlexec .= "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`; DELETE FROM `$dbname`.`server_usage` WHERE `timestamp` < (UNIX_TIMESTAMP() - 31536000); DELETE `b` FROM `$dbname`.`user` AS `a` RIGHT JOIN `$dbname`.`stats_user` AS `b` ON `a`.`uuid`=`b`.`uuid` WHERE `a`.`uuid` IS NULL; UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='clean_db'; DELETE FROM `$dbname`.`csrf_token` WHERE `timestamp` < (UNIX_TIMESTAMP() - 3600); ";
|
||||
enter_logfile($logpath,$timezone,4,$lang['clean0003']);
|
||||
enter_logfile($cfg,4,$lang['clean0003']);
|
||||
}
|
||||
|
||||
// delete IP address of offline user
|
||||
|
||||
@@ -1,62 +1,64 @@
|
||||
<?PHP
|
||||
function event_userenter(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host) {
|
||||
|
||||
global $logpath, $timezone, $mysqlcon, $dbname, $slowmode, $iphash, $sqlexec2;
|
||||
global $cfg, $mysqlcon, $dbname, $sqlexec2;
|
||||
|
||||
if($event['client_type'] == 0) {
|
||||
#enter_logfile($logpath,$timezone,6,"User ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].") connected to the server.");
|
||||
#enter_logfile($cfg,6,"User ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].") connected to the server.");
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$clientinfo = $host->serverGetSelected()->clientInfoDb($event["client_database_id"]);
|
||||
if($clientinfo['client_lastip'] == NULL) { //TeamSpeak sucks sometimes and gives a empty result
|
||||
enter_logfile($logpath,$timezone,4,"event_userenter: TeamSpeak gives an empty value for the IP address of ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].").. retry in 0,1 seconds..");
|
||||
enter_logfile($cfg,4,"event_userenter: TeamSpeak gives an empty value for the IP address of ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].").. retry in 0,1 seconds..");
|
||||
usleep(100000);
|
||||
try {
|
||||
unset($clientinfo);
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$clientinfo = $host->serverGetSelected()->clientInfoDb($event["client_database_id"]);
|
||||
if($clientinfo['client_lastip'] == NULL) {
|
||||
enter_logfile($logpath,$timezone,4,"event_userenter: TeamSpeak gives an empty value for the IP address of ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].").. retry in 0,5 seconds..");
|
||||
enter_logfile($cfg,4,"event_userenter: TeamSpeak gives an empty value for the IP address of ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].").. retry in 0,5 seconds..");
|
||||
usleep(500000);
|
||||
try {
|
||||
unset($clientinfo);
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$clientinfo = $host->serverGetSelected()->clientInfoDb($event["client_database_id"]);
|
||||
if($clientinfo['client_lastip'] == NULL) {
|
||||
enter_logfile($logpath,$timezone,2,"event_userenter: Fuck it.. TeamSpeak gives an empty value for the IP address of of ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].").");
|
||||
enter_logfile($cfg,2,"event_userenter: Fuck it.. TeamSpeak gives an empty value for the IP address of of ".$event['client_nickname']." (uuid: ".$event['client_unique_identifier'].").");
|
||||
return 0;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
if($iphash == 1) {
|
||||
if($cfg['rankup_hash_ip_addresses_mode'] == 1) {
|
||||
$hash = password_hash($clientinfo['client_lastip'], PASSWORD_DEFAULT);
|
||||
$ip = '';
|
||||
} elseif($cfg['rankup_hash_ip_addresses_mode'] == 2) {
|
||||
$salt = md5(dechex(crc32(substr(__DIR__,0,-4))));
|
||||
$hash = password_hash($clientinfo['client_lastip'], PASSWORD_DEFAULT, array("cost" => 10, "salt" => $salt));
|
||||
$ip = '';
|
||||
} else {
|
||||
$hash = '';
|
||||
$ip = $clientinfo['client_lastip'];
|
||||
}
|
||||
#enter_logfile($logpath,$timezone,6,"Event Userenter: Users IP-hash: ".$hash." IP: ".$ip);
|
||||
#enter_logfile($cfg,6,"Event Userenter: Users IP-hash: ".$hash." IP: ".$ip);
|
||||
if(($sqlhashs = $mysqlcon->query("SELECT * FROM `$dbname`.`user_iphash`")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE)) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"event_userenter 1:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"event_userenter 1:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
#enter_logfile($logpath,$timezone,6,"User-hash-Table: ".print_r($sqlhashs, true));
|
||||
#enter_logfile($cfg,6,"User-hash-Table: ".print_r($sqlhashs, true));
|
||||
$uuid = htmlspecialchars($event['client_unique_identifier'], ENT_QUOTES);
|
||||
if(isset($sqlhashs[$uuid])) {
|
||||
#enter_logfile($logpath,$timezone,6,"UPDATE $dbname.user_iphash SET iphash='".$hash."', ip='".$ip."' WHERE uuid='".$event['client_unique_identifier']."'");
|
||||
$sqlexec2 .= "UPDATE `$dbname`.`user_iphash` SET `iphash`='".$hash."',`ip`='".$ip."' WHERE `uuid`='".$event['client_unique_identifier']."'; ";
|
||||
} else {
|
||||
#enter_logfile($logpath,$timezone,6,"INSERT INTO $dbname.user_iphash (uuid,iphash,ip) VALUES ('".$event['client_unique_identifier']."','".$hash."','".$ip."')");
|
||||
$sqlexec2 .= "INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`) VALUES ('".$event['client_unique_identifier']."','".$hash."','".$ip."'); ";
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"event_userenter 4:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?PHP
|
||||
function get_avatars($ts3,$slowmode,$timezone,$logpath,$avatar_delay) {
|
||||
function get_avatars($ts3,$cfg) {
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$tsfilelist = $ts3->channelFileList($cid="0", $cpw="", $path="/");
|
||||
} catch (Exception $e) {
|
||||
if ($e->getCode() != 1281) {
|
||||
enter_logfile($logpath,$timezone,2,"get_avatars 1:".$e->getCode().': '."Error while getting avatarlist: ".$e->getMessage());
|
||||
enter_logfile($cfg,2,"get_avatars 1:".$e->getCode().': '."Error while getting avatarlist: ".$e->getMessage());
|
||||
}
|
||||
}
|
||||
$fsfilelist = opendir(substr(__DIR__,0,-4).'avatars/');
|
||||
@@ -20,21 +20,21 @@ function get_avatars($ts3,$slowmode,$timezone,$logpath,$avatar_delay) {
|
||||
foreach($tsfilelist as $tsfile) {
|
||||
$fullfilename = '/'.$tsfile['name'];
|
||||
$uuidasbase16 = substr($tsfile['name'],7);
|
||||
if (!isset($fsfilelistarray[$uuidasbase16.'.png']) || ($tsfile['datetime'] - $avatar_delay) > $fsfilelistarray[$uuidasbase16.'.png']) {
|
||||
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($timezone,$logpath); usleep($slowmode);
|
||||
check_shutdown($cfg); 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';
|
||||
enter_logfile($logpath,$timezone,5,"Download avatar: ".$fullfilename);
|
||||
enter_logfile($cfg,5,"Download avatar: ".$fullfilename);
|
||||
if(file_put_contents($avatarfilepath, $tsfile) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"Error while writing out the avatar. Please check the permission for the folder 'avatars'");
|
||||
enter_logfile($cfg,2,"Error while writing out the avatar. Please check the permission for the folder 'avatars'");
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"get_avatars 2:".$e->getCode().': '."Error while downloading avatar: ".$e->getMessage());
|
||||
enter_logfile($cfg,2,"get_avatars 2:".$e->getCode().': '."Error while downloading avatar: ".$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
<?PHP
|
||||
function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host) {
|
||||
|
||||
global $lang, $logpath, $timezone, $nextupinfo, $nextupinfomsg1, $nextupinfomsg2, $nextupinfomsg3, $mysqlcon, $dbname, $grouptime, $substridle, $slowmode, $currvers, $newversion, $adminuuid, $phpcommand;
|
||||
global $lang,$cfg,$mysqlcon, $dbname, $phpcommand;
|
||||
|
||||
if($host->whoami()["client_unique_identifier"] != $event["invokeruid"]) {
|
||||
$uuid = $event["invokeruid"];
|
||||
$admin = 0;
|
||||
foreach ($adminuuid as $auuid) {
|
||||
if ($uuid == $auuid) {
|
||||
foreach(array_flip($cfg['webinterface_admin_client_unique_id_list']) as $auuid) {
|
||||
if($uuid == $auuid) {
|
||||
$admin = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if((strstr($event["msg"], '!nextup') || strstr($event["msg"], '!next')) && $nextupinfo != 0) {
|
||||
//enter_logfile($logpath,$timezone,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) {
|
||||
//enter_logfile($cfg,6,"Client ".$event["invokername"]." (".$event["invokeruid"].") sent textmessage: ".$event["msg"]);
|
||||
if(($user = $mysqlcon->query("SELECT `count`,`nextup`,`idle`,`except`,`name` FROM `$dbname`.`user` WHERE `uuid`='$uuid'")->fetch()) === false) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 1:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,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($logpath,$timezone,2,"handle_messages 2:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,2,"handle_messages 2:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
|
||||
ksort($grouptime);
|
||||
$countgrp = count($grouptime);
|
||||
$grpcount=0;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
if ($substridle == 1) {
|
||||
ksort($cfg['rankup_definition']);
|
||||
$countgrp = count($cfg['rankup_definition']);
|
||||
$grpcount = 0;
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$nextup = $time - $user['count'] + $user['idle'];
|
||||
} else {
|
||||
$nextup = $time - $user['count'];
|
||||
@@ -40,30 +41,30 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
|
||||
$name = $user['name'];
|
||||
$grpcount++;
|
||||
if ($nextup > 0 && $nextup < $time || $grpcount == $countgrp && $nextup <= 0) {
|
||||
check_shutdown($timezone,$logpath); usleep($slowmode);
|
||||
check_shutdown($cfg); usleep($cfg['teamspeak_query_command_delay']);
|
||||
if ($grpcount == $countgrp && $nextup <= 0) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($nextupinfomsg2, $days, $hours, $mins, $secs, $sqlhisgroup[$groupid]['sgidname'], $name));
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($cfg['rankup_next_message_2'], $days, $hours, $mins, $secs, $sqlhisgroup[$groupid]['sgidname'], $name));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 3:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 3:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
} elseif ($user['except'] == 2 || $user['except'] == 3) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($nextupinfomsg3, $days, $hours, $mins, $secs, $sqlhisgroup[$groupid]['sgidname'], $name));
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($cfg['rankup_next_message_3'], $days, $hours, $mins, $secs, $sqlhisgroup[$groupid]['sgidname'], $name));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 4:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 4:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
} else {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($nextupinfomsg1, $days, $hours, $mins, $secs, $sqlhisgroup[$groupid]['sgidname'], $name));
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($cfg['rankup_next_message_1'], $days, $hours, $mins, $secs, $sqlhisgroup[$groupid]['sgidname'], $name));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 5:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 5:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
if($nextupinfo == 1) {
|
||||
if($cfg['rankup_next_message_mode'] == 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -71,59 +72,59 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
|
||||
}
|
||||
|
||||
if(strstr($event["msg"], '!version')) {
|
||||
if(version_compare($newversion, $currvers, '>') && $newversion != '') {
|
||||
usleep($slowmode);
|
||||
if(version_compare($cfg['version_latest_available'], $cfg['version_current_using'], '>') && $cfg['version_latest_available'] != '') {
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($lang['upmsg'], $currvers, $newversion));
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($lang['upmsg'], $cfg['version_current_using'], $cfg['version_latest_available']));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 6:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 6:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
} else {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($lang['msg0001'], $currvers));
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message(sprintf($lang['msg0001'], $cfg['version_current_using']));
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 7:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 7:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(strstr($event["msg"], '!help') || strstr($event["msg"], '!info') || strstr($event["msg"], '!commands')) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0002']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 8:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 8:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if((strstr($event["msg"], '!shutdown') || strstr($event["msg"], '!quit') || strstr($event["msg"], '!stop')) && $admin == 1) {
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['msg0004'], $event["invokername"], $event["invokeruid"]));
|
||||
enter_logfile($cfg,5,sprintf($lang['msg0004'], $event["invokername"], $event["invokeruid"]));
|
||||
$path = substr(__DIR__, 0, -4);
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0005']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 9:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 9:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
exec($phpcommand." ".$path."worker.php stop");
|
||||
} elseif (strstr($event["msg"], '!shutdown') || strstr($event["msg"], '!quit') || strstr($event["msg"], '!stop')) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0003']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 10:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 10:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if((strstr($event["msg"], '!restart') || strstr($event["msg"], '!reboot')) && $admin == 1) {
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['msg0007'], $event["invokername"], $event["invokeruid"]));
|
||||
enter_logfile($cfg,5,sprintf($lang['msg0007'], $event["invokername"], $event["invokeruid"]));
|
||||
$path = substr(__DIR__, 0, -4);
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0006']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 11:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 11:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
exec("start ".$phpcommand." ".$path."worker.php restart");
|
||||
@@ -131,49 +132,49 @@ function handle_messages(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
|
||||
exec($phpcommand." ".$path."worker.php restart > /dev/null 2>/dev/null &");
|
||||
}
|
||||
} elseif (strstr($event["msg"], '!restart') || strstr($event["msg"], '!reboot')) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0003']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 12:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 12:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if((strstr($event["msg"], '!checkupdate') || strstr($event["msg"], '!update')) && $admin == 1) {
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='0' WHERE `job_name` IN ('check_update','get_version','calc_server_stats')") === false) {
|
||||
enter_logfile($logpath,$timezone,4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0008']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 14:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 14:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
} elseif(strstr($event["msg"], '!checkupdate') || strstr($event["msg"], '!update')) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0003']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 15:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 15:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if((strstr($event["msg"], '!clean')) && $admin == 1) {
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='0' WHERE `job_name` IN ('clean_db','clean_clients')") === false) {
|
||||
enter_logfile($logpath,$timezone,4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
|
||||
enter_logfile($cfg,4,"handle_messages 13:".print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0009']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 14:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 14:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
} elseif(strstr($event["msg"], '!clean')) {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
try {
|
||||
$host->serverGetSelected()->clientGetByUid($event["invokeruid"])->message($lang['msg0003']);
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,"handle_messages 15:".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($cfg,2,"handle_messages 15:".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?PHP
|
||||
function update_groups($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$serverinfo,$logpath,$grouptime,$boostarr,$exceptgroup,$select_arr,$adminuuid,$nobreak = 0) {
|
||||
function update_groups($ts3,$mysqlcon,$lang,$cfg,$dbname,$serverinfo,$select_arr,$nobreak = 0) {
|
||||
$sqlexec = '';
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$iconlist = $ts3->channelFileList($cid="0", $cpw="", $path="/icons/");
|
||||
} catch (Exception $e) {
|
||||
if ($e->getCode() != 1281) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
|
||||
enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ function update_groups($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$serveri
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->serverGroupListReset();
|
||||
$ts3groups = $ts3->serverGroupList();
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
|
||||
enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.$lang['errgrplist'].$e->getMessage());
|
||||
}
|
||||
|
||||
// ServerIcon
|
||||
@@ -33,21 +33,21 @@ function update_groups($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$serveri
|
||||
if (!isset($select_arr['groups']['0']) || $select_arr['groups']['0']['iconid'] != $sIconId || $iconarr["i".$sIconId] > $select_arr['groups']['0']['icondate']) {
|
||||
if($sIconId > 600) {
|
||||
try {
|
||||
usleep($slowmode);
|
||||
enter_logfile($logpath,$timezone,5,$lang['upgrp0002']);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
enter_logfile($cfg,5,$lang['upgrp0002']);
|
||||
$sIconFile = $ts3->iconDownload();
|
||||
if(file_put_contents(substr(dirname(__FILE__),0,-4) . "tsicons/servericon.png", $sIconFile) === false) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['upgrp0003'].' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
enter_logfile($cfg,2,$lang['upgrp0003'].' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['errorts3'].$e->getCode().'; '.$lang['upgrp0004'].$e->getMessage());
|
||||
enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().'; '.$lang['upgrp0004'].$e->getMessage());
|
||||
}
|
||||
} elseif($sIconId == 0) {
|
||||
if(file_exists(substr(dirname(__FILE__),0,-4) . "tsicons/servericon.png")) {
|
||||
if(unlink(substr(dirname(__FILE__),0,-4) . "tsicons/servericon.png") === false) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['upgrp0005'].' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
enter_logfile($cfg,2,$lang['upgrp0005'].' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5,$lang['upgrp0006']);
|
||||
enter_logfile($cfg,5,$lang['upgrp0006']);
|
||||
}
|
||||
}
|
||||
$iconarr["i".$sIconId] = 0;
|
||||
@@ -73,23 +73,23 @@ function update_groups($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$serveri
|
||||
if($iconid > 600) {
|
||||
if (!isset($select_arr['groups'][$sgid]) || $select_arr['groups'][$sgid]['iconid'] != $iconid || $iconarr["i".$iconid] > $select_arr['groups'][$sgid]['icondate']) {
|
||||
try {
|
||||
check_shutdown($timezone,$logpath); usleep($slowmode);
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['upgrp0011'], $sgname, $sgid));
|
||||
check_shutdown($cfg); usleep($cfg['teamspeak_query_command_delay']);
|
||||
enter_logfile($cfg,5,sprintf($lang['upgrp0011'], $sgname, $sgid));
|
||||
$iconfile = $servergroup->iconDownload();
|
||||
if(file_put_contents(substr(dirname(__FILE__),0,-4) . "tsicons/" . $sgid . ".png", $iconfile) === false) {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['upgrp0007'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
enter_logfile($cfg,2,sprintf($lang['upgrp0007'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
}
|
||||
$iconcount++;
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['errorts3'].$e->getCode().': '.sprintf($lang['upgrp0008'], $sgname, $sgid).$e->getMessage());
|
||||
enter_logfile($cfg,2,$lang['errorts3'].$e->getCode().': '.sprintf($lang['upgrp0008'], $sgname, $sgid).$e->getMessage());
|
||||
}
|
||||
}
|
||||
} elseif($iconid == 0) {
|
||||
if(file_exists(substr(dirname(__FILE__),0,-4) . "tsicons/" . $sgid . ".png")) {
|
||||
if(unlink(substr(dirname(__FILE__),0,-4) . "tsicons/" . $sgid . ".png") === false) {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['upgrp0009'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
enter_logfile($cfg,2,sprintf($lang['upgrp0009'], $sgname, $sgid).' '.sprintf($lang['errperm'], 'tsicons'));
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['upgrp0010'], $sgname, $sgid));
|
||||
enter_logfile($cfg,5,sprintf($lang['upgrp0010'], $sgname, $sgid));
|
||||
}
|
||||
}
|
||||
$iconarr["i".$iconid] = 0;
|
||||
@@ -123,41 +123,41 @@ function update_groups($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$serveri
|
||||
foreach ($select_arr['groups'] as $sgid => $groups) {
|
||||
if(!isset($tsgroupids[$sgid]) && $sgid != 0 && $sgid != NULL) {
|
||||
$delsgroupids .= "'" . $sgid . "',";
|
||||
if(in_array($sgid, $grouptime)) {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['upgrp0001'], $sgid, $lang['wigrptime']));
|
||||
if(isset($adminuuid) && $adminuuid != NULL) {
|
||||
foreach ($adminuuid as $clientid) {
|
||||
usleep($slowmode);
|
||||
if(in_array($sgid, $cfg['rankup_definition'])) {
|
||||
enter_logfile($cfg,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($logpath,$timezone,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
#enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($boostarr[$sgid])) {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['upgrp0001'], $sgid, $lang['wiboost']));
|
||||
if(isset($adminuuid) && $adminuuid != NULL) {
|
||||
foreach ($adminuuid as $clientid) {
|
||||
usleep($slowmode);
|
||||
if(isset($cfg['rankup_boost_definition'][$sgid])) {
|
||||
enter_logfile($cfg,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($logpath,$timezone,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
#enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($exceptgroup[$sgid])) {
|
||||
enter_logfile($logpath,$timezone,2,sprintf($lang['upgrp0001'], $sgid, $lang['wiexgrp']));
|
||||
if(isset($adminuuid) && $adminuuid != NULL) {
|
||||
foreach ($adminuuid as $clientid) {
|
||||
usleep($slowmode);
|
||||
if(isset($cfg['rankup_excepted_group_id_list'][$sgid])) {
|
||||
enter_logfile($cfg,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($logpath,$timezone,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
#enter_logfile($cfg,6," ".sprintf($lang['upusrerr'], $clientid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
<?PHP
|
||||
function update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpcommand,$norotate=NULL) {
|
||||
function update_rs($mysqlcon,$lang,$cfg,$dbname,$phpcommand,$norotate=NULL) {
|
||||
$norotate = true;
|
||||
enter_logfile($logpath,$timezone,4," Start updating the Ranksystem...",$norotate);
|
||||
enter_logfile($logpath,$timezone,4," Backup the database due cloning tables...",$norotate);
|
||||
enter_logfile($cfg,4," Start updating the Ranksystem...",$norotate);
|
||||
enter_logfile($cfg,4," Backup the database due cloning tables...",$norotate);
|
||||
$countbackuperr = 0;
|
||||
|
||||
$tables = array('addons_config','config','groups','job_check','server_usage','stats_server','stats_user','user','user_snapshot');
|
||||
$tables = array('addons_config','cfg_params','groups','job_check','server_usage','stats_server','stats_user','user','user_snapshot');
|
||||
|
||||
foreach ($tables as $table) {
|
||||
if($mysqlcon->query("SELECT 1 FROM `$dbname`.`bak_$table` LIMIT 1") !== false) {
|
||||
if($mysqlcon->exec("DROP TABLE `$dbname`.`bak_$table`") === false) {
|
||||
enter_logfile($logpath,$timezone,1," Error due deleting old backup table ".$table.".",$norotate);
|
||||
enter_logfile($cfg,1," Error due deleting old backup table ".$table.".",$norotate);
|
||||
$countbackuperr++;
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," Old backup table ".$table." successfully removed.",$norotate);
|
||||
enter_logfile($cfg,4," Old backup table ".$table." successfully removed.",$norotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($tables as $table) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`bak_$table` LIKE `$dbname`.`$table`") === false) {
|
||||
enter_logfile($logpath,$timezone,1," Error due creating table bak_".$table.".",$norotate);
|
||||
enter_logfile($cfg,1," Error due creating table bak_".$table.".",$norotate);
|
||||
$countbackuperr++;
|
||||
} else {
|
||||
if($mysqlcon->exec("INSERT `$dbname`.`bak_$table` SELECT * FROM `$dbname`.`$table`") === false) {
|
||||
enter_logfile($logpath,$timezone,1," Error due inserting data from table ".$table.".",$norotate);
|
||||
enter_logfile($cfg,1," Error due inserting data from table ".$table.".",$norotate);
|
||||
$countbackuperr++;
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," Table ".$table." successfully cloned.",$norotate);
|
||||
enter_logfile($cfg,4," Table ".$table." successfully cloned.",$norotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($countbackuperr != 0) {
|
||||
enter_logfile($logpath,$timezone,4," Backup failed. Please check your database permissions.",$norotate);
|
||||
enter_logfile($logpath,$timezone,4," Update failed. Go on with normal work on old version.",$norotate);
|
||||
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);
|
||||
return;
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," Database-tables successfully backuped.",$norotate);
|
||||
enter_logfile($cfg,4," Database-tables successfully backuped.",$norotate);
|
||||
}
|
||||
|
||||
if(!is_file(substr(__DIR__,0,-4).'update/ranksystem_'.$newversion.'.zip')) {
|
||||
enter_logfile($logpath,$timezone,4," Downloading new update...",$norotate);
|
||||
$newUpdate = file_get_contents('https://ts-n.net/downloads/ranksystem_'.$newversion.'.zip');
|
||||
if(!is_file(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip')) {
|
||||
enter_logfile($cfg,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/');
|
||||
}
|
||||
$dlHandler = fopen(substr(__DIR__,0,-4).'update/ranksystem_'.$newversion.'.zip', 'w');
|
||||
$dlHandler = fopen(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip', 'w');
|
||||
if(!fwrite($dlHandler,$newUpdate)) {
|
||||
enter_logfile($logpath,$timezone,1," Could not save new update. Please check the permissions for folder 'update'.",$norotate);
|
||||
enter_logfile($logpath,$timezone,4," Update failed. Go on with normal work on old version.",$norotate);
|
||||
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);
|
||||
return;
|
||||
}
|
||||
if(!is_file(substr(__DIR__,0,-4).'update/ranksystem_'.$newversion.'.zip')) {
|
||||
enter_logfile($logpath,$timezone,4," Something gone wrong with downloading/saving the new update file.",$norotate);
|
||||
enter_logfile($logpath,$timezone,4," Update failed. Go on with normal work on old version.",$norotate);
|
||||
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);
|
||||
return;
|
||||
}
|
||||
fclose($dlHandler);
|
||||
enter_logfile($logpath,$timezone,4," New update successfully saved.",$norotate);
|
||||
enter_logfile($cfg,4," New update successfully saved.",$norotate);
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5," New update file already here...",$norotate);
|
||||
enter_logfile($cfg,5," New update file already here...",$norotate);
|
||||
}
|
||||
|
||||
$zipHandle = zip_open(substr(__DIR__,0,-4).'update/ranksystem_'.$newversion.'.zip');
|
||||
$zipHandle = zip_open(substr(__DIR__,0,-4).'update/ranksystem_'.$cfg['version_latest_available'].'.zip');
|
||||
|
||||
$countwrongfiles = 0;
|
||||
$countchangedfiles = 0;
|
||||
@@ -78,9 +78,9 @@ function update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpco
|
||||
|
||||
if(!is_dir(substr(__DIR__,0,-4).'/'.$thisFileDir)) {
|
||||
if(mkdir(substr(__DIR__,0,-4).$thisFileDir, 0777, true)) {
|
||||
enter_logfile($logpath,$timezone,4," Create new folder ".$thisFileDir,$norotate);
|
||||
enter_logfile($cfg,4," Create new folder ".$thisFileDir,$norotate);
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,1," Error by creating folder ".$thisFileDir.". Please check the permissions on your folder ".substr(__DIR__,0,-4),$norotate);
|
||||
enter_logfile($cfg,1," Error by creating folder ".$thisFileDir.". Please check the permissions on your folder ".substr(__DIR__,0,-4),$norotate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,16 +88,16 @@ function update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpco
|
||||
$contents = zip_entry_read($aF, zip_entry_filesize($aF));
|
||||
$updateThis = '';
|
||||
if($thisFileName == 'other/dbconfig.php' || $thisFileName == 'install.php' || $thisFileName == 'other/phpcommand.php') {
|
||||
enter_logfile($logpath,$timezone,5," Did not touch ".$thisFileName,$norotate);
|
||||
enter_logfile($cfg,5," Did not touch ".$thisFileName,$norotate);
|
||||
} else {
|
||||
if(($updateThis = fopen(substr(__DIR__,0,-4).'/'.$thisFileName, 'w')) === false) {
|
||||
enter_logfile($logpath,$timezone,1," Failed to open file ".$thisFileName,$norotate);
|
||||
enter_logfile($cfg,1," Failed to open file ".$thisFileName,$norotate);
|
||||
$countwrongfiles++;
|
||||
} elseif(!fwrite($updateThis, $contents)) {
|
||||
enter_logfile($logpath,$timezone,1," Failed to write file ".$thisFileName,$norotate);
|
||||
enter_logfile($cfg,1," Failed to write file ".$thisFileName,$norotate);
|
||||
$countwrongfiles++;
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,4," Replaced file ".$thisFileName,$norotate);
|
||||
enter_logfile($cfg,4," Replaced file ".$thisFileName,$norotate);
|
||||
$countchangedfiles++;
|
||||
}
|
||||
fclose($updateThis);
|
||||
@@ -106,30 +106,28 @@ function update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpco
|
||||
}
|
||||
}
|
||||
if($countwrongfiles == 0 && $countchangedfiles != 0) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'update/ranksystem_'.$newversion.'.zip')) {
|
||||
enter_logfile($logpath,$timezone,3," Could not clean update folder. Please remove the unneeded file ".substr(__DIR__,0,-4)."update/ranksystem_".$newversion.".zip",$norotate);
|
||||
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);
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5," Cleaned update folder.",$norotate);
|
||||
enter_logfile($cfg,5," Cleaned update folder.",$norotate);
|
||||
}
|
||||
|
||||
$nowtime = time();
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='get_version'; UPDATE `$dbname`.`config` SET `newversion`='$newversion';") === false) {
|
||||
enter_logfile($logpath,$timezone,1," Error due updating new version in database.");
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='$nowtime' WHERE `job_name`='get_version'; UPDATE `$dbname`.`cfg_params` SET `value`='{$cfg['version_latest_available']}' WHERE `param`='version_latest_available';") === false) {
|
||||
enter_logfile($cfg,1," Error due updating new version in database.");
|
||||
}
|
||||
|
||||
enter_logfile($logpath,$timezone,4," Files updated successfully. Wait for restart via cron/task. Shutting down!\n\n",$norotate);
|
||||
|
||||
$path = substr(__DIR__, 0, -4);
|
||||
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
exec("start ".$phpcommand." ".$path."worker.php restart");
|
||||
exit;
|
||||
shutdown($mysqlcon,$cfg,4," Files updated successfully. Wait for restart via cron/task.");
|
||||
} else {
|
||||
exec($phpcommand." ".$path."worker.php restart > /dev/null 2>/dev/null &");
|
||||
exit;
|
||||
shutdown($mysqlcon,$cfg,4," Files updated successfully. Wait for restart via cron/task.");
|
||||
}
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,1," Files updated with at least one error. Please check the log!",$norotate);
|
||||
enter_logfile($cfg,1," Files updated with at least one error. Please check the log!",$norotate);
|
||||
// how to handle this.. Perhaps try again automatically in 30 minutes
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ $lang['stag0011'] = "Limit of simultaneous groups: ";
|
||||
$lang['stag0012'] = "set groups";
|
||||
$lang['stag0013'] = "Addon ON/OFF";
|
||||
$lang['stag0014'] = "Turn the Addon on (enabled) or off (disabled).<br><br>On disabling the addon a possible part on the stats/ site will be hidden.";
|
||||
$lang['stag0015'] = "You couldn't be find on the TeamSpeak server. Please %sclick here%s to verify yourself.";
|
||||
$lang['stag0015'] = "%sيمكن العثور على TeamSpeak%s. يرجى النقر هنا للتحقق من نفسك أولا.";
|
||||
$lang['stag0016'] = "verification needed!";
|
||||
$lang['stag0017'] = "verificate here..";
|
||||
$lang['stix0001'] = "حالة الخادم";
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Stable since: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "افضل مستخدمين";
|
||||
$lang['sttw0002'] = "لهذا الاسبوع";
|
||||
$lang['sttw0003'] = "وقت التواجد %s %s ساعات";
|
||||
@@ -454,8 +455,11 @@ $lang['wishcoldbid'] = "database-ID";
|
||||
$lang['wishcoldbiddesc'] = "Show column 'Client-database-ID' in stats/list_rankup.php";
|
||||
$lang['wishcolgs'] = "actual group since";
|
||||
$lang['wishcolgsdesc'] = "Show column 'actual group since' in list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "idle time";
|
||||
$lang['wishcolitdesc'] = "Show column 'sum idle time' in stats/list_rankup.php";
|
||||
$lang['wishcolls'] = "last seen";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Stable since: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Nejlepší uživatelé";
|
||||
$lang['sttw0002'] = "Tohoto týdne";
|
||||
$lang['sttw0003'] = "S časem %s";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "database-ID";
|
||||
$lang['wishcoldbiddesc'] = "Zobrazit sloupec 'Client-database-ID' ve sloupci list_rankup.php";
|
||||
$lang['wishcolgs'] = "aktuální skupina od";
|
||||
$lang['wishcolgsdesc'] = "Zobrazit aktuální sloupec 'od roku' v list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "doba nečinnosti";
|
||||
$lang['wishcolitdesc'] = "Zobrazit sloupec 'součet čas nečinnosti' v list_rankup.php";
|
||||
$lang['wishcolls'] = "naposledy viděn";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Stable seit: 18.04.2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - für die tschechische Übersetzung";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - für die polnische Übersetzung";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - für die spanische Übersetzung";
|
||||
$lang['sttw0001'] = "Top User";
|
||||
$lang['sttw0002'] = "der Woche";
|
||||
$lang['sttw0003'] = "mit %s %s online Zeit";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "Datenbank-ID";
|
||||
$lang['wishcoldbiddesc'] = "Zeige Spalte 'Client-Datenbank-ID' in der stats/list_rankup.php";
|
||||
$lang['wishcolgs'] = "aktuelle Gruppe seit";
|
||||
$lang['wishcolgsdesc'] = "Zeige Spalte 'aktuelle Gruppe seit' in der stats/list_rankup.php";
|
||||
$lang['wishcolha0'] = "deaktiviert";
|
||||
$lang['wishcolha1'] = "sicheres Hashen";
|
||||
$lang['wishcolha2'] = "schnelles Hashen (Standard)";
|
||||
$lang['wishcolha'] = "hashe IP Adressen";
|
||||
$lang['wishcolhadesc'] = "Aktiviert das Verschlüsseln / Hashen von IP Adressen von TeamSpeak Benutzern und speichert lediglich den gehashten Wert in der Datenbank.<br>Dies kann aufgrund von bestimmten Datenschutzbestimmungen erforderlich werden; insbesondere fordert dies die EU-DSGVO.<br>Wir können jedoch nicht gänzlich auf die IP Adresse verzichten, da diese für das Verknüpfen des Webseiten-Besuchers mit dem zugehörigen TeamSpeak User benötigt wird.<br><br>Wenn diese Funktion deaktiviert (OFF) ist, wird die IP Adresse eines TeamSpeak Nutzers im Klartext gespeichert.<br><br>In beiden Varianten (ON und OFF) wird die IP Adresse jedoch nur so lange gespeichert, wie der Benutzer mit dem TS3 Server verbunden ist.<br><br>!!! Verschlüsseln / Hashen von IP Adressen benötigt mehr Ressourcen und wirkt sich negativ auf die Performance der Webseite aus !!!<br><br>Die IP Adressen von Benutzern werden beim Verbinden des Users auf dem TS3 Server gespeichert. Beim Wechsel der Funktion ist es daher erforderlich, dass der User sich erneut zum TS3 Server verbindet, bevor er sich auf der Ranksystem Webseite verifizieren kann.";
|
||||
$lang['wishcolhadesc'] = "Der TeamSpeak 3 Server speichert die IP-Adresse jedes Clients. Dies benötigen wir, damit das Ranksystem den Webseiten-Benutzer der Statistikseite mit dem entsprechenden TeamSpeak-Benutzer verknüpfen kann.<br><br>Mit dieser Funktion kann die Verschlüsselung / Hashen der IP-Adressen von TeamSpeak-Benutzern aktiviert werden. Sofern aktiviert, wird nur der Hash-Wert in der Datenbank gespeichert, anstatt die IP-Adresse im Klartext abzulegen. Dies ist in einigen Fällen des Datenschutzes erforderlich; insbesondere aufgrund der DSGVO.<br><br><br><b>schnelles Hashen (default):</b> IP-Adressen werden gehasht. Das 'Salt' ist für jede Rank-Systeminstanz unterschiedlich, aber für alle Benutzer auf dem Server gleich. Dies macht es schneller, aber auch schwächer als das 'sicheres Hashing'.<br><br><b>sicheres Hashen:</b> IP-Adressen werden gehasht. Jeder Benutzer erhält sein eigenes 'Salt', was es schwierig macht, die IP zu entschlüsseln (=sicher). Dieser Parameter ist konform mit der DSGVO. Contra: Diese Variante wirkt sich auf die Leistung aus, besonders bei größeren TeamSpeak-Servern verlangsamt sie die Statistikseite beim erstmaligen Laden der Seite sehr stark. Außerdem erhöht es die benötigten Ressourcen.<br><br><b>deaktiviert:</b> Ist die Funktion deaktiviert, wird die IP-Adresse eines Benutzers im Klartext gespeichert. Dies ist die schnellste Option, welche auch die geringsten Ressourcen benötigt.<br><br><br>In allen Varianten werden die IP-Adressen der Benutzer nur so lange gespeichert, wie der Benutzer mit dem TS3-Server verbunden ist (Datenminimierung - DSGVO).<br><br>Die IP-Adressen werden nur in dem Moment gespeichert, in dem sich ein Benutzer mit dem TS3-Server verbindet. Bei Änderung des Parameters ist eine erneute Verbindung der Benutzer mit dem TS3-Server erforderlich, damit diese sich wieder mit der Ranksystem-Webseite verifizieren können.";
|
||||
$lang['wishcolit'] = "idle Zeit";
|
||||
$lang['wishcolitdesc'] = "Zeige Spalte 'ges. idle Zeit' in der stats/list_rankup.php";
|
||||
$lang['wishcolls'] = "zuletzt gesehen";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Stable since: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Top users";
|
||||
$lang['sttw0002'] = "Of the week";
|
||||
$lang['sttw0003'] = "With %s %s online time";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "database-ID";
|
||||
$lang['wishcoldbiddesc'] = "Show column 'Client-database-ID' in list_rankup.php";
|
||||
$lang['wishcolgs'] = "current group since";
|
||||
$lang['wishcolgsdesc'] = "Show column 'current group since' in list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "idle time";
|
||||
$lang['wishcolitdesc'] = "Show column 'sum idle time' in list_rankup.php";
|
||||
$lang['wishcolls'] = "last seen";
|
||||
|
||||
514
languages/core_es.php
Normal file
514
languages/core_es.php
Normal file
@@ -0,0 +1,514 @@
|
||||
<?PHP
|
||||
$lang = array();
|
||||
$lang['adduser'] = "Usuario %s (ID de cliente unico: %s; ID de base de datos del cliente %s) es desconocida -> agregada a Ranksystem ahora.";
|
||||
$lang['brute'] = "Muchos inicios de sesión incorrectos detectados en el webinterface. Inicio de sesion bloqueado por 300 segundos! Último acceso desde IP %s.";
|
||||
$lang['brute1'] = "Intento de inicio de sesión incorrecta en el webinterface detectado. Intento de acceso fallido desde IP %s con nombre de usuario %s.";
|
||||
$lang['brute2'] = "Inicio de sesion exitoso en webinterface desde la IP %s.";
|
||||
$lang['changedbid'] = "Usuario %s (ID de cliente unico: %s) tengo una nueva TeamSpeak ID de base de datos del cliente (%s). Actualiza el viejo ID de base de datos del cliente (%s) y restablezca los tiempos recogidos!";
|
||||
$lang['clean'] = "Escaneando clientes para eliminar...";
|
||||
$lang['cleanc'] = "limpiar clientes";
|
||||
$lang['cleancdesc'] = "Con esta función, los clientes antiguos se eliminan del Ranksystem.<br><br>Para este fin, el sistema de rangos se sincronizará con la base de datos TeamSpeak. Clientes, que ya no existan en el servidor de TeamSpeak, serán eliminados del Ranksystem.<br><br>Esta función solo está habilitada cuando 'Consulta en modo lento' está desactivada!<br><br><br>Para el ajuste automático de la base de datos TeamSpeak, se puede usar Limpiador de clientes:<br>%s";
|
||||
$lang['cleandel'] = "%s los clientes fueron eliminados de la base de datos de Ranksystem, porque ya no existían en la base de datos TeamSpeak.";
|
||||
$lang['cleanno'] = "No había nada que eliminar...";
|
||||
$lang['cleanp'] = "Limpaidor periodico";
|
||||
$lang['cleanpdesc'] = "Establezca un tiempo que debe transcurrir antes del 'Limpiador de clientes' se ejecuta a continuación.<br><br>Establece un tiempo en segundos.<br><br>Es recomendado hacerlo una vez al dia, porque la limpieza del cliente necesita mucho tiempo para bases de datos grandes.";
|
||||
$lang['cleanrs'] = "Clientes en la base de datos de Ranksystem: %s";
|
||||
$lang['cleants'] = "Clientes encontrados en la base de datos TeamSpeak: %s (de %s)";
|
||||
$lang['clean0001'] = "Avatar innecesario eliminado %s (ID de cliente unico antiguo: %s) exitosamente.";
|
||||
$lang['clean0002'] = "Error al eliminar un avatar innecesario %s (ID de cliente unico: %s).";
|
||||
$lang['clean0003'] = "Compruebe si la limpieza de la base de datos está hecha. Se borraron todas las cosas innecesarias.";
|
||||
$lang['clean0004'] = "Verifique que haya eliminado usuarios. Nada ha cambiado, porque funciona 'Limpiador de clientes' está desactivado (webinterface - núcleo).";
|
||||
$lang['day'] = "%s <small>día</small>";
|
||||
$lang['days'] = "%s <small>días</small>";
|
||||
$lang['dbconerr'] = "Error al conectarse a la base de datos: ";
|
||||
$lang['errcsrf'] = "El token CSRF está incorrecto o ha caducado (=comprobación de seguridad fallida)! Por favor, recarga este sitio y pruébalo nuevamente. Si recibe este error varias veces, elimine la cookie de sesión de su navegador y vuelva a intentarlo!";
|
||||
$lang['errgrpid'] = "Sus cambios no se almacenaron en la base de datos debido a errores. Corrige los problemas y guarda tus cambios después!";
|
||||
$lang['errgrplist'] = "Error al obtener las listas de grupos del servidores: ";
|
||||
$lang['errlogin'] = "¡El nombre de usuario y / o contraseña son incorrectos! Inténtalo de nuevo...";
|
||||
$lang['errlogin2'] = "Protección de fuerza bruta: Inténtalo de nuevo en %s segundos!";
|
||||
$lang['errlogin3'] = "Protección de la fuerza bruta: Demasiados errores. Baneado por 300 Segundos!";
|
||||
$lang['error'] = "Error ";
|
||||
$lang['errorts3'] = "Error de TS3: ";
|
||||
$lang['errperm'] = "Por favor, compruebe el permiso para la carpeta '%s'!";
|
||||
$lang['errselusr'] = "Por favor elija al menos un usuario!";
|
||||
$lang['errseltime'] = "Por favor ingrese un tiempo en línea para agregar!";
|
||||
$lang['errukwn'] = "Un error desconocido a ocurrido!";
|
||||
$lang['highest'] = "rango más alto alcanzado";
|
||||
$lang['install'] = "Instalación";
|
||||
$lang['instdb'] = "Instalar base de datos";
|
||||
$lang['instdbsuc'] = "Base de datos %s creada con éxito.";
|
||||
$lang['insterr1'] = "ATENCIÓN: Estás tratando de instalar el Ranksystem, pero ya existe una base de datos con el nombre \"%s\".<br>Debido a la instalación, esta base de datos se descartará!<br>Asegúrate de querer esto. Si no, elija otra base de datos.";
|
||||
$lang['insterr2'] = "Se necesita PDO pero parece que no está instalado. Instalar <a href=\"http://php.net/manual/de/pdo.installation.php\" target=\"_blank\">PDO</a> y prueba de nuevo!";
|
||||
$lang['insterr3'] = "La función exec de PHP debe estar habilitada pero parece estar deshabilitada. Por favor activa el PHP <a href=\http://php.net/manual/de/function.exec.php\" target=\"_blank\">exec</a> funcion e intentalo de nuevo!";
|
||||
$lang['insterr4'] = "Your PHP version (%s) is below 5.5.0. Update your PHP and try it again!";
|
||||
$lang['insterr5'] = "SimpleXML is needed but seems not to be available. Install <a href=\"http://php.net/manual/en/book.simplexml.php\" target=\"_blank\">simpleXML</a> and try it again!";
|
||||
$lang['insterr6'] = "PHP cURL is needed but seems not to be available. Install <a href=\"//php.net/manual/en/book.curl.php\" target=\"_blank\">PHP cURL</a> and try it again!";
|
||||
$lang['insterr7'] = "PHP Zip is needed but seems not to be available. Install <a href=\"//php.net/manual/en/book.zip.php\" target=\"_blank\">PHP Zip</a> and try it again!";
|
||||
$lang['insterr8'] = "PHP COM extension (php_com_dotnet.dll) is needed but seems not to be available. Install <a href=\"//php.net/manual/en/book.com.php\" target=\"_blank\">PHP COM</a> and try it again!";
|
||||
$lang['insterr9'] = "PHP PDO MySQL extension (php_pdo_mysql.so) is needed but seems not to be available. Install <a href=\"//http://php.net/manual/en/ref.pdo-mysql.php\" target=\"_blank\">PHP PDO MySQL</a> and try it again!";
|
||||
$lang['isntwicfg'] = "Can't save the database configuration! Please assign full rights on 'other/dbconfig.php' (Linux: chmod 777; Windows: 'full access') and try again after.";
|
||||
$lang['isntwicfg2'] = "Configurar Webinterface";
|
||||
$lang['isntwichm'] = "Permisos de escritura en la carpeta \"%s\" están ausentes. Por favor asigne todos los derechos (Linux: chmod 777; Windows: 'acceso completo') y tratar de iniciar el Ranksystem de nuevo.";
|
||||
$lang['isntwiconf'] = "Abre el %s para configurar el Ranksystem!";
|
||||
$lang['isntwidbhost'] = "Dirección de host DB:";
|
||||
$lang['isntwidbhostdesc'] = "La dirección del servidor donde se ejecuta la base de datos.<br>(IP o DNS)<br><br>si el servidor de la base de datos y el espacio web se están ejecutando en el mismo sistema, deberías poder usar <pre>localhost</pre> o <pre>127.0.0.1</pre>";
|
||||
$lang['isntwidbmsg'] = "Error de la base de datos: ";
|
||||
$lang['isntwidbname'] = "Nombre de la DB:";
|
||||
$lang['isntwidbnamedesc'] = "Nombre de la base de datos";
|
||||
$lang['isntwidbpass'] = "Contraseña de la DB:";
|
||||
$lang['isntwidbpassdesc'] = "Contraseña para acceder a la base de datos";
|
||||
$lang['isntwidbtype'] = "Tipo de DB:";
|
||||
$lang['isntwidbtypedesc'] = "Tipo de la base de datos que Ranksystem debería usar.<br><br>El controlador PDO para PHP necesita ser instalado.<br>Para obtener más información y una lista real de requisitos, eche un vistazo a la página de instalación:<br>%s";
|
||||
$lang['isntwidbusr'] = "Usuario de la DB:";
|
||||
$lang['isntwidbusrdesc'] = "Usuario para acceder a la base de datos";
|
||||
$lang['isntwidel'] = "Por favor borre el archivo 'install.php' desde su servidor web";
|
||||
$lang['isntwiusr'] = "Usuario para el webinterface creado con éxito.";
|
||||
$lang['isntwiusr2'] = "¡Felicidades! Has terminado el proceso de instalación.";
|
||||
$lang['isntwiusrcr'] = "Crear usuario de Webinterface";
|
||||
$lang['isntwiusrdesc'] = "Ingrese un nombre de usuario y contraseña para acceder a la Webinterface. Con la Webinterface puede configurar el ranksytem.";
|
||||
$lang['isntwiusrh'] = "Acceso - Webinterface";
|
||||
$lang['listacsg'] = "grupo de servidores actual";
|
||||
$lang['listcldbid'] = "ID de base de datos del cliente";
|
||||
$lang['listexcept'] = "No, causa excepcion";
|
||||
$lang['listgrps'] = "grupo actual desde";
|
||||
$lang['listnick'] = "Nombre del cliente";
|
||||
$lang['listnxsg'] = "sigueinte grupo de servidores";
|
||||
$lang['listnxup'] = "sigueinte rango arriba";
|
||||
$lang['listrank'] = "rango";
|
||||
$lang['listseen'] = "ultima vez visto";
|
||||
$lang['listsuma'] = "suma. tiempo activo";
|
||||
$lang['listsumi'] = "suma. tiempo de inactividad";
|
||||
$lang['listsumo'] = "suma. tiempo en línea";
|
||||
$lang['listuid'] = "ID de cliente unica";
|
||||
$lang['login'] = "Iniciar sesión";
|
||||
$lang['msg0001'] = "Ranksystem se está ejecutando en la versión: %s";
|
||||
$lang['msg0002'] = "Los comandos válidos son:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t obtener una lista de comandos\n[B]!version[/B]\t\t\t\t\t\t\t\t obtener la versión de Ranksystem\n[B]!update[/B], [B]!checkupdate[/B]\t\t verificar la nueva versión y ejecutar la actualización\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t iniciar la limpieza de la base de datos de usuarios\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\tobtener el tiempo para el próximo rango\n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\treinicia el bot de Ranksystem\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t detener el bot de Ranksystem";
|
||||
$lang['msg0003'] = "No eres elegible para este comando!";
|
||||
$lang['msg0004'] = "Cliente %s (%s) cierre de solicitudes.";
|
||||
$lang['msg0005'] = "cya";
|
||||
$lang['msg0006'] = "brb";
|
||||
$lang['msg0007'] = "Cliente %s (%s) solicitudes reiniciar.";
|
||||
$lang['msg0008'] = "Actualización de verificación hecha. Si hay una actualización disponible, se ejecutará inmediatamente.";
|
||||
$lang['msg0009'] = "Limpieza de la base de datos de usuarios empezó. Eche un vistazo al registro del sistema de rangos para obtener más información.";
|
||||
$lang['noentry'] = "Entradas no encontradas..";
|
||||
$lang['pass'] = "Contraseña";
|
||||
$lang['pass2'] = "Cambiar contraseña";
|
||||
$lang['pass3'] = "Antigua contraseña";
|
||||
$lang['pass4'] = "Nueva contraseña";
|
||||
$lang['pass5'] = "¿Se te olvidó tu contraseña?";
|
||||
$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.";
|
||||
$lang['sccupcount'] = "Tiempo activo de %s segundos para el ID de cliente unica (%s) se agregará en unos segundos (echa un vistazo al log de Ranksystem).";
|
||||
$lang['sccupcount2'] = "Agregar un tiempo activo de %s segundos para el ID de cliente unica (%s); solicitado sobre la función de administrador.";
|
||||
$lang['setontime'] = "agregar tiempo";
|
||||
$lang['setontimedesc'] = "Agregue tiempo en línea a los clientes seleccionados previamente. Cada usuario obtendrá este tiempo adicional a su anterior tiempo en línea.<br><br>El tiempo en línea ingresado será considerado para el rango ascendente y debe entrar en vigencia inmediatamente.";
|
||||
$lang['setontime2'] = "eliminar el tiempo";
|
||||
$lang['setontimedesc2'] = "Eliminar el tiempo en línea de los clientes seleccionados anteriores. Cada usuario será removido esta vez de su viejo tiempo en línea.<br><br>El tiempo en línea ingresado será considerado para el rango ascendente y debe entrar en vigencia inmediatamente.";
|
||||
$lang['sgrpadd'] = "Conceder grupo de servidor %s (ID: %s) para usuario %s (ID de cliente unica: %s; ID de cliente en base de datos %s).";
|
||||
$lang['sgrprerr'] = "Usuario afectado: %s (ID de cliente unica: %s; ID de cliente en base de datos %s) y grupo de servidores %s (ID: %s).";
|
||||
$lang['sgrprm'] = "Eliminar grupo de servidores %s (ID: %s) para usuario %s (ID de cliente unica: %s; ID de cliente en base de datos %s).";
|
||||
$lang['size_byte'] = "B";
|
||||
$lang['size_kib'] = "KiB";
|
||||
$lang['size_mib'] = "MiB";
|
||||
$lang['size_gib'] = "GiB";
|
||||
$lang['size_tib'] = "TiB";
|
||||
$lang['size_pib'] = "PiB";
|
||||
$lang['size_eib'] = "EiB";
|
||||
$lang['size_zib'] = "ZiB";
|
||||
$lang['size_yib'] = "YiB";
|
||||
$lang['stag0001'] = "Asignar grupos de servidores";
|
||||
$lang['stag0002'] = "Grupos permitidos";
|
||||
$lang['stag0003'] = "Definir una lista de grupos de servidores, que un usuario puede asignarse.<br><br>Los grupos de servidores deberían ingresarse aquí con su groupID separados por comas.<br><br>Ejemplo:<br>23,24,28";
|
||||
$lang['stag0004'] = "Limitar grupos";
|
||||
$lang['stag0005'] = "Limite el número de grupos de servidores, que se pueden configurar al mismo tiempo.";
|
||||
$lang['stag0006'] = "Hay varios identificadores únicos en línea con su dirección IP. Por favor %shaga clic aquí%s para verificar primero.";
|
||||
$lang['stag0007'] = "Espere hasta que los cambios surtan efecto antes de cambiar las siguientes cosas...";
|
||||
$lang['stag0008'] = "Cambios grupales guardados con éxito. Puede tomar unos segundos hasta que surta efecto en el servidor ts3.";
|
||||
$lang['stag0009'] = "No puedes elegir más de %s grupo(s) al mismo tiempo!";
|
||||
$lang['stag0010'] = "Por favor elija al menos un nuevo grupo.";
|
||||
$lang['stag0011'] = "Límite de grupo simultáneos: ";
|
||||
$lang['stag0012'] = "establecer grupos";
|
||||
$lang['stag0013'] = "Addon ON/OFF";
|
||||
$lang['stag0014'] = "Encienda el addon (habilitado) o desactívelo (deshabilitado).<br><br>Al desactivar el Addon, se ocultará una posible parte de las estadísticas/ el sitio estará oculto.";
|
||||
$lang['stag0015'] = "No se puede encontrar en el servidor de TeamSpeak. Por favor %shaga clic aquí%s para verificarse.";
|
||||
$lang['stag0016'] = "verificación necesaria!";
|
||||
$lang['stag0017'] = "verifica aquí..";
|
||||
$lang['stix0001'] = "Estadísticas del servidor";
|
||||
$lang['stix0002'] = "Total de usuarios";
|
||||
$lang['stix0003'] = "Ver detalles";
|
||||
$lang['stix0004'] = "Tiempo en línea de todos los usuarios / Total";
|
||||
$lang['stix0005'] = "Ver top de todos los tiempos";
|
||||
$lang['stix0006'] = "Ver top del mes";
|
||||
$lang['stix0007'] = "Ver top de la semana";
|
||||
$lang['stix0008'] = "Uso del servidor";
|
||||
$lang['stix0009'] = "En los últimos 7 días";
|
||||
$lang['stix0010'] = "En los últimos 30 días";
|
||||
$lang['stix0011'] = "En las últimas 24 horas";
|
||||
$lang['stix0012'] = "seleccionar periodo";
|
||||
$lang['stix0013'] = "Último día";
|
||||
$lang['stix0014'] = "Última semana";
|
||||
$lang['stix0015'] = "Último mes";
|
||||
$lang['stix0016'] = "Tiempo activo / inactivo (de todos los clientes)";
|
||||
$lang['stix0017'] = "Versiones (de todos los clientes)";
|
||||
$lang['stix0018'] = "Nacionalidades (de todos los clientes)";
|
||||
$lang['stix0019'] = "Plataformas (de todos los clientes)";
|
||||
$lang['stix0020'] = "Estadísticas actuales";
|
||||
$lang['stix0023'] = "El estado del servidor";
|
||||
$lang['stix0024'] = "Online";
|
||||
$lang['stix0025'] = "Offline";
|
||||
$lang['stix0026'] = "Clientes (en línea / máx.)";
|
||||
$lang['stix0027'] = "Cantidad de canales";
|
||||
$lang['stix0028'] = "Ping promedio del servidor";
|
||||
$lang['stix0029'] = "Total de bytes recibidos";
|
||||
$lang['stix0030'] = "Total de bytes enviados";
|
||||
$lang['stix0031'] = "Tiempo de actividad del servidor";
|
||||
$lang['stix0032'] = "antes sin conexión:";
|
||||
$lang['stix0033'] = "<span id=\"days\">00</span> Dias, <span id=\"hours\">00</span> Horas, <span id=\"minutes\">00</span> Minutos, <span id=\"seconds\">00</span> Segundos";
|
||||
$lang['stix0034'] = "Promedio de pérdida de paquetes";
|
||||
$lang['stix0035'] = "Estadísticas generales";
|
||||
$lang['stix0036'] = "Nombre del servidor";
|
||||
$lang['stix0037'] = "Dirección del servidor (Dirección del host: Puerto)";
|
||||
$lang['stix0038'] = "Contraseña del servidor";
|
||||
$lang['stix0039'] = "No (el servidor es público)";
|
||||
$lang['stix0040'] = "Sí (el servidor es privado)";
|
||||
$lang['stix0041'] = "ID del servidor";
|
||||
$lang['stix0042'] = "Plataforma del servidor";
|
||||
$lang['stix0043'] = "Versión del servidor";
|
||||
$lang['stix0044'] = "Fecha de creación del servidor (dd/mm/aaaa)";
|
||||
$lang['stix0045'] = "Informe a la lista de servidores";
|
||||
$lang['stix0046'] = "Activado";
|
||||
$lang['stix0047'] = "No esta activado";
|
||||
$lang['stix0048'] = "no hay suficiente información todavía ...";
|
||||
$lang['stix0049'] = "Tiempo en línea de todos los usuarios / mes";
|
||||
$lang['stix0050'] = "Tiempo en línea de todos los usuarios / semana";
|
||||
$lang['stix0051'] = "TeamSpeak ha fallado, por lo que no hay fecha de creación ...";
|
||||
$lang['stix0052'] = "otros";
|
||||
$lang['stix0053'] = "Tiempo activo (en días)";
|
||||
$lang['stix0054'] = "Tiempo inactivo (en días)";
|
||||
$lang['stix0055'] = "en línea las últimas 24 horas";
|
||||
$lang['stix0056'] = "en línea en los ultimos %s dias";
|
||||
$lang['stix0059'] = "Lista de usuario";
|
||||
$lang['stix0060'] = "Usuario";
|
||||
$lang['stix0061'] = "Ver todas las versiones";
|
||||
$lang['stix0062'] = "Ver todas las naciones";
|
||||
$lang['stix0063'] = "Ver todas las plataformas";
|
||||
$lang['stix0064'] = "Últimos 3 meses";
|
||||
$lang['stmy0001'] = "Mis estadísticas";
|
||||
$lang['stmy0002'] = "Rango";
|
||||
$lang['stmy0003'] = "ID de la base de datos:";
|
||||
$lang['stmy0004'] = "ID unica:";
|
||||
$lang['stmy0005'] = "Conexiones totales al servidor:";
|
||||
$lang['stmy0006'] = "Fecha de inicio para estadísticas:";
|
||||
$lang['stmy0007'] = "Tiempo total en línea:";
|
||||
$lang['stmy0008'] = "Tiempo en línea pasado %s dias:";
|
||||
$lang['stmy0009'] = "Tiempo activo pasado %s dias:";
|
||||
$lang['stmy0010'] = "Logros completados:";
|
||||
$lang['stmy0011'] = "Progreso de logro de tiempo";
|
||||
$lang['stmy0012'] = "Tiempo: Legendario";
|
||||
$lang['stmy0013'] = "Porque tienes un tiempo en línea de %s horas.";
|
||||
$lang['stmy0014'] = "Progreso completado";
|
||||
$lang['stmy0015'] = "Tiempo: Oro";
|
||||
$lang['stmy0016'] = "% Completado para Legendario";
|
||||
$lang['stmy0017'] = "Tiempo: Plata";
|
||||
$lang['stmy0018'] = "% Completado para Oro";
|
||||
$lang['stmy0019'] = "Tiempo: Bronce";
|
||||
$lang['stmy0020'] = "% Completado para Plata";
|
||||
$lang['stmy0021'] = "Tiempo: Sin clasificar";
|
||||
$lang['stmy0022'] = "% Completado para bronce";
|
||||
$lang['stmy0023'] = "Progreso del logro de conexión";
|
||||
$lang['stmy0024'] = "Conecta: Legendario";
|
||||
$lang['stmy0025'] = "Porque te has conectado %s veces al servidor.";
|
||||
$lang['stmy0026'] = "Conecta: Oro";
|
||||
$lang['stmy0027'] = "Conecta: Plata";
|
||||
$lang['stmy0028'] = "Conecta: Bronce";
|
||||
$lang['stmy0029'] = "Conecta: Sin clasificar";
|
||||
$lang['stmy0030'] = "Progreso próximo grupo de servidores";
|
||||
$lang['stmy0031'] = "Tiempo activo total";
|
||||
$lang['stna0001'] = "Naciones";
|
||||
$lang['stna0002'] = "estadística";
|
||||
$lang['stna0003'] = "Código";
|
||||
$lang['stna0004'] = "Contar";
|
||||
$lang['stna0005'] = "Versiones";
|
||||
$lang['stna0006'] = "Plataformas";
|
||||
$lang['stna0007'] = "Porcentaje";
|
||||
$lang['stnv0001'] = "Noticias del servidor";
|
||||
$lang['stnv0002'] = "Cerrar";
|
||||
$lang['stnv0003'] = "Actualizar la información del cliente";
|
||||
$lang['stnv0004'] = "Solo use esta actualización cuando haya cambiado su información TS3, como su nombre de usuario TS3";
|
||||
$lang['stnv0005'] = "Solo funciona cuando estás conectado al servidor TS3 al mismo tiempo";
|
||||
$lang['stnv0006'] = "Refrescar";
|
||||
$lang['stnv0016'] = "No disponible";
|
||||
$lang['stnv0017'] = "No está conectado al servidor TS3, por lo que no puede mostrar ningún dato por usted.";
|
||||
$lang['stnv0018'] = "Conéctese al servidor TS3 y luego actualice su sesión presionando el botón azul de actualización en la esquina superior derecha..";
|
||||
$lang['stnv0019'] = "Mis estadísticas - Contenido de la página";
|
||||
$lang['stnv0020'] = "Esta página contiene un resumen general de sus estadísticas personales y actividad en el servidor.";
|
||||
$lang['stnv0021'] = "Las informaciones se recopilan desde el comienzo del Ranksystem, no lo son desde el comienzo del servidor TeamSpeak.";
|
||||
$lang['stnv0022'] = "Esta página recibe sus valores de una base de datos. Entonces los valores pueden retrasarse un poco.";
|
||||
$lang['stnv0023'] = "La cantidad de tiempo en línea para todos los usuarios por semana y por mes solo se calculará cada 15 minutos. Todos los demás valores deben ser casi en vivo (con el máximo retraso por unos segundos).";
|
||||
$lang['stnv0024'] = "Ranksystem - Estadísticas";
|
||||
$lang['stnv0025'] = "Limitar entradas";
|
||||
$lang['stnv0026'] = "todas";
|
||||
$lang['stnv0027'] = "¡La información en este sitio podría estar desactualizada! Parece que Ranksystem ya no está conectado al TeamSpeak.";
|
||||
$lang['stnv0028'] = "(¡No estás conectado al TS3!)";
|
||||
$lang['stnv0029'] = "Lista Rankup";
|
||||
$lang['stnv0030'] = "Información de Ranksystem";
|
||||
$lang['stnv0031'] = "Sobre el campo de búsqueda puede buscar el patrón en el nombre del cliente, ID de cliente unica y ID de de cliente unica en base de datos.";
|
||||
$lang['stnv0032'] = "También puede usar una vista de opciones de filtro (ver a continuación). Ingrese el filtro también dentro del campo de búsqueda.";
|
||||
$lang['stnv0033'] = "La combinación de filtro y patrón de búsqueda son posibles. Ingrese primero el (los) filtro (s) seguido (s) sin ningún signo de su patrón de búsqueda.";
|
||||
$lang['stnv0034'] = "También es posible combinar múltiples filtros. Ingrese esto consecutivamente dentro del campo de búsqueda.";
|
||||
$lang['stnv0035'] = "<u>Ejemplo:</u><br>filter:nonexcepted:TeamSpeakUser";
|
||||
$lang['stnv0036'] = "Mostrar solo clientes, que son aceptados (cliente, grupo de servidores o excepción de canal).";
|
||||
$lang['stnv0037'] = "Mostrar solo clientes, que no son aceptados.";
|
||||
$lang['stnv0038'] = "Mostrar solo clientes, que están en línea.";
|
||||
$lang['stnv0039'] = "Mostrar solo clientes que no están en línea.";
|
||||
$lang['stnv0040'] = "Mostrar solo clientes, que están en un grupo definido. Representar el rango actual/nivel.<br>Reemplazar <i>GROUPID</i> con la ID del grupo de servidores deseado.";
|
||||
$lang['stnv0041'] = "Mostrar solo clientes, que se seleccionan por última vez que se vieron.<br>Reemplazar <i>OPERADOR</i> con '<' o '>' o '=' o '!='.<br>Y reemplazar <i>HORA</i> con una marca de tiempo o fecha con formato 'Y-m-d H-i' (ejemplo: 2016-06-18 20-25).<br>Ejemplo completo: filter:lastseen:>:2016-06-18 20-25:";
|
||||
$lang['stnv0042'] = "Mostrar solo clientes, que son del país definido.<br>Reemplazar <i>TS3-COUNTRY-CODE</i> con el país deseado. <br> Lista de códigos google para ISO 3166-1 alpha-2";
|
||||
$lang['stnv0043'] = "conectar TS3";
|
||||
$lang['stri0001'] = "Información del Ranksystem";
|
||||
$lang['stri0002'] = "Qué es Ranksystem?";
|
||||
$lang['stri0003'] = "Un TS3 bot, que otorga automáticamente rangos (grupos de servidores) al usuario en un servidor TeamSpeak 3 para el tiempo en línea o la actividad en línea. También recopila información y estadísticas sobre el usuario y muestra el resultado en este sitio.";
|
||||
$lang['stri0004'] = "Quién creó el Ranksystem?";
|
||||
$lang['stri0005'] = "Cuando se creó el Ranksystem?";
|
||||
$lang['stri0006'] = "Primera versión alfa: 05/10/2014.";
|
||||
$lang['stri0007'] = "Primera versión beta: 01/02/2015.";
|
||||
$lang['stri0008'] = "Puedes ver la versión más nueva en <a href=\"//ts-n.net/ranksystem.php\" target=\"_blank\">Sitio web de Ranksystem</a>.";
|
||||
$lang['stri0009'] = "¿Cómo se creó Ranksystem?";
|
||||
$lang['stri0010'] = "El Ranksystem está codificado en";
|
||||
$lang['stri0011'] = "Utiliza también las siguientes bibliotecas:";
|
||||
$lang['stri0012'] = "Agradecimientos especiales a:";
|
||||
$lang['stri0013'] = "sergey, <a href=\"//vk.com/akhachirov\" target=\"_blank\">Arselopster</a>, <a href=\"//vk.com/zheez\" target=\"_blank\">DeviantUser</a> & <a href=\"//goodgame.by/\" target=\"_blank\">kidi</a> - para la traducción al ruso";
|
||||
$lang['stri0014'] = "Bejamin Frost - for initialisation the bootstrap design";
|
||||
$lang['stri0015'] = "<a href=\"//hydrake.eu/\" target=\"_blank\">ZanK</a> & <a href=\"//mozzygaming.it\" target=\"_blank\">jacopomozzy</a> - para traducción al italiano";
|
||||
$lang['stri0016'] = "<a href=\"//iraqgaming.net/\" target=\"_blank\">DeStRoYzR</a> & <a href=\"//www.sagamer.net/\" target=\"_blank\">Jehad</a> - para la inicialización traducción árabe";
|
||||
$lang['stri0017'] = "<a href=\"//whitecs.ro/\" target=\"_blank\">SakaLuX</a> - para la inicialización traducción rumana";
|
||||
$lang['stri0018'] = "<a href=\"//r4p3.net/members/0x0539.5476/\" target=\"_blank\">0x0539</a> - para la inicialización traducción holandesa";
|
||||
$lang['stri0019'] = "<a href=\"//umazinggames.fr/\" target=\"_blank\">Quentinti</a> - para traducción al francés";
|
||||
$lang['stri0020'] = "<a href=\"mailto://celso@esbsb.com.br\" target=\"_blank\">Pasha</a> - para traducción al portugués";
|
||||
$lang['stri0021'] = "<a href=\"//hdf-multigaming.de\" target=\"_blank\">Shad86</a> - 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'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBroccoli</a> - para compartir sus ideas y pruebas previas";
|
||||
$lang['stri0023'] = "Estable desde: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - para traducción al checo";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - para la traducción polaca";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - para la traducción al español";
|
||||
$lang['sttw0001'] = "Usuarios principales";
|
||||
$lang['sttw0002'] = "De la semana";
|
||||
$lang['sttw0003'] = "Con %s %s tiempo en línea";
|
||||
$lang['sttw0004'] = "Los 10 mejores en comparación";
|
||||
$lang['sttw0005'] = "Horas (Define 100 %)";
|
||||
$lang['sttw0006'] = "%s horas (%s%)";
|
||||
$lang['sttw0007'] = "Las 10 mejores estadísticas";
|
||||
$lang['sttw0008'] = "Los 10 principales frente a otros en el tiempo en línea";
|
||||
$lang['sttw0009'] = "Los 10 mejores contra otros en tiempo activo";
|
||||
$lang['sttw0010'] = "Los 10 principales frente a otros en tiempo inactivo";
|
||||
$lang['sttw0011'] = "Los 10 mejores (en horas)";
|
||||
$lang['sttw0012'] = "Otro %s usuarios (en horas)";
|
||||
$lang['sttw0013'] = "Con %s %s tiempo activo";
|
||||
$lang['sttw0014'] = "horas";
|
||||
$lang['sttw0015'] = "minutos";
|
||||
$lang['sttm0001'] = "Del mes";
|
||||
$lang['stta0001'] = "De todos los tiempos";
|
||||
$lang['stve0001'] = "\nHola %s,\npara verificar con el Ranksystem, haga clic en el siguiente enlace:\n[B]%s[/B]\n\nSi el enlace no funciona, también puede escribir el token manualmente en:\n%s\n\nSi no solicitó este mensaje, por favor ignórelo.. Cuando lo reciba repetidas veces, póngase en contacto con un administrador.";
|
||||
$lang['stve0002'] = "Se le envió un mensaje con el token en el servidor TS3.";
|
||||
$lang['stve0003'] = "Ingrese el token que recibió en el servidor TS3. Si no ha recibido un mensaje, asegúrese de haber elegido la ID única correcta.";
|
||||
$lang['stve0004'] = "¡El token ingresado no coincide! Por favor inténtalo de nuevo.";
|
||||
$lang['stve0005'] = "Felicitaciones, ¡se ha verificado con éxito! Ahora puede continuar...";
|
||||
$lang['stve0006'] = "Un error desconocido sucedió. Por favor inténtalo de nuevo. En repetidas ocasiones contacta a un administrador";
|
||||
$lang['stve0007'] = "Verificar en TeamSpeak";
|
||||
$lang['stve0008'] = "Elija aquí su identificación única en el servidor TS3 para verificar usted mismo.";
|
||||
$lang['stve0009'] = " -- seleccionate -- ";
|
||||
$lang['stve0010'] = "Recibirá un token en el servidor TS3, que debe ingresar aquí:";
|
||||
$lang['stve0011'] = "Token:";
|
||||
$lang['stve0012'] = "verificar";
|
||||
$lang['time_ms'] = "ms";
|
||||
$lang['time_sec'] = "Segundo(s)";
|
||||
$lang['time_min'] = "Minuto(s)";
|
||||
$lang['time_hour'] = "Hora(s)";
|
||||
$lang['time_day'] = "Dia(s)";
|
||||
$lang['upgrp0001'] = "Hay un grupo de servidores con ID %s cconfigurado dentro de su '%s' parámetro (interfaz web -> núcleo), pero ese ID de grupo de servidor no existe en su servidor TS3 (más)! Corrígelo o pueden ocurrir errores!";
|
||||
$lang['upgrp0002'] = "Descargar nuevo icono de servidor";
|
||||
$lang['upgrp0003'] = "Error al escribir el icono de servidor.";
|
||||
$lang['upgrp0004'] = "Error al descargar el icono del servidor TS3: ";
|
||||
$lang['upgrp0005'] = "Error al eliminar el icono del servidor.";
|
||||
$lang['upgrp0006'] = "Noté que icono del servidor se eliminó del servidor TS3, ahora también se eliminó del Ranksystem.";
|
||||
$lang['upgrp0007'] = "Error al escribir el icono del grupo de servidores del grupo %s con ID %s.";
|
||||
$lang['upgrp0008'] = "Error al descargar el icono del grupo de servidores del grupo %s con ID %s: ";
|
||||
$lang['upgrp0009'] = "Error al eliminar el icono del grupo de servidores del grupo %s con ID %s.";
|
||||
$lang['upgrp0010'] = "Icono de grupo de servidores detectado %s con ID %s eliminado del servidor TS3, ahora también se eliminó del Ranksystem.";
|
||||
$lang['upgrp0011'] = "Descargue el nuevo icono del grupo de servidores para grupo %s con ID: %s";
|
||||
$lang['upinf'] = "Una nueva versión de Ranksystem está disponible; Informar a los clientes en el servidor...";
|
||||
$lang['upinf2'] = "El Ranksystem fue recientemente (%s) actualizado. Revisar la %sChangelog%s para más información sobre los cambios.";
|
||||
$lang['upmsg'] = "\nHey, una nueva versión de [B]Ranksystem[/B] ¡está disponible!\n\nversión actual: %s\n[B]nueva versión: %s[/B]\n\nPPor favor visite nuestro sitio para más información[URL]https://ts-n.net/ranksystem.php#changelog[/URL].\n\nStarting el proceso de actualización en segundo plano. [B]Por favor, checa el ranksystem.log![/B]";
|
||||
$lang['upmsg2'] = "\nOye, el [B]Ranksystem[/B] Ha sido actualizado.\n\n[B]nueva versión: %s[/B]\n\nPor favor visite nuestro sitio para más información [URL]https://ts-n.net/ranksystem.php#changelog[/URL].";
|
||||
$lang['upusrerr'] = "El único ID de cliente %s no se pudo alcanzar en el TeamSpeak!";
|
||||
$lang['upusrinf'] = "Usuario %s fue informado exitosamente";
|
||||
$lang['user'] = "Nombre de usuario";
|
||||
$lang['verify0001'] = "Asegúrese de estar realmente conectado al servidor TS3!";
|
||||
$lang['verify0002'] = "Ingrese, si no está hecho, el Ranksystem %scanal de verificación%s!";
|
||||
$lang['verify0003'] = "Si está realmente conectado al servidor TS3, póngase en contacto con un administrador allí. <br> Esto necesita crear un canal de verificación en el servidor TeamSpeak. Después de esto, el canal creado debe definirse en el Ranksystem, que solo un administrador puede hacer.<br>Más información que el administrador encontrará webinterface (-> núcleo) del Ranksystem.<br><br>¡Sin esta actividad no es posible verificarlo para el Ranksystem en este momento! Lo siento :(";
|
||||
$lang['verify0004'] = "Ningún usuario dentro del canal de verificación encontrado...";
|
||||
$lang['wi'] = "Webinterface";
|
||||
$lang['wiaction'] = "acción";
|
||||
$lang['wiadmhide'] = "ocultar clientes exceptuados";
|
||||
$lang['wiadmhidedesc'] = "Para ocultar usuario exceptuado en la siguiente selección";
|
||||
$lang['wiadmuuid'] = "ID de administrador";
|
||||
$lang['wiadmuuiddesc'] = "Ingrese aquí su identificación de cliente única; como el administrador de Ranksystem.<br>También son posibles múltiples ID de clientes -> separados con coma<br><br>Esto es necesario para restablecer la contraseña del webinterface.<br>No hay una dirección única de ID de cliente definida, ¡no es posible restablecer la contraseña!<br><br>Aquí, los ID de cliente únicos definidos también pueden enviar comandos de administrador al Bot (!reboot, !shutdown, !update).";
|
||||
$lang['wiboost'] = "boost";
|
||||
$lang['wiboostdesc'] = "Proporcione a un usuario de su servidor TeamSpeak un grupo de servidores (debe crearse manualmente), que puede declarar aquí como grupo de refuerzo. Defina también un factor que se debe usar (por ejemplo, 2x) y un tiempo, por cuánto tiempo se debe evaluar el impulso.<br>Cuanto mayor sea el factor, más rápido un usuario alcanza el siguiente rango más alto.<br>Ha expirado el tiempo, el grupo de servidores de refuerzo se elimina automáticamente del usuario afectado. El tiempo comienza a correr tan pronto como el usuario obtiene el grupo de servidores.<br><br><pre>ID del grupo de servidores => factor => tiempo (en segundos)</pre><br>Cada entrada tiene que separarse de la siguiente con una coma.<br><br>Example:<br><pre>12=>2=>6000,13=>3=>2500,14=>5=>600</pre>Aquí, un usuario en el grupo de servidores 12 obtiene el factor 2 durante los siguientes 6000 segundos, un usuario en el grupo de servidores 13 obtiene el factor 3 durante 2500 segundos, y así sucesivamente...";
|
||||
$lang['wibot1'] = "Ranksystem bot debe ser detenido. Consulte el registro a continuación para obtener más información!";
|
||||
$lang['wibot2'] = "Ranksystem bot debe ser comenzado. Consulte el registro a continuación para obtener más información!";
|
||||
$lang['wibot3'] = "Ranksystem bot debe reiniciarse Consulte el registro a continuación para obtener más informaciónn!";
|
||||
$lang['wibot4'] = "Iniciar / Parar Ranksystem bot";
|
||||
$lang['wibot5'] = "Iniciar bot";
|
||||
$lang['wibot6'] = "Detener bot";
|
||||
$lang['wibot7'] = "Restart bot";
|
||||
$lang['wibot8'] = "Ranksystem log (extracto):";
|
||||
$lang['wibot9'] = "Complete todos los campos obligatorios antes de comenzar con Ranksystem bot!";
|
||||
$lang['wichdbid'] = "ID de cliente en base de datos reinciado";
|
||||
$lang['wichdbiddesc'] = "Active esta función para restablecer el tiempo en línea de un usuario, si su TeamSpeak ID de cliente en base de datos ha sido cambiado.<br>El usuario será emparejado por su ID de cliente único.<br><br>Si esta función está desactivada, el conteo del tiempo en línea (o activo) continuará por el valor anterior, con el nuevo ID de base de datos del cliente. En este caso, solo se reemplazará la ID de la base de datos del cliente del usuario.<br><br><br><b>¿Cómo cambia el ID de la base de datos del cliente?</b><br><br>En cada uno de los casos siguientes, el cliente obtiene una nueva ID de base de datos de cliente con la siguiente conexión al servidor TS3.<br><br>1) <u>automáticamente por el servidor TS3</u><br>El servidor TeamSpeak tiene una función para eliminar al usuario después de X días fuera de la base de datos. Por defecto, esto sucede cuando un usuario está desconectado durante 30 días y no está en un grupo de servidores permanente.<br>Esta opción puede cambiar dentro de su <u>ts3server.ini</u>:<pre>dbclientkeepdays=30</pre><br>2) <u>restaurar la instantánea de TS3</u><br>Cuando está restaurando una instantánea del servidor TS3, los ID de la base de datos se cambiarán.<br><br>3) <u>eliminar manualmente el cliente</u><br>Un cliente de TeamSpeak también podría eliminarse manualmente o mediante un script de terceros del servidor TS3..";
|
||||
$lang['wiconferr'] = "Hay un error en la configuración del Ranksystem. Vaya a la webinterface y corrija la Configuración principal. Especialmente revisa la configuración 'rank up'!";
|
||||
$lang['wichpw1'] = "Su contraseña anterior es incorrecta. Inténtalo de nuevo";
|
||||
$lang['wichpw2'] = "Las nuevas contraseñas no coinciden. Inténtalo de nuevo.";
|
||||
$lang['wichpw3'] = "La contraseña de la interfaz web ha sido modificada con éxito. Solicitud de IP %s.";
|
||||
$lang['wichpw4'] = "Cambia la contraseña";
|
||||
$lang['widaform'] = "Formato de fecha";
|
||||
$lang['widaformdesc'] = "Elija el formato de fecha que se muestra.<br><br>Ejemplo:<br>%a dias, %h horas, %i minutos, %s segundos";
|
||||
$lang['widbcfgsuc'] = "Configuraciones de bases de datos guardadas con éxito.";
|
||||
$lang['widbcfgerr'] = "¡Error al guardar las configuraciones de la base de datos! Error de conexión o error de escritura para 'other/dbconfig.php'";
|
||||
$lang['widelcldgrp'] = "renovar grupos";
|
||||
$lang['widelcldgrpdesc'] = "Ranksystem recuerda los grupos de servidores dados, por lo que no es necesario dar / verificar esto con cada ejecución del worker.php again.<br><br>Con esta función puede eliminar una vez el conocimiento de grupos de servidores dados. En efecto, el sistema de rangos intenta dar a todos los clientes (que están en el servidor TS3 en línea) el grupo de servidores del rango real.<br>Para cada cliente, que obtiene el grupo o permanece en el grupo, Ranksystem recuerda esto como se describe al principio.<br><br>Esta función puede ser útil, cuando los usuarios no están en el grupo de servidores, deben ser para el tiempo en línea definido.<br><br>Atención: ¡Ejecuta esto en un momento, en el que los próximos minutos no se llegarán a rangos! El Ranksystem no puede eliminar el grupo anterior, porque no puede recordar ;-)";
|
||||
$lang['widelsg'] = "eliminar de los grupos de servidores";
|
||||
$lang['widelsgdesc'] = "Choose si los clientes también deben eliminarse del último grupo de servidores conocido, cuando elimina clientes de la base de datos de Ranksystem.<br><br>Solo considerará los grupos de servidores, lo que concierne al Ranksystem";
|
||||
$lang['wiexcid'] = "excepción de canal";
|
||||
$lang['wiexciddesc'] = "Una lista separada por comas de los identificadores de canal que no deben participar en el Ranksystem.<br><br>Mantén a los usuarios en uno de los canales enumerados, la hora en que se ignorará por completo. No existe el tiempo en línea, sin embargo, el tiempo inactivo cuenta.<br><br>Esta función solo tiene sentido con el modo 'tiempo en línea', porque aquí podrían ignorarse los canales AFK, por ejemplo.<br>Con el modo 'tiempo activo', esta función es inútil porque, como se deduciría, el tiempo de inactividad en las salas AFK no se contabilizaría de todos modos..<br><br>Be un usuario en un canal excluido, se señala para este período como 'excluido del sistema de clasificación'. El usuario ya no aparece en la lista 'stats/list_rankup.php' al menos que los clientes excluidos no se muestren allí (Página de estadísticas - cliente exceptuado).";
|
||||
$lang['wiexgrp'] = "excepción de grupo de servidores";
|
||||
$lang['wiexgrpdesc'] = "Una lista separada por comas de ID de grupo de servidores, que no deberían tenerse en cuenta para Ranksystem.<br>El usuario en al menos uno de estos ID de grupos de servidores se ignorará para el rango arriba.";
|
||||
$lang['wiexres'] = "modo de excepción";
|
||||
$lang['wiexres1'] = "contar tiempo (predeterminado)";
|
||||
$lang['wiexres2'] = "descanso";
|
||||
$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).<br><br>1) <b>contar tiempo (predeterminado)</b>: 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)..<br><br>2) <b>descanso</b>: 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á.<br><br>3) <b>restablecer el tiempo</b>: 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.<br><br><br>las <u>excepciónes de canal</u> 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.<br>El usuario en esta lista será ignorado por el para subir de rango.";
|
||||
$lang['wigrptime'] = "subir de rango definición";
|
||||
$lang['wigrptimedesc'] = "Defina aquí después de qué momento un usuario debe obtener automáticamente un grupo de servidores predefinido.<br><br><pre>tiempo (segundos)=>grupo de servidores ID</pre><br>Max. valor son 999.999.999 segundos (más de 31 años)<br><br>Importante para esto es el 'tiempo en línea' o el 'tiempo activo' de un usuario, dependiendo de la configuración del modo.<br><br>Cada entrada tiene que separarse de la siguiente con una coma.<br><br>El tiempo debe ser ingresado acumulativo<br><br>Ejemplo:<br><pre>60=>9,120=>10,180=>11</pre>En esto, un usuario obtiene después de 60 segundos el grupo de servidores 9, a su vez después de 60 segundos el grupo de servidores 10, y así sucesivamente ...";
|
||||
$lang['wihladm'] = "Lista rangos (modo de administrador)";
|
||||
$lang['wihladm1'] = "Agregar tiempo en línea al usuario";
|
||||
$lang['wihladm2'] = "Eliminar tiempo en línea del usuario";
|
||||
$lang['wihlset'] = "Configuración";
|
||||
$lang['wihlvs'] = "Varios ajustes";
|
||||
$lang['wiignidle'] = "Ignorar idle";
|
||||
$lang['wiignidledesc'] = "Defina un período, hasta el cual se ignorará el tiempo de inactividad de un usuario.<br><br>Cuando un cliente no hace nada en el servidor (=inactivo), esta vez lo notará Ranksystem. Con esta característica, el tiempo de inactividad de un usuario no se contará hasta el límite definido. Solo cuando se excede el límite definido, cuenta desde ese punto para el sistema de rangos como tiempo de inactividad.<br><br>Esta función solo importa junto con el modo 'tiempo activo'.<br><br>Lo que significa que la función es, p. evaluar el tiempo de escucha en conversaciones como actividad.<br><br>0 Segundos. = desactivar esta función<br><br>Ejemplo:<br>Ignorar inactivo = 600 (segundos)<br>Un cliente tiene una inactividad de 8 minutos.<br>└ Se ignoran 8 minutos inactivos y, por lo tanto, recibe esta vez como tiempo activo. Si el tiempo de inactividad ahora aumentó a 12 minutos, el tiempo es más de 10 minutos y en este caso 2 minutos se contarán como tiempo de inactividad, los primeros 10 minutos como tiempo de actividad.";
|
||||
$lang['wilog'] = "Logpath";
|
||||
$lang['wilogdesc'] = "Ruta del archivo de registro de Ranksystem.<br><br>Ejemplo:<br>/var/logs/ranksystem/<br><br>Asegúrese de que el usuario web tenga los permisos de escritura en el logpath.";
|
||||
$lang['wilogout'] = "Cerrar sesión";
|
||||
$lang['wimsgmsg'] = "Mensajes";
|
||||
$lang['wimsgmsgdesc'] = "Defina un mensaje, que se enviará a un usuario, cuando se eleve al siguiente rango más alto.<br><br>Este mensaje se enviará a través del mensaje privado TS3. Se pueden usar todos los códigos bb conocidos, que también funcionan para un mensaje privado normal.<br>%s<br><br>Además, el tiempo pasado previamente puede expresarse mediante argumentos:<br>%1\$s - dias<br>%2\$s - horas<br>%3\$s - minutos<br>%4\$s - segundos<br>%5\$s - nombre del grupo de servidores alcanzado<br>%6$s - nombre del usuario (destinatario)<br><br>Ejemplo:<br><pre>Oye,\\nalcanzaste un rango más alto, ya que ya te conectaste %1\$s dias, %2\$s horas y %3\$s minutos a nuestro servidor TS3.[B]Seguid así![/B] ;-)</pre>";
|
||||
$lang['wimsgsn'] = "Servidor-Noticias";
|
||||
$lang['wimsgsndesc'] = "Definir un mensaje, que se mostrará en /stats/ página como noticias del servidor.<br><br>Puede usar funciones html predeterminadas para modificar el diseño<br><br>Ejemplo:<br><b> - <b>para negrita</b><br><u> - <u>para subrayar</u><br><i> - <i>para cursiva</i><br><br> - para el ajuste de palabras (nueva línea)";
|
||||
$lang['wimsgusr'] = "Notificación de Subir de nivel";
|
||||
$lang['wimsgusrdesc'] = "Informar a un usuario con un mensaje de texto privado sobre su rango.";
|
||||
$lang['winav1'] = "TeamSpeak";
|
||||
$lang['winav2'] = "Base de datos";
|
||||
$lang['winav3'] = "Núcleo";
|
||||
$lang['winav4'] = "Otro";
|
||||
$lang['winav5'] = "Mensaje";
|
||||
$lang['winav6'] = "Página de estadísticas";
|
||||
$lang['winav7'] = "Administrar";
|
||||
$lang['winav8'] = "Parar / Iniciar Bot";
|
||||
$lang['winav9'] = "Actualización disponible!";
|
||||
$lang['winav10'] = "Utilice la webinterface solo a través de %s HTTPS%s Una encriptación es fundamental para garantizar su privacidad y seguridad.%sPara poder usar HTTPS, su servidor web necesita una conexión SSL.";
|
||||
$lang['winav11'] = "Ingrese el ID de cliente único del administrador del Ranksystem (Otro -> ID de administrador). Esto es muy importante en caso de que haya perdido sus datos de inicio de sesión para la webinterface (para restablecerlos).";
|
||||
$lang['winav12'] = "Complementos";
|
||||
$lang['winxinfo'] = "Comando \"!nextup\"";
|
||||
$lang['winxinfodesc'] = "Permite al usuario en el servidor TS3 escribir el comando \"!nextup\" al Ranksystem (query)bot como mensaje de texto privado.<br><br>Como respuesta, el usuario recibirá un mensaje de texto definido con el tiempo necesario para la siguiente clasificación.<br><br><b>Desactivado</b> - La función está desactivada. El comando '!nextup' será ignorado.<br><b>permitido - solo siguiente rango</b> - Devuelve el tiempo necesario para el siguiente grupo..<br><b>permitido - todos los siguientes rangos</b> - Devuelve el tiempo necesario para todos los rangos superiores.";
|
||||
$lang['winxmode1'] = "desactivado";
|
||||
$lang['winxmode2'] = "permitido - solo siguiente rango";
|
||||
$lang['winxmode3'] = "permitido - todos los siguientes rangos";
|
||||
$lang['winxmsg1'] = "Mensaje";
|
||||
$lang['winxmsgdesc1'] = "Defina un mensaje, que el usuario recibirá como respuesta al comando \"!nextup\".<br><br>Argumentos:<br>%1$s - dias al siguiente rango<br>%2$s - horas al siguiente rango<br>%3$s - minutos para el siguiente rango<br>%4$s - segundos al siguiente rango<br>%5$s - nombre del siguiente grupo de servidores<br>%6$s - nombre del usuario (destinatario)<br><br>Ejemplo:<br><pre>Tu próximo rango estará en %1$s dias, %2$s horas y %3$s minutos y %4$s segundos. El siguiente grupo de servidores que alcanzará es [B]%5$s[/B].</pre>";
|
||||
$lang['winxmsg2'] = "Mensaje (más alto)";
|
||||
$lang['winxmsgdesc2'] = "Defina un mensaje, que el usuario recibirá como respuesta al comando \"!nextup\", cuando el usuario ya alcanzó el rango más alto.<br><br>Argumentos:<br>%1$s - días para el próximo rango<br>%2$s - horas al siguiente rango<br>%3$s - minutos para el siguiente rango<br>%4$s - segundos al siguiente rango<br>%5$s - nombre del siguiente grupo de servidores<br>%6$s - nombre del usuario (destinatario)<br><br>Ejemplo:<br><pre>Has alcanzado el rango más alto en %1$s dias, %2$s horas y %3$s minutos y %4$s segundos.</pre>";
|
||||
$lang['winxmsg3'] = "Mensaje (exceptuado)";
|
||||
$lang['winxmsgdesc3'] = "Defina un mensaje, que el usuario recibirá como respuesta al comando \"!nextup\", cuando el usuario es exceptuado de la Ranksystem.<br><br>Argumentos:<br>%1$s - días para el próximo rango<br>%2$s - horas al siguiente rango<br>%3$s - minutos para el siguiente rango<br>%4$s - segundos al siguiente rango<br>%5$s - namenombre del siguiente grupo de servidores<<br>%6$s - nombre del usuario (destinatario)<br><br>Ejemplo:<br><pre>Estás exceptuado de Ranksystem. Si desea clasificar, póngase en contacto con un administrador en el servidor TS3..</pre>";
|
||||
$lang['wirtpw1'] = "Lo sentimos, hermano. Has olvidado ingresar tu ID de administrador dentro de la interfaz web antes. No hay manera de restablecer la contraseña!";
|
||||
$lang['wirtpw2'] = "ID de administrador no encontrada en el servidor TS3. Debe estar en línea con la ID de cliente única, que se guarda como ID de administrador.";
|
||||
$lang['wirtpw3'] = "Su dirección IP no coincide con la dirección IP del administrador en el servidor TS3. Asegúrese de tener la misma dirección IP en línea en el servidor TS3 y también en esta página (también se necesita el mismo protocolo IPv4 / IPv6).";
|
||||
$lang['wirtpw4'] = "\nLa contraseña para la interfaz web fue restablecida con éxito.\nNombre de usuario: %s\nContraseña: [B]%s[/B]\n\nLogin %saquí%s";
|
||||
$lang['wirtpw5'] = "Se envió un mensaje de texto privado de TeamSpeak 3 al administrador con la nueva contraseña. Hacer clic %s aquí %s para iniciar sesión.";
|
||||
$lang['wirtpw6'] = "La contraseña de la interfaz web ha sido restablecida con éxito. Solicitud de IP %s.";
|
||||
$lang['wirtpw7'] = "Restablecer la contraseña";
|
||||
$lang['wirtpw8'] = "Aquí puede restablecer la contraseña de la webinterface..";
|
||||
$lang['wirtpw9'] = "Se requieren las siguientes cosas para restablecer la contraseña:";
|
||||
$lang['wirtpw10'] = "Necesitas estar en línea en el servidor TeamSpeak3.";
|
||||
$lang['wirtpw11'] = "Debe estar en línea con el ID de cliente único, que se guarda como ID de administrador.";
|
||||
$lang['wirtpw12'] = "Debe estar en línea con la misma dirección IP en el servidor TeamSpeak3 que aquí en esta página (también el mismo protocolo IPv4 / IPv6).";
|
||||
$lang['wiselcld'] = "seleccionar clientes";
|
||||
$lang['wiselclddesc'] = "Seleccione los clientes por su último nombre de usuario conocido, ID de cliente unica o ID de cliente en base de datos.<br>Múltiples selecciones también son posibles.";
|
||||
$lang['wishcolas'] = "grupo de servidores actual";
|
||||
$lang['wishcolasdesc'] = "Mostrar la columna 'actual servergroup' en list_rankup.php ";
|
||||
$lang['wishcolat'] = "tiempo activo";
|
||||
$lang['wishcolatdesc'] = "Mostrar columna 'sum. active time'en list_rankup.php ";
|
||||
$lang['wishcolcld'] = "Nombre del cliente";
|
||||
$lang['wishcolclddesc'] = "Mostrar columna 'Client-name' en list_rankup.php";
|
||||
$lang['wishcoldbid'] = "base de datos-ID";
|
||||
$lang['wishcoldbiddesc'] = "Mostrar columna 'Client-database-ID' en list_rankup.php";
|
||||
$lang['wishcolgs'] = "grupo actual desde";
|
||||
$lang['wishcolgsdesc'] = "Mostrar la columna 'current group since' en list_rankup.php";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Active el cifrado / hash de las direcciones IP del usuario de TeamSpeak y guarda solo el valor de hash dentro de la base de datos.<br>Esto es necesario en algunos casos de su privacidad legal; Especialmente requerido debido a la EU-GDPR.<br>No podemos prescindir de la dirección IP, porque la necesitamos para vincular al usuario de TeamSpeak con el usuario del sitio web.<br><br>Si esta función está \"DESACTIVADA\", la dirección IP de un usuario se almacenará en texto sin formato.<br><br>En ambas variantes (ENCENDIDO y APAGADO), las direcciones IP de un usuario solo se almacenarán mientras el usuario esté conectado al servidor TS3.<br><br>!!! El cifrado / hash de direcciones IP aumentará los recursos necesarios y afectará negativamente el rendimiento del sitio web !!!<br><br>Las direcciones IP de los usuarios solo se almacenarán una vez que el usuario se conecte al servidor TS3. Al cambiar esta función, el usuario debe volver a conectarse al servidor TS3 para poder verificar con la página web de Ranksystem.";
|
||||
$lang['wishcolit'] = "tiempo de inactividad";
|
||||
$lang['wishcolitdesc'] = "Mostrar columna 'sum idle time' en list_rankup.php";
|
||||
$lang['wishcolls'] = "ultima vez visto";
|
||||
$lang['wishcollsdesc'] = "Mostrar columna 'last seen' en list_rankup.php";
|
||||
$lang['wishcolnx'] = "próximo rango";
|
||||
$lang['wishcolnxdesc'] = "Mostrar columna 'next rank up' en list_rankup.php";
|
||||
$lang['wishcolot'] = "tiempo en línea";
|
||||
$lang['wishcolotdesc'] = "Mostrar columna 'sum. online time' en list_rankup.php";
|
||||
$lang['wishcolrg'] = "rango";
|
||||
$lang['wishcolrgdesc'] = "Mostrar columna 'rank' en list_rankup.php";
|
||||
$lang['wishcolsg'] = "próximo grupo de servidores";
|
||||
$lang['wishcolsgdesc'] = "Mostrar columna 'next servergroup' en list_rankup.php";
|
||||
$lang['wishcoluuid'] = "ID de cliente";
|
||||
$lang['wishcoluuiddesc'] = "Mostrar columna 'unique Client-ID' en list_rankup.php";
|
||||
$lang['wishexcld'] = "cliente exceptuado";
|
||||
$lang['wishexclddesc'] = "Mostrar clientes en list_rankup.php,<br>que están excluidos y, por tanto, no participan en el Ranksystem.";
|
||||
$lang['wishexgrp'] = "grupos exceptuados";
|
||||
$lang['wishexgrpdesc'] = "Mostrar clientes en list_rankup.php, que están en la lista 'client exception' y no debe ser considerado para el Ranksystem.";
|
||||
$lang['wishhicld'] = "Clientes en el nivel más alto";
|
||||
$lang['wishhiclddesc'] = "Mostrar clientes en list_rankup.php, que alcanzó el nivel más alto en el Ranksystem.";
|
||||
$lang['wishnav'] = "mostrar navegación del sitio";
|
||||
$lang['wishnavdesc'] = "Mostrar la navegación del sitio en 'stats/' pagina.<br><br>Si esta opción está desactivada en la página de estadísticas, se ocultará la navegación del sitio.<br>A continuación, puede tomar cada sitio e.g.Luego puede tomar cada sitio e.g. 'stats/list_rankup.php' e insértelo como marco en su sitio web existente o en el tablón de anuncios.";
|
||||
$lang['wisupidle'] = "Modo";
|
||||
$lang['wisupidledesc'] = "Hay dos modos, cómo se puede contar el tiempo.<br><br>1) <b>tiempo en línea</b>: Aquí se tiene en cuenta el tiempo puro en línea del usuario (ver columna 'sum. online time' en el 'stats/list_rankup.php')<br><br>2) <b>tiempo activo</b>: 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').<br><br>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.";
|
||||
$lang['wisvsuc'] = "Cambios exitosamente guardados!";
|
||||
$lang['wisvres'] = "¡Debe reiniciar el sistema de clasificación antes de que los cambios surtan efecto! %s";
|
||||
$lang['witime'] = "Zona horaria";
|
||||
$lang['witimedesc'] = "Seleccione la zona horaria donde está alojado el servidor.";
|
||||
$lang['wits3avat'] = "Avatar Delay";
|
||||
$lang['wits3avatdesc'] = "Defina un tiempo en segundos para retrasar la descarga de los avatares de TS3 modificados.<br><br>Esta función es especialmente útil para los robots (musicales), que cambian su avatar periódicamente.";
|
||||
$lang['wits3dch'] = "Canal por defecto";
|
||||
$lang['wits3dchdesc'] = "La identificación del canal, al que el bot debe conectarse.<br><br>El bot se unirá a este canal después de conectarse al servidor TeamSpeak.";
|
||||
$lang['wits3host'] = "Dirección de host TS3";
|
||||
$lang['wits3hostdesc'] = "Dirección del servidor TeamSpeak 3<br>(IP o el DNS)";
|
||||
$lang['wits3sm'] = "Query-Slowmode";
|
||||
$lang['wits3smdesc'] = "Con Query-Slowmode puede reducir \"spam\" de los comandos de consulta al servidor TeamSpeak. Esto previene prohibiciones en caso de inundación. <br> TeamSpeak Los comandos de consulta se retrasan con esta función.<br><br>!!!TAMBIÉN REDUCE EL USO DE LA CPU !!!<br><br>La activación no se recomienda, si no se requiere. La demora aumenta la duración del bot, lo que lo hace impreciso.<br><br>La última columna muestra el tiempo requerido para una duración (en segundos):<br><br>%s<br><br>En consecuencia, los valores (tiempos) con el ultraretraso se vuelven inexactos en unos 65 segundos. Dependiendo de, qué hacer y / o el tamaño del servidor aún más alto.";
|
||||
$lang['wits3qnm'] = "Nombre del Bot";
|
||||
$lang['wits3qnmdesc'] = "El nombre, con esto el query-connection se establecerá. <br> Puede nombrarlo gratis.";
|
||||
$lang['wits3querpw'] = "TS3 Query-Password";
|
||||
$lang['wits3querpwdesc'] = "Contraseña de consulta de TeamSpeak 3 <br> Contraseña para el usuario de la consulta.";
|
||||
$lang['wits3querusr'] = "TS3 Query-User";
|
||||
$lang['wits3querusrdesc'] = "Nombre de usuario de consulta de TeamSpeak 3 <br> El valor predeterminado es serveradmin <br> Por supuesto, también puede crear una cuenta de servidor adicional solo para el sistema de clasificación. <br> Los permisos necesarios que encontrará en:<br>%s";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "Puerto de consulta TeamSpeak 3<br>El valor predeterminado RAW (texto sin formato) es 10011 (TCP)<br>El SSH predeterminado (encriptado) es 10022 (TCP)<br><br>Si no es el predeterminado, debe encontrarlo en su 'ts3server.ini'.";
|
||||
$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).<br>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.<br><br>¡También esté seguro de que ha comprobado el puerto de consulta TS3, que necesita (quizás) cambiarse en Ranksystem!!<br><br><b>Atención:</b> 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!<br><br><b>Requisitos:</b><br><br>1) TS3 Server versión 3.3.0 o superior.<br><br>2) La extensión PHP PHP-SSH2 es necesaria.<br>En Linux puede instalarlo con el siguiente comando:<br>%s<br>3) ¡La encriptación debe estar habilitada en su servidor TS3!<br>Active los siguientes parámetros dentro de su 'ts3server.ini' y personalícelo según sus necesidades:<br>%s Después de cambiar las configuraciones de su servidor TS3, es necesario reiniciar su servidor TS3..";
|
||||
$lang['wits3voice'] = "Puerto de voz TS3";
|
||||
$lang['wits3voicedesc'] = "Puerto de voz TeamSpeak 3<br>El valor predeterminado es 9987 (UDP)<br>Este es el puerto, también lo usa para conectarse con el cliente TS3.";
|
||||
$lang['wiverify'] = "Canal de verificación";
|
||||
$lang['wiverifydesc'] = "Ingrese aquí el ID de canal del canal de verificación.<br><br>Este canal debe ser configurado <u>manualmente</u> en tu servidor TeamSpeak. Nombre, permisos y otras propiedades podrían definirse para su elección; solo el usuario debería ser posible unirse a este canal!<br><br>La verificación la realiza el propio usuario en la página de estadísticas.(/stats/). Esto solo es necesario si el visitante del sitio web no puede ser emparejado / relacionado automáticamente con el usuario de TeamSpeak.<br><br>To verify the TeamSpeak user, he has to be in the verification channel. Allí puede recibir un token con el que puede verificarse a sí mismo para la página de estadísticas.";
|
||||
$lang['wivlang'] = "Idioma";
|
||||
$lang['wivlangdesc'] = "Elija un idioma predeterminado para el Ranksystem.<br><br>El idioma también se puede seleccionar en los sitios web para los usuarios y se almacenará para la sesión.";
|
||||
?>
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Stable since: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Top des utilisateurs";
|
||||
$lang['sttw0002'] = "De la semaine";
|
||||
$lang['sttw0003'] = "Avec %s %s de temps en ligne";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "ID dans la BDD";
|
||||
$lang['wishcoldbiddesc'] = "Afficher la colonne 'ID dans la BDD' dans list_rankup.php";
|
||||
$lang['wishcolgs'] = "Groupe actuel depuis";
|
||||
$lang['wishcolgsdesc'] = "Afficher la colonne 'groupe actuel depuis' dans list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "Temps d'inactivité";
|
||||
$lang['wishcolitdesc'] = "Afficher la colonne 'sum. temps d'inactivité' dans list_rankup.php";
|
||||
$lang['wishcolls'] = "Dernière apparition";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightybr
|
||||
$lang['stri0023'] = "Versione stabile dal: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Top utenti";
|
||||
$lang['sttw0002'] = "Della settimana";
|
||||
$lang['sttw0003'] = "con %s %s di tempo online";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "ID del database";
|
||||
$lang['wishcoldbiddesc'] = "Mostra colonna 'ID del database' in stats/list_rankup.php";
|
||||
$lang['wishcolgs'] = "Gruppo attuale da";
|
||||
$lang['wishcolgsdesc'] = "Mostra colonna 'Gruppo auttuale da' in list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "tempo in IDLE";
|
||||
$lang['wishcolitdesc'] = "Mostra colonna 'tempo in IDLE' in stats/list_rankup.php";
|
||||
$lang['wishcolls'] = "Ultimo volta online";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Stable since: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Top users";
|
||||
$lang['sttw0002'] = "Of the week";
|
||||
$lang['sttw0003'] = "With %s %s online time";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "database-ID";
|
||||
$lang['wishcoldbiddesc'] = "Show column 'Client-database-ID' in list_rankup.php";
|
||||
$lang['wishcolgs'] = "actual group since";
|
||||
$lang['wishcolgsdesc'] = "Show column 'actual group since' in list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "idle time";
|
||||
$lang['wishcolitdesc'] = "Show column 'sum idle time' in list_rankup.php";
|
||||
$lang['wishcolls'] = "last seen";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Stabilny od: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Najlepsi uzytkownicy";
|
||||
$lang['sttw0002'] = "Tygodnia";
|
||||
$lang['sttw0003'] = "Z %s %s czas online";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "identyfikator bazy danych";
|
||||
$lang['wishcoldbiddesc'] = "Pokaz kolumne 'Identyfikator bazy danych klienta' in list_rankup.php";
|
||||
$lang['wishcolgs'] = "aktualna grupa od";
|
||||
$lang['wishcolgsdesc'] = "Pokaz kolumne 'aktualna grupa od' w list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "czas bezczynnosci";
|
||||
$lang['wishcolitdesc'] = "Pokaz kolumne 'suma czasu bezczynnosci' w list_rankup.php";
|
||||
$lang['wishcolls'] = "ostatnio widziany";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Estável desde: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Top Usuários";
|
||||
$lang['sttw0002'] = "Da Semana";
|
||||
$lang['sttw0003'] = "Com %s %s online";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "ID do banco de dados";
|
||||
$lang['wishcoldbiddesc'] = "Mostrar a coluna 'Cliente-database-ID' na list_rankup.php";
|
||||
$lang['wishcolgs'] = "Grupo atual desde";
|
||||
$lang['wishcolgsdesc'] = "Mostrar a coluna 'Grupo atual desde' na list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "Tempo inativo";
|
||||
$lang['wishcolitdesc'] = "Mostrar coluna 'Tempo inativo' na list_rankup.php";
|
||||
$lang['wishcolls'] = "Visto pela ultima vez";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">
|
||||
$lang['stri0023'] = "Stable since: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - for czech translation";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - for polish translation";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - for spanish translation";
|
||||
$lang['sttw0001'] = "Top useri";
|
||||
$lang['sttw0002'] = "saptamana";
|
||||
$lang['sttw0003'] = "cu %s %s timp online";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "ID baza de date";
|
||||
$lang['wishcoldbiddesc'] = "Afiseaza coloana 'ID baza de date' in list_rankup.php";
|
||||
$lang['wishcolgs'] = "grad actual de";
|
||||
$lang['wishcolgsdesc'] = "Afiseaza coloana 'grad de' in list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "hash IP addresses";
|
||||
$lang['wishcolhadesc'] = "Activate encrypting / hashing of IP addresses of TeamSpeak user and saves only the hashed value inside the database.<br>This is needed in some cases of your privacy legal; especially required due the EU-GDPR<br>We can't do without the IP address, because we need it to bind the TeamSpeak user with the website user.<br><br>If this function is \"OFF\" the IP address of a user will be stored in plain text.<br><br>In both variants (ON an OFF) the IP addresses of a user will only be stored as long as the user is connected to the TS3 server.<br><br>!!! Encrypting / Hashing of IP addresses will increase the needed resources and will negatively affect the performance of the website !!!<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to verify with the Ranksystem webpage.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "timp afk";
|
||||
$lang['wishcolitdesc'] = "Afiseaza coloana 'sum. timp afk' in list_rankup.php";
|
||||
$lang['wishcolls'] = "ultima conectare";
|
||||
|
||||
@@ -290,6 +290,7 @@ $lang['stri0022'] = "<a href=\"//magicbroccoli.de\" target=\"_blank\">mightyBr
|
||||
$lang['stri0023'] = "Стабильный релиз: 18/04/2016.";
|
||||
$lang['stri0024'] = "<a href=\"//zasivarna.tk/\" target=\"_blank\">KeviN</a> - За перевод интерфейса на Чешский язык";
|
||||
$lang['stri0025'] = "<a href=\"//github.com/DoktorekOne\" target=\"_blank\">DoktorekOne</a> - За перевод интерфейса на Польский язык";
|
||||
$lang['stri0026'] = "<a href=\"//foro.gameflix.es\" target=\"_blank\">JavierlechuXD</a> - для перевода на испанский язык";
|
||||
$lang['sttw0001'] = "Топ-10 пользователей";
|
||||
$lang['sttw0002'] = "За неделю";
|
||||
$lang['sttw0003'] = "Набрал %s %s часов онлайна";
|
||||
@@ -453,8 +454,11 @@ $lang['wishcoldbid'] = "ID в базе данных";
|
||||
$lang['wishcoldbiddesc'] = "Показывать колонку 'ID в Базе данных' в stats/list_rankup.php";
|
||||
$lang['wishcolgs'] = "Текущая группа начиная с";
|
||||
$lang['wishcolgsdesc'] = "Показывать колонку 'Текущая группа начиная с' на странице list_rankup.php";
|
||||
$lang['wishcolha0'] = "disable hashing";
|
||||
$lang['wishcolha1'] = "secure hashing";
|
||||
$lang['wishcolha2'] = "fast hashing (default)";
|
||||
$lang['wishcolha'] = "Хэширование IP адреса";
|
||||
$lang['wishcolhadesc'] = "Активация шифрования / хэширования IP адресов пользователей TeamSpeak сервера и сохранение хэшированных значений внутри базы данных.<br>Эта функция необходима в связи с некоторыми законами о приватности; особенно необходима в связи с EU-GDPR<br>Система рангов не может работать без хранения IP адресов, это необходимо для идентификации пользователя сервера TeamSpeak в системе рангов.<br><br>Если эта функция отключена - IP адреса пользователей будут храниться как текст.<br><br>В обоих случаях (Включена и Отключена) IP адрес пользователя будет храниться пока пользователь подключен к серверу TeamSpeak.<br><br>!!! Включение шифрования / хэширования IP адресов увеличивает нагрузку на сервер и негативно скажется на производительности сайта !!!<br><br>IP адреса пользователей будут храниться как только пользователи подключаются к серверу TeamSpeak. При включении / выключении данной функции пользователям необходимо переподключиться к серверу TeamSpeak для того что бы они могли идентифицироваться в системе рангов.";
|
||||
$lang['wishcolhadesc'] = "The TeamSpeak 3 server stores the IP address of each client. This we need for the Ranksystem to bind the website user of the statistics page with the related TeamSpeak user.<br><br>With this function you can active an encrypting / hashing of the IP addresses of TeamSpeak users. When enabled, only the hashed value will be stored in the database, instead of storing it in plain text. This is needed in some cases of your privacy legal; especially required due the EU-GDPR.<br><br><b>fast hashing (default):</b> IP addresses will be hashed. The salt is different for each ranksystem instance, but same for all users on the server. This makes it faster, but also weaker as the 'secure hashing'.<br><br><b>secure hashing:</b> IP addresses will be hashed. Each user will get his own salt, which makes it hard to decrypt the IP (=secure). This parameter is conform with the EU-GDPR. Contra: This variation affects the performance, especially on bigger TeamSpeak servers, it will slow down the statistics page on first site load very much. Also it inceases the needed resources.<br><br><b>disable hashing:</b> If this function is disabled the IP address of a user will be stored in plain text. This is the fastest option that requires the least resources.<br><br><br>In all variants the IP addresses of users will only be stored as long as the user is connected to the TS3 server (less data collection - EU-GDPR).<br><br>The IP addresses of users will only be stored once a user connected to the TS3 server. On changing this function the user needs to reconnect to the TS3 server to be able to get verified with the Ranksystem webpage.";
|
||||
$lang['wishcolit'] = "Учитывать время простоя";
|
||||
$lang['wishcolitdesc'] = "Показывать колонку 'суммарное время простоя' в stats/list_rankup.php";
|
||||
$lang['wishcolls'] = "Последний раз замечен";
|
||||
|
||||
250
languages/nations_es.php
Normal file
250
languages/nations_es.php
Normal file
@@ -0,0 +1,250 @@
|
||||
<?PHP
|
||||
$nation = array();
|
||||
$nation['AD'] = 'Andorra';
|
||||
$nation['AE'] = 'Emiratos Árabes Unidos';
|
||||
$nation['AF'] = 'Afganistán';
|
||||
$nation['AG'] = 'Antigua y Barbuda';
|
||||
$nation['AI'] = 'Anguila';
|
||||
$nation['AL'] = 'Albania';
|
||||
$nation['AM'] = 'Armenia';
|
||||
$nation['AO'] = 'Angola';
|
||||
$nation['AQ'] = 'Antarctica';
|
||||
$nation['AR'] = 'Argentina';
|
||||
$nation['AS'] = 'Samoa Americana';
|
||||
$nation['AT'] = 'Austria';
|
||||
$nation['AU'] = 'Australia';
|
||||
$nation['AW'] = 'Aruba';
|
||||
$nation['AX'] = 'Islas Åland';
|
||||
$nation['AZ'] = 'Azerbaiyán';
|
||||
$nation['BA'] = 'Bosnia y Herzegovina';
|
||||
$nation['BB'] = 'Barbados';
|
||||
$nation['BD'] = 'Bangladesh';
|
||||
$nation['BE'] = 'Bélgica';
|
||||
$nation['BF'] = 'Burkina Faso';
|
||||
$nation['BG'] = 'Bulgaria';
|
||||
$nation['BH'] = 'Bahrein';
|
||||
$nation['BI'] = 'Burundi';
|
||||
$nation['BJ'] = 'Benin';
|
||||
$nation['BL'] = 'St. Barthélemy ';
|
||||
$nation['BM'] = 'Bermuda';
|
||||
$nation['BN'] = 'Brunei Darussalam';
|
||||
$nation['BO'] = 'Bolivia';
|
||||
$nation['BR'] = 'Brasil';
|
||||
$nation['BS'] = 'Bahamas';
|
||||
$nation['BT'] = 'Bután';
|
||||
$nation['BV'] = 'Isla Bouvet';
|
||||
$nation['BW'] = 'Botswana';
|
||||
$nation['BY'] = 'Belarus';
|
||||
$nation['BZ'] = 'Belice';
|
||||
$nation['CA'] = 'Canadá';
|
||||
$nation['CC'] = 'Islas Cocos (Keeling)';
|
||||
$nation['CD'] = 'República Democrática del Congo';
|
||||
$nation['CF'] = 'República Centroafricana';
|
||||
$nation['CG'] = 'Congo';
|
||||
$nation['CH'] = 'Suiza';
|
||||
$nation['CI'] = 'Costa de Marfil';
|
||||
$nation['CK'] = 'Islas Cook';
|
||||
$nation['CL'] = 'Chile';
|
||||
$nation['CM'] = 'Camerún';
|
||||
$nation['CN'] = 'China';
|
||||
$nation['CO'] = 'Colombia';
|
||||
$nation['CR'] = 'Costa Rica';
|
||||
$nation['CS'] = 'Yugoslavia';
|
||||
$nation['CU'] = 'Cuba';
|
||||
$nation['CV'] = 'Cabo Verde';
|
||||
$nation['CW'] = 'Curaçao';
|
||||
$nation['CX'] = 'Isla de Navidad';
|
||||
$nation['CY'] = 'Chipre';
|
||||
$nation['CZ'] = 'República Checa';
|
||||
$nation['DE'] = 'Alemania';
|
||||
$nation['DJ'] = 'Djibouti';
|
||||
$nation['DK'] = 'Dinamarca';
|
||||
$nation['DM'] = 'Dominica';
|
||||
$nation['DO'] = 'República Dominicana';
|
||||
$nation['DZ'] = 'Argelia';
|
||||
$nation['EC'] = 'Ecuador';
|
||||
$nation['EE'] = 'Estonia';
|
||||
$nation['EG'] = 'Egipto';
|
||||
$nation['EH'] = 'Sahara Occidental';
|
||||
$nation['ER'] = 'Eritrea';
|
||||
$nation['ES'] = 'España';
|
||||
$nation['ET'] = 'Etiopía';
|
||||
$nation['FI'] = 'Finlandia';
|
||||
$nation['FJ'] = 'Fiji';
|
||||
$nation['FK'] = 'Islas Malvinas';
|
||||
$nation['FM'] = 'Micronesia, Estados Federales de';
|
||||
$nation['FO'] = 'Islas Feroe';
|
||||
$nation['FR'] = 'Francia';
|
||||
$nation['GA'] = 'Gabón';
|
||||
$nation['GB'] = 'Gran Bretaña';
|
||||
$nation['GD'] = 'Grenada';
|
||||
$nation['GE'] = 'Georgia';
|
||||
$nation['GF'] = 'Guayana Francesa';
|
||||
$nation['GG'] = 'Guernsey';
|
||||
$nation['GH'] = 'Ghana';
|
||||
$nation['GI'] = 'Gibraltar';
|
||||
$nation['GL'] = 'Groenlandia';
|
||||
$nation['GM'] = 'Gambia';
|
||||
$nation['GN'] = 'Guinea';
|
||||
$nation['GP'] = 'Guadalupe';
|
||||
$nation['GQ'] = 'Guinea Ecuatorial';
|
||||
$nation['GR'] = 'Grecia';
|
||||
$nation['GS'] = 'Islas Georgia del Sur y Sandwich del Sur';
|
||||
$nation['GT'] = 'Guatemala';
|
||||
$nation['GU'] = 'Guam';
|
||||
$nation['GW'] = 'Guinea-Bissau';
|
||||
$nation['GY'] = 'Guyana';
|
||||
$nation['HK'] = 'Hong Kong';
|
||||
$nation['HM'] = 'Islas Heard y Mc Donald';
|
||||
$nation['HN'] = 'Honduras';
|
||||
$nation['HR'] = 'Croacia';
|
||||
$nation['HT'] = 'Haití';
|
||||
$nation['HU'] = 'Hungría';
|
||||
$nation['ID'] = 'Indonesia';
|
||||
$nation['IE'] = 'Irlanda';
|
||||
$nation['IL'] = 'Israel';
|
||||
$nation['IM'] = 'Isla de Man';
|
||||
$nation['IN'] = 'India';
|
||||
$nation['IO'] = 'Territorio Británico del Océano Índico';
|
||||
$nation['IQ'] = 'Iraq';
|
||||
$nation['IR'] = 'Irán';
|
||||
$nation['IS'] = 'Islandia';
|
||||
$nation['IT'] = 'Italia';
|
||||
$nation['JE'] = 'Jersey';
|
||||
$nation['JM'] = 'Jamaica';
|
||||
$nation['JO'] = 'Jordan';
|
||||
$nation['JP'] = 'Japón';
|
||||
$nation['KE'] = 'Kenia';
|
||||
$nation['KG'] = 'Kirguistán';
|
||||
$nation['KH'] = 'Camboya';
|
||||
$nation['KI'] = 'Kiribati';
|
||||
$nation['KM'] = 'Comoras';
|
||||
$nation['KN'] = 'Saint Kitts and Nevis';
|
||||
$nation['KP'] = 'Corea del Norte';
|
||||
$nation['KR'] = 'Corea del Sur';
|
||||
$nation['KW'] = 'Kuwait';
|
||||
$nation['KY'] = 'Islas Caimán';
|
||||
$nation['KZ'] = 'Kazajstán';
|
||||
$nation['LA'] = 'Lao';
|
||||
$nation['LB'] = 'Líbano';
|
||||
$nation['LC'] = 'Santa Lucía';
|
||||
$nation['LI'] = 'Liechtenstein';
|
||||
$nation['LK'] = 'Sri Lanka';
|
||||
$nation['LR'] = 'Liberia';
|
||||
$nation['LS'] = 'Lesotho';
|
||||
$nation['LT'] = 'Lituania';
|
||||
$nation['LU'] = 'Luxemburgo';
|
||||
$nation['LV'] = 'Letonia';
|
||||
$nation['LY'] = 'Libia';
|
||||
$nation['MA'] = 'Marruecos';
|
||||
$nation['MC'] = 'Mónaco';
|
||||
$nation['MD'] = 'Moldova';
|
||||
$nation['ME'] = 'Montenegro';
|
||||
$nation['MG'] = 'Madagascar';
|
||||
$nation['MH'] = 'Islas Marshall';
|
||||
$nation['MK'] = 'Macedonia';
|
||||
$nation['ML'] = 'Mali';
|
||||
$nation['MM'] = 'Myanmar / Birmania';
|
||||
$nation['MN'] = 'Mongolia';
|
||||
$nation['MO'] = 'Macao';
|
||||
$nation['MP'] = 'Islas Marianas del Norte';
|
||||
$nation['MQ'] = 'Martinica';
|
||||
$nation['MR'] = 'Mauritania';
|
||||
$nation['MS'] = 'Montserrat';
|
||||
$nation['MT'] = 'Malta';
|
||||
$nation['MU'] = 'Mauricio';
|
||||
$nation['MV'] = 'Maldives';
|
||||
$nation['MW'] = 'Malawi';
|
||||
$nation['MX'] = 'México';
|
||||
$nation['MY'] = 'Malaysia';
|
||||
$nation['MZ'] = 'Mozambique';
|
||||
$nation['NA'] = 'Namibia';
|
||||
$nation['NC'] = 'Nueva Caledonia';
|
||||
$nation['NE'] = 'Niger';
|
||||
$nation['NF'] = 'Isla Norfolk';
|
||||
$nation['NG'] = 'Nigeria';
|
||||
$nation['NI'] = 'Nicaragua';
|
||||
$nation['NL'] = 'Países Bajos';
|
||||
$nation['NO'] = 'Noruega';
|
||||
$nation['NP'] = 'Nepal';
|
||||
$nation['NR'] = 'Nauru';
|
||||
$nation['NU'] = 'Niue';
|
||||
$nation['NZ'] = 'Nueva Zelanda';
|
||||
$nation['OM'] = 'Omán';
|
||||
$nation['PA'] = 'Panamá';
|
||||
$nation['PE'] = 'Perú';
|
||||
$nation['PF'] = 'Polinesia francesa';
|
||||
$nation['PG'] = 'Papua Nueva Guinea';
|
||||
$nation['PH'] = 'Filipinas';
|
||||
$nation['PK'] = 'Pakistán';
|
||||
$nation['PL'] = 'Polonia';
|
||||
$nation['PM'] = 'St. Pierre und Miquelon ';
|
||||
$nation['PN'] = 'Isla Pitcairn';
|
||||
$nation['PR'] = 'Puerto Rico';
|
||||
$nation['PS'] = 'Palestina';
|
||||
$nation['PT'] = 'Portugal';
|
||||
$nation['PW'] = 'Palau';
|
||||
$nation['PY'] = 'Paraguay';
|
||||
$nation['QA'] = 'Qatar';
|
||||
$nation['RE'] = 'Isla de la Reunión';
|
||||
$nation['RO'] = 'Rumania';
|
||||
$nation['RS'] = 'Serbia';
|
||||
$nation['RU'] = 'Rusia';
|
||||
$nation['RW'] = 'Rwanda';
|
||||
$nation['SA'] = 'Arabia Saudita';
|
||||
$nation['SB'] = 'Islas Salomón';
|
||||
$nation['SC'] = 'Seychelles';
|
||||
$nation['SD'] = 'Sudán';
|
||||
$nation['SE'] = 'Suecia';
|
||||
$nation['SG'] = 'Singapur';
|
||||
$nation['SH'] = 'Santa Elena, Ascensión y Tristán da Cunha';
|
||||
$nation['SI'] = 'Eslovenia';
|
||||
$nation['SJ'] = 'Islas Svalbard y Jan Mayen';
|
||||
$nation['SK'] = 'Eslovaquia';
|
||||
$nation['SL'] = 'Sierra Leona';
|
||||
$nation['SM'] = 'San Marino';
|
||||
$nation['SN'] = 'Senegal';
|
||||
$nation['SO'] = 'Somalia';
|
||||
$nation['SR'] = 'Suriname';
|
||||
$nation['ST'] = 'Santo Tomé y Príncipe';
|
||||
$nation['SV'] = 'El Salvador';
|
||||
$nation['SY'] = 'Siria';
|
||||
$nation['SZ'] = 'Swaziland';
|
||||
$nation['TC'] = 'Islas Turcas y Caicos';
|
||||
$nation['TD'] = 'Chad';
|
||||
$nation['TF'] = 'Territorios franceses del sur';
|
||||
$nation['TG'] = 'Togo';
|
||||
$nation['TH'] = 'Tailandia';
|
||||
$nation['TJ'] = 'Tayikistán';
|
||||
$nation['TK'] = 'Tokelau';
|
||||
$nation['TL'] = 'Timor Oriental Timor Oriental';
|
||||
$nation['TM'] = 'Turkmenistán';
|
||||
$nation['TN'] = 'Túnez';
|
||||
$nation['TO'] = 'Tonga';
|
||||
$nation['TR'] = 'Turquía';
|
||||
$nation['TT'] = 'Trinidad y Tobago';
|
||||
$nation['TV'] = 'Tuvalu';
|
||||
$nation['TW'] = 'Taiwan';
|
||||
$nation['TZ'] = 'Tanzania';
|
||||
$nation['UA'] = 'Ucrania';
|
||||
$nation['UG'] = 'Uganda';
|
||||
$nation['UK'] = 'Reino Unido';
|
||||
$nation['UM'] = 'U.S. Islas periféricas menores ';
|
||||
$nation['US'] = 'Estados Unidos';
|
||||
$nation['UY'] = 'Uruguay';
|
||||
$nation['UZ'] = 'Uzbekistan';
|
||||
$nation['VA'] = 'Estado de la Ciudad del Vaticano (Santa Sede)';
|
||||
$nation['VC'] = 'San Vicente y las Granadinas';
|
||||
$nation['VE'] = 'Venezuela';
|
||||
$nation['VG'] = 'Isla Virgen';
|
||||
$nation['VI'] = 'Islas Vírgenes (EE. UU.)';
|
||||
$nation['VN'] = 'Vietnam';
|
||||
$nation['VU'] = 'Vanuatu';
|
||||
$nation['WF'] = 'Islas Wallis y Futuna';
|
||||
$nation['WS'] = 'Samoa';
|
||||
$nation['YE'] = 'Yemen';
|
||||
$nation['YT'] = 'Mayotte';
|
||||
$nation['ZA'] = 'Sudáfrica';
|
||||
$nation['ZM'] = 'Zambia';
|
||||
$nation['ZW'] = 'Zimbabwe';
|
||||
?>
|
||||
255
other/config.php
255
other/config.php
@@ -8,6 +8,8 @@ function set_language($language) {
|
||||
include(substr(dirname(__FILE__),0,-5).'languages/core_cz.php');
|
||||
} elseif(strtolower($language) == "de") {
|
||||
include(substr(dirname(__FILE__),0,-5).'languages/core_de.php');
|
||||
} elseif(strtolower($language) == "es") {
|
||||
include(substr(dirname(__FILE__),0,-5).'languages/core_es.php');
|
||||
} elseif(strtolower($language) == "fr") {
|
||||
include(substr(dirname(__FILE__),0,-5).'languages/core_fr.php');
|
||||
} elseif(strtolower($language) == "it") {
|
||||
@@ -85,131 +87,228 @@ if($db['type'] != "type") {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($mysqlcon) && ($config = $mysqlcon->query("SELECT * FROM `$dbname`.`config`")->fetch())) {
|
||||
if(count($config) != 0) {
|
||||
$ts['host'] = $config['tshost'];
|
||||
$ts['query'] = $config['tsquery'];
|
||||
$ts['tsencrypt'] = $config['tsencrypt'];
|
||||
$ts['voice'] = $config['tsvoice'];
|
||||
$ts['user'] = $config['tsuser'];
|
||||
$ts['pass'] = $config['tspass'];
|
||||
$webuser = $config['webuser'];
|
||||
$webpass = $config['webpass'];
|
||||
if (isset($mysqlcon) && ($oldcfg = $mysqlcon->query("SELECT * FROM `$dbname`.`config`"))) {
|
||||
if(isset($oldcfg) && $oldcfg != NULL) {
|
||||
$config = $oldcfg->fetch();
|
||||
$cfg['teamspeak_host_address'] = $config['tshost'];
|
||||
$cfg['teamspeak_query_port'] = $config['tsquery'];
|
||||
$cfg['teamspeak_query_encrypt_switch'] = $config['tsencrypt'];
|
||||
$cfg['teamspeak_voice_port'] = $config['tsvoice'];
|
||||
$cfg['teamspeak_query_user'] = $config['tsuser'];
|
||||
$cfg['teamspeak_query_pass'] = $config['tspass'];
|
||||
$cfg['webinterface_user'] = $config['webuser'];
|
||||
$cfg['webinterface_pass'] = $config['webpass'];
|
||||
if(!isset($_GET["lang"])) {
|
||||
if(isset($_SESSION[$rspathhex.'language'])) {
|
||||
$language = $_SESSION[$rspathhex.'language'];
|
||||
$cfg['default_language'] = $_SESSION[$rspathhex.'language'];
|
||||
} else {
|
||||
$language = $config['language'];
|
||||
$cfg['default_language'] = $config['language'];
|
||||
}
|
||||
} elseif($_GET["lang"] == "ar") {
|
||||
$language = "ar";
|
||||
$cfg['default_language'] = "ar";
|
||||
$_SESSION[$rspathhex.'language'] = "ar";
|
||||
} elseif($_GET["lang"] == "cz") {
|
||||
$language = "cz";
|
||||
$cfg['default_language'] = "cz";
|
||||
$_SESSION[$rspathhex.'language'] = "cz";
|
||||
} elseif($_GET["lang"] == "de") {
|
||||
$language = "de";
|
||||
$cfg['default_language'] = "de";
|
||||
$_SESSION[$rspathhex.'language'] = "de";
|
||||
} elseif($_GET["lang"] == "fr") {
|
||||
$language = "fr";
|
||||
$cfg['default_language'] = "fr";
|
||||
$_SESSION[$rspathhex.'language'] = "fr";
|
||||
} elseif($_GET["lang"] == "it") {
|
||||
$language = "it";
|
||||
$cfg['default_language'] = "it";
|
||||
$_SESSION[$rspathhex.'language'] = "it";
|
||||
} elseif($_GET["lang"] == "nl") {
|
||||
$language = "nl";
|
||||
$cfg['default_language'] = "nl";
|
||||
$_SESSION[$rspathhex.'language'] = "nl";
|
||||
} elseif($_GET["lang"] == "pl") {
|
||||
$language = "pl";
|
||||
$cfg['default_language'] = "pl";
|
||||
$_SESSION[$rspathhex.'language'] = "pl";
|
||||
} elseif($_GET["lang"] == "ro") {
|
||||
$language = "ro";
|
||||
$cfg['default_language'] = "ro";
|
||||
$_SESSION[$rspathhex.'language'] = "ro";
|
||||
} elseif($_GET["lang"] == "ru") {
|
||||
$language = "ru";
|
||||
$cfg['default_language'] = "ru";
|
||||
$_SESSION[$rspathhex.'language'] = "ru";
|
||||
} elseif($_GET["lang"] == "pt") {
|
||||
$language = "pt";
|
||||
$cfg['default_language'] = "pt";
|
||||
$_SESSION[$rspathhex.'language'] = "pt";
|
||||
} else {
|
||||
$language = "en";
|
||||
$cfg['default_language'] = "en";
|
||||
$_SESSION[$rspathhex.'language'] = "en";
|
||||
}
|
||||
$lang = set_language($language);
|
||||
$queryname = $config['queryname'];
|
||||
$slowmode = $config['slowmode'];
|
||||
$lang = set_language($cfg['default_language']);
|
||||
$cfg['teamspeak_query_nickname'] = $config['queryname'];
|
||||
$cfg['teamspeak_query_command_delay'] = $config['slowmode'];
|
||||
if(empty($config['grouptime'])) {
|
||||
$grouptime = null;
|
||||
$cfg['rankup_definition'] = null;
|
||||
} else {
|
||||
$grouptimearr = explode(',', $config['grouptime']);
|
||||
foreach ($grouptimearr as $entry) {
|
||||
list($key, $value) = explode('=>', $entry);
|
||||
$grouptime[$key] = $value;
|
||||
$addnewvalue1[$key] = $value;
|
||||
$cfg['rankup_definition'] = $addnewvalue1;
|
||||
}
|
||||
}
|
||||
if(empty($config['boost'])) {
|
||||
$boostarr = null;
|
||||
$cfg['rankup_boost_definition'] = null;
|
||||
} else {
|
||||
$boostexp = explode(',', $config['boost']);
|
||||
foreach ($boostexp as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$boostarr[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
$resetbydbchange = $config['resetbydbchange'];
|
||||
$msgtouser = $config['msgtouser'];
|
||||
$currvers = $config['currvers'];
|
||||
$substridle = $config['substridle'];
|
||||
$exceptuuid = array_flip(explode(',', $config['exceptuuid']));
|
||||
$exceptgroup = array_flip(explode(',', $config['exceptgroup']));
|
||||
$exceptcid = array_flip(explode(',', $config['exceptcid']));
|
||||
$timeformat = $config['dateformat'];
|
||||
$showexcld = $config['showexcld'];
|
||||
$showhighest = $config['showhighest'];
|
||||
$showcolrg = $config['showcolrg'];
|
||||
$showcolcld = $config['showcolcld'];
|
||||
$showcoluuid = $config['showcoluuid'];
|
||||
$showcoldbid = $config['showcoldbid'];
|
||||
$showcolls = $config['showcolls'];
|
||||
$showcolot = $config['showcolot'];
|
||||
$showcolit = $config['showcolit'];
|
||||
$showcolat = $config['showcolat'];
|
||||
$showcolas = $config['showcolas'];
|
||||
$showcolnx = $config['showcolnx'];
|
||||
$showcolsg = $config['showcolsg'];
|
||||
$cleanclients = $config['cleanclients'];
|
||||
$cleanperiod = $config['cleanperiod'];
|
||||
$defchid = $config['defchid'];
|
||||
$logpath = $config['logpath'];
|
||||
$cfg['rankup_client_database_id_change_switch'] = $config['resetbydbchange'];
|
||||
$cfg['rankup_message_to_user_switch'] = $config['msgtouser'];
|
||||
$cfg['version_current_using'] = $config['currvers'];
|
||||
$cfg['rankup_time_assess_mode'] = $config['substridle'];
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = array_flip(explode(',', $config['exceptuuid']));
|
||||
$cfg['rankup_excepted_group_id_list'] = array_flip(explode(',', $config['exceptgroup']));
|
||||
$cfg['rankup_excepted_channel_id_list'] = array_flip(explode(',', $config['exceptcid']));
|
||||
$cfg['default_date_format'] = $config['dateformat'];
|
||||
$cfg['stats_show_excepted_clients_switch'] = $config['showexcld'];
|
||||
$cfg['stats_show_clients_in_highest_rank_switch'] = $config['showhighest'];
|
||||
$cfg['stats_column_rank_switch'] = $config['showcolrg'];
|
||||
$cfg['stats_column_client_name_switch'] = $config['showcolcld'];
|
||||
$cfg['stats_column_unique_id_switch'] = $config['showcoluuid'];
|
||||
$cfg['stats_column_client_db_id_switch'] = $config['showcoldbid'];
|
||||
$cfg['stats_column_last_seen_switch'] = $config['showcolls'];
|
||||
$cfg['stats_column_online_time_switch'] = $config['showcolot'];
|
||||
$cfg['stats_column_idle_time_switch'] = $config['showcolit'];
|
||||
$cfg['stats_column_active_time_switch'] = $config['showcolat'];
|
||||
$cfg['stats_column_current_server_group_switch'] = $config['showcolas'];
|
||||
$cfg['stats_column_next_rankup_switch'] = $config['showcolnx'];
|
||||
$cfg['stats_column_next_server_group_switch'] = $config['showcolsg'];
|
||||
$cfg['rankup_clean_clients_switch'] = $config['cleanclients'];
|
||||
$cfg['rankup_clean_clients_period'] = $config['cleanperiod'];
|
||||
$cfg['teamspeak_default_channel_id'] = $config['defchid'];
|
||||
$cfg['logs_path'] = $config['logpath'];
|
||||
if ($config['timezone'] == NULL) {
|
||||
$timezone = "Europe/Berlin";
|
||||
$cfg['logs_timezone'] = "Europe/Berlin";
|
||||
} else {
|
||||
$timezone = $config['timezone'];
|
||||
$cfg['logs_timezone'] = $config['timezone'];
|
||||
}
|
||||
date_default_timezone_set($timezone);
|
||||
$advancemode = $config['advancemode'];
|
||||
$count_access = $config['count_access'];
|
||||
$last_access = $config['last_access'];
|
||||
$ignoreidle = $config['ignoreidle'];
|
||||
$rankupmsg = $config['rankupmsg'];
|
||||
$newversion = $config['newversion'];
|
||||
$servernews = $config['servernews'];
|
||||
date_default_timezone_set($cfg['logs_timezone']);
|
||||
$cfg['webinterface_access_count'] = $config['count_access'];
|
||||
$cfg['webinterface_access_last'] = $config['last_access'];
|
||||
$cfg['rankup_ignore_idle_time'] = $config['ignoreidle'];
|
||||
$cfg['rankup_message_to_user'] = $config['rankupmsg'];
|
||||
$cfg['version_latest_available'] = $config['newversion'];
|
||||
$cfg['stats_server_news'] = $config['servernews'];
|
||||
if(empty($config['adminuuid'])) {
|
||||
$adminuuid = NULL;
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = NULL;
|
||||
} else {
|
||||
$adminuuid = explode(',', $config['adminuuid']);
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = explode(',', $config['adminuuid']);
|
||||
}
|
||||
$nextupinfo = $config['nextupinfo'];
|
||||
$nextupinfomsg1 = $config['nextupinfomsg1'];
|
||||
$nextupinfomsg2 = $config['nextupinfomsg2'];
|
||||
$nextupinfomsg3 = $config['nextupinfomsg3'];
|
||||
$shownav = $config['shownav'];
|
||||
$showgrpsince = $config['showgrpsince'];
|
||||
$resetexcept = $config['resetexcept'];
|
||||
$upchannel = $config['upchannel'];
|
||||
$avatar_delay = $config['avatar_delay'];
|
||||
$registercid = $config['registercid'];
|
||||
$iphash = $config['iphash'];
|
||||
$cfg['rankup_next_message_mode'] = $config['nextupinfo'];
|
||||
$cfg['rankup_next_message_1'] = $config['nextupinfomsg1'];
|
||||
$cfg['rankup_next_message_2'] = $config['nextupinfomsg2'];
|
||||
$cfg['rankup_next_message_3'] = $config['nextupinfomsg3'];
|
||||
$cfg['stats_show_site_navigation_switch'] = $config['shownav'];
|
||||
$cfg['stats_column_current_group_since_switch'] = $config['showgrpsince'];
|
||||
$cfg['rankup_excepted_mode'] = $config['resetexcept'];
|
||||
$cfg['version_update_channel'] = $config['upchannel'];
|
||||
$cfg['teamspeak_avatar_download_delay'] = $config['avatar_delay'];
|
||||
$cfg['teamspeak_verification_channel_id'] = $config['registercid'];
|
||||
$cfg['rankup_hash_ip_addresses_mode'] = $config['iphash'];
|
||||
unset($addnewvalue1, $addnewvalue2, $oldcfd, $config);
|
||||
}
|
||||
} elseif(!isset($_GET["lang"])) {
|
||||
$lang = set_language("en");
|
||||
}
|
||||
|
||||
if (isset($mysqlcon) && ($newcfg = $mysqlcon->query("SELECT * FROM `$dbname`.`cfg_params`"))) {
|
||||
if(isset($newcfg) && $newcfg != NULL) {
|
||||
$cfg = $newcfg->fetchAll(PDO::FETCH_KEY_PAIR);
|
||||
if (!isset($cfg['logs_timezone']) || $cfg['logs_timezone'] == NULL) {
|
||||
$cfg['logs_timezone'] = "Europe/Berlin";
|
||||
}
|
||||
date_default_timezone_set($cfg['logs_timezone']);
|
||||
|
||||
if(empty($cfg['webinterface_admin_client_unique_id_list'])) {
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = NULL;
|
||||
} else {
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = array_flip(explode(',', $cfg['webinterface_admin_client_unique_id_list']));
|
||||
}
|
||||
if(empty($cfg['rankup_excepted_unique_client_id_list'])) {
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = NULL;
|
||||
} else {
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_unique_client_id_list']));
|
||||
}
|
||||
if(empty($cfg['rankup_excepted_group_id_list'])) {
|
||||
$cfg['rankup_excepted_group_id_list'] = NULL;
|
||||
} else {
|
||||
$cfg['rankup_excepted_group_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_group_id_list']));
|
||||
}
|
||||
if(empty($cfg['rankup_excepted_channel_id_list'])) {
|
||||
$cfg['rankup_excepted_channel_id_list'] = NULL;
|
||||
} else {
|
||||
$cfg['rankup_excepted_channel_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_channel_id_list']));
|
||||
}
|
||||
if(empty($cfg['rankup_definition'])) {
|
||||
$cfg['rankup_definition'] = NULL;
|
||||
} else {
|
||||
foreach (explode(',', $cfg['rankup_definition']) as $entry) {
|
||||
list($key, $value) = explode('=>', $entry);
|
||||
$addnewvalue1[$key] = $value;
|
||||
$cfg['rankup_definition'] = $addnewvalue1;
|
||||
}
|
||||
}
|
||||
if(empty($cfg['rankup_boost_definition'])) {
|
||||
$cfg['rankup_boost_definition'] = NULL;
|
||||
} else {
|
||||
foreach (explode(',', $cfg['rankup_boost_definition']) as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
if(!isset($_GET["lang"])) {
|
||||
if(isset($_SESSION[$rspathhex.'language'])) {
|
||||
$cfg['default_language'] = $_SESSION[$rspathhex.'language'];
|
||||
}
|
||||
} elseif($_GET["lang"] == "ar") {
|
||||
$cfg['default_language'] = "ar";
|
||||
$_SESSION[$rspathhex.'language'] = "ar";
|
||||
} elseif($_GET["lang"] == "cz") {
|
||||
$cfg['default_language'] = "cz";
|
||||
$_SESSION[$rspathhex.'language'] = "cz";
|
||||
} elseif($_GET["lang"] == "de") {
|
||||
$cfg['default_language'] = "de";
|
||||
$_SESSION[$rspathhex.'language'] = "de";
|
||||
} elseif($_GET["lang"] == "es") {
|
||||
$cfg['default_language'] = "es";
|
||||
$_SESSION[$rspathhex.'language'] = "es";
|
||||
} elseif($_GET["lang"] == "fr") {
|
||||
$cfg['default_language'] = "fr";
|
||||
$_SESSION[$rspathhex.'language'] = "fr";
|
||||
} elseif($_GET["lang"] == "it") {
|
||||
$cfg['default_language'] = "it";
|
||||
$_SESSION[$rspathhex.'language'] = "it";
|
||||
} elseif($_GET["lang"] == "nl") {
|
||||
$cfg['default_language'] = "nl";
|
||||
$_SESSION[$rspathhex.'language'] = "nl";
|
||||
} elseif($_GET["lang"] == "pl") {
|
||||
$cfg['default_language'] = "pl";
|
||||
$_SESSION[$rspathhex.'language'] = "pl";
|
||||
} elseif($_GET["lang"] == "ro") {
|
||||
$cfg['default_language'] = "ro";
|
||||
$_SESSION[$rspathhex.'language'] = "ro";
|
||||
} elseif($_GET["lang"] == "ru") {
|
||||
$cfg['default_language'] = "ru";
|
||||
$_SESSION[$rspathhex.'language'] = "ru";
|
||||
} elseif($_GET["lang"] == "pt") {
|
||||
$cfg['default_language'] = "pt";
|
||||
$_SESSION[$rspathhex.'language'] = "pt";
|
||||
} else {
|
||||
$cfg['default_language'] = "en";
|
||||
$_SESSION[$rspathhex.'language'] = "en";
|
||||
}
|
||||
$lang = set_language($cfg['default_language']);
|
||||
unset($addnewvalue1, $addnewvalue2, $newcfd);
|
||||
}
|
||||
} elseif(!isset($_GET["lang"])) {
|
||||
$lang = set_language("en");
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?PHP
|
||||
function load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath) {
|
||||
function load_addons_config($mysqlcon,$lang,$cfg,$dbname) {
|
||||
if(!isset($mysqlcon) || $mysqlcon == NULL || ($addons_config = $mysqlcon->query("SELECT * FROM `$dbname`.`addons_config`")) === false) {
|
||||
if(function_exists('enter_logfile')) {
|
||||
enter_logfile($logpath,$timezone,2,"Error on loading addons config.. Database down, not reachable, corrupt or empty?");
|
||||
enter_logfile($cfg,2,"Error on loading addons config.. Database down, not reachable, corrupt or empty?");
|
||||
} else {
|
||||
echo "Error on loading addons config.. Database down, not reachable, corrupt or empty?";
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ if (isset($_POST['refresh'])) {
|
||||
$rspathhex = 'rs_'.dechex(crc32(__DIR__)).'_';
|
||||
rem_session_ts3($rspathhex);
|
||||
}
|
||||
function set_session_ts3($voiceport, $mysqlcon, $dbname, $language, $adminuuid) {
|
||||
global $iphash, $lang;
|
||||
function set_session_ts3($mysqlcon,$cfg,$lang,$dbname) {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
$hpclientip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
@@ -26,20 +25,29 @@ function set_session_ts3($voiceport, $mysqlcon, $dbname, $language, $adminuuid)
|
||||
$iptable = $mysqlcon->query("SELECT `uuid`,`iphash`,`ip` FROM `$dbname`.`user_iphash`")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE);
|
||||
$_SESSION[$rspathhex.'connected'] = 0;
|
||||
$_SESSION[$rspathhex.'tsname'] = $lang['stag0016'];
|
||||
$_SESSION[$rspathhex.'serverport'] = $voiceport;
|
||||
$_SESSION[$rspathhex.'serverport'] = $cfg['teamspeak_voice_port'];
|
||||
$_SESSION[$rspathhex.'multiple'] = array();
|
||||
|
||||
if($cfg['rankup_hash_ip_addresses_mode'] == 2) {
|
||||
$salt = md5(dechex(crc32(substr(__DIR__,0,-5))));
|
||||
$hashedip = password_hash($hpclientip, PASSWORD_DEFAULT, array("cost" => 10, "salt" => $salt));
|
||||
}
|
||||
|
||||
foreach ($allclients as $client) {
|
||||
if(isset($_SESSION[$rspathhex.'uuid_verified']) && $_SESSION[$rspathhex.'uuid_verified'] != $client['uuid']) {
|
||||
continue;
|
||||
}
|
||||
$verify = FALSE;
|
||||
if($iphash == 1) {
|
||||
if (isset($iptable[$client['uuid']]['iphash']) && password_verify($hpclientip, $iptable[$client['uuid']]['iphash'])) {
|
||||
if($cfg['rankup_hash_ip_addresses_mode'] == 1) {
|
||||
if (isset($iptable[$client['uuid']]['iphash']) && $iptable[$client['uuid']]['iphash'] != NULL && password_verify($hpclientip, $iptable[$client['uuid']]['iphash'])) {
|
||||
$verify = TRUE;
|
||||
}
|
||||
} elseif($cfg['rankup_hash_ip_addresses_mode'] == 2) {
|
||||
if (isset($iptable[$client['uuid']]['iphash']) && $hashedip == $iptable[$client['uuid']]['iphash'] && $iptable[$client['uuid']]['iphash'] != NULL) {
|
||||
$verify = TRUE;
|
||||
}
|
||||
} else {
|
||||
if (isset($iptable[$client['uuid']]['ip']) && $hpclientip == $iptable[$client['uuid']]['ip']) {
|
||||
if (isset($iptable[$client['uuid']]['ip']) && $hpclientip == $iptable[$client['uuid']]['ip'] && $iptable[$client['uuid']]['ip'] != NULL) {
|
||||
$verify = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -53,7 +61,7 @@ function set_session_ts3($voiceport, $mysqlcon, $dbname, $language, $adminuuid)
|
||||
$_SESSION[$rspathhex.'multiple'][$client['uuid']] = htmlspecialchars($client['name']);
|
||||
}
|
||||
$_SESSION[$rspathhex.'tsuid'] = $client['uuid'];
|
||||
foreach ($adminuuid as $auuid) {
|
||||
foreach(array_flip($cfg['webinterface_admin_client_unique_id_list']) as $auuid) {
|
||||
if ($_SESSION[$rspathhex.'tsuid'] == $auuid) {
|
||||
$_SESSION[$rspathhex.'admin'] = TRUE;
|
||||
}
|
||||
@@ -82,7 +90,7 @@ function set_session_ts3($voiceport, $mysqlcon, $dbname, $language, $adminuuid)
|
||||
$_SESSION[$rspathhex.'tsavatar'] = "none";
|
||||
}
|
||||
$_SESSION[$rspathhex.'connected'] = 1;
|
||||
$_SESSION[$rspathhex.'language'] = $language;
|
||||
$_SESSION[$rspathhex.'language'] = $cfg['default_language'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if($addons_config['assign_groups_active']['value'] != '1') {
|
||||
echo "addon is disabled";
|
||||
@@ -24,7 +24,7 @@ if($addons_config['assign_groups_active']['value'] != '1') {
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
|
||||
@@ -15,34 +15,36 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if($language == "ar") {
|
||||
if($cfg['default_language'] == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "cz") {
|
||||
} elseif($cfg['default_language'] == "cz") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
} elseif($cfg['default_language'] == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
} elseif($cfg['default_language'] == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
} elseif($cfg['default_language'] == "es") {
|
||||
require_once('../languages/nations_es.php');
|
||||
} elseif($cfg['default_language'] == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
} elseif($cfg['default_language'] == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
} elseif($cfg['default_language'] == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "pl") {
|
||||
} elseif($cfg['default_language'] == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
} elseif($language == "ro") {
|
||||
} elseif($cfg['default_language'] == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
} elseif($cfg['default_language'] == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
} elseif($cfg['default_language'] == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
function human_readable_size($bytes,$lang) {
|
||||
@@ -371,7 +373,7 @@ require_once('nav.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0031']; ?></td>
|
||||
<td><?PHP $serveruptime = new DateTime("@".$sql_res['server_uptime']); if ($sql_res['server_status'] == 0) { echo '- (<i>'.$lang['stix0032'].' '.(new DateTime("@0"))->diff($serveruptime)->format($timeformat).')</i>'; } else { echo $lang['stix0033']; } ?></td>
|
||||
<td><?PHP $serveruptime = new DateTime("@".$sql_res['server_uptime']); if ($sql_res['server_status'] == 0) { echo '- (<i>'.$lang['stix0032'].' '.(new DateTime("@0"))->diff($serveruptime)->format($cfg['default_date_format']).')</i>'; } else { echo $lang['stix0033']; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0034']; ?></td>
|
||||
@@ -396,23 +398,23 @@ require_once('nav.php');
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0037']; ?></td>
|
||||
<td><a href="ts3server://<?PHP
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
echo $cfg['teamspeak_host_address'];
|
||||
}
|
||||
echo ':'.$ts['voice']; ?>">
|
||||
echo ':'.$cfg['teamspeak_voice_port']; ?>">
|
||||
<?PHP
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
echo $cfg['teamspeak_host_address'];
|
||||
}
|
||||
echo ':'.$ts['voice']; ?></a></td>
|
||||
echo ':'.$cfg['teamspeak_voice_port']; ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0038']; ?></td>
|
||||
@@ -436,7 +438,7 @@ require_once('nav.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0045']; ?></td>
|
||||
<td><?PHP if ($sql_res['server_weblist'] == 1) { echo '<a href="https://www.planetteamspeak.com/serverlist/result/server/ip/'; if($ts['host']=='localhost' || $ts['host']=='127.0.0.1') { echo $_SERVER['HTTP_HOST'];} else { echo $ts['host']; } echo ':'.$ts['voice'] .'" target="_blank" rel="noopener noreferrer">'.$lang['stix0046'].'</a>'; } else { echo $lang['stix0047']; } ?></td>
|
||||
<td><?PHP if ($sql_res['server_weblist'] == 1) { echo $lang['stix0046']; } else { echo $lang['stix0047']; } ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -17,10 +17,10 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
@@ -94,6 +94,7 @@ require_once('nav.php');
|
||||
<p><?PHP echo $lang['stri0020']; ?></p>
|
||||
<p><?PHP echo $lang['stri0024']; ?></p>
|
||||
<p><?PHP echo $lang['stri0025']; ?></p>
|
||||
<p><?PHP echo $lang['stri0026']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
@@ -36,15 +36,14 @@ function getclientip() {
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(isset($_POST['username'])) {
|
||||
$_GET["search"] = $_POST['usersuche'];
|
||||
$_GET["seite"] = 1;
|
||||
}
|
||||
$filter='';
|
||||
$searchstring='';
|
||||
$filter = $searchstring = NULL;
|
||||
if(isset($_GET["search"]) && $_GET["search"] != '') {
|
||||
$getstring = htmlspecialchars($_GET['search']);
|
||||
}
|
||||
@@ -64,7 +63,7 @@ if(isset($getstring) && strstr($getstring, 'filter:excepted:')) {
|
||||
} else {
|
||||
$searchstring = '';
|
||||
}
|
||||
if($showexcld == 0) {
|
||||
if($cfg['stats_show_excepted_clients_switch'] == 0) {
|
||||
$filter .= " AND `except` IN ('0','1')";
|
||||
}
|
||||
}
|
||||
@@ -145,7 +144,7 @@ if(isset($_GET['order']) && $_GET['order'] == 'desc') {
|
||||
}
|
||||
|
||||
if(isset($_GET['admin'])) {
|
||||
if($_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass && $_SESSION[$rspathhex.'clientip'] == getclientip()) {
|
||||
if($_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass'] && $_SESSION[$rspathhex.'clientip'] == getclientip()) {
|
||||
$adminlogin = 1;
|
||||
}
|
||||
}
|
||||
@@ -247,6 +246,7 @@ if($adminlogin == 1) {
|
||||
case "desc":
|
||||
$keyorder2 = "asc&admin=true";
|
||||
}
|
||||
$keyorder .= "&admin=true";
|
||||
} else {
|
||||
switch ($keyorder) {
|
||||
case "asc":
|
||||
@@ -261,7 +261,7 @@ if($adminlogin == 1) {
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<?PHP
|
||||
if($user_pro_seite == "all" || $shownav == 0) {
|
||||
if($user_pro_seite == "all" || $cfg['stats_show_site_navigation_switch'] == 0) {
|
||||
} else {
|
||||
pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring);
|
||||
}
|
||||
@@ -270,48 +270,48 @@ if($adminlogin == 1) {
|
||||
<thead data-spy="affix" data-offset-top="100">
|
||||
<tr>
|
||||
<?PHP
|
||||
if ($showcolrg == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_rank_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=rank&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listrank'] , '</span></a></th>';
|
||||
if ($showcolcld == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_client_name_switch'] == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'name') ? '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>';
|
||||
if ($showcoluuid == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_unique_id_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=uuid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listuid'] , '</span></a></th>';
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_client_db_id_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=cldbid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listcldbid'] , '</span></a></th>';
|
||||
if ($showcolls == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_last_seen_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=lastseen&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listseen'] , '</span></a></th>';
|
||||
if ($showcolot == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_online_time_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=count&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumo'] , '</span></a></th>';
|
||||
if ($showcolit == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_idle_time_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=idle&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumi'] , '</span></a></th>';
|
||||
if ($showcolat == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_active_time_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=active&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsuma'] , '</span></a></th>';
|
||||
if ($showcolas == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_current_server_group_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listacsg'] , '</span></a></th>';
|
||||
if ($showgrpsince == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_current_group_since_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpsince&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listgrps'] , '</span></a></th>';
|
||||
if ($showcolnx == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_next_rankup_switch'] == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'nextup') ? '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>';
|
||||
if (($showcolsg == 1 || $adminlogin == 1) && $substridle == 1) {
|
||||
if (($cfg['stats_column_next_server_group_switch'] == 1 || $adminlogin == 1) && $cfg['rankup_time_assess_mode'] == 1) {
|
||||
echo '<th class="text-center"><a href="?sort=active&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listnxsg'] , '</span></a></th>';
|
||||
} elseif (($showcolsg == 1 || $adminlogin == 1) && $substridle != 1) {
|
||||
} elseif (($cfg['stats_column_next_server_group_switch'] == 1 || $adminlogin == 1) && $cfg['rankup_time_assess_mode'] != 1) {
|
||||
echo '<th class="text-center"><a href="?sort=count&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listnxsg'] , '</span></a></th>';
|
||||
}
|
||||
echo '</tr></thead><tbody>';
|
||||
ksort($grouptime);
|
||||
ksort($cfg['rankup_definition']);
|
||||
if (count($sqlhis) > 0) {
|
||||
foreach ($sqlhis as $uuid => $value) {
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$activetime = $value['count'] - $value['idle'];
|
||||
} else {
|
||||
$activetime = $value['count'];
|
||||
}
|
||||
$grpcount=0;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
$grpcount++;
|
||||
if ($activetime < $time || $grpcount == count($grouptime) && $value['nextup'] <= 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
if ($activetime < $time || $grpcount == count($cfg['rankup_definition']) && $value['nextup'] <= 0 && $cfg['stats_show_clients_in_highest_rank_switch'] == 1 || $grpcount == count($cfg['rankup_definition']) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<tr>';
|
||||
if ($showcolrg == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_rank_switch'] == 1 || $adminlogin == 1) {
|
||||
if($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
@@ -320,42 +320,42 @@ if($adminlogin == 1) {
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//tsviewer.com/index.php?page=search&action=ausgabe_user&nickname=' , htmlspecialchars($value['name']) , '" target="_blank">' , htmlspecialchars($value['name']) , '</a></td>';
|
||||
} elseif ($showcolcld == 1) {
|
||||
} elseif ($cfg['stats_column_client_name_switch'] == 1) {
|
||||
echo '<td class="text-center">' , htmlspecialchars($value['name']) , '</td>';
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//ts3index.com/?page=searchclient&uid=' , $uuid , '" target="_blank">' , $uuid , '</a></td>';
|
||||
} elseif ($showcoluuid == 1) {
|
||||
} elseif ($cfg['stats_column_unique_id_switch'] == 1) {
|
||||
echo '<td class="text-center">' , $uuid , '</td>';
|
||||
}
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_client_db_id_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<td class="text-center">' , $value['cldbid'] , '</td>';
|
||||
if ($showcolls == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_last_seen_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($value['online'] == 1) {
|
||||
echo '<td class="text-center text-success">online</td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['lastseen']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolot == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_online_time_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['count']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
}
|
||||
if ($showcolit == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_idle_time_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['idle']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
}
|
||||
if ($showcolat == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_active_time_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".($value['count']-$value['idle']));
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
}
|
||||
if ($showcolas == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_current_server_group_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($value['grpid'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} elseif ($sqlhisgroup[$value['grpid']]['iconfile'] == 1) {
|
||||
@@ -364,19 +364,19 @@ if($adminlogin == 1) {
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$value['grpid']]['sgidname'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($showgrpsince == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_current_group_since_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($value['grpsince'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['grpsince']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolnx == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_next_rankup_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
if (($value['except'] == 0 || $value['except'] == 1) && $value['nextup'] > 0) {
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['nextup']);
|
||||
echo $dtF->diff($dtT)->format($timeformat) , '</td>';
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']) , '</td>';
|
||||
} elseif ($value['except'] == 0 || $value['except'] == 1) {
|
||||
echo '0</td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
@@ -385,8 +385,8 @@ if($adminlogin == 1) {
|
||||
echo $lang['errukwn'], '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolsg == 1 || $adminlogin == 1) {
|
||||
if ($grpcount == count($grouptime) && $value['nextup'] == 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
if ($cfg['stats_column_next_server_group_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($grpcount == count($cfg['rankup_definition']) && $value['nextup'] == 0 && $cfg['stats_show_clients_in_highest_rank_switch'] == 1 || $grpcount == count($cfg['rankup_definition']) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<td class="text-center"><em>',$lang['highest'],'</em></td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"><em>',$lang['listexcept'],'</em></td>';
|
||||
|
||||
@@ -16,10 +16,10 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(count($_SESSION[$rspathhex.'multiple']) > 1 && !isset($_SESSION[$rspathhex.'uuid_verified'])) {
|
||||
@@ -31,17 +31,17 @@ if(count($_SESSION[$rspathhex.'multiple']) > 1 && !isset($_SESSION[$rspathhex.'u
|
||||
$count_hours = round($dbdata_fetched['count']/3600);
|
||||
$idle_hours = round($dbdata_fetched['idle']/3600);
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$activetime = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
} else {
|
||||
$activetime = $dbdata_fetched['count'];
|
||||
}
|
||||
$active_count = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
|
||||
krsort($grouptime);
|
||||
krsort($cfg['rankup_definition']);
|
||||
$nextgrp = '';
|
||||
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
$actualgrp = $time;
|
||||
if ($activetime > $time) {
|
||||
break;
|
||||
@@ -63,16 +63,16 @@ if(count($_SESSION[$rspathhex.'multiple']) > 1 && !isset($_SESSION[$rspathhex.'u
|
||||
$stats_user = $mysqlcon->query("SELECT `count_week`,`active_week`,`count_month`,`active_month` FROM `$dbname`.`stats_user` WHERE `uuid`='".$_SESSION[$rspathhex.'tsuid']."'")->fetch();
|
||||
|
||||
if (isset($stats_user['count_week'])) $count_week = $stats_user['count_week']; else $count_week = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
if (isset($stats_user['active_week'])) $active_week = $stats_user['active_week']; else $active_week = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_week"); $active_week = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_week"); $active_week = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
if (isset($stats_user['count_month'])) $count_month = $stats_user['count_month']; else $count_month = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_month"); $count_month = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_month"); $count_month = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
if (isset($stats_user['active_month'])) $active_month = $stats_user['active_month']; else $active_month = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_month"); $active_month = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_month"); $active_month = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
if (isset($dbdata_fetched['count'])) $count_total = $dbdata_fetched['count']; else $count_total = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_total"); $count_total = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_count"); $active_count = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_total"); $count_total = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_count"); $active_count = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
|
||||
$time_for_bronze = 50;
|
||||
$time_for_silver = 100;
|
||||
|
||||
@@ -15,34 +15,36 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if($language == "ar") {
|
||||
if($cfg['default_language'] == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "cz") {
|
||||
} elseif($cfg['default_language'] == "cz") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
} elseif($cfg['default_language'] == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
} elseif($cfg['default_language'] == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
} elseif($cfg['default_language'] == "es") {
|
||||
require_once('../languages/nations_es.php');
|
||||
} elseif($cfg['default_language'] == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
} elseif($cfg['default_language'] == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
} elseif($cfg['default_language'] == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "pl") {
|
||||
} elseif($cfg['default_language'] == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
} elseif($cfg['default_language'] == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
} elseif($cfg['default_language'] == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($cfg['default_language'] == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_nations` ORDER BY `count` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
@@ -8,15 +8,15 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?PHP echo $language; ?>">
|
||||
<html lang="<?PHP echo $cfg['default_language']; ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="version" content="<?PHP echo $currvers; ?>">
|
||||
<meta name="version" content="<?PHP echo $cfg['version_current_using']; ?>">
|
||||
<link rel="icon" href="../tsicons/rs.png">
|
||||
<title>TS-N.NET Ranksystem</title>
|
||||
<link href="../libs/combined_st.css?v=<?PHP echo $currvers; ?>" rel="stylesheet">
|
||||
<link href="../libs/combined_st.css?v=<?PHP echo $cfg['version_current_using']; ?>" rel="stylesheet">
|
||||
<?PHP
|
||||
$sitescript = basename($_SERVER['SCRIPT_NAME']);
|
||||
switch($sitescript) {
|
||||
@@ -44,7 +44,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
default:
|
||||
?><script src="../libs/qb.js"></script><?PHP
|
||||
}
|
||||
if(isset($shownav) && $shownav == 0) { ?>
|
||||
if(isset($cfg['stats_show_site_navigation_switch']) && $cfg['stats_show_site_navigation_switch'] == 0) { ?>
|
||||
<style>
|
||||
body{margin-top:0px!important}
|
||||
.affix{top:0px!important;width:calc(100% - 50px)!important;position:fixed;color:#000;background-color:#fff!important;}
|
||||
@@ -60,7 +60,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0001']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $servernews; ?></p>
|
||||
<p><?PHP echo $cfg['stats_server_news']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
@@ -162,7 +162,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
if($shownav == 1) {
|
||||
if($cfg['stats_show_site_navigation_switch'] == 1) {
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
@@ -184,12 +184,12 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=50&lang=$language&search=$getstring"; ?>">50</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=100&lang=$language&search=$getstring"; ?>">100</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=250&lang=$language&search=$getstring"; ?>">250</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=500&lang=$language&search=$getstring"; ?>">500</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=50&lang={$cfg['default_language']}&search=$getstring"; ?>">50</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=100&lang={$cfg['default_language']}&search=$getstring"; ?>">100</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=250&lang={$cfg['default_language']}&search=$getstring"; ?>">250</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=500&lang={$cfg['default_language']}&search=$getstring"; ?>">500</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=all&lang=$language&search=$getstring"; ?>"><?PHP echo $lang['stnv0026']; ?></a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=all&lang={$cfg['default_language']}&search=$getstring"; ?>"><?PHP echo $lang['stnv0026']; ?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-form navbar-right">
|
||||
@@ -224,14 +224,14 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
}
|
||||
} elseif ($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
echo '<li><a href="ts3server://';
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
echo $cfg['teamspeak_host_address'];
|
||||
}
|
||||
echo ':'.$ts['voice'];
|
||||
echo ':'.$cfg['teamspeak_voice_port'];
|
||||
echo '"><i class="fa fa-fw fa-headphones"></i> '.$lang['stnv0043'].'</a></li>';
|
||||
}
|
||||
?>
|
||||
@@ -267,6 +267,9 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<li>
|
||||
<a href="?lang=en"><span class="flag-icon flag-icon-gb"></span> EN - english</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=es"><span class="flag-icon flag-icon-es"></span> ES - español</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=fr"><span class="flag-icon flag-icon-fr"></span> FR - français</a>
|
||||
</li>
|
||||
|
||||
@@ -15,27 +15,12 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_platforms` ORDER BY `count` DESC")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
|
||||
@@ -16,13 +16,13 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `uuid`,`name`,`count`,`idle`,`cldgroup`,`online` FROM `$dbname`.`user` ORDER BY (`count` - `idle`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
@@ -37,9 +37,9 @@ $top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if (!isset($cfg['rankup_excepted_unique_client_id_list'][$uuid]) && !array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$hours = $client['count'] - $client['idle'];
|
||||
} else {
|
||||
$hours = $client['count'];
|
||||
|
||||
@@ -16,13 +16,13 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_month`,`s`.`idle_month`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY (`s`.`count_month` - `s`.`idle_month`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
@@ -39,9 +39,9 @@ $top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if (!isset($cfg['rankup_excepted_unique_client_id_list'][$uuid]) && !array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$hours = $client['count_month'] - $client['idle_month'];
|
||||
} else {
|
||||
$hours = $client['count_month'];
|
||||
|
||||
@@ -16,13 +16,13 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_week`,`s`.`idle_week`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY (`s`.`count_week` - `s`.`idle_week`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
@@ -39,9 +39,9 @@ $top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if (!isset($cfg['rankup_excepted_unique_client_id_list'][$uuid]) && !array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$hours = $client['count_week'] - $client['idle_week'];
|
||||
} else {
|
||||
$hours = $client['count_week'];
|
||||
|
||||
@@ -17,10 +17,10 @@ require_once('../other/phpcommand.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
@@ -30,14 +30,14 @@ if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
$err_msg = $lang['stve0004']; $err_lvl = 3;
|
||||
} elseif($_REQUEST['token'] == $_SESSION[$rspathhex.'token']) {
|
||||
$err_msg = $lang['stve0005']; $err_lvl = NULL;
|
||||
$_SESSION[$rspathhex.'serverport'] = $ts['voice'];
|
||||
$_SESSION[$rspathhex.'serverport'] = $cfg['teamspeak_voice_port'];
|
||||
$_SESSION[$rspathhex.'uuid_verified'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'tsuid'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'multiple'] = array();
|
||||
$_SESSION[$rspathhex.'connected'] = 1;
|
||||
$_SESSION[$rspathhex.'tscldbid'] = $_SESSION[$rspathhex.'temp_cldbid'];
|
||||
$_SESSION[$rspathhex.'tsname'] = $_SESSION[$rspathhex.'temp_name'];
|
||||
foreach ($adminuuid as $auuid) {
|
||||
foreach ($cfg['webinterface_admin_client_unique_id_list'] as $auuid) {
|
||||
if ($_SESSION[$rspathhex.'uuid_verified'] == $auuid) {
|
||||
$_SESSION[$rspathhex.'admin'] = TRUE;
|
||||
}
|
||||
@@ -68,18 +68,18 @@ if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tsavatar'] = "none";
|
||||
}
|
||||
$_SESSION[$rspathhex.'language'] = $language;
|
||||
$_SESSION[$rspathhex.'language'] = $cfg['default_language'];
|
||||
} else {
|
||||
$err_msg = $lang['stve0006']; $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
if((!isset($_SESSION[$rspathhex.'multiple']) || count($_SESSION[$rspathhex.'multiple']) == 0) && ($registercid == NULL || $registercid == 0)) {
|
||||
if((!isset($_SESSION[$rspathhex.'multiple']) || count($_SESSION[$rspathhex.'multiple']) == 0) && ($cfg['teamspeak_verification_channel_id'] == NULL || $cfg['teamspeak_verification_channel_id'] == 0)) {
|
||||
$err_msg = $lang['verify0001']."<br><br>".$lang['verify0003'];
|
||||
$err_lvl = 3;
|
||||
} elseif($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0) {
|
||||
} elseif($_SESSION[$rspathhex.'connected'] == 0 && $cfg['teamspeak_verification_channel_id'] != NULL && $cfg['teamspeak_verification_channel_id'] != 0) {
|
||||
$err_msg = $lang['verify0001']; $err_lvl = 1;
|
||||
$uuids = $mysqlcon->query("SELECT `name`,`uuid` FROM `$dbname`.`user` WHERE `online`='1' AND `cid`='$registercid' ORDER BY `name` ASC")->fetchAll();
|
||||
$uuids = $mysqlcon->query("SELECT `name`,`uuid` FROM `$dbname`.`user` WHERE `online`='1' AND `cid`='{$cfg['teamspeak_verification_channel_id']}' ORDER BY `name` ASC")->fetchAll();
|
||||
foreach($uuids as $entry) {
|
||||
$_SESSION[$rspathhex.'multiple'][$entry['uuid']] = $entry['name'];
|
||||
}
|
||||
@@ -90,21 +90,21 @@ if((!isset($_SESSION[$rspathhex.'multiple']) || count($_SESSION[$rspathhex.'mult
|
||||
if(isset($_POST['uuid']) && !isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
require_once('../libs/ts3_lib/TeamSpeak3.php');
|
||||
try {
|
||||
if($ts['tsencrypt'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&ssh=1");
|
||||
if($cfg['teamspeak_query_encrypt_switch'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?server_port=".$cfg['teamspeak_voice_port']."&ssh=1");
|
||||
} else {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?server_port=".$cfg['teamspeak_voice_port']."&blocking=0");
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->selfUpdate(array('client_nickname' => "Ranksystem - Verification"));
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$allclients = $ts3->clientList();
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
@@ -138,7 +138,7 @@ require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl);
|
||||
if(count($_SESSION[$rspathhex.'multiple']) > 1 || ($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0)) {
|
||||
if(count($_SESSION[$rspathhex.'multiple']) > 1 || ($_SESSION[$rspathhex.'connected'] == 0 && $cfg['teamspeak_verification_channel_id'] != NULL && $cfg['teamspeak_verification_channel_id'] != 0)) {
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div id="login-overlay" class="modal-dialog">
|
||||
@@ -153,14 +153,14 @@ require_once('nav.php');
|
||||
<?PHP
|
||||
if($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$ts3link = '<a href="ts3server://';
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
$ts3link .= preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
$ts3link .= $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
$ts3link .= $ts['host'];
|
||||
$ts3link .= $cfg['teamspeak_host_address'];
|
||||
}
|
||||
$ts3link .= ':'.$ts['voice'].'?cid='.$registercid.'">';
|
||||
$ts3link .= ':'.$cfg['teamspeak_voice_port'].'?cid='.$cfg['teamspeak_verification_channel_id'].'">';
|
||||
echo '<p>1. ',sprintf($lang['verify0002'], $ts3link, '</a>'),'</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -15,27 +15,12 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_versions` ORDER BY `count` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
|
||||
@@ -15,7 +15,7 @@ session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
@@ -41,7 +41,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -32,10 +32,10 @@ function getclientip() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function getlog($logpath,$number_lines,$filters,$filter2,$inactivefilter = NULL) {
|
||||
function getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter = NULL) {
|
||||
$lines=array();
|
||||
if(file_exists($logpath."ranksystem.log")) {
|
||||
$fp = fopen($logpath."ranksystem.log", "r");
|
||||
if(file_exists($cfg['logs_path']."ranksystem.log")) {
|
||||
$fp = fopen($cfg['logs_path']."ranksystem.log", "r");
|
||||
$buffer=array();
|
||||
while($line = fgets($fp, 4096)) {
|
||||
array_push($buffer, $line);
|
||||
@@ -168,7 +168,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
rem_session_ts3($rspathhex);
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
@@ -193,10 +193,10 @@ if ((isset($_POST['start']) || isset($_POST['stop']) || isset($_POST['restart'])
|
||||
exit;
|
||||
}
|
||||
|
||||
$logoutput = getlog($logpath,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
$logoutput = getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
|
||||
if (isset($_POST['start']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if(substr(sprintf('%o', fileperms($logpath)), -3, 1)!='7') {
|
||||
if(substr(sprintf('%o', fileperms($cfg['logs_path'])), -3, 1)!='7') {
|
||||
$err_msg = "!!!! Logs folder is not writable !!!!<br>Cancel start request!"; $err_lvl = 3;
|
||||
} else {
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
@@ -214,7 +214,7 @@ if (isset($_POST['start']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$err_msg = $lang['wibot2'];
|
||||
$err_lvl = 1;
|
||||
usleep(80000);
|
||||
$logoutput = getlog($logpath,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
$logoutput = getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,11 +230,11 @@ if (isset($_POST['stop']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$err_msg = $lang['wibot1'];
|
||||
$err_lvl = 1;
|
||||
usleep(80000);
|
||||
$logoutput = getlog($logpath,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
$logoutput = getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
}
|
||||
|
||||
if (isset($_POST['restart']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if(substr(sprintf('%o', fileperms($logpath)), -3, 1)!='7') {
|
||||
if(substr(sprintf('%o', fileperms($cfg['logs_path'])), -3, 1)!='7') {
|
||||
$err_msg = "!!!! Logs folder is not writable !!!!<br>Cancel restart request!"; $err_lvl = 3;
|
||||
} else {
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
@@ -252,12 +252,12 @@ if (isset($_POST['restart']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$err_msg = $lang['wibot3'];
|
||||
$err_lvl = 1;
|
||||
usleep(80000);
|
||||
$logoutput = getlog($logpath,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
$logoutput = getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter);
|
||||
}
|
||||
}
|
||||
|
||||
$disabled = '';
|
||||
if($ts['host'] == NULL || $ts['query'] == NULL || $ts['voice'] == NULL || $ts['user'] == NULL || $ts['pass'] == NULL || $queryname == NULL || $grouptime == NULL || $logpath == NULL) {
|
||||
if($cfg['teamspeak_host_address'] == NULL || $cfg['teamspeak_query_port'] == NULL || $cfg['teamspeak_voice_port'] == NULL || $cfg['teamspeak_query_user'] == NULL || $cfg['teamspeak_query_pass'] == NULL || $cfg['teamspeak_query_nickname'] == NULL || $cfg['rankup_definition'] == NULL || $cfg['logs_path'] == NULL) {
|
||||
$disabled = 1;
|
||||
$err_msg = $lang['wibot9'];
|
||||
$err_lvl = 2;
|
||||
|
||||
@@ -15,8 +15,8 @@ session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/phpcommand.php');
|
||||
|
||||
function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
|
||||
$file = $logpath.'ranksystem.log';
|
||||
function enter_logfile($cfg,$loglevel,$logtext,$norotate = false) {
|
||||
$file = $cfg['logs_path'].'ranksystem.log';
|
||||
if ($loglevel == 1) {
|
||||
$loglevel = " CRITICAL ";
|
||||
} elseif ($loglevel == 2) {
|
||||
@@ -27,27 +27,22 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
|
||||
$loglevel = " NOTICE ";
|
||||
} elseif ($loglevel == 5) {
|
||||
$loglevel = " INFO ";
|
||||
} elseif ($loglevel == 6) {
|
||||
$loglevel = " DEBUG ";
|
||||
}
|
||||
$input = DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n";
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, $input);
|
||||
if (filesize($file) > 5242880) {
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Restart Bot to continue with new log file...\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n");
|
||||
fclose($loghandle);
|
||||
if($norotate == false && filesize($file) > 5242880) {
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fclose($loghandle);
|
||||
$file2 = "$file.old";
|
||||
if (file_exists($file2)) unlink($file2);
|
||||
rename($file, $file2);
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
exec("del /F ".substr(__DIR__,0,-12).'logs/pid');
|
||||
$WshShell = new COM("WScript.Shell");
|
||||
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."worker.php start", 0, false);
|
||||
exit;
|
||||
} else {
|
||||
exec("rm -f ".substr(__DIR__,0,-12).'logs/pid');
|
||||
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php start");
|
||||
exit;
|
||||
}
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
fclose($loghandle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +69,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
@@ -93,15 +88,15 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['changepw']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$newpass = password_hash($_POST['newpwd1'], PASSWORD_DEFAULT);
|
||||
if (!password_verify($_POST['oldpwd'], $webpass)) {
|
||||
$cfg['webinterface_pass'] = password_hash($_POST['newpwd1'], PASSWORD_DEFAULT);
|
||||
if (!password_verify($_POST['oldpwd'], $cfg['webinterface_pass'])) {
|
||||
$err_msg = $lang['wichpw1']; $err_lvl = 3;
|
||||
} elseif ($_POST['newpwd1'] != $_POST['newpwd2'] || $_POST['newpwd1'] == NULL) {
|
||||
$err_msg = $lang['wichpw2']; $err_lvl = 3;
|
||||
} elseif ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `webpass`='$newpass'") === false) {
|
||||
} elseif($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_pass','{$cfg['webinterface_pass']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,3,sprintf($lang['wichpw3'],getclientip()));
|
||||
enter_logfile($cfg,3,sprintf($lang['wichpw3'],getclientip()));
|
||||
$err_msg = $lang['wisvsuc']; $err_lvl = NULL;
|
||||
}
|
||||
} elseif(isset($_POST['changepw'])) {
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
@@ -56,24 +56,24 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
|
||||
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
|
||||
enter_logfile($logpath,$timezone,1,"Select on DB failed for group check: ".print_r($mysqlcon->errorInfo(), true));
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if(empty($_POST['boost'])) {
|
||||
$boostarr = null;
|
||||
if(empty($_POST['rankup_boost_definition'])) {
|
||||
$cfg['rankup_boost_definition'] = NULL;
|
||||
} else {
|
||||
$boostarr = null;
|
||||
foreach (explode(',', $_POST['boost']) as $entry) {
|
||||
foreach (explode(',', $_POST['rankup_boost_definition']) as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$boostarr[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
if(empty($_POST['grouptime'])) {
|
||||
if(empty($_POST['rankup_definition'])) {
|
||||
$grouparr = null;
|
||||
} else {
|
||||
foreach (explode(',', $_POST['grouptime']) as $entry) {
|
||||
foreach (explode(',', $_POST['rankup_definition']) as $entry) {
|
||||
list($time, $groupid) = explode('=>', $entry);
|
||||
$grouparr[$groupid] = $time;
|
||||
}
|
||||
@@ -89,14 +89,14 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
foreach($boostarr as $groupid => $value) {
|
||||
foreach($cfg['rankup_boost_definition'] as $groupid => $value) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
$err_msg .= sprintf($lang['upgrp0001'], $groupid, $lang['wiboost']).'<br>';
|
||||
$err_lvl = 3;
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
foreach(array_flip(explode(',', $_POST['exceptgroup'])) as $groupid => $value) {
|
||||
foreach(array_flip(explode(',', $_POST['rankup_excepted_group_id_list'])) as $groupid => $value) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
$err_msg .= sprintf($lang['upgrp0001'], $groupid, $lang['wiexgrp']).'<br>';
|
||||
$err_lvl = 3;
|
||||
@@ -106,25 +106,25 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
}
|
||||
unset($groupslist);
|
||||
|
||||
$cfg['rankup_time_assess_mode'] = $_POST['rankup_time_assess_mode'];
|
||||
$cfg['rankup_excepted_mode'] = $_POST['rankup_excepted_mode'];
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = $_POST['rankup_excepted_unique_client_id_list'];
|
||||
$cfg['rankup_excepted_group_id_list'] = $_POST['rankup_excepted_group_id_list'];
|
||||
$cfg['rankup_excepted_channel_id_list'] = $_POST['rankup_excepted_channel_id_list'];
|
||||
$cfg['rankup_definition'] = $_POST['rankup_definition'];
|
||||
$cfg['rankup_boost_definition'] = $_POST['rankup_boost_definition'];
|
||||
$cfg['rankup_ignore_idle_time'] = $_POST['rankup_ignore_idle_time'];
|
||||
|
||||
$substridle = $_POST['substridle'];
|
||||
$exceptuuid = $_POST['exceptuuid'];
|
||||
$exceptgroup = $_POST['exceptgroup'];
|
||||
$exceptcid = $_POST['exceptcid'];
|
||||
$grouptime = $_POST['grouptime'];
|
||||
$ignoreidle = $_POST['ignoreidle'];
|
||||
$resetexcept = $_POST['resetexcept'];
|
||||
if (isset($_POST['resetbydbchange'])) $resetbydbchange = 1; else $resetbydbchange = 0;
|
||||
if (isset($_POST['cleanclients'])) $cleanclients = 1; else $cleanclients = 0;
|
||||
$cleanperiod = $_POST['cleanperiod'];
|
||||
$boost = $_POST['boost'];
|
||||
if($_POST['registercid'] == NULL) {
|
||||
$registercid = 0;
|
||||
if (isset($_POST['rankup_client_database_id_change_switch'])) $cfg['rankup_client_database_id_change_switch'] = 1; else $cfg['rankup_client_database_id_change_switch'] = 0;
|
||||
if (isset($_POST['rankup_clean_clients_switch'])) $cfg['rankup_clean_clients_switch'] = 1; else $cfg['rankup_clean_clients_switch'] = 0;
|
||||
$cfg['rankup_clean_clients_period'] = $_POST['rankup_clean_clients_period'];
|
||||
if($_POST['teamspeak_verification_channel_id'] == NULL) {
|
||||
$cfg['teamspeak_verification_channel_id'] = 0;
|
||||
} else {
|
||||
$registercid = $_POST['registercid'];
|
||||
$cfg['teamspeak_verification_channel_id'] = $_POST['teamspeak_verification_channel_id'];
|
||||
}
|
||||
if($errcnf == 0) {
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `substridle`='$substridle',`exceptuuid`='$exceptuuid',`exceptgroup`='$exceptgroup',`exceptcid`='$exceptcid',`grouptime`='$grouptime',`ignoreidle`='$ignoreidle',`resetbydbchange`='$resetbydbchange',`cleanclients`='$cleanclients',`cleanperiod`='$cleanperiod',`boost`='$boost',`resetexcept`='$resetexcept',`registercid`='$registercid'") === false) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_time_assess_mode','{$cfg['rankup_time_assess_mode']}'),('rankup_excepted_mode','{$cfg['rankup_excepted_mode']}'),('rankup_excepted_unique_client_id_list','{$cfg['rankup_excepted_unique_client_id_list']}'),('rankup_excepted_group_id_list','{$cfg['rankup_excepted_group_id_list']}'),('rankup_excepted_channel_id_list','{$cfg['rankup_excepted_channel_id_list']}'),('rankup_definition','{$cfg['rankup_definition']}'),('rankup_ignore_idle_time','{$cfg['rankup_ignore_idle_time']}'),('rankup_client_database_id_change_switch','{$cfg['rankup_client_database_id_change_switch']}'),('rankup_clean_clients_switch','{$cfg['rankup_clean_clients_switch']}'),('rankup_clean_clients_period','{$cfg['rankup_clean_clients_period']}'),('teamspeak_verification_channel_id','{$cfg['teamspeak_verification_channel_id']}'),('rankup_boost_definition','{$cfg['rankup_boost_definition']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -135,11 +135,28 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
} else {
|
||||
$err_msg .= "<br>".$lang['errgrpid'];
|
||||
}
|
||||
$config['grouptime'] = $_POST['grouptime'];
|
||||
$config['exceptuuid'] = $_POST['exceptuuid'];
|
||||
$config['exceptgroup'] = $_POST['exceptgroup'];
|
||||
$config['exceptcid'] = $_POST['exceptcid'];
|
||||
$config['boost'] = $_POST['boost'];
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_unique_client_id_list']));
|
||||
$cfg['rankup_excepted_group_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_group_id_list']));
|
||||
$cfg['rankup_excepted_channel_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_channel_id_list']));
|
||||
if(empty($_POST['rankup_definition'])) {
|
||||
$cfg['rankup_definition'] = NULL;
|
||||
} else {
|
||||
$grouptimearr = explode(',', $_POST['rankup_definition']);
|
||||
foreach ($grouptimearr as $entry) {
|
||||
list($key, $value) = explode('=>', $entry);
|
||||
$addnewvalue1[$key] = $value;
|
||||
$cfg['rankup_definition'] = $addnewvalue1;
|
||||
}
|
||||
}
|
||||
if(empty($_POST['rankup_boost_definition'])) {
|
||||
$cfg['rankup_boost_definition'] = NULL;
|
||||
} else {
|
||||
foreach (explode(',', $_POST['rankup_boost_definition']) as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
} elseif(isset($_POST['update'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
@@ -161,10 +178,10 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wisupidledesc"><?php echo $lang['wisupidle']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="substridle">
|
||||
<select class="selectpicker show-tick form-control basic" name="rankup_time_assess_mode">
|
||||
<?PHP
|
||||
echo '<option value="0"'; if($substridle=="0") echo " selected=selected"; echo '>',$lang['wishcolot'],'</option>';
|
||||
echo '<option value="1"'; if($substridle=="1") echo " selected=selected"; echo '>',$lang['wishcolat'],'</option>';
|
||||
echo '<option value="0"'; if($cfg['rankup_time_assess_mode']=="0") echo " selected=selected"; echo '>',$lang['wishcolot'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_time_assess_mode']=="1") echo " selected=selected"; echo '>',$lang['wishcolat'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -174,11 +191,11 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexresdesc"><?php echo $lang['wiexres']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="resetexcept">
|
||||
<select class="selectpicker show-tick form-control basic" name="rankup_excepted_mode">
|
||||
<?PHP
|
||||
echo '<option value="0"'; if($resetexcept=="0") echo " selected=selected"; echo '>',$lang['wiexres1'],'</option>';
|
||||
echo '<option value="1"'; if($resetexcept=="1") echo " selected=selected"; echo '>',$lang['wiexres2'],'</option>';
|
||||
echo '<option value="2"'; if($resetexcept=="2") echo " selected=selected"; echo '>',$lang['wiexres3'],'</option>';
|
||||
echo '<option value="0"'; if($cfg['rankup_excepted_mode']=="0") echo " selected=selected"; echo '>',$lang['wiexres1'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_excepted_mode']=="1") echo " selected=selected"; echo '>',$lang['wiexres2'],'</option>';
|
||||
echo '<option value="2"'; if($cfg['rankup_excepted_mode']=="2") echo " selected=selected"; echo '>',$lang['wiexres3'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -186,21 +203,21 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexuiddesc"><?php echo $lang['wiexuid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([A-Za-z0-9\\\/\+]{27}=,)*([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check all unique IDs are correct and your list do not ends with a comma!" rows="1" name="exceptuuid" maxlength="999"><?php echo $config['exceptuuid']; ?></textarea>
|
||||
<textarea class="form-control" data-pattern="^([A-Za-z0-9\\\/\+]{27}=,)*([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check all unique IDs are correct and your list do not ends with a comma!" rows="1" name="rankup_excepted_unique_client_id_list" maxlength="999"><?php if(!empty($cfg['rankup_excepted_unique_client_id_list'])) echo implode(',',array_flip($cfg['rankup_excepted_unique_client_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexgrpdesc"><?php echo $lang['wiexgrp']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9},)*[0-9]{1,9}$" data-error="Only use digits separated with a comma! Also must the first and last value be digit!" rows="1" name="exceptgroup" maxlength="999"><?php echo $config['exceptgroup']; ?></textarea>
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9},)*[0-9]{1,9}$" data-error="Only use digits separated with a comma! Also must the first and last value be digit!" rows="1" name="rankup_excepted_group_id_list" maxlength="999"><?php if(!empty($cfg['rankup_excepted_group_id_list'])) echo implode(',',array_flip($cfg['rankup_excepted_group_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexciddesc"><?php echo $lang['wiexcid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9},)*[0-9]{1,9}$" data-error="Only use digits separated with a comma! Also must the first and last value be digit!" rows="1" name="exceptcid" maxlength="999"><?php echo $config['exceptcid']; ?></textarea>
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9},)*[0-9]{1,9}$" data-error="Only use digits separated with a comma! Also must the first and last value be digit!" rows="1" name="rankup_excepted_channel_id_list" maxlength="999"><?php if(!empty($cfg['rankup_excepted_channel_id_list'])) echo implode(',',array_flip($cfg['rankup_excepted_channel_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -210,7 +227,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group required-field-block">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wigrptimedesc"><?php echo $lang['wigrptime']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9}=>[0-9]{1,9},)*[0-9]{1,9}=>[0-9]{1,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="grouptime" maxlength="5000" required><?php echo $config['grouptime']; ?></textarea>
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9}=>[0-9]{1,9},)*[0-9]{1,9}=>[0-9]{1,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="rankup_definition" maxlength="5000" required><?php $implode_definition = ''; foreach ($cfg['rankup_definition'] as $time => $sgroup) { $implode_definition .= $time."=>".$sgroup.","; } $implode_definition = substr($implode_definition, 0, -1); echo $implode_definition; ?></textarea>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@@ -220,9 +237,9 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiignidledesc"><?php echo $lang['wiignidle']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="ignoreidle" value="<?php echo $ignoreidle; ?>">
|
||||
<input type="text" class="form-control" name="rankup_ignore_idle_time" value="<?php echo $cfg['rankup_ignore_idle_time']; ?>">
|
||||
<script>
|
||||
$("input[name='ignoreidle']").TouchSpin({
|
||||
$("input[name='rankup_ignore_idle_time']").TouchSpin({
|
||||
min: 0,
|
||||
max: 65535,
|
||||
verticalbuttons: true,
|
||||
@@ -234,10 +251,10 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wichdbiddesc"><?php echo $lang['wichdbid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-lg-8">
|
||||
<?PHP if ($resetbydbchange == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="resetbydbchange" value="',$resetbydbchange,'">';
|
||||
<?PHP if ($cfg['rankup_client_database_id_change_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="rankup_client_database_id_change_switch" value="',$cfg['rankup_client_database_id_change_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="resetbydbchange" value="',$resetbydbchange,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="rankup_client_database_id_change_switch" value="',$cfg['rankup_client_database_id_change_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -247,10 +264,10 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#cleancdesc"><?php echo $lang['cleanc']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cleanclients == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="cleanclients" value="',$cleanclients,'">';
|
||||
<?PHP if ($cfg['rankup_clean_clients_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="rankup_clean_clients_switch" value="',$cfg['rankup_clean_clients_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="cleanclients" value="',$cleanclients,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="rankup_clean_clients_switch" value="',$cfg['rankup_clean_clients_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,9 +275,9 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#cleanpdesc"><?php echo $lang['cleanp']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="cleanperiod" value="<?php echo $cleanperiod; ?>">
|
||||
<input type="text" class="form-control" name="rankup_clean_clients_period" value="<?php echo $cfg['rankup_clean_clients_period']; ?>">
|
||||
<script>
|
||||
$("input[name='cleanperiod']").TouchSpin({
|
||||
$("input[name='rankup_clean_clients_period']").TouchSpin({
|
||||
min: 0,
|
||||
max: 9223372036854775807,
|
||||
verticalbuttons: true,
|
||||
@@ -276,9 +293,9 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiverifydesc"><?php echo $lang['wiverify']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="registercid" value="<?php echo $registercid; ?>">
|
||||
<input type="text" class="form-control" name="teamspeak_verification_channel_id" value="<?php echo $cfg['teamspeak_verification_channel_id']; ?>">
|
||||
<script>
|
||||
$("input[name='registercid']").TouchSpin({
|
||||
$("input[name='teamspeak_verification_channel_id']").TouchSpin({
|
||||
min: 0,
|
||||
max: 16777215,
|
||||
verticalbuttons: true,
|
||||
@@ -292,7 +309,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiboostdesc"><?php echo $lang['wiboost']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([1-9][0-9]{0,9}=>[0-9]{0,9}=>[1-9][0-9]{0,9},)*[1-9][0-9]{0,9}=>[0-9]{0,9}=>[1-9][0-9]{0,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="boost" maxlength="999"><?php echo $config['boost']; ?></textarea>
|
||||
<textarea class="form-control" data-pattern="^([1-9][0-9]{0,9}=>[0-9]{0,9}=>[1-9][0-9]{0,9},)*[1-9][0-9]{0,9}=>[0-9]{0,9}=>[1-9][0-9]{0,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="rankup_boost_definition" maxlength="999"><?php $implode_boost = ''; foreach ($cfg['rankup_boost_definition'] as $r) { $implode_boost .= $r['group']."=>".$r['factor']."=>".$r['time'].","; } $implode_boost = substr($implode_boost, 0, -1); echo $implode_boost; ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/phpcommand.php');
|
||||
|
||||
function enter_logfile($logpath,$timezone,$loglevel,$logtext,$norotate = false) {
|
||||
$file = $logpath.'ranksystem.log';
|
||||
function enter_logfile($cfg,$loglevel,$logtext,$norotate = false) {
|
||||
$file = $cfg['logs_path'].'ranksystem.log';
|
||||
if ($loglevel == 1) {
|
||||
$loglevel = " CRITICAL ";
|
||||
} elseif ($loglevel == 2) {
|
||||
@@ -31,17 +31,17 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext,$norotate = false)
|
||||
$loglevel = " DEBUG ";
|
||||
}
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n");
|
||||
fclose($loghandle);
|
||||
if($norotate == false && filesize($file) > 5242880) {
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fclose($loghandle);
|
||||
$file2 = "$file.old";
|
||||
if (file_exists($file2)) unlink($file2);
|
||||
rename($file, $file2);
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
fclose($loghandle);
|
||||
}
|
||||
}
|
||||
@@ -63,38 +63,35 @@ function getclientip() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(($last_access = $mysqlcon->query("SELECT `last_access`,`count_access` FROM `$dbname`.`config`")->fetchAll()) === false) {
|
||||
$err_msg .= print_r($mysqlcon->errorInfo(), true);
|
||||
}
|
||||
|
||||
if(($last_access[0]['last_access'] + 1) >= time()) {
|
||||
$again = $last_access[0]['last_access'] + 2 - time();
|
||||
$err_msg = sprintf($lang['errlogin2'],$again);
|
||||
if(($cfg['webinterface_access_last'] + 1) >= time()) {
|
||||
$waittime = $cfg['webinterface_access_last'] + 2 - time();
|
||||
$err_msg = sprintf($lang['errlogin2'],$waittime);
|
||||
$err_lvl = 3;
|
||||
} elseif ($last_access[0]['count_access'] >= 10) {
|
||||
enter_logfile($logpath,$timezone,3,sprintf($lang['brute'], getclientip()));
|
||||
} elseif ($cfg['webinterface_access_count'] >= 10) {
|
||||
enter_logfile($cfg,3,sprintf($lang['brute'], getclientip()));
|
||||
$err_msg = $lang['errlogin3'];
|
||||
$err_lvl = 3;
|
||||
$bantime = time() + 299;
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` SET `last_access`='$bantime',`count_access`='0'") === false) { }
|
||||
} elseif (isset($_POST['username']) && $_POST['username'] == $webuser && password_verify($_POST['password'], $webpass)) {
|
||||
$_SESSION[$rspathhex.'username'] = $webuser;
|
||||
$_SESSION[$rspathhex.'password'] = $webpass;
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_access_last','{$bantime}'),('webinterface_access_count','0') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) { }
|
||||
} elseif (isset($_POST['username']) && $_POST['username'] == $cfg['webinterface_user'] && password_verify($_POST['password'], $cfg['webinterface_pass'])) {
|
||||
$_SESSION[$rspathhex.'username'] = $cfg['webinterface_user'];
|
||||
$_SESSION[$rspathhex.'password'] = $cfg['webinterface_pass'];
|
||||
$_SESSION[$rspathhex.'clientip'] = getclientip();
|
||||
$_SESSION[$rspathhex.'newversion'] = $newversion;
|
||||
enter_logfile($logpath,$timezone,6,sprintf($lang['brute2'], getclientip()));
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` SET `count_access`='0'") === false) { }
|
||||
$_SESSION[$rspathhex.'newversion'] = $cfg['version_latest_available'];
|
||||
enter_logfile($cfg,6,sprintf($lang['brute2'], getclientip()));
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_access_count','0') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) { }
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\')."/bot.php");
|
||||
exit;
|
||||
} elseif(isset($_POST['username'])) {
|
||||
$nowtime = time();
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['brute1'], getclientip(), $_POST['username']));
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` SET `last_access`='$nowtime',`count_access`=`count_access` + 1") === false) { }
|
||||
enter_logfile($cfg,5,sprintf($lang['brute1'], getclientip(), $_POST['username']));
|
||||
$cfg['webinterface_access_count']++;
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_access_last','{$nowtime}'),('webinterface_access_count','{$cfg['webinterface_access_count']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) { }
|
||||
$err_msg = $lang['errlogin'];
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if(isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass) {
|
||||
if(isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass']) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\')."/bot.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
@@ -56,14 +56,14 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$rankupmsg = addslashes($_POST['rankupmsg']);
|
||||
$servernews = addslashes($_POST['servernews']);
|
||||
$nextupinfomsg1 = addslashes($_POST['nextupinfomsg1']);
|
||||
$nextupinfomsg2 = addslashes($_POST['nextupinfomsg2']);
|
||||
$nextupinfomsg3 = addslashes($_POST['nextupinfomsg3']);
|
||||
$nextupinfo = $_POST['nextupinfo'];
|
||||
if (isset($_POST['msgtouser'])) $msgtouser = 1; else $msgtouser = 0;
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `msgtouser`='$msgtouser',`rankupmsg`='$rankupmsg',`servernews`='$servernews',`nextupinfo`='$nextupinfo',`nextupinfomsg1`='$nextupinfomsg1',`nextupinfomsg2`='$nextupinfomsg2',`nextupinfomsg3`='$nextupinfomsg3'") === false) {
|
||||
$cfg['rankup_message_to_user'] = addslashes($_POST['rankup_message_to_user']);
|
||||
$cfg['stats_server_news'] = addslashes($_POST['stats_server_news']);
|
||||
$cfg['rankup_next_message_1'] = addslashes($_POST['rankup_next_message_1']);
|
||||
$cfg['rankup_next_message_2'] = addslashes($_POST['rankup_next_message_2']);
|
||||
$cfg['rankup_next_message_3'] = addslashes($_POST['rankup_next_message_3']);
|
||||
$cfg['rankup_next_message_mode'] = $_POST['rankup_next_message_mode'];
|
||||
if (isset($_POST['rankup_message_to_user_switch'])) $cfg['rankup_message_to_user_switch'] = 1; else $cfg['rankup_message_to_user_switch'] = 0;
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_message_to_user_switch','{$cfg['rankup_message_to_user_switch']}'),('rankup_message_to_user','{$cfg['rankup_message_to_user']}'),('stats_server_news','{$cfg['stats_server_news']}'),('rankup_next_message_mode','{$cfg['rankup_next_message_mode']}'),('rankup_next_message_1','{$cfg['rankup_next_message_1']}'),('rankup_next_message_2','{$cfg['rankup_next_message_2']}'),('rankup_next_message_3','{$cfg['rankup_next_message_3']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -71,11 +71,11 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
type="submit" class="btn btn-primary" name="restart"><i class="fa fa-fw fa-refresh"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
$rankupmsg = $_POST['rankupmsg'];
|
||||
$servernews = $_POST['servernews'];
|
||||
$nextupinfomsg1 = $_POST['nextupinfomsg1'];
|
||||
$nextupinfomsg2 = $_POST['nextupinfomsg2'];
|
||||
$nextupinfomsg3 = $_POST['nextupinfomsg3'];
|
||||
$cfg['rankup_message_to_user'] = $_POST['rankup_message_to_user'];
|
||||
$cfg['stats_server_news'] = $_POST['stats_server_news'];
|
||||
$cfg['rankup_next_message_1'] = $_POST['rankup_next_message_1'];
|
||||
$cfg['rankup_next_message_2'] = $_POST['rankup_next_message_2'];
|
||||
$cfg['rankup_next_message_3'] = $_POST['rankup_next_message_3'];
|
||||
} elseif(isset($_POST['update'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
@@ -101,17 +101,17 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wimsgusrdesc"><?php echo $lang['wimsgusr']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($msgtouser == 1) {
|
||||
echo '<input id="switch-animate" type="checkbox" checked data-size="mini" name="msgtouser" value="',$msgtouser,'">';
|
||||
<?PHP if ($cfg['rankup_message_to_user_switch'] == 1) {
|
||||
echo '<input id="switch-animate" type="checkbox" checked data-size="mini" name="rankup_message_to_user_switch" value="',$cfg['rankup_message_to_user_switch'],'">';
|
||||
} else {
|
||||
echo '<input id="switch-animate" type="checkbox" data-size="mini" name="msgtouser" value="',$msgtouser,'">';
|
||||
echo '<input id="switch-animate" type="checkbox" data-size="mini" name="rankup_message_to_user_switch" value="',$cfg['rankup_message_to_user_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wimsgmsgdesc"><?php echo $lang['wimsgmsg']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" rows="5" name="rankupmsg" maxlength="500"><?php echo $rankupmsg; ?></textarea>
|
||||
<textarea class="form-control" rows="5" name="rankup_message_to_user" maxlength="500"><?php echo $cfg['rankup_message_to_user']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,7 +120,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wimsgsndesc"><?php echo $lang['wimsgsn']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" rows="15" name="servernews" maxlength="5000"><?php echo $servernews; ?></textarea>
|
||||
<textarea class="form-control" rows="15" name="stats_server_news" maxlength="5000"><?php echo $cfg['stats_server_news']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,11 +131,11 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#winxinfodesc"><?php echo $lang['winxinfo']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" id="basic" name="nextupinfo">
|
||||
<select class="selectpicker show-tick form-control" id="basic" name="rankup_next_message_mode">
|
||||
<?PHP
|
||||
echo '<option value="0"'; if($nextupinfo=="0") echo " selected=selected"; echo '>',$lang['winxmode1'],'</option>';
|
||||
echo '<option value="1"'; if($nextupinfo=="1") echo " selected=selected"; echo '>',$lang['winxmode2'],'</option>';
|
||||
echo '<option value="2"'; if($nextupinfo=="2") echo " selected=selected"; echo '>',$lang['winxmode3'],'</option>';
|
||||
echo '<option value="0"'; if($cfg['rankup_next_message_mode']=="0") echo " selected=selected"; echo '>',$lang['winxmode1'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_next_message_mode']=="1") echo " selected=selected"; echo '>',$lang['winxmode2'],'</option>';
|
||||
echo '<option value="2"'; if($cfg['rankup_next_message_mode']=="2") echo " selected=selected"; echo '>',$lang['winxmode3'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -143,19 +143,19 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#winxmsgdesc1"><?php echo $lang['winxmsg1']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" rows="5" name="nextupinfomsg1" maxlength="500"><?php echo $nextupinfomsg1; ?></textarea>
|
||||
<textarea class="form-control" rows="5" name="rankup_next_message_1" maxlength="500"><?php echo $cfg['rankup_next_message_1']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#winxmsgdesc2"><?php echo $lang['winxmsg2']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" rows="5" name="nextupinfomsg2" maxlength="500"><?php echo $nextupinfomsg2; ?></textarea>
|
||||
<textarea class="form-control" rows="5" name="rankup_next_message_2" maxlength="500"><?php echo $cfg['rankup_next_message_2']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#winxmsgdesc3"><?php echo $lang['winxmsg3']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" rows="5" name="nextupinfomsg3" maxlength="500"><?php echo $nextupinfomsg3; ?></textarea>
|
||||
<textarea class="form-control" rows="5" name="rankup_next_message_3" maxlength="500"><?php echo $cfg['rankup_next_message_3']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,16 +8,16 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?PHP echo $language; ?>">
|
||||
<html lang="<?PHP echo $cfg['default_language']; ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="version" content="<?PHP echo $currvers; ?>">
|
||||
<meta name="version" content="<?PHP echo $cfg['version_current_using']; ?>">
|
||||
<link rel="icon" href="../tsicons/rs.png">
|
||||
<title>TS-N.NET Ranksystem</title>
|
||||
<link href="../libs/combined_wi.css?v=<?PHP echo $currvers; ?>" rel="stylesheet">
|
||||
<script src="../libs/combined_wi.js?v=<?PHP echo $currvers; ?>"></script>
|
||||
<link href="../libs/combined_wi.css?v=<?PHP echo $cfg['version_current_using']; ?>" rel="stylesheet">
|
||||
<script src="../libs/combined_wi.js?v=<?PHP echo $cfg['version_current_using']; ?>"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('.required-icon').tooltip({
|
||||
@@ -48,8 +48,8 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<div id="wrapper">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="index.php">TSN Ranksystem - Webinterface <?PHP echo $currvers;?></a>
|
||||
<?PHP if(isset($_SESSION[$rspathhex.'newversion']) && version_compare($_SESSION[$rspathhex.'newversion'], $currvers, '>') && $_SESSION[$rspathhex.'newversion'] != '') {
|
||||
<a class="navbar-brand" href="index.php">TSN Ranksystem - Webinterface <?PHP echo $cfg['version_current_using'];?></a>
|
||||
<?PHP if(isset($_SESSION[$rspathhex.'newversion']) && version_compare($_SESSION[$rspathhex.'newversion'], $cfg['version_current_using'], '>') && $_SESSION[$rspathhex.'newversion'] != '') {
|
||||
echo '<a class="navbar-brand" href="//ts-n.net/ranksystem.php?changelog" target="_blank">'.$lang['winav9'].' ['.$_SESSION[$rspathhex.'newversion'].']</a>';
|
||||
} ?>
|
||||
</div>
|
||||
@@ -69,7 +69,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
} else {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],':',$_SERVER['SERVER_PORT'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-12),'stats/"><i class="fa fa-fw fa-bar-chart"></i> ',$lang['winav6'],'</a></li>';
|
||||
}
|
||||
if(isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass) { ?>
|
||||
if(isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass']) { ?>
|
||||
<li>
|
||||
<a href="changepassword.php"><i class="fa fa-lock"></i> <?PHP echo $lang['pass2']; ?></a>
|
||||
</li>
|
||||
@@ -96,6 +96,9 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<li>
|
||||
<a href="?lang=en"><span class="flag-icon flag-icon-gb"></span> EN - English</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=es"><span class="flag-icon flag-icon-es"></span> ES - español</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=fr"><span class="flag-icon flag-icon-fr"></span> FR - français</a>
|
||||
</li>
|
||||
@@ -169,7 +172,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
</div>
|
||||
</nav>
|
||||
<?PHP
|
||||
if($adminuuid==NULL && $_SESSION[$rspathhex.'username'] == $webuser && !isset($err_msg)) {
|
||||
if($cfg['webinterface_admin_client_unique_id_list'] == NULL && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && !isset($err_msg)) {
|
||||
$err_msg = $lang['winav11']; $err_lvl = 3;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
@@ -56,26 +56,19 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if (isset($_POST['iphash'])) {
|
||||
if($iphash != 1) {
|
||||
if ($_POST['rankup_hash_ip_addresses_mode'] != $cfg['rankup_hash_ip_addresses_mode']) {
|
||||
$err_msg2 = $lang['wisvinfo1'];
|
||||
$err_lvl2 = 2;
|
||||
}
|
||||
$iphash = 1;
|
||||
} else {
|
||||
if($iphash == 1) {
|
||||
$err_msg2 = $lang['wisvinfo1'];
|
||||
$err_lvl2 = 2;
|
||||
}
|
||||
$iphash = 0;
|
||||
}
|
||||
$timezone = $_POST['timezone'];
|
||||
$timeformat = $_POST['dateformat'];
|
||||
$logpath = addslashes($_POST['logpath']);
|
||||
$language = $_POST['languagedb'];
|
||||
$_SESSION[$rspathhex.'language'] = $_POST['languagedb'];
|
||||
$adminuuid = $_POST['adminuuid'];
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `timezone`='$timezone',`dateformat`='$timeformat',`logpath`='$logpath',`language`='$language',`adminuuid`='$adminuuid',`iphash`='$iphash'") === false) {
|
||||
$cfg['rankup_hash_ip_addresses_mode'] = $_POST['rankup_hash_ip_addresses_mode'];
|
||||
$cfg['logs_timezone'] = $_POST['logs_timezone'];
|
||||
$cfg['default_date_format'] = $_POST['default_date_format'];
|
||||
$cfg['logs_path'] = addslashes($_POST['logs_path']);
|
||||
$cfg['default_language'] = $_SESSION[$rspathhex.'language'] = $_POST['default_language'];
|
||||
unset($lang); $lang = set_language($cfg['default_language']);
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = $_POST['webinterface_admin_client_unique_id_list'];
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('logs_timezone','{$cfg['logs_timezone']}'),('default_date_format','{$cfg['default_date_format']}'),('logs_path','{$cfg['logs_path']}'),('default_language','{$cfg['default_language']}'),('webinterface_admin_client_unique_id_list','{$cfg['webinterface_admin_client_unique_id_list']}'),('rankup_hash_ip_addresses_mode','{$cfg['rankup_hash_ip_addresses_mode']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -83,29 +76,31 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
type="submit" class="btn btn-primary" name="restart"><i class="fa fa-fw fa-refresh"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
$logpath = $_POST['logpath'];
|
||||
$config['adminuuid'] = $_POST['adminuuid'];
|
||||
if(!isset($language) || $language == "en") {
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = array_flip(explode(',', $cfg['webinterface_admin_client_unique_id_list']));
|
||||
$cfg['logs_path'] = $_POST['logs_path'];
|
||||
if(!isset($cfg['default_language']) || $cfg['default_language'] == "en") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_en.php');
|
||||
} elseif($language == "ar") {
|
||||
} elseif($cfg['default_language'] == "ar") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_ar.php');
|
||||
} elseif($language == "cz") {
|
||||
} elseif($cfg['default_language'] == "cz") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_cz.php');
|
||||
} elseif($language == "de") {
|
||||
} elseif($cfg['default_language'] == "de") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_de.php');
|
||||
} elseif($language == "fr") {
|
||||
} elseif($cfg['default_language'] == "es") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_es.php');
|
||||
} elseif($cfg['default_language'] == "fr") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_fr.php');
|
||||
} elseif($language == "it") {
|
||||
} elseif($cfg['default_language'] == "it") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_it.php');
|
||||
} elseif($language == "nl") {
|
||||
} elseif($cfg['default_language'] == "nl") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_nl.php');
|
||||
} elseif($language == "pl") {
|
||||
} elseif($cfg['default_language'] == "pl") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_pl.php');
|
||||
} elseif($language == "ro") {
|
||||
} elseif($cfg['default_language'] == "ro") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_ro.php');
|
||||
} elseif($language == "ru") {
|
||||
} elseif($cfg['default_language'] == "ru") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
} elseif($cfg['default_language'] == "pt") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_pt.php');
|
||||
}
|
||||
} elseif(isset($_POST['update'])) {
|
||||
@@ -132,12 +127,12 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#witimedesc"><?php echo $lang['witime']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" name="timezone">
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" name="logs_timezone">
|
||||
<?PHP
|
||||
$timezonearr = DateTimeZone::listIdentifiers();
|
||||
foreach ($timezonearr as $timez) {
|
||||
if ($timez == $timezone) {
|
||||
echo '<option value="'.$timezone,'" selected=selected>',$timezone,'</option>';
|
||||
if ($timez == $cfg['logs_timezone']) {
|
||||
echo '<option value="'.$cfg['logs_timezone'],'" selected=selected>',$cfg['logs_timezone'],'</option>';
|
||||
} else {
|
||||
echo '<option value="',$timez,'">',$timez,'</option>';
|
||||
}
|
||||
@@ -149,13 +144,13 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#widaformdesc"><?php echo $lang['widaform']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="dateformat" value="<?php echo $timeformat; ?>">
|
||||
<input type="text" class="form-control" name="default_date_format" value="<?php echo $cfg['default_date_format']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wilogdesc"><?php echo $lang['wilog']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<input type="text" class="form-control" data-pattern=".*(\/|\\)$" data-error="The Logpath must end with / or \" name="logpath" value="<?php echo $logpath; ?>" required>
|
||||
<input type="text" class="form-control" data-pattern=".*(\/|\\)$" data-error="The Logpath must end with / or \" name="logs_path" value="<?php echo $cfg['logs_path']; ?>" required>
|
||||
<div class="help-block with-errors"></div>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
</div>
|
||||
@@ -163,19 +158,20 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wivlangdesc"><?php echo $lang['wivlang']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" name="languagedb">
|
||||
<select class="selectpicker show-tick form-control" name="default_language">
|
||||
<?PHP
|
||||
echo '<option data-subtext="العربية" value="ar"'.($language === 'ar' ? ' selected="selected"' : '').'>AR</option>';
|
||||
echo '<option data-subtext="čeština" value="cz"'.($language === 'cz' ? ' selected="selected"' : '').'>CZ</option>';
|
||||
echo '<option data-subtext="Deutsch" value="de"'.($language === 'de' ? ' selected="selected"' : '').'>DE</option>';
|
||||
echo '<option data-subtext="English" value="en"'.($language === 'en' ? ' selected="selected"' : '').'>EN</option>';
|
||||
echo '<option data-subtext="français" value="fr"'.($language === 'fr' ? ' selected="selected"' : '').'>FR</option>';
|
||||
echo '<option data-subtext="Italiano" value="it"'.($language === 'it' ? ' selected="selected"' : '').'>IT</option>';
|
||||
echo '<option data-subtext="Nederlands" value="nl"'.($language === 'nl' ? ' selected="selected"' : '').'>NL</option>';
|
||||
echo '<option data-subtext="polski" value="pl"'.($language === 'pl' ? ' selected="selected"' : '').'>PL</option>';
|
||||
echo '<option data-subtext="Română" value="ro"'.($language === 'ro' ? ' selected="selected"' : '').'>RO</option>';
|
||||
echo '<option data-subtext="Pусский" value="ru"'.($language === 'ru' ? ' selected="selected"' : '').'>RU</option>';
|
||||
echo '<option data-subtext="Português" value="pt"'.($language === 'pt' ? ' selected="selected"' : '').'>PT</option>';
|
||||
echo '<option data-subtext="العربية" value="ar"'.($cfg['default_language'] === 'ar' ? ' selected="selected"' : '').'>AR</option>';
|
||||
echo '<option data-subtext="čeština" value="cz"'.($cfg['default_language'] === 'cz' ? ' selected="selected"' : '').'>CZ</option>';
|
||||
echo '<option data-subtext="Deutsch" value="de"'.($cfg['default_language'] === 'de' ? ' selected="selected"' : '').'>DE</option>';
|
||||
echo '<option data-subtext="English" value="en"'.($cfg['default_language'] === 'en' ? ' selected="selected"' : '').'>EN</option>';
|
||||
echo '<option data-subtext="español" value="es"'.($cfg['default_language'] === 'es' ? ' selected="selected"' : '').'>ES</option>';
|
||||
echo '<option data-subtext="français" value="fr"'.($cfg['default_language'] === 'fr' ? ' selected="selected"' : '').'>FR</option>';
|
||||
echo '<option data-subtext="Italiano" value="it"'.($cfg['default_language'] === 'it' ? ' selected="selected"' : '').'>IT</option>';
|
||||
echo '<option data-subtext="Nederlands" value="nl"'.($cfg['default_language'] === 'nl' ? ' selected="selected"' : '').'>NL</option>';
|
||||
echo '<option data-subtext="polski" value="pl"'.($cfg['default_language'] === 'pl' ? ' selected="selected"' : '').'>PL</option>';
|
||||
echo '<option data-subtext="Română" value="ro"'.($cfg['default_language'] === 'ro' ? ' selected="selected"' : '').'>RO</option>';
|
||||
echo '<option data-subtext="Pусский" value="ru"'.($cfg['default_language'] === 'ru' ? ' selected="selected"' : '').'>RU</option>';
|
||||
echo '<option data-subtext="Português" value="pt"'.($cfg['default_language'] === 'pt' ? ' selected="selected"' : '').'>PT</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -185,7 +181,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiadmuuiddesc"><?php echo $lang['wiadmuuid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<textarea class="form-control" data-pattern="^([A-Za-z0-9\\\/\+]{27}=,)*([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check all unique IDs are correct and your list do not ends with a comma!" rows="1" name="adminuuid" maxlength="500"><?php echo $config['adminuuid']; ?></textarea>
|
||||
<textarea class="form-control" data-pattern="^([A-Za-z0-9\\\/\+]{27}=,)*([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check all unique IDs are correct and your list do not ends with a comma!" rows="1" name="webinterface_admin_client_unique_id_list" maxlength="500"><?php if(!empty($cfg['webinterface_admin_client_unique_id_list'])) echo implode(',',array_flip($cfg['webinterface_admin_client_unique_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
</div>
|
||||
@@ -194,11 +190,14 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolhadesc"><?php echo $lang['wishcolha']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($iphash == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="iphash" value="',$iphash,'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="iphash" value="',$iphash,'">';
|
||||
} ?>
|
||||
<select class="selectpicker show-tick form-control basic" name="rankup_hash_ip_addresses_mode">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[recommended]" value="2"'; if($cfg['rankup_hash_ip_addresses_mode']=="2") echo " selected=selected"; echo '>',$lang['wishcolha2'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_hash_ip_addresses_mode']=="1") echo " selected=selected"; echo '>',$lang['wishcolha1'],'</option>';
|
||||
echo '<option data-divider="true"> </option>';
|
||||
echo '<option value="0"'; if($cfg['rankup_hash_ip_addresses_mode']=="0") echo " selected=selected"; echo '>',$lang['wishcolha0'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,8 +15,8 @@ session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/phpcommand.php');
|
||||
|
||||
function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
|
||||
$file = $logpath.'ranksystem.log';
|
||||
function enter_logfile($cfg,$loglevel,$logtext,$norotate = false) {
|
||||
$file = $cfg['logs_path'].'ranksystem.log';
|
||||
if ($loglevel == 1) {
|
||||
$loglevel = " CRITICAL ";
|
||||
} elseif ($loglevel == 2) {
|
||||
@@ -27,27 +27,22 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
|
||||
$loglevel = " NOTICE ";
|
||||
} elseif ($loglevel == 5) {
|
||||
$loglevel = " INFO ";
|
||||
} elseif ($loglevel == 6) {
|
||||
$loglevel = " DEBUG ";
|
||||
}
|
||||
$input = DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n";
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, $input);
|
||||
if (filesize($file) > 5242880) {
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Restart Bot to continue with new log file...\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n");
|
||||
fclose($loghandle);
|
||||
if($norotate == false && filesize($file) > 5242880) {
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fclose($loghandle);
|
||||
$file2 = "$file.old";
|
||||
if (file_exists($file2)) unlink($file2);
|
||||
rename($file, $file2);
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
exec("del /F ".substr(__DIR__,0,-12).'logs/pid');
|
||||
$WshShell = new COM("WScript.Shell");
|
||||
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."worker.php start", 0, false);
|
||||
exit;
|
||||
} else {
|
||||
exec("rm -f ".substr(__DIR__,0,-12).'logs/pid');
|
||||
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php start");
|
||||
exit;
|
||||
}
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($cfg['logs_timezone']))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
fclose($loghandle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +63,7 @@ function getclientip() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(($last_access = $mysqlcon->query("SELECT `last_access`,`count_access` FROM `$dbname`.`config`")->fetchAll()) === false) {
|
||||
if ($last_access = $mysqlcon->query("SELECT * FROM `$dbname`.`cfg_params` WHERE `param` IN ('webinterface_access_last','webinterface_access_count')")->fetchAll(PDO::FETCH_KEY_PAIR) === false) {
|
||||
$err_msg .= print_r($mysqlcon->errorInfo(), true);
|
||||
}
|
||||
|
||||
@@ -85,49 +80,48 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if (($last_access[0]['last_access'] + 1) >= time()) {
|
||||
$again = $last_access[0]['last_access'] + 2 - time();
|
||||
if (($last_access['webinterface_access_last'] + 1) >= time()) {
|
||||
$again = $last_access['webinterface_access_last'] + 2 - time();
|
||||
$err_msg = sprintf($lang['errlogin2'],$again);
|
||||
$err_lvl = 3;
|
||||
} elseif (isset($_POST['resetpw']) && isset($db_csrf[$_POST['csrf_token']]) && ($adminuuid==NULL || count($adminuuid) == 0)) {
|
||||
} elseif (isset($_POST['resetpw']) && isset($db_csrf[$_POST['csrf_token']]) && ($cfg['webinterface_admin_client_unique_id_list']==NULL || count($cfg['webinterface_admin_client_unique_id_list']) == 0)) {
|
||||
$err_msg = $lang['wirtpw1']; $err_lvl=3;
|
||||
} elseif (isset($_POST['resetpw']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$nowtime = time();
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` SET `last_access`='$nowtime',`count_access`=`count_access` + 1") === false) { }
|
||||
$newcount = $last_access['webinterface_access_count'] + 1;
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_access_last','{$nowtime}'),('webinterface_access_count','{$newcount}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) { }
|
||||
|
||||
require_once(substr(__DIR__,0,-12).'libs/ts3_lib/TeamSpeak3.php');
|
||||
try {
|
||||
if($ts['tsencrypt'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&ssh=1");
|
||||
if($cfg['teamspeak_query_encrypt_switch'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?server_port=".$cfg['teamspeak_voice_port']."&ssh=1");
|
||||
} else {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?server_port=".$cfg['teamspeak_voice_port']."&blocking=0");
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->selfUpdate(array('client_nickname' => "Ranksystem - Reset Password"));
|
||||
} catch (Exception $e) { }
|
||||
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$allclients = $ts3->clientList();
|
||||
$adminuuid_flipped = array_flip($adminuuid);
|
||||
$pwd = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#*+;:-_~?=%&$<24>!()"),0,12);
|
||||
$webpass = password_hash($pwd, PASSWORD_DEFAULT);
|
||||
$cfg['webinterface_pass'] = password_hash($pwd, PASSWORD_DEFAULT);
|
||||
|
||||
foreach ($allclients as $client) {
|
||||
if(in_array($client['client_unique_identifier'] , $adminuuid)) {
|
||||
if(in_array($client['client_unique_identifier'] , $cfg['webinterface_admin_client_unique_id_list'])) {
|
||||
$checkuuid = 1;
|
||||
if($client['connection_client_ip'] == getclientip()) {
|
||||
$checkip = 1;
|
||||
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` SET `webpass`='$webpass',`last_access`='0'") === false) {
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_pass','{$cfg['webinterface_pass']}'),('webinterface_access_last','0') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) {
|
||||
$err_msg = $lang['isntwidbmsg'].print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$ts3->clientGetByUid($client['client_unique_identifier'])->message(sprintf($lang['wirtpw4'], $webuser, $pwd, '[URL=http'.(!empty($_SERVER['HTTPS'])?"s":"").'://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).']','[/URL]'));
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->clientGetByUid($client['client_unique_identifier'])->message(sprintf($lang['wirtpw4'], $cfg['webinterface_user'], $pwd, '[URL=http'.(!empty($_SERVER['HTTPS'])?"s":"").'://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).']','[/URL]'));
|
||||
$err_msg = sprintf($lang['wirtpw5'],'<a href="http'.(!empty($_SERVER['HTTPS'])?"s":"").'://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/">','</a>'); $err_lvl = 1;
|
||||
enter_logfile($logpath,$timezone,3,sprintf($lang['wirtpw6'],getclientip()));
|
||||
enter_logfile($cfg,3,sprintf($lang['wirtpw6'],getclientip()));
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
@@ -56,22 +56,23 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if (isset($_POST['showexcld'])) $showexcld = 1; else $showexcld = 0;
|
||||
if (isset($_POST['showcolrg'])) $showcolrg = 1; else $showcolrg = 0;
|
||||
if (isset($_POST['showcolcld'])) $showcolcld = 1; else $showcolcld = 0;
|
||||
if (isset($_POST['showcoluuid'])) $showcoluuid = 1; else $showcoluuid = 0;
|
||||
if (isset($_POST['showcoldbid'])) $showcoldbid = 1; else $showcoldbid = 0;
|
||||
if (isset($_POST['showcolls'])) $showcolls = 1; else $showcolls = 0;
|
||||
if (isset($_POST['showcolot'])) $showcolot = 1; else $showcolot = 0;
|
||||
if (isset($_POST['showcolit'])) $showcolit = 1; else $showcolit = 0;
|
||||
if (isset($_POST['showcolat'])) $showcolat = 1; else $showcolat = 0;
|
||||
if (isset($_POST['showcolas'])) $showcolas = 1; else $showcolas = 0;
|
||||
if (isset($_POST['showcolnx'])) $showcolnx = 1; else $showcolnx = 0;
|
||||
if (isset($_POST['showcolsg'])) $showcolsg = 1; else $showcolsg = 0;
|
||||
if (isset($_POST['showhighest'])) $showhighest = 1; else $showhighest = 0;
|
||||
if (isset($_POST['showgrpsince'])) $showgrpsince = 1; else $showgrpsince = 0;
|
||||
if (isset($_POST['shownav'])) $shownav = 1; else $shownav = 0;
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `showexcld`='$showexcld',`showcolrg`='$showcolrg',`showcolcld`='$showcolcld',`showcoluuid`='$showcoluuid',`showcoldbid`='$showcoldbid',`showcolls`='$showcolls',`showcolot`='$showcolot',`showcolit`='$showcolit',`showcolat`='$showcolat',`showcolas`='$showcolas',`showcolnx`='$showcolnx',`showcolsg`='$showcolsg',`showhighest`='$showhighest',`showgrpsince`='$showgrpsince',`shownav`='$shownav'") === false) {
|
||||
if (isset($_POST['stats_column_rank_switch'])) $cfg['stats_column_rank_switch'] = 1; else $cfg['stats_column_rank_switch'] = 0;
|
||||
if (isset($_POST['stats_column_client_name_switch'])) $cfg['stats_column_client_name_switch'] = 1; else $cfg['stats_column_client_name_switch'] = 0;
|
||||
if (isset($_POST['stats_column_unique_id_switch'])) $cfg['stats_column_unique_id_switch'] = 1; else $cfg['stats_column_unique_id_switch'] = 0;
|
||||
if (isset($_POST['stats_column_client_db_id_switch'])) $cfg['stats_column_client_db_id_switch'] = 1; else $cfg['stats_column_client_db_id_switch'] = 0;
|
||||
if (isset($_POST['stats_column_last_seen_switch'])) $cfg['stats_column_last_seen_switch'] = 1; else $cfg['stats_column_last_seen_switch'] = 0;
|
||||
if (isset($_POST['stats_column_online_time_switch'])) $cfg['stats_column_online_time_switch'] = 1; else $cfg['stats_column_online_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_idle_time_switch'])) $cfg['stats_column_idle_time_switch'] = 1; else $cfg['stats_column_idle_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_active_time_switch'])) $cfg['stats_column_active_time_switch'] = 1; else $cfg['stats_column_active_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_current_server_group_switch'])) $cfg['stats_column_current_server_group_switch'] = 1; else $cfg['stats_column_current_server_group_switch'] = 0;
|
||||
if (isset($_POST['stats_column_next_rankup_switch'])) $cfg['stats_column_next_rankup_switch'] = 1; else $cfg['stats_column_next_rankup_switch'] = 0;
|
||||
if (isset($_POST['stats_column_next_server_group_switch'])) $cfg['stats_column_next_server_group_switch'] = 1; else $cfg['stats_column_next_server_group_switch'] = 0;
|
||||
if (isset($_POST['stats_column_current_group_since_switch'])) $cfg['stats_column_current_group_since_switch'] = 1; else $cfg['stats_column_current_group_since_switch'] = 0;
|
||||
if (isset($_POST['stats_show_excepted_clients_switch'])) $cfg['stats_show_excepted_clients_switch'] = 1; else $cfg['stats_show_excepted_clients_switch'] = 0;
|
||||
if (isset($_POST['stats_show_clients_in_highest_rank_switch'])) $cfg['stats_show_clients_in_highest_rank_switch'] = 1; else $cfg['stats_show_clients_in_highest_rank_switch'] = 0;
|
||||
if (isset($_POST['stats_show_site_navigation_switch'])) $cfg['stats_show_site_navigation_switch'] = 1; else $cfg['stats_show_site_navigation_switch'] = 0;
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_column_rank_switch','{$cfg['stats_column_rank_switch']}'),('','{$cfg['stats_column_client_name_switch']}'),('stats_column_unique_id_switch','{$cfg['stats_column_unique_id_switch']}'),('stats_column_client_db_id_switch','{$cfg['stats_column_client_db_id_switch']}'),('stats_column_last_seen_switch','{$cfg['stats_column_last_seen_switch']}'),('stats_column_online_time_switch','{$cfg['stats_column_online_time_switch']}'),('stats_column_idle_time_switch','{$cfg['stats_column_idle_time_switch']}'),('stats_column_active_time_switch','{$cfg['stats_column_active_time_switch']}'),('stats_column_current_server_group_switch','{$cfg['stats_column_current_server_group_switch']}'),('stats_column_current_group_since_switch','{$cfg['stats_column_current_group_since_switch']}'),('stats_column_next_rankup_switch','{$cfg['stats_column_next_rankup_switch']}'),('stats_column_next_server_group_switch','{$cfg['stats_column_next_server_group_switch']}'),('stats_show_excepted_clients_switch','{$cfg['stats_show_excepted_clients_switch']}'),('stats_show_clients_in_highest_rank_switch','{$cfg['stats_show_clients_in_highest_rank_switch']}'),('stats_show_site_navigation_switch','{$cfg['stats_show_site_navigation_switch']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -103,120 +104,120 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolrgdesc"><?php echo $lang['wishcolrg']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolrg == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolrg" value="',$showcolrg,'">';
|
||||
<?PHP if ($cfg['stats_column_rank_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_rank_switch" value="',$cfg['stats_column_rank_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolrg" value="',$showcolrg,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_rank_switch" value="',$cfg['stats_column_rank_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolclddesc"><?php echo $lang['wishcolcld']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolcld == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolcld" value="',$showcolcld,'">';
|
||||
<?PHP if ($cfg['stats_column_client_name_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_client_name_switch" value="',$cfg['stats_column_client_name_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolcld" value="',$showcolcld,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_client_name_switch" value="',$cfg['stats_column_client_name_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcoluuiddesc"><?php echo $lang['wishcoluuid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcoluuid == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcoluuid" value="',$showcoluuid,'">';
|
||||
<?PHP if ($cfg['stats_column_unique_id_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_unique_id_switch" value="',$cfg['stats_column_unique_id_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcoluuid" value="',$showcoluuid,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_unique_id_switch" value="',$cfg['stats_column_unique_id_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcoldbiddesc"><?php echo $lang['wishcoldbid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcoldbid == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcoldbid" value="',$showcoldbid,'">';
|
||||
<?PHP if ($cfg['stats_column_client_db_id_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_client_db_id_switch" value="',$cfg['stats_column_client_db_id_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcoldbid" value="',$showcoldbid,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_client_db_id_switch" value="',$cfg['stats_column_client_db_id_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcollsdesc"><?php echo $lang['wishcolls']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolls == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolls" value="',$showcolls,'">';
|
||||
<?PHP if ($cfg['stats_column_last_seen_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_last_seen_switch" value="',$cfg['stats_column_last_seen_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolls" value="',$showcolls,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_last_seen_switch" value="',$cfg['stats_column_last_seen_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolotdesc"><?php echo $lang['wishcolot']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolot == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolot" value="',$showcolot,'">';
|
||||
<?PHP if ($cfg['stats_column_online_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_online_time_switch" value="',$cfg['stats_column_online_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolot" value="',$showcolot,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_online_time_switch" value="',$cfg['stats_column_online_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolitdesc"><?php echo $lang['wishcolit']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolit == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolit" value="',$showcolit,'">';
|
||||
<?PHP if ($cfg['stats_column_idle_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_idle_time_switch" value="',$cfg['stats_column_idle_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolit" value="',$showcolit,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_idle_time_switch" value="',$cfg['stats_column_idle_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolatdesc"><?php echo $lang['wishcolat']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolat == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolat" value="',$showcolat,'">';
|
||||
<?PHP if ($cfg['stats_column_active_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_active_time_switch" value="',$cfg['stats_column_active_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolat" value="',$showcolat,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_active_time_switch" value="',$cfg['stats_column_active_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolasdesc"><?php echo $lang['wishcolas']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolas == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolas" value="',$showcolas,'">';
|
||||
<?PHP if ($cfg['stats_column_current_server_group_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_current_server_group_switch" value="',$cfg['stats_column_current_server_group_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolas" value="',$showcolas,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_current_server_group_switch" value="',$cfg['stats_column_current_server_group_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolgsdesc"><?php echo $lang['wishcolgs']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showgrpsince == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showgrpsince" value="',$showgrpsince,'">';
|
||||
<?PHP if ($cfg['stats_column_current_group_since_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_current_group_since_switch" value="',$cfg['stats_column_current_group_since_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showgrpsince" value="',$showgrpsince,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_current_group_since_switch" value="',$cfg['stats_column_current_group_since_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolnxdesc"><?php echo $lang['wishcolnx']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolnx == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolnx" value="',$showcolnx,'">';
|
||||
<?PHP if ($cfg['stats_column_next_rankup_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_next_rankup_switch" value="',$cfg['stats_column_next_rankup_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolnx" value="',$showcolnx,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_next_rankup_switch" value="',$cfg['stats_column_next_rankup_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolsgdesc"><?php echo $lang['wishcolsg']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showcolsg == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showcolsg" value="',$showcolsg,'">';
|
||||
<?PHP if ($cfg['stats_column_next_server_group_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_next_server_group_switch" value="',$cfg['stats_column_next_server_group_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showcolsg" value="',$showcolsg,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_next_server_group_switch" value="',$cfg['stats_column_next_server_group_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -227,20 +228,20 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishexclddesc"><?php echo $lang['wishexcld']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showexcld == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showexcld" value="',$showexcld,'">';
|
||||
<?PHP if ($cfg['stats_show_excepted_clients_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_excepted_clients_switch" value="',$cfg['stats_show_excepted_clients_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showexcld" value="',$showexcld,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_excepted_clients_switch" value="',$cfg['stats_show_excepted_clients_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishhiclddesc"><?php echo $lang['wishhicld']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($showhighest == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="showhighest" value="',$showhighest,'">';
|
||||
<?PHP if ($cfg['stats_show_clients_in_highest_rank_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_clients_in_highest_rank_switch" value="',$cfg['stats_show_clients_in_highest_rank_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="showhighest" value="',$showhighest,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_clients_in_highest_rank_switch" value="',$cfg['stats_show_clients_in_highest_rank_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,10 +249,10 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishnavdesc"><?php echo $lang['wishnav']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($shownav == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="shownav" value="',$shownav,'">';
|
||||
<?PHP if ($cfg['stats_show_site_navigation_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_site_navigation_switch" value="',$cfg['stats_show_site_navigation_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="shownav" value="',$shownav,'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_site_navigation_switch" value="',$cfg['stats_show_site_navigation_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
@@ -56,17 +56,17 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$tshost = $_POST['tshost'];
|
||||
$tsquery = $_POST['tsquery'];
|
||||
if (isset($_POST['tsencrypt'])) $tsencrypt = 1; else $tsencrypt = 0;
|
||||
$tsvoice = $_POST['tsvoice'];
|
||||
$tsuser = $_POST['tsuser'];
|
||||
$tspass = $_POST['tspass'];
|
||||
$queryname = $_POST['queryname'];
|
||||
$defchid = $_POST['defchid'];
|
||||
$slowmode = $_POST['slowmode'];
|
||||
$avatar_delay= $_POST['avatar_delay'];
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `tshost`='$tshost',`tsencrypt`='$tsencrypt',`tsquery`='$tsquery',`tsvoice`='$tsvoice',`tsuser`='$tsuser',`tspass`='$tspass',`queryname`='$queryname',`slowmode`='$slowmode',`defchid`='$defchid',`avatar_delay`='$avatar_delay'; DELETE FROM `$dbname`.`csrf_token` WHERE `token`='".$_POST['csrf_token']."'") === false) {
|
||||
$cfg['teamspeak_host_address'] = $_POST['teamspeak_host_address'];
|
||||
$cfg['teamspeak_query_port'] = $_POST['teamspeak_query_port'];
|
||||
if (isset($_POST['teamspeak_query_encrypt_switch'])) $cfg['teamspeak_query_encrypt_switch'] = 1; else $cfg['teamspeak_query_encrypt_switch'] = 0;
|
||||
$cfg['teamspeak_voice_port'] = $_POST['teamspeak_voice_port'];
|
||||
$cfg['teamspeak_query_user'] = $_POST['teamspeak_query_user'];
|
||||
$cfg['teamspeak_query_pass'] = $_POST['teamspeak_query_pass'];
|
||||
$cfg['teamspeak_query_nickname'] = $_POST['teamspeak_query_nickname'];
|
||||
$cfg['teamspeak_default_channel_id'] = $_POST['teamspeak_default_channel_id'];
|
||||
$cfg['teamspeak_query_command_delay'] = $_POST['teamspeak_query_command_delay'];
|
||||
$cfg['teamspeak_avatar_download_delay']= $_POST['teamspeak_avatar_download_delay'];
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('teamspeak_host_address','{$cfg['teamspeak_host_address']}'),('teamspeak_query_encrypt_switch','{$cfg['teamspeak_query_encrypt_switch']}'),('teamspeak_query_port','{$cfg['teamspeak_query_port']}'),('teamspeak_voice_port','{$cfg['teamspeak_voice_port']}'),('teamspeak_query_user','{$cfg['teamspeak_query_user']}'),('teamspeak_query_pass','{$cfg['teamspeak_query_pass']}'),('teamspeak_query_nickname','{$cfg['teamspeak_query_nickname']}'),('teamspeak_default_channel_id','{$cfg['teamspeak_default_channel_id']}'),('teamspeak_query_command_delay','{$cfg['teamspeak_query_command_delay']}'),('teamspeak_avatar_download_delay','{$cfg['teamspeak_avatar_download_delay']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -74,12 +74,6 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
type="submit" class="btn btn-primary" name="restart"><i class="fa fa-fw fa-refresh"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
$ts['host'] = $_POST['tshost'];
|
||||
$ts['query'] = $_POST['tsquery'];
|
||||
$ts['tsencrypt']= $tsencrypt;
|
||||
$ts['voice'] = $_POST['tsvoice'];
|
||||
$ts['user'] = $_POST['tsuser'];
|
||||
$ts['pass'] = $_POST['tspass'];
|
||||
} elseif(isset($_POST['update'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
@@ -105,7 +99,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group required-field-block">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3hostdesc"><?php echo $lang['wits3host']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" data-pattern="^[^.]+[^:]*$" data-error="Do not enter the port inside this field. You should enter the port (e.g. 9987) inside the TS3-Voice-Port!" name="tshost" value="<?php echo $ts['host']; ?>" maxlength="64" required>
|
||||
<input type="text" class="form-control" data-pattern="^[^.]+[^:]*$" data-error="Do not enter the port inside this field. You should enter the port (e.g. 9987) inside the TS3-Voice-Port!" name="teamspeak_host_address" value="<?php echo $cfg['teamspeak_host_address']; ?>" maxlength="64" required>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@@ -113,19 +107,19 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3encryptdesc"><?php echo $lang['wits3encrypt']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($ts['tsencrypt'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="tsencrypt" value="',$ts['tsencrypt'],'">';
|
||||
<?PHP if ($cfg['teamspeak_query_encrypt_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="teamspeak_query_encrypt_switch" value="',$cfg['teamspeak_query_encrypt_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="tsencrypt" value="',$ts['tsencrypt'],'">';
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="teamspeak_query_encrypt_switch" value="',$cfg['teamspeak_query_encrypt_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3querydesc"><?php echo $lang['wits3query']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block-spin">
|
||||
<input type="text" class="form-control" name="tsquery" value="<?php echo $ts['query']; ?>" required>
|
||||
<input type="text" class="form-control" name="teamspeak_query_port" value="<?php echo $cfg['teamspeak_query_port']; ?>" required>
|
||||
<script>
|
||||
$("input[name='tsquery']").TouchSpin({
|
||||
$("input[name='teamspeak_query_port']").TouchSpin({
|
||||
min: 0,
|
||||
max: 65535,
|
||||
verticalbuttons: true,
|
||||
@@ -138,9 +132,9 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3voicedesc"><?php echo $lang['wits3voice']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block-spin">
|
||||
<input type="text" class="form-control" name="tsvoice" value="<?php echo $ts['voice']; ?>" required>
|
||||
<input type="text" class="form-control" name="teamspeak_voice_port" value="<?php echo $cfg['teamspeak_voice_port']; ?>" required>
|
||||
<script>
|
||||
$("input[name='tsvoice']").TouchSpin({
|
||||
$("input[name='teamspeak_voice_port']").TouchSpin({
|
||||
min: 0,
|
||||
max: 65535,
|
||||
verticalbuttons: true,
|
||||
@@ -158,14 +152,14 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3querusrdesc"><?php echo $lang['wits3querusr']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<input type="text" class="form-control" name="tsuser" value="<?php echo $ts['user']; ?>" required>
|
||||
<input type="text" class="form-control" name="teamspeak_query_user" value="<?php echo $cfg['teamspeak_query_user']; ?>" required>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3querpwdesc"><?php echo $lang['wits3querpw']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<input type="password" class="form-control" name="tspass" id="tspass" value="<?php echo $ts['pass']; ?>" data-toggle="password" data-placement="before" required>
|
||||
<input type="password" class="form-control" name="teamspeak_query_pass" value="<?php echo $cfg['teamspeak_query_pass']; ?>" data-toggle="password" data-placement="before" required>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -177,7 +171,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3qnmdesc"><?php echo $lang['wits3qnm']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<input type="text" class="form-control" name="queryname" value="<?php echo $queryname; ?>" maxlength="30" required>
|
||||
<input type="text" class="form-control" name="teamspeak_query_nickname" value="<?php echo $cfg['teamspeak_query_nickname']; ?>" maxlength="30" required>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,9 +179,9 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3dchdesc"><?php echo $lang['wits3dch']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="defchid" value="<?php echo $defchid; ?>">
|
||||
<input type="text" class="form-control" name="teamspeak_default_channel_id" value="<?php echo $cfg['teamspeak_default_channel_id']; ?>">
|
||||
<script>
|
||||
$("input[name='defchid']").TouchSpin({
|
||||
$("input[name='teamspeak_default_channel_id']").TouchSpin({
|
||||
min: 0,
|
||||
max: 2147483647,
|
||||
verticalbuttons: true,
|
||||
@@ -200,15 +194,15 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3smdesc"><?php echo $lang['wits3sm']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" id="basic" name="slowmode">
|
||||
<select class="selectpicker show-tick form-control" id="basic" name="teamspeak_query_command_delay">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[recommended]" value="0"'; if($slowmode=="0") echo ' selected="selected"'; echo '>disabled (Realtime)</option>';
|
||||
echo '<option data-subtext="[recommended]" value="0"'; if($cfg['teamspeak_query_command_delay']=="0") echo ' selected="selected"'; echo '>disabled (Realtime)</option>';
|
||||
echo '<option data-divider="true"> </option>';
|
||||
echo '<option data-subtext="(0,2 seconds)" value="200000"'; if($slowmode=="200000") echo ' selected="selected"'; echo '>Low delay</option>';
|
||||
echo '<option data-subtext="(0,5 seconds)" value="500000"'; if($slowmode=="500000") echo ' selected="selected"'; echo '>Middle delay</option>';
|
||||
echo '<option data-subtext="(1,0 seconds)" value="1000000"'; if($slowmode=="1000000") echo ' selected="selected"'; echo '>High delay</option>';
|
||||
echo '<option data-subtext="(2,0 seconds)" value="2000000"'; if($slowmode=="2000000") echo ' selected="selected"'; echo '>Huge delay</option>';
|
||||
echo '<option data-subtext="(5,0 seconds)" value="5000000"'; if($slowmode=="5000000") echo ' selected="selected"'; echo '>Ultra delay</option>';
|
||||
echo '<option data-subtext="(0,2 seconds)" value="200000"'; if($cfg['teamspeak_query_command_delay']=="200000") echo ' selected="selected"'; echo '>Low delay</option>';
|
||||
echo '<option data-subtext="(0,5 seconds)" value="500000"'; if($cfg['teamspeak_query_command_delay']=="500000") echo ' selected="selected"'; echo '>Middle delay</option>';
|
||||
echo '<option data-subtext="(1,0 seconds)" value="1000000"'; if($cfg['teamspeak_query_command_delay']=="1000000") echo ' selected="selected"'; echo '>High delay</option>';
|
||||
echo '<option data-subtext="(2,0 seconds)" value="2000000"'; if($cfg['teamspeak_query_command_delay']=="2000000") echo ' selected="selected"'; echo '>Huge delay</option>';
|
||||
echo '<option data-subtext="(5,0 seconds)" value="5000000"'; if($cfg['teamspeak_query_command_delay']=="5000000") echo ' selected="selected"'; echo '>Ultra delay</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -217,9 +211,9 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3avatdesc"><?php echo $lang['wits3avat']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="avatar_delay" value="<?php echo $avatar_delay; ?>">
|
||||
<input type="text" class="form-control" name="teamspeak_avatar_download_delay" value="<?php echo $cfg['teamspeak_avatar_download_delay']; ?>">
|
||||
<script>
|
||||
$("input[name='avatar_delay']").TouchSpin({
|
||||
$("input[name='teamspeak_avatar_download_delay']").TouchSpin({
|
||||
min: 0,
|
||||
max: 65535,
|
||||
verticalbuttons: true,
|
||||
|
||||
@@ -4,8 +4,8 @@ error_reporting(0);
|
||||
require_once(__DIR__.'/other/config.php');
|
||||
require_once(__DIR__.'/other/phpcommand.php');
|
||||
$GLOBALS['exec'] = FALSE;
|
||||
if($logpath == NULL) { $logpath = "./logs/"; }
|
||||
$GLOBALS['logfile'] = $logpath.'ranksystem.log';
|
||||
if($cfg['logs_path'] == NULL) { $cfg['logs_path'] = "./logs/"; }
|
||||
$GLOBALS['logfile'] = $cfg['logs_path'].'ranksystem.log';
|
||||
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
$GLOBALS['pidfile'] = __DIR__.'\logs\pid';
|
||||
@@ -69,8 +69,8 @@ function start() {
|
||||
sleep(10);
|
||||
}
|
||||
|
||||
global $logpath;
|
||||
if(substr(sprintf('%o', fileperms($logpath)), -3, 1)!='7') {
|
||||
global $cfg;
|
||||
if(substr(sprintf('%o', fileperms($cfg['logs_path'])), -3, 1)!='7') {
|
||||
echo "\n !!!! Logs folder is not writable !!!!\n\n";
|
||||
echo " Cancel start request...\n\n";
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user