function getPlayerSummary($player, $weapons, $vehicles, $kits, $armies, $maps) { # mensch mach was! $summary['weapon'] = 0; $summary['vehicle'] = 0; $summary['kit'] = 0; $summary['army'] = 0; $summary['map'] = 0; $max = -1; #0..12 () for ($i = 0; $i <= 10; $i++) { if ($weapons[$i]['time'] > $max) { $summary['weapon'] = $i; $max = $weapons[$i]['time']; } } if ($weapons[11]['time'] + $weapons[13]['time'] + $weapons[14]['time'] > $max) { $summary['weapon'] = 11; $max = $weapons[11]['time'] + $weapons[13]['time'] + $weapons[14]['time']; } if ($weapons[12]['time'] > $max) { $summary['weapon'] = 12; } $max = -1; for ($i = 0; $i <= getKitCount() - 1; $i++) { if ($kits[0]['time' . $i] > $max) { $summary['kit'] = $i; $max = $kits[0]['time' . $i]; } } $max = -1; for ($i = 0; $i <= getVehicleCount() - 1; $i++) { if ($vehicles[0]['time' . $i] > $max) { $summary['vehicle'] = $i; $max = $vehicles[0]['time' . $i]; } } $max = -1; for ($i = 0; $i <= getArmyCount(); $i++) { if ($armies[0]['time' . $i] > $max) { $summary['army'] = $i; $max = $armies[0]['time' . $i]; } } return $summary; }
</tr> </table> <table id="theater" class="stat sortable" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <th><a href="#" class="sortheader" onclick="ts_resortTable(this);return false;">Theater<span class="sortarrow"> </span></a></th> <th><a href="#" class="sortheader" onclick="ts_resortTable(this);return false;">Time<span class="sortarrow"> </span></a></th> <th><a href="#" class="sortheader" onclick="ts_resortTable(this);return false;">Wins<span class="sortarrow"> </span></a></th> <th><a href="#" class="sortheader" onclick="ts_resortTable(this);return false;">Losses<span class="sortarrow"> </span></a></th> <th><a href="#" class="sortheader" onclick="ts_resortTable(this);return false;">Ratio<span class="sortarrow"> </span></a></th> <th><a href="#" class="sortheader" onclick="ts_resortTable(this);return false;">B.R.<span class="sortarrow"> </span></a></th> </tr>'; #add <tr class="favorite"> for ($i = 0; $i < getArmyCount(); $i++) { $template .= ' <tr> <td id="theater-' . $i . '">' . $TheaterData[$i]['name'] . '</td> <td title="' . $TheaterData[$i]['time'] . '" nowrap="nowrap">' . intToTime($TheaterData[$i]['time']) . '</td> <td>' . $TheaterData[$i]['wins'] . '</td> <td>' . $TheaterData[$i]['losses'] . '</td> <td>' . round(getRatio($TheaterData[$i]['wins'], $TheaterData[$i]['losses']), 2) . '</td> <td>' . $TheaterData[$i]['br'] . '</td> </tr>'; } $template .= ' <!-- <tr> <td id="theater-1">MEC</td> <td title="387492" nowrap="nowrap">107:38:12</td>