#432 Check TS3 masterserver version

This commit is contained in:
Ulrich Block 2015-06-06 12:02:34 +02:00
parent ea4071fbe3
commit 322bd9f7f5
13 changed files with 129 additions and 11 deletions

View File

@ -83,6 +83,7 @@
<name>Servername</name>
<newuser>Neuer User</newuser>
<noVoiceServer>Keine in Easy-Wi unbekannten TS3 Server gefunden</noVoiceServer>
<old_version>Veralterte Version</old_version>
<os_bit>Bitversion</os_bit>
<password>Private Server</password>
<port>Port</port>

View File

@ -79,6 +79,7 @@
<name>Server name</name>
<newuser>New user</newuser>
<noVoiceServer>No TS3 server can be found which are unknown for Easy-Wi</noVoiceServer>
<old_version>Old version</old_version>
<os_bit>Bit-version</os_bit>
<password>Private server</password>
<port>Port</port>

View File

@ -55,6 +55,7 @@ include(EASYWIDIR . '/stuff/methods/functions_gs.php');
include(EASYWIDIR . '/stuff/methods/functions_ssh_exec.php');
include(EASYWIDIR . '/stuff/methods/class_app.php');
include(EASYWIDIR . '/stuff/methods/class_masterserver.php');
include(EASYWIDIR . '/stuff/methods/functions_ts3.php');
include(EASYWIDIR . '/stuff/methods/class_ts3.php');
include(EASYWIDIR . '/stuff/methods/queries_updates.php');
include(EASYWIDIR . '/stuff/keyphrasefile.php');
@ -73,16 +74,31 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
$now = date('Y-m-d', strtotime('now'));
$sprache = getlanguagefile('gserver', 'uk', 0);
echo "Fetch version for Teamspeak 3 Server\r\n";
$query = $sql->prepare("UPDATE `voice_masterserver` SET `latest_version`=? WHERE `bitversion`=?");
$ts3MasterVersion32 = getTS3Version('server', 'linux', 32);
$query->execute(array($ts3MasterVersion32['version'], '32'));
$ts3MasterVersion64 = getTS3Version('server', 'linux', 64);
$query->execute(array($ts3MasterVersion64['version'], '64'));
echo "Current versions for Teamspeak 3 Server are {$ts3MasterVersion32['version']} (32bit) and {$ts3MasterVersion64['version']} (64bit)\r\n";
echo "Fetch version for Minecraft and Bukkit Server\r\n";
$query = $sql->prepare("SELECT t.`shorten` FROM `servertypes` t LEFT JOIN `rservermasterg` r ON t.`id`=r.`servertypeid` WHERE r.`id` IS NOT NULL AND t.`gameq`='minecraft' GROUP BY t.`shorten` ORDER BY t.`shorten`");
$query2 = $sql->prepare("UPDATE `servertypes` SET `steamVersion`=?,`downloadPath`=? WHERE `shorten`=?");
$query->execute();
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
echo 'Retrieving Version for ' . $row['shorten'] . "\r\n";
$reply = ($row['shorten'] == 'bukkit') ? getCraftBukkitVersion () : getMinecraftVersion();
if (is_array($reply)) {
echo 'Version for ' . $row['shorten'] . ' is: ' . $reply['version'] . "\r\n";
if (strlen($reply['version']) > 1) {
@ -93,10 +109,12 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
echo "Fetch version for valves appIDs\r\n";
$query = $sql->prepare("SELECT t.`appID`,t.`shorten` FROM `servertypes` t INNER JOIN `rservermasterg` r ON t.`id`=r.`servertypeid` WHERE t.`appID` IS NOT NULL AND t.`steamgame`!='N' GROUP BY t.`appID` ORDER BY t.`appID`");
$query2 = $sql->prepare("UPDATE `servertypes` SET `steamVersion`=? WHERE `appID`=?");
$query->execute();
$steamVersion = array();
$query2 = $sql->prepare("UPDATE `servertypes` SET `steamVersion`=? WHERE `appID`=?");
$query = $sql->prepare("SELECT t.`appID`,t.`shorten` FROM `servertypes` t INNER JOIN `rservermasterg` r ON t.`id`=r.`servertypeid` WHERE t.`appID` IS NOT NULL AND t.`steamgame`!='N' GROUP BY t.`appID` ORDER BY t.`appID`");
$query->execute();
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
if (!in_array($row['appID'], array(null,'', false))) {
@ -119,6 +137,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
}
$webhostdomain = webhostdomain(0);
$query = $sql->prepare("SELECT `timezone`,`voice_autobackup`,`voice_autobackup_intervall`,`voice_maxbackup`,`down_checks`,`resellerid` FROM `settings`");
$query->execute();
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
@ -487,6 +506,22 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
$query->execute();
if (date('G') == 5) {
$query = $sql->prepare("SELECT `ssh2ip`,`description`,`resellerid` FROM `voice_masterserver` WHERE `active`='Y' AND `latest_version`!=`local_version`");
$query->execute();
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$serverName = (strlen($row['description']) == 0) ? $row['ssh2ip'] : $row['ssh2ip'] . ' ' . $row['description'];
print "Sending TS3 update information for server $serverName\r\n";
$query2 = $sql->prepare("SELECT `id` FROM `userdata` WHERE ((`resellerid`=? AND `accounttype`='a') OR (`id`=? AND `accounttype`='r')) AND `mail_gsupdate`='Y'");
$query2->execute(array($row['resellerid'], $row['resellerid']));
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
sendmail('emailvoicemasterold', $row2['id'], $serverName, '');
}
}
print "Reparing tables\r\n";
$query = $sql->prepare("REPAIR TABLE `addons`,`addons_installed`,`api_external_auth`,`api_ips`,`api_settings`,`badips`,`dhcpdata`,`eac`,`easywi_version`,`gserver_restarts`,`gsstatus`,`gsswitch`,`imprints`,`jobs`,`lendedserver`,`lendsettings`,`lendstats`,`mail_log`,`mysql_external_dbs`,`mysql_external_servers`,`page_pages`,`page_pages_text`,`page_settings`,`page_terms`,`page_terms_used`,`resellerdata`,`resellerimages`,`rserverdata`,`rservermasterg`,`serverlist`,`servertypes`,`settings`,`test`,`tickets`,`ticket_topics`,`traffic_data`,`traffic_data_day`,`traffic_settings`,`userdata`,`usergroups`,`userlog`,`userpermissions`,`virtualcontainer`,`virtualhosts`,`voice_masterserver`,`voice_server`,`voice_server_backup`,`voice_server_stats`,`voice_stats_settings`");
$query->execute();

View File

@ -106,7 +106,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
print 'Getting MySQL DB sizes' . "\r\n";
}
} else {
$checkTypeOfServer='all';
$checkTypeOfServer = 'all';
print 'Checking Gameserver, Voiceserver MySQL DB sizes and Web Quotas' . "\r\n";
}
@ -540,7 +540,8 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
# Voice Server
if ($checkTypeOfServer == 'all' or $checkTypeOfServer == 'vs') {
#voice_tsdns
# voice_tsdns
print 'Checking TSDNS' . "\r\n";
$query = $sql->prepare("SELECT *,AES_DECRYPT(`ssh2port`,:aeskey) AS `decryptedssh2port`,AES_DECRYPT(`ssh2user`,:aeskey) AS `decryptedssh2user`,AES_DECRYPT(`ssh2password`,:aeskey) AS `decryptedssh2password` FROM `voice_tsdns` WHERE `active`='Y'");
@ -645,6 +646,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
$querypassword = $vrow['decryptedquerypassword'];
$resellerid = $vrow['resellerid'];
$autorestart = $vrow['autorestart'];
$latestVersion = $vrow['latest_version'];
if ($addedby == 1) {
$vselect2 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
@ -799,6 +801,20 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
$pupdate->execute(array($ts3masterid));
}
$serverVersion = $connection->getServerVersion();
if ($serverVersion) {
if ($serverVersion == $latestVersion) {
echo "TS3 server version is running up to date version $serverVersion\r\n";
} else {
echo "TS3 server version is running outdated version $serverVersion. Latest is $latestVersion\r\n";
}
$pupdate = $sql->prepare("UPDATE `voice_masterserver` SET `local_version`=? WHERE `id`=? LIMIT 1");
$pupdate->execute(array($serverVersion, $ts3masterid));
}
$serverlist = $connection->ServerList();
if (!isset($serverlist[0]['id']) or $serverlist[0]['id'] == 0) {

View File

@ -122,6 +122,8 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$changeCount += $query->rowCount();
$query->execute(array($reseller_id, 'emailgserverupdate', $ui->escaped('emailgserverupdate', 'post')));
$changeCount += $query->rowCount();
$query->execute(array($reseller_id, 'emailvoicemasterold', $ui->escaped('emailvoicemasterold', 'post')));
$changeCount += $query->rowCount();
$query->execute(array($reseller_id, 'emailpwrecovery', $ui->escaped('emailpwrecovery', 'post')));
$changeCount += $query->rowCount();
$query->execute(array($reseller_id, 'emailsecuritybreach', $ui->escaped('emailsecuritybreach', 'post')));
@ -160,6 +162,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$changeCount += updateMailXML('emaildown', $ui->post);
$changeCount += updateMailXML('emaildownrestart', $ui->post);
$changeCount += updateMailXML('emailgserverupdate', $ui->post);
$changeCount += updateMailXML('emailvoicemasterold', $ui->post);
$changeCount += updateMailXML('emailpwrecovery', $ui->post);
$changeCount += updateMailXML('emailsecuritybreach', $ui->post);
$changeCount += updateMailXML('emailnewticket', $ui->post);
@ -199,12 +202,13 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
'emaildownrestart' => '',
'emailgserverupdate' => '',
'emailpwrecovery' => '',
'emailregister' => '',
'emailsecuritybreach' => '',
'emailnewticket' => '',
'emailuseradd' => '',
'emailvinstall' => '',
'emailvrescue' => '',
'emailregister' => '',
'emailvoicemasterold' => '',
'email' => '',
'emailregards' => '',
'emailfooter' => '',
@ -232,6 +236,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$emailnewticket_xml = array();
$emailuseradd_xml = array();
$emailvinstall_xml = array();
$emailvoicemasterold_xml = array();
$emailvrescue_xml = array();
if (isset($template_to_use)) {
@ -247,6 +252,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$emailuseradd_xml[] = getMailXML('emailuseradd', $row);
$emailvinstall_xml[] = getMailXML('emailvinstall', $row);
$emailvrescue_xml[] = getMailXML('emailvrescue', $row);
$emailgserverupdate_xml[] = getMailXML('emailvoicemasterold', $row);
$emailregister_xml[] = getMailXML('emailregister', $row);
}
}

View File

@ -81,6 +81,11 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$status = 4;
$statusMessage = $gsprache->status_ok;
if ($row['local_version'] != $row['latest_version']) {
$status = 2;
$statusMessage = $sprache->old_version . ' ' . $row['local_version'];
}
if ($row['active'] == 'N') {
$status = 3;
$statusMessage = $gsprache->status_inactive;

View File

@ -574,7 +574,6 @@ class TS3 {
}
return $serverdetails;
}
public function ServerDetails ($virtualserver_id) {
@ -1047,4 +1046,10 @@ class TS3 {
return false;
}
public function getServerVersion() {
$array = $this->SendCommand('version');
return (is_array($array) and isset($array[0]['version'])) ? $array[0]['version'] : false;
}
}

View File

@ -72,7 +72,7 @@ $emailTemplates = array(
'languages' => array(
"INSERT INTO `translations` (`type`,`lang`,`transID`,`text`,`resellerID`) VALUES ('em', 'de', 'emailgserverupdate', '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<sprache>\r\n <topic>Update eines Masterservers</topic>\r\n <salutation>Sehr geehrte(r)</salutation>\r\n <text1>Ein Gameserverupdate wurde beim Server</text1>\r\n <text2>um</text2>\r\n <text3>f&uuml; das Spiel</text3> \r\n <text4>fertig gestellt.</text4>\r\n <text5>Ihre Server sollten weiterhin erreichbar sein.</text5>\r\n <noreply>(Dies ist eine automatisch versendete E-Mail. Bitte antworten Sie nicht darauf, weil dieses E-Mail Konto nicht in der Lage ist, E-Mails zu empfangen.)</noreply>\r\n</sprache>', ?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)",
"INSERT INTO `translations` (`type`,`lang`,`transID`,`text`,`resellerID`) VALUES ('em', 'uk', 'emailgserverupdate', '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<sprache>\r\n <topic>Masterservers has been updated</topic>\r\n <salutation>Dear</salutation>\r\n <text1>a gameserverupdate for the server</text1>\r\n <text2>was applied at</text2>\r\n <text3>for the game</text3> \r\n <text4>.</text4>\r\n <text5>Your server should be still available for access.</text5>\r\n <noreply>(This is an automated mail. Please do not reply to it since the account is configured to send only.)</noreply>\r\n</sprache>', ?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)"
)
)
),
'emailnewticket' => array(
'html' => "INSERT INTO `settings_email` (`email_setting_name`,`email_setting_value`,`reseller_id`) VALUES ('emailnewticket','<!DOCTYPE html> \r\n<head>\r\n <title>%topic%</title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"UTF-8\">\r\n</head>\r\n<body>\r\n<div id=\"card\">\r\n <font face=\"arial,helvetica,verdana,tahoma\" size=\"3\"><strong>%topic% %server%</strong></font>\r\n <p>%salutation% %username%,</p>\r\n <p>%text1% %date%</p>\r\n <p>%emailregards%</p>\r\n <p>%noreply%</p>\r\n %emailfooter%\r\n</div>\r\n</body>\r\n</html>\r\n<style>\r\n#card {\r\n margin:0 auto;\r\n width:100%;\r\n height:100%;\r\n padding:20px 20px;\r\n position:relative;\r\n border-radius:3px;\r\n box-shadow:1px 1px 1px rgba(3, 3, 3, 0.35);\r\n background: #f1f1f1;\r\n background: -moz-linear-gradient(-45deg, #f1f1f1 0%, #f6f6f6 13%, #ffffff 68%, #ffffff 99%);\r\n background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f1f1f1), color-stop(13%,#f6f6f6), color-stop(68%,#ffffff), color-stop(99%,#ffffff));\r\n background: -webkit-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: -o-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: -ms-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);}\r\n</style>',?) ON DUPLICATE KEY UPDATE `email_setting_value`=VALUES(`email_setting_value`)",
@ -116,6 +116,13 @@ $emailTemplates = array(
"INSERT INTO `translations` (`type`,`lang`,`transID`,`text`,`resellerID`) VALUES ('em', 'uk', 'emailvinstall', '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<sprache>\r\n <topic>Rescue system has been started</topic>\r\n <salutation>Dear</salutation>\r\n <text1>The rescue system for your server with the IP</text1>\r\n <text2>was started at</text2>\r\n <text3>.</text3> \r\n <text4>The root password is:</text4>\r\n <text5>If you have any questions feel free to use our supportsystem or give us a call.</text5>\r\n <text6>You will find the phonenumber in our panel.</text6>\r\n <noreply>(This is an automated mail. Please do not reply to it since the account is configured to send only.)</noreply>\r\n</sprache>', ?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)"
)
),
'emailvoicemasterold' => array(
'html' => "INSERT INTO `settings_email` (`email_setting_name`,`email_setting_value`,`reseller_id`) VALUES ('emailvoicemasterold','<!DOCTYPE html> \r\n<head>\r\n <title>%topic%</title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"UTF-8\">\r\n</head>\r\n<body>\r\n<div id=\"card\">\r\n <font face=\"arial,helvetica,verdana,tahoma\" size=\"3\"><strong>%topic% %server%</strong></font>\r\n <p>%salutation% %username%,</p>\r\n <p>%text1% %server%%text2%.</p>\r\n <p>%text3%</p>\r\n <p>%emailregards%</p>\r\n <p>%noreply%</p>\r\n %emailfooter%\r\n</div>\r\n</body>\r\n</html>\r\n<style>\r\n#card {\r\n margin:0 auto;\r\n width:100%;\r\n height:100%;\r\n padding:20px 20px;\r\n position:relative;\r\n border-radius:3px;\r\n box-shadow:1px 1px 1px rgba(3, 3, 3, 0.35);\r\n background: #f1f1f1;\r\n background: -moz-linear-gradient(-45deg, #f1f1f1 0%, #f6f6f6 13%, #ffffff 68%, #ffffff 99%);\r\n background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f1f1f1), color-stop(13%,#f6f6f6), color-stop(68%,#ffffff), color-stop(99%,#ffffff));\r\n background: -webkit-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: -o-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: -ms-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);}\r\n</style>',?) ON DUPLICATE KEY UPDATE `email_setting_value`=VALUES(`email_setting_value`)",
'languages' => array(
"INSERT INTO `translations` (`type`,`lang`,`transID`,`text`,`resellerID`) VALUES ('em', 'de', 'emailvoicemasterold', '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<sprache>\r\n <topic>Teamspeak 3 Master Server ist veraltet</topic>\r\n <salutation>Sehr geehrte(r)</salutation>\r\n <text1>eine veraltete Version wurde an Ihrem Voice Master Server</text1>\r\n <text2> festgestellt</text2>\r\n <text3>Bitte aktualisieren sie schnellst möglich um eventuelle Sicherheitslücken zu schließen.</text3>\r\n <noreply>(Dies ist eine automatisch versendete E-Mail. Bitte antworten Sie nicht darauf, weil dieses E-Mail Konto nicht in der Lage ist, E-Mails zu empfangen.)</noreply>\r\n</sprache>', ?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)",
"INSERT INTO `translations` (`type`,`lang`,`transID`,`text`,`resellerID`) VALUES ('em', 'uk', 'emailvoicemasterold', '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<sprache>\r\n <topic>Teamspeak 3 Master Server is outdated</topic>\r\n <salutation>Dear</salutation>\r\n <text1>an outdated version has been detected at your voice master server</text1>\r\n <text2></text2>\r\n <text3>Please update as soon as possible in order to close possible security issues.</text3>\r\n <noreply>(This is an automated mail. Please do not reply to it since the account is configured to send only.)</noreply>\r\n</sprache>', ?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)"
)
),
'emailvrescue' => array(
'html' => "INSERT INTO `settings_email` (`email_setting_name`,`email_setting_value`,`reseller_id`) VALUES ('emailvrescue','<!DOCTYPE html> \r\n<head>\r\n <title>%topic%</title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"UTF-8\">\r\n</head>\r\n<body>\r\n<div id=\"card\">\r\n <font face=\"arial,helvetica,verdana,tahoma\" size=\"3\"><strong>%topic% %server%</strong></font>\r\n <p>%salutation% %username%,</p>\r\n <p>%text1% %ip% %text2% %date% %text3%</p>\r\n <p>%text4% %rpw%</p>\r\n <p>%text5%</p>\r\n <p>%text6%</p>\r\n <p>%emailregards%</p>\r\n <p>%noreply%</p>\r\n\r\n %emailfooter%\r\n</div>\r\n</body>\r\n</html>\r\n<style>\r\n#card {\r\n margin:0 auto;\r\n width:100%;\r\n height:100%;\r\n padding:20px 20px;\r\n position:relative;\r\n border-radius:3px;\r\n box-shadow:1px 1px 1px rgba(3, 3, 3, 0.35);\r\n background: #f1f1f1;\r\n background: -moz-linear-gradient(-45deg, #f1f1f1 0%, #f6f6f6 13%, #ffffff 68%, #ffffff 99%);\r\n background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f1f1f1), color-stop(13%,#f6f6f6), color-stop(68%,#ffffff), color-stop(99%,#ffffff));\r\n background: -webkit-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: -o-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: -ms-linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);\r\n background: linear-gradient(-45deg, #f1f1f1 0%,#f6f6f6 13%,#ffffff 68%,#ffffff 99%);}\r\n</style>',?) ON DUPLICATE KEY UPDATE `email_setting_value`=VALUES(`email_setting_value`)",
'languages' => array(

View File

@ -481,6 +481,10 @@ function checkDNS ($dns, $id = null, $user_id = null, $type = '') {
}
/*
* They probably do not expect scripts like this on the mirror side
* But so what as long as it works...
*/
function getTS3Version ($type = 'server', $os = 'linux', $bit = 64, $url = null) {
// check if entered parameters are correct

View File

@ -1628,9 +1628,10 @@ $query = "CREATE TABLE IF NOT EXISTS `voice_dns` (
$add = $sql->prepare($query);
$add->execute();
// https://github.com/easy-wi/developer/issues/36 managedByUser, managedForID added
$query = "CREATE TABLE IF NOT EXISTS `voice_masterserver` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`local_version` varchar(10) DEFAULT NULL,
`latest_version` varchar(10) DEFAULT NULL,
`active` enum('Y','N') DEFAULT 'Y',
`description` varchar(255) DEFAULT NULL,
`type` varchar(30) NOT NULL DEFAULT 'ts3',

View File

@ -1423,6 +1423,8 @@ $defined['voice_dns'] = array(
// https://github.com/easy-wi/developer/issues/36 managedServer,managedForID added
$defined['voice_masterserver'] = array(
'id' => array("Type"=>"int(10) unsigned","Null"=>"NO","Key"=>"PRI","Default"=>"","Extra"=>"auto_increment"),
'local_version' => array("Type"=>"varchar(10)","Null"=>"YES","Key"=>"","Default"=>"","Extra"=>""),
'latest_version' => array("Type"=>"varchar(10)","Null"=>"YES","Key"=>"","Default"=>"","Extra"=>""),
'active' => array("Type"=>"enum('Y','N')","Null"=>"YES","Key"=>"","Default"=>"Y","Extra"=>""),
'description' => array("Type"=>"varchar(255)","Null"=>"YES","Key"=>"","Default"=>"","Extra"=>""),
'type' => array("Type"=>"varchar(30)","Null"=>"NO","Key"=>"","Default"=>"ts3","Extra"=>""),

View File

@ -55,7 +55,14 @@
<div class="checkbox">
<label>
<input type="checkbox" id="inputTemplate-emailgserverupdate" name="templates[]" value="emailgserverupdate">
<?php echo $gsprache->master.' '.$gsprache->update;?>
<?php echo $gsprache->gameserver.' '.$gsprache->master.' '.$gsprache->update;?>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="inputTemplate-emailvoicemasterold" name="templates[]" value="emailvoicemasterold">
<?php echo $gsprache->voiceserver.' '.$gsprache->master.' '.$gsprache->update;?>
</label>
</div>

View File

@ -204,7 +204,7 @@
<hr>
<h3><?php echo $gsprache->master.' '.$gsprache->update;?></h3>
<h3><?php echo $gsprache->gameserver.' '.$gsprache->master.' '.$gsprache->update;?></h3>
<div class="form-group">
<?php foreach ($emailgserverupdate_xml as $array){ ?>
@ -232,6 +232,34 @@
<hr>
<h3><?php echo $gsprache->voiceserver.' '.$gsprache->master.' '.$gsprache->update;?></h3>
<div class="form-group">
<?php foreach ($emailvoicemasterold_xml as $array){ ?>
<label class="checkbox-inline">
<input id="inputCheckboxVoiceUpdate<?php echo $array['lang'];?>" name="languages-emailvoicemasterold[]" value="<?php echo $array['lang'];?>" onclick="textdrop('<?php echo $array['lang'];?>-emailvoicemasterold');" type="checkbox" <?php if($array['style']==1) echo 'checked';?>> <img src="images/flags/<?php echo $array['lang'];?>.png" alt="Flag: 16_<?php echo $array['lang'];?>'.png"/>
</label>
<?php } ?>
</div>
<?php foreach ($emailvoicemasterold_xml as $array) { ?>
<div id="<?php echo $array['lang'].'-emailvoicemasterold';?>" class="form-group <?php if ($array['style']==0) echo 'display_none';?>">
<label class="control-label" for="inputVoiceServerUpdate<?php echo $array['lang'];?>">XML <img src="images/flags/<?php echo $array['lang'];?>.png" alt="Flag: <?php echo $array['lang'];?>.png"/></label>
<div class="controls">
<textarea class="form-control" id="inputVoiceServerUpdate<?php echo $array['lang'];?>" name="emailvoicemasterold_xml_<?php echo $array['lang'];?>" rows="8"><?php echo $array['xml'];?></textarea>
</div>
</div>
<?php }?>
<div class="form-group">
<label class="control-label" for="inlineGserverUpdateTemplate"><?php echo $gsprache->template;?></label>
<div class="controls">
<textarea class="form-control" id="inlineGserverUpdateTemplate" name="emailgserverupdate" rows="8"><?php echo $email_settings['emailgserverupdate'];?></textarea>
</div>
</div>
<hr>
<h3><?php echo $sprache->emailpasswordrecovery;?></h3>
<div class="form-group">