Notice: Undefined index: language in /var/www/erevtools.com/public_html/config.php on line 21
eRevTools - Military Units
'No' then 1 else 0 end) as banned, sum(case when a.banned = 'No' and a.lastseen >= '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s')) - (7*24*60*60))."' then a.damage else 0 end) as totaldmgpower, sum(case when a.banned = 'No' and a.lastseen >= '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s')) - (7*24*60*60))."' then a.navydmg1hit else 0 end) as totalnavydmgpower, sum(case when a.banned = 'No' and a.lastseen <= '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s')) - (7*24*60*60))."' then 1 else 0 end) as lastseen "; // $query = $query."sum(case when a.damage >= 0 and a.damage < ".$damageq1." and a.banned = 'No' then 1 else 0 end) as totalq1, sum(case when a.damage >= 0 and a.damage < ".$damageq1." and a.banned = 'No' then a.damage else 0 end) as damageq1, "; // $query = $query."sum(case when a.damage >= ".$damageq1." and a.damage < ".$damageq2." and a.banned = 'No' then 1 else 0 end) as totalq2, sum(case when a.damage >= ".$damageq1." and a.damage < ".$damageq2." and a.banned = 'No' then a.damage else 0 end) as damageq2, "; // $query = $query."sum(case when a.damage >= ".$damageq2." and a.damage < ".$damageq3." and a.banned = 'No' then 1 else 0 end) as totalq3, sum(case when a.damage >= ".$damageq2." and a.damage < ".$damageq3." and a.banned = 'No' then a.damage else 0 end) as damageq3, "; // $query = $query."sum(case when a.damage >= ".$damageq3." and a.damage < ".$maxdamage." and a.banned = 'No' then 1 else 0 end) as totalq4, sum(case when a.damage >= ".$damageq3." and a.damage < ".$maxdamage." and a.banned = 'No' then a.damage else 0 end) as damageq4 "; $query = $query."from players a, countries b, militaryunits c where a.muid <> 0 and a.muid = c.muid and a.countryid = b.countryid group by a.muid, c.name, c.country order by totaldmgpower desc"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo ""; $totallanddmg = 0; $totalcoastaldmg = 0; $total2clickers = 0; $query = "SELECT a.playerid, sum(a.damage) as dmg, sum(a.hits) as hits FROM wars_playersdamage a, wars b, players c where a.playerid = c.playerid and a.warid = b.warid and a.muid = c.muid and a.muid = ".$row["muid"]." and b.date >= '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s')) - (7*24*60*60))."' group by a.playerid"; $result2 = mysql_query($query); while ($row2 = mysql_fetch_array($result2)) { if ($row2["hits"] <= 350) { $total2clickers++; } } mysql_free_result($result2); $query = "SELECT b.regiontypeid, sum(a.damage) as dmg, sum(a.hits) as hits FROM wars_playersdamage a, wars b, players c where a.playerid = c.playerid and a.warid = b.warid and a.muid = c.muid and a.muid = ".$row["muid"]." and b.date >= '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s')) - (7*24*60*60))."' group by b.regiontypeid"; $result2 = mysql_query($query); while ($row2 = mysql_fetch_array($result2)) { if ($row2["regiontypeid"] == 0) { $totallanddmg = $totallanddmg + $row2["dmg"]; } else { $totalcoastaldmg = $totalcoastaldmg + $row2["dmg"]; } } mysql_free_result($result2); echo ""; echo ""; } mysql_free_result($result); ?>
Military UnitCountryTotal PlayersBanned PlayersNot Seen Players (Last 7 days)2 clickers + DO Players (Last 7 days)Active Players (Last 7 days)Land Damage (Last 7 days)Land Damage PowerNavy Damage (Last 7 days)Navy Damage Power
".$row["name"]."".$row["country"]."".$row["totalplayers"]."".$row["banned"]."
".number_format($row["banned"]/$row["totalplayers"]*100, 2, '.', ',')."%
".$row["lastseen"]."
".number_format($row["lastseen"]/$row["totalplayers"]*100, 2, '.', ',')."%
".$total2clickers."
".number_format($total2clickers/$row["totalplayers"]*100, 2, '.', ',')."%
".($row['totalplayers']-$total2clickers-$row['lastseen']-$row['banned'])."
".number_format(($row['totalplayers']-$total2clickers-$row['lastseen']-$row['banned'])/$row["totalplayers"]*100, 2, '.', ',')."%
".number_format($totallanddmg, 0, '.', ',')."".number_format($row["totaldmgpower"], 0, '.', ',')."".number_format($totalcoastaldmg, 0, '.', ',')."".number_format($row["totalnavydmgpower"], 0, '.', ',')."