Notice: Undefined index: language in /var/www/erevtools.com/public_html/config.php on line 21
eRevTools - Battle
"; if ($row["status"] == 'A') { if ($row["val"] > 0) { // Defender is the winner echo ""; } else { echo ""; } } else { if ($row["defenderid"] == $row["finalownerid"]) { // Defender is the winner echo ""; } else { echo ""; } } echo "
".$row['attacker']."

Total Damage: ".number_format($attackdamage, 0, '.', ',')."
Total Hits: ".$attackhits."
Total Players: ".$attackplayers."

".$row['attacker']." victories against ".$row['defender'].": ".$won."/".$total."



"; $dateini = strtotime($row['date']); $date = strtotime(date('Y-m-d H:i:s')); if ($row['status'] == "A") { $diff = 86400 - ($date - ($dateini + ($gmt*60*60))); if ($diff < 0) { $diff = 0; } echo "Region: ".$row['region']."
Battle ID: ".$row['warid']."
Battle countdown: ".strftime('%H:%M:%S', $diff)."
"; } else { echo "Region: ".$row['region']."
Battle ID: ".$row['warid']."
"; } echo "
Battle start time: ".date('Y-m-d H:i:s', $dateini)."
Battle Type: ".$row['type']; $total2 = 0; $i = 1; $msg = ""; $query = "select if(defenderid = finalownerid, defender, attacker) as country, count(*) as total from wars where region = '".$row['region']."' and status = 'I' and date <= '".$row['date']."' group by country order by total desc"; $result2 = mysql_query($query); while ($row2 = mysql_fetch_array($result2)) { if ($i < 4) { $msg = $msg.$row2['country']." (".$row2['total'].") "; } $i++; $total2 = $total2 + $row2['total']; } mysql_free_result($result2); echo "

Battles in this region: ".$total2."
Past winnners: ".$msg; echo "
"; if ($row["status"] == 'A') { if ($row["val"] > 0) { // Defender is the winner echo ""; } else { echo ""; } } else { if ($row["defenderid"] == $row["finalownerid"]) { // Defender is the winner echo ""; } else { echo ""; } } echo "
".$row['defender']."

Total Damage: ".number_format($defensedamage, 0, '.', ',')."
Total Hits: ".$defensehits."
Total Players: ".$defenseplayers."

".$row['defender']." victories against ".$row['attacker'].": ".$lost."/".$total."
"; } mysql_free_result($result); echo "
"; ?>
"; $i = 1; $query = "select b.playerid, b.name, a.hits, a.damage, a.countryid from wars_playersdamage a, players b where a.playerid = b.playerid and a.warid = ".$_GET['battleid']." and a.side = 'attack' order by damage desc"; $result2 = mysql_query($query); while ($row2 = mysql_fetch_array($result2)) { echo ""; $i++; } mysql_free_result($result2); echo "
".$i."".$row2["name"]."".number_format($row2["hits"], 0, '.', ',')."".number_format($row2["damage"], 0, '.', ',')."
"; echo "
"; $i = 1; $query = "select b.playerid, b.name, a.hits, a.damage, a.countryid from wars_playersdamage a, players b where a.playerid = b.playerid and a.warid = ".$_GET['battleid']." and a.side = 'defense' order by damage desc"; $result2 = mysql_query($query); while ($row2 = mysql_fetch_array($result2)) { echo ""; $i++; } mysql_free_result($result2); echo "
".$i."".$row2["name"]."".number_format($row2["hits"], 0, '.', ',')."".number_format($row2["damage"], 0, '.', ',')."
"; echo "
"; ?>