From b38263fe8c739e72feaea9fd445684153efa6502 Mon Sep 17 00:00:00 2001 From: Ulrich Block Date: Sun, 13 Oct 2013 17:12:31 +0200 Subject: [PATCH] =?UTF-8?q?#127:=20Farben/Status=20in=20der=20GS=20=C3=9Cb?= =?UTF-8?q?ersicht=20falsch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/stuff/gserver.php | 45 +++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/web/stuff/gserver.php b/web/stuff/gserver.php index 6379ef51..a8243011 100644 --- a/web/stuff/gserver.php +++ b/web/stuff/gserver.php @@ -1127,6 +1127,7 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen $table = array(); $query2 = $sql->prepare("SELECT `extraData` FROM `jobs` WHERE `affectedID`=? AND `resellerID`=? AND `type`='gs' AND (`status` IS NULL OR `status`=1) ORDER BY `jobID` DESC LIMIT 1"); foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) { + unset($tobeActive); $server = $row['server']; $userid = $row['userid']; $serverid = $row['id']; @@ -1148,8 +1149,8 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen if (!isset($maxplayers)) $maxplayers = ''; $premoved = ''; $nameremoved = ''; - $imgName='16_ok'; - $imgAlt='Online'; + $imgName = '16_ok'; + $imgAlt = 'Online'; if ($row['jobPending'] == 'Y') { $query2->execute(array($row['id'], $row['resellerid'])); foreach ($query2->fetchAll(PDO::FETCH_ASSOC) as $row2) { @@ -1162,31 +1163,37 @@ if ($ui->st('d', 'get') == 'ad' and is_numeric($licenceDetails['lG']) and $licen } else { $jobPending = $gsprache->no; } - if (($row['active'] == 'Y' and $row['jobPending'] == 'N') or ($row['jobPending'] == 'Y') and isset($tobeActive) and $tobeActive == 'Y') { - $imgName='16_ok'; - $imgAlt='Active'; + + if ($stopped == 'Y') { + $imgName = '16_bad'; + $imgAlt = 'Stopped'; + + } else if ($row['active'] == 'N' and $row['jobPending'] == 'Y' and isset($tobeActive) and $tobeActive == 'Y') { + $imgName = '16_ok'; + $imgAlt = 'Active'; + } else if ($row['active'] == 'N') { - $imgName='16_bad'; - $imgAlt='Inactive'; - } else if ($stopped== 'Y') { - $imgName='16_bad'; - $imgAlt='Stopped'; + $imgName = '16_bad'; + $imgAlt = 'Inactive'; + } else if (($name == 'OFFLINE' or $name == '') and $notified >= $rSA['down_checks'] and $stopped== 'N') { - $imgName='16_error'; - $imgAlt='Crashed'; + $imgName = '16_error'; + $imgAlt = 'Crashed'; + } else { - $imgAlt='Online'; + if ($war== 'Y' and $password== 'N') { - $imgName='16_error'; - $imgAlt='No Password'; - $premoved="
".$sprache->premoved."
"; + $imgName = '16_error'; + $imgAlt = 'No Password'; } + if ($brandname == 'Y' and $rSA['brandname'] != null and $rSA['brandname'] != '' and strpos(strtolower($name),strtolower($rSA['brandname'])) === false) { - $imgName='16_error'; - $imgAlt='No Servertag'; - $nameremoved="
".$sprache->nameremoved."
"; + $imgName = '16_error'; + $imgAlt = 'No Servertag'; } + } + $table[] = array('serveractive' => $serveractive,'shorten' => $row['shorten'], 'useractive' => $row['useractive'], 'cname' => $row['cname'], 'names' => trim($row['name'] . ' ' . $row['vname']),'img' => $imgName,'alt' => $imgAlt,'premoved' => $premoved,'nameremoved' => $nameremoved, 'server' => $server,'serverid' => $serverid,'name' => $name,'type' => $type,'map' => $map,'numplayers' => $numplayers,'maxplayers' => $maxplayers,'id' => $userid,'lendserver' => $lendserver,'active' => $row['active'], 'jobPending' => $jobPending); } $next = $start+$amount;