mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Clean qstat leftovers
This commit is contained in:
parent
760bd5ffee
commit
83af9a834e
@ -104,7 +104,6 @@
|
||||
<port_gs>Gameserverport</port_gs>
|
||||
<premoved>Serverpasswort entfernt</premoved>
|
||||
<protect>Protection Modus</protect>
|
||||
<qstat>QStat Parameter</qstat>
|
||||
<ramMax>Maximaler Ram</ramMax>
|
||||
<ramMin>Minimaler Ram</ramMin>
|
||||
<rcon>RCON Passwort</rcon>
|
||||
|
@ -48,8 +48,6 @@
|
||||
<portStep>Port Schritte zum nächsten Server</portStep>
|
||||
<protect>Protection Modus</protect>
|
||||
<protectedSaveCFGs>Dateien behalten beim Protection Mode Switch</protectedSaveCFGs>
|
||||
<qstat>Qstat Parameter</qstat>
|
||||
<qstatpassparam>Qstat Passwortparameter</qstatpassparam>
|
||||
<ramLimited>Ram Limitiert</ramLimited>
|
||||
<rcon>Remote Passwort (RCON)</rcon>
|
||||
<requires>Benötigt</requires>
|
||||
|
@ -75,7 +75,6 @@
|
||||
<port_gs>Spilserverport</port_gs>
|
||||
<premoved>Serveradgangskode fjernet</premoved>
|
||||
<protect>Beskyttelse tilstand</protect>
|
||||
<qstat>Qstat parameter</qstat>
|
||||
<ramMax>Maksimale Hukommelse</ramMax>
|
||||
<ramMin>Minimum Hukommelse</ramMin>
|
||||
<rcon>Fjernbetjening adgangskode (RCON)</rcon>
|
||||
|
@ -47,8 +47,6 @@
|
||||
<portStep>Port skridt til næste server</portStep>
|
||||
<protect>Beskyttelse tilstand</protect>
|
||||
<protectedSaveCFGs>Filer, der skal holdes mens skifte Beskyttet tilstand</protectedSaveCFGs>
|
||||
<qstat>Qstat Parameter</qstat>
|
||||
<qstatpassparam>Qstat adgangskodeparameter</qstatpassparam>
|
||||
<ramLimited>Ram begrænset</ramLimited>
|
||||
<rcon>Fjernbetjening adgangskode (RCON)</rcon>
|
||||
<requires>Kræver</requires>
|
||||
|
@ -104,7 +104,6 @@
|
||||
<port_gs>Gameserverport</port_gs>
|
||||
<premoved>Serverpassword removed</premoved>
|
||||
<protect>Protection Mode</protect>
|
||||
<qstat>Qstat parameter</qstat>
|
||||
<ramMax>Maximum Ram</ramMax>
|
||||
<ramMin>Minimum Ram</ramMin>
|
||||
<rcon>Remote password (RCON)</rcon>
|
||||
|
@ -48,8 +48,6 @@
|
||||
<portStep>Port steps to next server</portStep>
|
||||
<protect>Protection modus</protect>
|
||||
<protectedSaveCFGs>Files to be kept while switching Protection Mode</protectedSaveCFGs>
|
||||
<qstat>Qstat Parameter</qstat>
|
||||
<qstatpassparam>Qstat passwordparameter</qstatpassparam>
|
||||
<ramLimited>Ram limited</ramLimited>
|
||||
<rcon>Remote password (RCON)</rcon>
|
||||
<requires>Requires</requires>
|
||||
|
@ -73,7 +73,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
|
||||
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.`qstat`='minecraft' GROUP BY t.`shorten` ORDER BY t.`shorten`");
|
||||
$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();
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
@ -446,11 +446,10 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
}
|
||||
if ($newlayout == 'Y') $SSH2customer = $SSH2customer . '-' . $gsswitchID;
|
||||
if (isset($restart) and $user_active == 'Y') {
|
||||
$query3 = $sql->prepare("SELECT s.`id`,s.`upload`,s.`map`,s.`servertemplate`,s.`mapGroup`,t.`qstat` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE t.`shorten`=? AND s.`switchID`=? LIMIT 1");
|
||||
$query3 = $sql->prepare("SELECT s.`id`,s.`upload`,s.`map`,s.`servertemplate`,s.`mapGroup`,t.`gameq`,t.`gamebinary` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE t.`shorten`=? AND s.`switchID`=? LIMIT 1");
|
||||
$query3->execute(array($shorten, $gsswitchID));
|
||||
foreach ($query3->fetchAll(PDO::FETCH_ASSOC) as $row3) {
|
||||
$runID = $row3['id'];
|
||||
$qstat = $row3['qstat'];
|
||||
$query3 = $sql->prepare("UPDATE `gsswitch` SET `serverid`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query3->execute(array($runID, $gsswitchID, $resellerid));
|
||||
$query3 = $sql->prepare("UPDATE `serverlist` SET `anticheat`=?,`map`=?,`mapGroup`=?,`servertemplate`=? WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
@ -479,10 +478,10 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
$tmp=gsrestart($gsswitchID,'re', $aeskey, $resellerid);
|
||||
if (is_array($tmp)) foreach($tmp as $t) $cmds[] = $t;
|
||||
}
|
||||
} else if ($restart == 'N' and $qstat == 'minecraft' and $worldsafe == 'Y') {
|
||||
} else if ($restart == 'N' and $row3['gameq'] == 'minecraft' and $worldsafe == 'Y') {
|
||||
$cmds[]="sudo -u ${SSH2customer} ./control.sh mc_ws $gsfolder";
|
||||
echo "Minecraft worlsafe: $server\r\n";
|
||||
} else if ($restart == 'N' and $qstat == 'a2s' and ($uploadtype == 2 or $uploadtype == '3') and $upload== 'Y') {
|
||||
} else if ($restart == 'N' and $row3['gamebinary'] == 'srcds_run' and ($uploadtype == 2 or $uploadtype == '3') and $upload== 'Y') {
|
||||
$tmp=gsrestart($gsswitchID,'du', $aeskey, $resellerid);
|
||||
if (is_array($tmp)) foreach($tmp as $t) $cmds[] = $t;
|
||||
}
|
||||
|
@ -319,13 +319,12 @@ if ($ui->smallletters('w',5, 'get') == 'check') {
|
||||
$query = $sql->prepare("SELECT `id` FROM `eac` WHERE `active`='Y' AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($reseller_id));
|
||||
$count = $query->rowCount();
|
||||
$query2 = $sql->prepare("SELECT `qstat` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=? LIMIT 1");
|
||||
$query2 = $sql->prepare("SELECT `gamebinary` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=? LIMIT 1");
|
||||
$query2->execute(array($get_shorten, $reseller_id));
|
||||
foreach ($query2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
|
||||
$qstat = $row2['qstat'];
|
||||
if ($qstat=="a2s" or $qstat=="hla2s") {
|
||||
if ($row['gamebinary'] == 'srcds_run' or $row['gamebinary'] == 'hlds_run') {
|
||||
$anticheatsoft="Valve Anti Cheat";
|
||||
} else if ($qstat=="cods") {
|
||||
} else if ($row2['gamebinary'] == 'cod4_lnxded') {
|
||||
$anticheatsoft="Punkbuster";
|
||||
} else {
|
||||
$anticheatsoft = '';
|
||||
|
@ -165,11 +165,11 @@ class masterServer {
|
||||
// if an ID is given collect only data for this ID, else collect all game data for this rootserver
|
||||
if ($all === true) {
|
||||
|
||||
$query = $sql->prepare("SELECT t.`id` AS `servertype_id`,t.`shorten`,t.`qstat`,t.`steamgame`,t.`appID`,t.`steamVersion`,t.`updates`,t.`downloadPath`,t.`gamebinary`,r.`localVersion`,s.`updates` AS `supdates` FROM `rservermasterg` r INNER JOIN `servertypes` t ON r.`servertypeid`=t.`id` INNER JOIN `rserverdata` s ON r.`serverid`=s.`id` WHERE r.`serverid`=? ${extraSQL}");
|
||||
$query = $sql->prepare("SELECT t.`id` AS `servertype_id`,t.`shorten`,t.`steamgame`,t.`appID`,t.`steamVersion`,t.`updates`,t.`downloadPath`,t.`gamebinary`,r.`localVersion`,s.`updates` AS `supdates` FROM `rservermasterg` r INNER JOIN `servertypes` t ON r.`servertypeid`=t.`id` INNER JOIN `rserverdata` s ON r.`serverid`=s.`id` WHERE r.`serverid`=? ${extraSQL}");
|
||||
$query->execute(array($this->rootID));
|
||||
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT t.`id` AS `servertype_id`,t.`shorten`,t.`qstat`,t.`steamgame`,t.`appID`,t.`steamVersion`,t.`updates`,t.`downloadPath`,t.`gamebinary`,r.`localVersion`,s.`updates` AS `supdates` FROM `rservermasterg` r INNER JOIN `servertypes` t ON r.`servertypeid`=t.`id` INNER JOIN `rserverdata` s ON r.`serverid`=s.`id` WHERE r.`serverid`=? AND r.`servertypeid`=? ${extraSQL} LIMIT 1");
|
||||
$query = $sql->prepare("SELECT t.`id` AS `servertype_id`,t.`shorten`,t.`steamgame`,t.`appID`,t.`steamVersion`,t.`updates`,t.`downloadPath`,t.`gamebinary`,r.`localVersion`,s.`updates` AS `supdates` FROM `rservermasterg` r INNER JOIN `servertypes` t ON r.`servertypeid`=t.`id` INNER JOIN `rserverdata` s ON r.`serverid`=s.`id` WHERE r.`serverid`=? AND r.`servertypeid`=? ${extraSQL} LIMIT 1");
|
||||
$query->execute(array($this->rootID, $all));
|
||||
}
|
||||
|
||||
|
@ -641,14 +641,13 @@ if (!function_exists('passwordgenerate')) {
|
||||
$tempCmds = array();
|
||||
$stopped = 'Y';
|
||||
|
||||
$query = $sql->prepare("SELECT g.*,g.`id` AS `switchID`,AES_DECRYPT(g.`ppassword`,:aeskey) AS `decryptedppass`,AES_DECRYPT(g.`ftppassword`,:aeskey) AS `decryptedftppass`,s.*,AES_DECRYPT(s.`uploaddir`,:aeskey) AS `decypteduploaddir`,AES_DECRYPT(s.`webapiAuthkey`,:aeskey) AS `dwebapiAuthkey`,g.`pallowed`,t.`modfolder`,t.`gamebinary`,t.`binarydir`,t.`shorten`,t.`qstat`,t.`appID` FROM `gsswitch` g INNER JOIN `serverlist` s ON g.`serverid`=s.`id` INNER JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE g.`active`='Y' AND g.`id`=:serverid AND g.`resellerid`=:reseller_id AND t.`resellerid`=:reseller_id LIMIT 1");
|
||||
$query = $sql->prepare("SELECT g.*,g.`id` AS `switchID`,AES_DECRYPT(g.`ppassword`,:aeskey) AS `decryptedppass`,AES_DECRYPT(g.`ftppassword`,:aeskey) AS `decryptedftppass`,s.*,AES_DECRYPT(s.`uploaddir`,:aeskey) AS `decypteduploaddir`,AES_DECRYPT(s.`webapiAuthkey`,:aeskey) AS `dwebapiAuthkey`,g.`pallowed`,t.`modfolder`,t.`gamebinary`,t.`binarydir`,t.`shorten`,t.`appID` FROM `gsswitch` g INNER JOIN `serverlist` s ON g.`serverid`=s.`id` INNER JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE g.`active`='Y' AND g.`id`=:serverid AND g.`resellerid`=:reseller_id AND t.`resellerid`=:reseller_id LIMIT 1");
|
||||
$query->execute(array(':aeskey' => $aeskey, ':serverid' => $switchID, ':reseller_id' => $reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$serverid = $row['serverid'];
|
||||
$anticheat = $row['anticheat'];
|
||||
$servertemplate = $row['servertemplate'];
|
||||
$protected = $row['protected'];
|
||||
$qstat = $row['qstat'];
|
||||
$upload = $row['upload'];
|
||||
$uploaddir = $row['decypteduploaddir'];
|
||||
$shorten = $row['shorten'];
|
||||
@ -659,8 +658,8 @@ if (!function_exists('passwordgenerate')) {
|
||||
$port3 = $row['port3'];
|
||||
$port4 = $row['port4'];
|
||||
$port5 = $row['port5'];
|
||||
$minram = ($row['minram']>0) ? $row['minram'] : 512;
|
||||
$maxram = ($row['maxram']>0) ? $row['maxram'] : 1024;
|
||||
$minram = ($row['minram'] > 0) ? $row['minram'] : 512;
|
||||
$maxram = ($row['maxram'] > 0) ? $row['maxram'] : 1024;
|
||||
$gamebinary = $row['gamebinary'];
|
||||
$binarydir = $row['binarydir'];
|
||||
$eacallowed = $row['eacallowed'];
|
||||
@ -677,12 +676,14 @@ if (!function_exists('passwordgenerate')) {
|
||||
$modcmd = $row['modcmd'];
|
||||
$pallowed = $row['pallowed'];
|
||||
$user_id = $row['userid'];
|
||||
|
||||
$query = $sql->prepare("SELECT `cname` FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($user_id));
|
||||
$customer = $query->fetchColumn();
|
||||
if ($row['newlayout'] == 'Y') {
|
||||
$customer .= '-' . $row['switchID'];
|
||||
}
|
||||
|
||||
$cores = ($row['taskset'] == 'Y') ? $row['cores'] : '';
|
||||
$maxcores = count(preg_split("/\,/", $cores, -1,PREG_SPLIT_NO_EMPTY));
|
||||
if ($maxcores == 0) {
|
||||
@ -700,13 +701,14 @@ if (!function_exists('passwordgenerate')) {
|
||||
}
|
||||
$bindir = $absolutepath. '/' . $binarydir;
|
||||
$cvarprotect = array();
|
||||
if ($qstat == 'hla2s' and $tvenable == 'Y') {
|
||||
if ($gamebinary == 'hlds_run' and $tvenable == 'Y') {
|
||||
$slots++;
|
||||
}
|
||||
$modsCmds = array();
|
||||
$cvars=array('%binary%', '%tic%', '%ip%', '%port%', '%tvport%', '%port2%', '%port3%', '%port4%', '%port5%', '%slots%', '%map%', '%mapgroup%', '%fps%', '%minram%', '%maxram%', '%maxcores%', '%folder%', '%user%', '%absolutepath%');
|
||||
$cvars = array('%binary%', '%tic%', '%ip%', '%port%', '%tvport%', '%port2%', '%port3%', '%port4%', '%port5%', '%slots%', '%map%', '%mapgroup%', '%fps%', '%minram%', '%maxram%', '%maxcores%', '%folder%', '%user%', '%absolutepath%');
|
||||
$query2 = $sql->prepare("SELECT `cmd`,`modcmds`,`configedit` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=? LIMIT 1");
|
||||
$query2->execute(array($shorten, $reseller_id));
|
||||
|
||||
foreach ($query2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
|
||||
|
||||
foreach (explode("\r\n", $row2['configedit']) as $line) {
|
||||
@ -765,10 +767,10 @@ if (!function_exists('passwordgenerate')) {
|
||||
$cmd = $row2['cmd'];
|
||||
}
|
||||
}
|
||||
if ($qstat == 'a2s' and $tvenable == 'N') {
|
||||
if ($gamebinary == 'srcds_run' and $tvenable == 'N') {
|
||||
$cmd .= ' -nohltv -tvdisable';
|
||||
}
|
||||
if (($protected == 'N' and ($qstat == 'a2s' or $qstat == 'hla2s') and ($anticheat == 2 or $anticheat == 3 or $anticheat == 4 or $anticheat == 5 or $anticheat == 6)) or (($protected == 'Y' and ($anticheat == 3 or $anticheat == 4 or $anticheat == 5 or $anticheat == 6)) and ($qstat == 'a2s' or $qstat == 'hla2s') and $eacallowed == 'Y')) {
|
||||
if (($protected == 'N' and ($gamebinary == 'hlds_run' or $gamebinary == 'srcds_run') and ($anticheat == 2 or $anticheat == 3 or $anticheat == 4 or $anticheat == 5 or $anticheat == 6)) or (($protected == 'Y' and ($anticheat == 3 or $anticheat == 4 or $anticheat == 5 or $anticheat == 6)) and ($gamebinary == 'srcds_run' or $gamebinary == 'hlds_run') and $eacallowed == 'Y')) {
|
||||
$cmd .= ' -insecure';
|
||||
}
|
||||
|
||||
@ -805,9 +807,9 @@ if (!function_exists('passwordgenerate')) {
|
||||
if ($row2['decyptedftpuploadpath'] != null and $row2['decyptedftpuploadpath'] != '' and $row2['decyptedftpuploadpath'] != 'ftp://username:password@1.1.1.1/demos') {
|
||||
$ftpupload = $row2['decyptedftpuploadpath'];
|
||||
}
|
||||
if ($qstat == 'a2s') {
|
||||
if ($gamebinary == 'srcds_run') {
|
||||
$cmd .= ' +rcon_password ' .$row2['rcon'] . ' +sv_password ' . $row2['password']. ' +tv_enable 1 +tv_autorecord 1';
|
||||
} else if ($qstat == 'hla2s') {
|
||||
} else if ($gamebinary == 'hlds_run') {
|
||||
$cmd .= ' +rcon_password ' . $row2['rcon'] . ' +sv_password ' . $row2['password'];
|
||||
}
|
||||
}
|
||||
@ -819,7 +821,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
}
|
||||
if (in_array($row['appID'], array(730,740)) and isid($row['workshopCollection'], 10) and wpreg_check($row['dwebapiAuthkey'], 32) and strlen($row['dwebapiAuthkey'])>0 and $row['workshopCollection']>0) {
|
||||
$cmd .= ' +host_workshop_collection ' . $row['workshopCollection'] . ' +workshop_start_map ' . $map . ' -authkey ' . $row['dwebapiAuthkey'];
|
||||
$cmd = preg_replace('/[\s\s+]{1,}\+map[\s\s+]{1,}[\w-_!%]{1,}/','', $cmd);
|
||||
$cmd = preg_replace('/[\s\s+]{1,}\+map[\s\s+]{1,}[\w-_!%]{1,}/', '', $cmd);
|
||||
}
|
||||
$rdata = serverdata('root', $rootid, $aeskey);
|
||||
$sship = $rdata['ip'];
|
||||
@ -840,7 +842,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
$customerProtected = $customer . '-p';
|
||||
}
|
||||
|
||||
if ($action!='du' and $eacallowed == 'Y' and ($anticheat == 3 or $anticheat == 4 or $anticheat == 5 or $anticheat == 6) and ($qstat == 'a2s' or $qstat == 'hla2s')) {
|
||||
if ($action!='du' and $eacallowed == 'Y' and ($anticheat == 3 or $anticheat == 4 or $anticheat == 5 or $anticheat == 6) and ($gamebinary == 'srcds_run' or $gamebinary == 'hlds_run')) {
|
||||
|
||||
if ($action == 'so' or $action == 'sp') {
|
||||
$rcon = '';
|
||||
@ -905,7 +907,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($action!='du' and $eacallowed == 'Y' and ($qstat == 'a2s' or $qstat == 'hla2s') and ($anticheat == 1 or $anticheat == 2)) {
|
||||
} else if ($action!='du' and $eacallowed == 'Y' and ($gamebinary == 'srcds_run' or $gamebinary == 'hlds_run') and ($anticheat == 1 or $anticheat == 2)) {
|
||||
$rcon = '';
|
||||
eacchange('remove', $serverid, $rcon, $reseller_id);
|
||||
}
|
||||
@ -916,8 +918,8 @@ if (!function_exists('passwordgenerate')) {
|
||||
$stopped = 'Y';
|
||||
|
||||
if ($action == 'so') {
|
||||
$tempCmds[]="sudo -u ${customer} ./control.sh gstop $customer \"$serverfolder\" $qstat $protectedString";
|
||||
if ((isset($ftpupload) and $qstat == 'a2s')) {
|
||||
$tempCmds[]="sudo -u ${customer} ./control.sh gstop $customer \"$serverfolder\" $gamebinary $protectedString";
|
||||
if ((isset($ftpupload) and $gamebinary == 'srcds_run')) {
|
||||
$tempCmds[]="sudo -u ${customer} ./control.sh demoupload \"$bindir\" \"$ftpupload\" \"$modfolder\"";
|
||||
}
|
||||
} else {
|
||||
@ -931,10 +933,10 @@ if (!function_exists('passwordgenerate')) {
|
||||
if ($protected == 'N' and count($installedaddons)>0) {
|
||||
$tempCmds[] = "sudo -u ${customer} ./control.sh addonmatch $customer \"$serverfolder\" \"".implode(' ', $installedaddons)."\"";
|
||||
}
|
||||
$restartCmd = "sudo -u ${customer} ./control.sh grestart $customer \"$serverfolder\" \"$startline\" $protectedString $qstat \"$cores\"";
|
||||
$restartCmd = "sudo -u ${customer} ./control.sh grestart $customer \"$serverfolder\" \"$startline\" $protectedString $gamebinary \"$cores\"";
|
||||
}
|
||||
|
||||
if (!isset($ftpupload) and $qstat == 'a2s' and isurl($uploaddir)) {
|
||||
if (!isset($ftpupload) and $gamebinary == 'srcds_run' and isurl($uploaddir)) {
|
||||
|
||||
if ($upload==2) {
|
||||
$uploadcmd = "./control.sh demoupload \"$bindir\" \"$uploaddir\" \"$modfolder\" manual remove";
|
||||
|
@ -180,13 +180,13 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen
|
||||
} else {
|
||||
$installing = true;
|
||||
}
|
||||
$qstat = $row['qstat'];
|
||||
if ($qstat == 'a2s') {
|
||||
|
||||
if ($row['gamebinary'] == 'srcds_run') {
|
||||
$upload = 1;
|
||||
} else {
|
||||
$upload = 0;
|
||||
}
|
||||
$table[] = array('description' => $row['description'], 'id' => $row['id'], 'steamgame' => $row['steamgame'], 'shorten' => $shorten,'gamebinary' => $row['gamebinary'], 'binarydir' => $row['binarydir'], 'modfolder' => $row['modfolder'], 'fps' => $row['fps'], 'slots' => $row['slots'], 'map' => $row['map'], 'mapGroup' => $row['mapGroup'], 'cmd' => $cmd,'tic' => $row['tic'], 'upload' => $upload,'qstat' => $qstat,'installing' => $installing);
|
||||
$table[] = array('description' => $row['description'], 'id' => $row['id'], 'steamgame' => $row['steamgame'], 'shorten' => $shorten,'gamebinary' => $row['gamebinary'], 'binarydir' => $row['binarydir'], 'modfolder' => $row['modfolder'], 'fps' => $row['fps'], 'slots' => $row['slots'], 'map' => $row['map'], 'mapGroup' => $row['mapGroup'], 'cmd' => $cmd,'tic' => $row['tic'], 'upload' => $upload,'installing' => $installing);
|
||||
$i++;
|
||||
}
|
||||
if ($query->rowcount()==0) {
|
||||
@ -662,7 +662,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen
|
||||
foreach (preg_split('/\,/', $row['cores'],-1,PREG_SPLIT_NO_EMPTY) as $uc) {
|
||||
$usedcores[] = $uc;
|
||||
}
|
||||
$query2 = $sql->prepare("SELECT s.*,AES_DECRYPT(s.`uploaddir`,?) AS `decypteduploaddir`,t.`shorten`,t.`description`,t.`qstat`,t.`gamebinary`,t.`binarydir`,t.`modfolder` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE s.`switchID`=? AND s.`resellerid`=?");
|
||||
$query2 = $sql->prepare("SELECT s.*,AES_DECRYPT(s.`uploaddir`,?) AS `decypteduploaddir`,t.`shorten`,t.`description`,t.`gamebinary`,t.`gamebinary`,t.`binarydir`,t.`modfolder` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE s.`switchID`=? AND s.`resellerid`=?");
|
||||
$query2->execute(array($aeskey,$server_id,$reseller_id));
|
||||
$i = 0;
|
||||
$gamestringtemp = '';
|
||||
@ -674,8 +674,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen
|
||||
} else {
|
||||
$style="style=\"display: none; border-spacing: 0px;\"";
|
||||
}
|
||||
$qstat = $row2['qstat'];
|
||||
if ($qstat == 'a2s') {
|
||||
if ($row2['gamebinary'] == 'srcds_run') {
|
||||
if ($row2['upload']>0) {
|
||||
$upload = $row2['upload'];
|
||||
} else {
|
||||
@ -688,7 +687,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen
|
||||
}
|
||||
$gamestringtemp .= "_$shorten";
|
||||
$cmd=stripslashes($row2['cmd']);
|
||||
$table[] = array('id' => $row2['id'], 'shorten' => $row2['shorten'], 'description' => $row2['description'], 'gamebinary' => $row2['gamebinary'], 'binarydir' => $row2['binarydir'], 'modfolder' => $row2['modfolder'], 'fps' => $row2['fps'], 'map' => $row2['map'], 'mapGroup' => $row2['mapGroup'], 'cmd' => $cmd,'tic' => $row2['tic'], 'qstat' => $qstat,'upload' => $upload,'uploaddir' => $uploaddir,'userfps' => $row2['userfps'], 'usertick' => $row2['usertick'], 'usermap' => $row2['usermap'], 'user_uploaddir' => $row2['user_uploaddir'], 'owncmd' => $row2['owncmd'], 'style' => $style);
|
||||
$table[] = array('id' => $row2['id'], 'shorten' => $row2['shorten'], 'description' => $row2['description'], 'gamebinary' => $row2['gamebinary'], 'binarydir' => $row2['binarydir'], 'modfolder' => $row2['modfolder'], 'fps' => $row2['fps'], 'map' => $row2['map'], 'mapGroup' => $row2['mapGroup'], 'cmd' => $cmd,'tic' => $row2['tic'],'upload' => $upload,'uploaddir' => $uploaddir,'userfps' => $row2['userfps'], 'usertick' => $row2['usertick'], 'usermap' => $row2['usermap'], 'user_uploaddir' => $row2['user_uploaddir'], 'owncmd' => $row2['owncmd'], 'style' => $style);
|
||||
$i++;
|
||||
}
|
||||
$gamestring = $i.$gamestringtemp;
|
||||
|
@ -384,9 +384,9 @@ if ($ui->pregw('g','14', 'get')) {
|
||||
if ($ui->pregw('m','20', 'get')) {
|
||||
$list_gtype = $ui->pregw('m','20', 'get');
|
||||
if ($where != '') {
|
||||
$where .=" AND (s.`shorten`='$list_gtype' OR s.`qstat`='$list_gtype')";
|
||||
$where .=" AND s.`shorten`='$list_gtype'";
|
||||
} else if ($list_gtype!="all") {
|
||||
$where="WHERE (s.`shorten`='$list_gtype' OR s.`qstat`='$list_gtype')";
|
||||
$where="WHERE s.`shorten`='$list_gtype'";
|
||||
}
|
||||
} else {
|
||||
$list_gtype = '';
|
||||
|
@ -36,19 +36,20 @@
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if ((!isset($user_id) or $main != 1) or (isset($user_id) and !$pa['restart']) or !$ui->id('id',19, 'get')) {
|
||||
if ((!isset($user_id) or $main != 1) or (isset($user_id) and !$pa['restart']) or !$ui->id('id', 10, 'get')) {
|
||||
redirect('userpanel.php');
|
||||
}
|
||||
|
||||
$server_id = (int) $ui->id('id',19, 'get');
|
||||
$id = (int) $ui->id('id', 10, 'get');
|
||||
$sprache = getlanguagefile('gserver', $user_language, $reseller_id);
|
||||
$pallowed = 'N';
|
||||
|
||||
if (isset($admin_id) and $reseller_id != 0 and $admin_id != $reseller_id) {
|
||||
$reseller_id = $admin_id;
|
||||
}
|
||||
if (!isset($_SESSION['sID']) or in_array($ui->id('id',19, 'get'), $substituteAccess['gs'])) {
|
||||
if (!isset($_SESSION['sID']) or in_array($id, $substituteAccess['gs'])) {
|
||||
$query = $sql->prepare("SELECT g.`serverip`,g.`port`,g.`protected`,s.`anticheat`,g.`pallowed`,g.`eacallowed`,s.`map`,s.`mapGroup`,t.`shorten`,t.`mapGroup` AS `defaultMapGroup` FROM `gsswitch` g LEFT JOIN `serverlist` s ON g.`serverid`=s.`id` LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE g.`id`=? AND g.`userid`=? AND g.`resellerid`=? LIMIT 1");
|
||||
$query->execute(array($ui->id('id',19, 'get'), $user_id, $reseller_id));
|
||||
$query->execute(array($id, $user_id, $reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$serverip = $row['serverip'];
|
||||
$port = $row['port'];
|
||||
@ -71,9 +72,11 @@ if (!isset($rowcount) or $rowcount == 0) {
|
||||
}
|
||||
|
||||
if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset($port)) {
|
||||
|
||||
$date2 = $ui->gamestring('date', 'post');
|
||||
$date = explode('_', $date2);
|
||||
$qstat_array = array();
|
||||
$gameqArray = array();
|
||||
$binaryArray = array();
|
||||
|
||||
if ($date[0] == 'mon') {
|
||||
$day = $sprache->monday;
|
||||
@ -105,18 +108,19 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
$hlds_6 = $row['hlds_6'];
|
||||
}
|
||||
|
||||
$query = $sql->prepare("SELECT s.`upload`,t.`shorten`,t.`description`,t.`qstat`,t.`mapGroup`,t.`protected`,t.`qstat` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE s.`switchID`=? AND s.`resellerid`=? GROUP BY t.`shorten`");
|
||||
$query->execute(array($ui->id('id',19, 'get'), $reseller_id));
|
||||
$query = $sql->prepare("SELECT s.`upload`,t.`shorten`,t.`description`,t.`gameq`,t.`gamebinary`,t.`mapGroup`,t.`protected` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE s.`switchID`=? AND s.`resellerid`=? GROUP BY t.`shorten`");
|
||||
$query->execute(array($id, $reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$shorten = $row['shorten'];
|
||||
$uploadallowed[] = $row['upload'];
|
||||
$qstat_array[$shorten] = $row['qstat'];
|
||||
$gameqArray[$shorten] = $row['gameq'];
|
||||
$binaryArray[$shorten] = $row['gamebinary'];
|
||||
|
||||
if (!isset($qstat)) {
|
||||
$qstat = $row['qstat'];
|
||||
if (!isset($gameq)) {
|
||||
$gameq = $row['gameq'];
|
||||
}
|
||||
|
||||
$table[$row['shorten']] = array('shorten' => $shorten,'description' => $row['description'], 'defaultMapGroup' => $row['mapGroup'], 'protected' => $row['protected'], 'qstat' => $row['qstat']);
|
||||
$table[$row['shorten']] = array('shorten' => $shorten,'description' => $row['description'], 'defaultMapGroup' => $row['mapGroup'], 'protected' => $row['protected'], 'gameq' => $row['gameq'], 'gamebinary' => $row['gamebinary']);
|
||||
}
|
||||
|
||||
$template = '';
|
||||
@ -127,29 +131,33 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
$backup = '';
|
||||
$worldsafe = 'N';
|
||||
$upload = '';
|
||||
$binary = '';
|
||||
|
||||
$query = $sql->prepare("SELECT * FROM `gserver_restarts` WHERE `restarttime`=? AND `switchID`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($date2, $ui->id('id',19, 'get'), $reseller_id));
|
||||
$query->execute(array($date2, $id, $reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$template = $row['template'];
|
||||
$anticheat = $row['anticheat'];
|
||||
$gsswitch = $row['gsswitch'];
|
||||
$defaultMapGroup = $table[$row['gsswitch']]['defaultMapGroup'];
|
||||
if ($defaultMapGroup != null) $mapGroup = $row['mapGroup'];
|
||||
$map = $row['map'];
|
||||
$pro = $row['protected'];
|
||||
$restart = $row['restart'];
|
||||
$backup = $row['backup'];
|
||||
$worldsafe = $row['worldsafe'];
|
||||
$qstat = $qstat_array[$gsswitch];
|
||||
if (in_array('a2s', $qstat_array) and (in_array(2, $uploadallowed) or in_array(3, $uploadallowed))) {
|
||||
$binary = $binaryArray[$gsswitch];
|
||||
|
||||
if ($defaultMapGroup != null) {
|
||||
$mapGroup = $row['mapGroup'];
|
||||
}
|
||||
|
||||
if (in_array('srcds_run', $binaryArray) and (in_array(2, $uploadallowed) or in_array(3, $uploadallowed))) {
|
||||
$upload = $row['upload'];
|
||||
}
|
||||
}
|
||||
if ($restart == 'Y'){
|
||||
$style='style="width:690px;"';
|
||||
} else {
|
||||
$style='style="display:none;border-spacing:0px;"';
|
||||
}
|
||||
|
||||
$style = ($restart == 'Y') ? 'style="width:690px;"' : 'style="display:none;border-spacing:0px;"';
|
||||
|
||||
if (!isset($eac) and $eacallowed== 'Y' and $rowcount>0 and ($gsswitch == 'css' or $gsswitch == 'cod4' or $gsswitch == 'cstrike' or $gsswitch == 'czero' or $gsswitch == 'tf')) {
|
||||
if ($gsswitch == 'cstrike' or $gsswitch == 'czero') {
|
||||
|
||||
@ -192,9 +200,9 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
$eac = array();
|
||||
}
|
||||
|
||||
if ($qstat == 'a2s' or $qstat == 'hla2s') {
|
||||
if ($binary == 'srcds_run' or $binary == 'hlds_run') {
|
||||
$anticheatsoft = 'Valve Anti Cheat';
|
||||
} else if ($qstat == 'cods') {
|
||||
} else if ($binary == 'cod4_lnxded') {
|
||||
$anticheatsoft = 'Punkbuster';
|
||||
} else {
|
||||
$anticheatsoft = '';
|
||||
@ -204,13 +212,13 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
|
||||
} else if ($ui->smallletters('edit2',4, 'post') == 'edit' and $ui->gamestring('date', 'post') and $ui->id('template',1, 'post') and $ui->id('anticheat',1, 'post') and $ui->gamestring('shorten', 'post') and $ui->active('backup', 'post') and $ui->active('restart', 'post') and isset($serverip) and isset($port)) {
|
||||
|
||||
$qstat_array = array();
|
||||
$gameqArray = array();
|
||||
$date = $ui->gamestring('date', 'post');
|
||||
$template = $ui->id('template',1, 'post');
|
||||
$anticheat = $ui->id('anticheat',1, 'post');
|
||||
$gsswitch = $ui->gamestring('shorten', 'post');
|
||||
|
||||
$query = $sql->prepare("SELECT t.`protected`,t.`qstat` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE t.`shorten`=? AND s.`resellerid`=?");
|
||||
$query = $sql->prepare("SELECT t.`protected`,t.`gameq` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE t.`shorten`=? AND s.`resellerid`=?");
|
||||
$query->execute(array($gsswitch, $reseller_id));
|
||||
$serverlist = $query->fetch(PDO::FETCH_ASSOC);
|
||||
$query->closeCursor();
|
||||
@ -228,12 +236,8 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
}
|
||||
|
||||
$worldsafe = ($ui->active('worldsafe', 'post')) ? $ui->active('worldsafe', 'post') : 'N';
|
||||
if ($ui->active('worldsafe', 'post') and in_array('a2s', $qstat_array) and ($uploadallowed == 2 or $uploadallowed == 3)) {
|
||||
$worldsafe = $ui->post['worldsafe'];
|
||||
} else {
|
||||
$worldsafe = 'N';
|
||||
}
|
||||
if ($anticheat>2) {
|
||||
|
||||
if ($anticheat > 2) {
|
||||
if ($gsswitch == 'cstrike' or $gsswitch == 'czero') {
|
||||
if ($anticheat==3 and $hlds_3== 'N' and $hlds_5 == 'Y') {
|
||||
$anticheat = 5;
|
||||
@ -266,11 +270,12 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
}
|
||||
$restart = $ui->active('restart', 'post');
|
||||
$backup = $ui->active('backup', 'post');
|
||||
if($ui->mapname('map', 'post') && $serverlist['qstat']!='minecraft') {
|
||||
|
||||
if($ui->mapname('map', 'post') && $serverlist['gameq'] != 'minecraft') {
|
||||
$map = $ui->mapname('map', 'post');
|
||||
}
|
||||
else {
|
||||
$map = "";
|
||||
$map = '';
|
||||
}
|
||||
|
||||
if ($ui->active('protected', 'post') && $serverlist['protected']=='Y') {
|
||||
@ -284,40 +289,43 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
$stvupload = 'N';
|
||||
}
|
||||
$query = $sql->prepare("SELECT `id` FROM `gserver_restarts` WHERE `restarttime`=? AND `switchID`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($date, $ui->id('id',19, 'get'), $reseller_id));
|
||||
$query->execute(array($date, $id, $reseller_id));
|
||||
$rowcount = $query->rowCount();
|
||||
if ($rowcount==0) {
|
||||
$pupdate = $sql->prepare("INSERT INTO `gserver_restarts` (`template`,`anticheat`,`protected`,`restarttime`,`gsswitch`,`map`,`mapGroup`,`restart`,`backup`,`worldsafe`,`upload`,`switchID`,`userid`,`resellerid`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
$pupdate->execute(array($template, $anticheat, $protected, $date, $gsswitch, $map, $ui->mapname('mapGroup', 'post'), $restart, $backup, $worldsafe, $stvupload, $ui->id('id',19, 'get'), $user_id, $reseller_id));
|
||||
$pupdate->execute(array($template, $anticheat, $protected, $date, $gsswitch, $map, $ui->mapname('mapGroup', 'post'), $restart, $backup, $worldsafe, $stvupload, $id, $user_id, $reseller_id));
|
||||
} else {
|
||||
$pupdate = $sql->prepare("UPDATE `gserver_restarts` SET `template`=?,`anticheat`=?,`protected`=?,`gsswitch`=?,`map`=?,`mapGroup`=?,`restart`=?,`backup`=?,`worldsafe`=?,`upload`=? WHERE `restarttime`=? AND `switchID`=? AND `userid`=? AND `resellerid`=? LIMIT 1");
|
||||
$pupdate->execute(array($template, $anticheat, $protected, $gsswitch, $map, $ui->mapname('mapGroup', 'post'), $restart, $backup, $worldsafe, $stvupload, $date, $ui->id('id',19, 'get'), $user_id, $reseller_id));
|
||||
$pupdate->execute(array($template, $anticheat, $protected, $gsswitch, $map, $ui->mapname('mapGroup', 'post'), $restart, $backup, $worldsafe, $stvupload, $date, $id, $user_id, $reseller_id));
|
||||
}
|
||||
$template_file = $spracheResponse->table_add;
|
||||
} else if ($ui->smallletters('delete',6, 'post') == 'delete' and $ui->gamestring('date', 'post') and isset($serverip) and isset($port)) {
|
||||
$date = $ui->gamestring('date', 'post');
|
||||
$pdelete = $sql->prepare("DELETE FROM `gserver_restarts` WHERE `restarttime`=? AND `switchID`=? AND `resellerid`=? LIMIT 1");
|
||||
$pdelete->execute(array($date, $ui->id('id',19, 'get'), $reseller_id));
|
||||
$pdelete->execute(array($date, $id, $reseller_id));
|
||||
$template_file = $spracheResponse->table_del;;
|
||||
} else if (isset($serverip) and isset($port)){
|
||||
|
||||
$backup = 'N';
|
||||
$i = 0;
|
||||
while ($i<24) {
|
||||
$gameqArray = array();
|
||||
|
||||
while ($i < 24) {
|
||||
$restarts[$i] = array('mon' => '','tue' => '','wed' => '','thu' => '','fri' => '','sat' => '','sun' => '');
|
||||
$i++;
|
||||
}
|
||||
$query = $sql->prepare("SELECT t.`shorten`,t.`qstat` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE s.`switchID`=? AND s.`resellerid`=? GROUP BY t.`shorten`");
|
||||
$query->execute(array($ui->id('id',19, 'get'), $reseller_id));
|
||||
|
||||
$query = $sql->prepare("SELECT t.`shorten`,t.`gameq`,t.`gamebinary` FROM `serverlist` s LEFT JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE s.`switchID`=? AND s.`resellerid`=? GROUP BY t.`shorten`");
|
||||
$query->execute(array($id, $reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$shorten = $row['shorten'];
|
||||
$qstat_array[$shorten] = $row['qstat'];
|
||||
$gameqArray[$shorten] = array('gameq' => $row['gameq'], 'gamebinary' => $row['gamebinary']);
|
||||
}
|
||||
$backup = 'N';
|
||||
|
||||
$query = $sql->prepare("SELECT `template`,`restarttime`,`gsswitch`,`anticheat`,`protected`,`map`,`restart`,`backup`,`worldsafe`,`upload` FROM `gserver_restarts` WHERE `switchID`=? AND `resellerid`=?");
|
||||
$query->execute(array($ui->id('id',19, 'get'), $reseller_id));
|
||||
$query->execute(array($id, $reseller_id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$restarttime=explode("_", $row['restarttime']);
|
||||
$day = $restarttime[0];
|
||||
$hour = $restarttime[1];
|
||||
|
||||
$shorten = $row['gsswitch'];
|
||||
$template = $row['template'];
|
||||
$restart = $row['restart'];
|
||||
@ -325,30 +333,34 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
$worldsafe = $row['worldsafe'];
|
||||
$upload = $row['upload'];
|
||||
$protected = $row['protected'];
|
||||
if (isset($qstat_array[$shorten])) {
|
||||
$qstat = $qstat_array[$shorten];
|
||||
} else {
|
||||
$qstat = '';
|
||||
}
|
||||
if (isset($qstat) and $qstat == 'a2s' or $qstat == 'hla2s') {
|
||||
$anticheatsoft="VAC";
|
||||
} else if (isset($qstat) and $qstat == 'cods') {
|
||||
$anticheatsoft="PBuster";
|
||||
$anticheat = $row['anticheat'];
|
||||
|
||||
$gamebinary = (isset($gameqArray[$shorten])) ? $gameqArray[$shorten]['gamebinary'] : '';
|
||||
|
||||
$restarttime = explode('_', $row['restarttime']);
|
||||
$day = $restarttime[0];
|
||||
$hour = $restarttime[1];
|
||||
|
||||
if ($gamebinary == 'srcds_run' or $gamebinary == 'hlds_run') {
|
||||
$anticheatsoft = 'VAC';
|
||||
} else if ($gamebinary == 'cod4_lnxded') {
|
||||
$anticheatsoft = 'PBuster';
|
||||
} else {
|
||||
$anticheatsoft = '';
|
||||
}
|
||||
$anticheat = $row['anticheat'];
|
||||
if ($anticheat==1) {
|
||||
|
||||
if ($anticheat == 1) {
|
||||
$restarts[$hour][$day]['anti'] = $anticheatsoft . ' ' . $sprache->on;
|
||||
} else if ($anticheat==2) {
|
||||
} else if ($anticheat == 2) {
|
||||
$restarts[$hour][$day]['anti'] = $anticheatsoft . ' ' . $sprache->off2;
|
||||
} else if ($anticheat==3 or $anticheat==4 or $anticheat==5 or $anticheat==6) {
|
||||
} else if ($anticheat == 3 or $anticheat == 4 or $anticheat == 5 or $anticheat == 6) {
|
||||
$restarts[$hour][$day]['anti'] = 'EAC';
|
||||
}
|
||||
if ($template==1) {
|
||||
|
||||
if ($template == 1) {
|
||||
$template = '';
|
||||
} else {
|
||||
$template='-' . $template;
|
||||
$template = '-' . $template;
|
||||
}
|
||||
|
||||
if ($backup == 'Y') {
|
||||
@ -356,14 +368,16 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
} else {
|
||||
$restarts[$hour][$day]['backup'] = $gsprache->no;
|
||||
}
|
||||
if ($qstat == 'minecraft' and $restart == 'N' and $worldsafe == 'Y') {
|
||||
|
||||
if ($gameqArray[$shorten]['gameq'] == 'minecraft' and $restart == 'N' and $worldsafe == 'Y') {
|
||||
$restarts[$hour][$day]['worldsave'] = $gsprache->yes;
|
||||
} else if ($qstat == 'minecraft' and $restart == 'N') {
|
||||
} else if ($gameqArray[$shorten]['gameq'] == 'minecraft' and $restart == 'N') {
|
||||
$restarts[$hour][$day]['worldsave'] = $gsprache->no;
|
||||
}
|
||||
if ($qstat == 'a2s' and $restart == 'N' and $upload== 'Y') {
|
||||
|
||||
if ($gamebinary == 'srcds_run' and $restart == 'N' and $upload== 'Y') {
|
||||
$restarts[$hour][$day]['sourcetvdemo'] = $gsprache->yes;
|
||||
} else if ($qstat == 'a2s' and $restart == 'N') {
|
||||
} else if ($gamebinary == 'srcds_run' and $restart == 'N') {
|
||||
$restarts[$hour][$day]['sourcetvdemo'] = $gsprache->no;
|
||||
}
|
||||
|
||||
@ -371,24 +385,27 @@ if ($ui->smallletters('edit',4, 'post') == 'edit' and isset($serverip) and isset
|
||||
$restarts[$hour][$day]['restart'] = $gsprache->yes;
|
||||
$restarts[$hour][$day]['template'] = $shorten.$template;
|
||||
$restarts[$hour][$day]['map'] = $row['map'];
|
||||
if ($pallowed== 'Y') {
|
||||
|
||||
if ($pallowed == 'Y') {
|
||||
if ($protected=='N') {
|
||||
$restarts[$hour][$day]['protected'] = $gsprache->no;
|
||||
} else if ($protected=='Y') {
|
||||
$restarts[$hour][$day]['protected'] = $gsprache->yes;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
$restarts[$hour][$day]['protected'] = "";
|
||||
$restarts[$hour][$day]['protected'] = '';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$restarts[$hour][$day]['restart'] = $gsprache->no;
|
||||
$restarts[$hour][$day]['template'] = "";
|
||||
$restarts[$hour][$day]['map'] = "";
|
||||
$restarts[$hour][$day]['protected'] = "";
|
||||
$restarts[$hour][$day]['template'] = '';
|
||||
$restarts[$hour][$day]['map'] = '';
|
||||
$restarts[$hour][$day]['protected'] = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$template_file = 'userpanel_gserver_calendar_list.tpl';
|
||||
}
|
@ -114,8 +114,8 @@
|
||||
<label class="control-label" for="inputPmode"><?php echo $sprache->protect;?></label>
|
||||
<div class="controls">
|
||||
<select id="inputPmode" name="pallowed">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N"><?php echo $gsprache->no;?></option>
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<form id="newRestart" action="userpanel.php?w=ca&id=<?php echo $server_id;?>" method="post" class="form-inline">
|
||||
<form id="newRestart" action="userpanel.php?w=ca&id=<?php echo $id;?>" method="post" class="form-inline">
|
||||
<input type="hidden" id="date" name="date" value=""/>
|
||||
<input type="hidden" id="edit" name="edit" value="edit" />
|
||||
<select id="day" name="day">
|
||||
@ -92,14 +92,14 @@ $(document).ready(function (){
|
||||
<?php echo $restarts[$i][$day]['protected']; ?>
|
||||
</td>
|
||||
<td class="span1">
|
||||
<form action="userpanel.php?w=ca&id=<?php echo $server_id;?>&r=gs" method="post" onsubmit="return confirm('<?php echo $gsprache->sure;?>');">
|
||||
<form action="userpanel.php?w=ca&id=<?php echo $id;?>&r=gs" method="post" onsubmit="return confirm('<?php echo $gsprache->sure;?>');">
|
||||
<input type="hidden" name="date" value="mon_<?php echo $i;?>"/>
|
||||
<input type="hidden" name="delete" value="delete" />
|
||||
<button class="btn btn-danger btn-mini"><i class="icon-trash icon-white"></i> <?php echo $gsprache->del;?></button>
|
||||
</form>
|
||||
</td>
|
||||
<td class="span1">
|
||||
<form action="userpanel.php?w=ca&id=<?php echo $server_id;?>" method="post">
|
||||
<form action="userpanel.php?w=ca&id=<?php echo $id;?>" method="post">
|
||||
<input type="hidden" name="date" value="mon_<?php echo $i;?>"/>
|
||||
<input type="hidden" name="edit" value="edit" />
|
||||
<button class="btn btn-primary btn-mini"><i class="icon-edit icon-white"></i> <?php echo $gsprache->mod;?></button>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<hr>
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<form class="form-horizontal" action="userpanel.php?w=ca&id=<?php echo $server_id;?>&r=gs" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post">
|
||||
<form class="form-horizontal" action="userpanel.php?w=ca&id=<?php echo $id;?>&r=gs" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function (){
|
||||
$('#inputSwitch').change(function() {
|
||||
@ -29,7 +29,7 @@
|
||||
else {
|
||||
$('#protectedSettings').collapse('hide');
|
||||
}
|
||||
if($(this).find('option:selected').data('qstat')=='minecraft') {
|
||||
if($(this).find('option:selected').data('gameq')=='minecraft') {
|
||||
console.log('minecraft');
|
||||
$('#worldsaveSettings').collapse('show');
|
||||
$('#mapSettings').collapse('hide');
|
||||
@ -70,7 +70,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(in_array('a2s',$qstat_array) and (in_array('2',$uploadallowed) or in_array('3',$uploadallowed))){ ?>
|
||||
<?php if(in_array('srcds_run',$binaryArray) and (in_array(2,$uploadallowed) or in_array(3,$uploadallowed))){ ?>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputSourceTV">SourceTV Demo Upload</label>
|
||||
<div class="controls">
|
||||
@ -96,7 +96,7 @@
|
||||
<div class="controls">
|
||||
<select name="shorten" id="inputSwitch" onchange="$.get('serverallocation.php?mapgroup=' + this.value, function(data) { $('#mapGroup').html(data); });">
|
||||
<?php foreach ($table as $table_row){ ?>
|
||||
<option value="<?php echo $table_row['shorten'];?>" <?php if($gsswitch==$table_row['shorten']) echo 'selected="selected"';?> data-protected="<?php echo $table_row['protected'];?>" data-qstat="<?php echo $table_row['qstat'];?>"><?php echo $table_row['description'];?></option>
|
||||
<option value="<?php echo $table_row['shorten'];?>" <?php if($gsswitch==$table_row['shorten']) echo 'selected="selected"';?> data-protected="<?php echo $table_row['protected'];?>" data-gameq="<?php echo $table_row['gameq'];?>"><?php echo $table_row['description'];?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<td>
|
||||
<strong><?php echo $config['line'];?></strong>
|
||||
</td>
|
||||
<td class="span1">
|
||||
<td class="span3">
|
||||
<?php if($config['permission']=="easy" or $config['permission']=="both") { ?>
|
||||
<a href="userpanel.php?w=gs&d=cf&id=<?php echo $id;?>&type=easy&config=<?php echo urlencode($config['line']);?>"><span class="btn btn-primary btn-mini"><i class="icon-edit icon-white"></i> <?php echo $sprache->easy;?></span></a>
|
||||
<?php } ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user