function render_war_team($war, $clan, $show_players = false) { ?> <div class="team"> <div class="team-header"> <h3><a href="/clan/?id=<?php echo rawurlencode($clan['clan']); ?> "><?php clan_logo($clan); ?> </a></h3> <div class="result"> <span class="clan"><a href="/clan/?id=<?php echo rawurlencode($clan['clan']); ?> "><?php echo htmlspecialchars($clan['name'] ?: $clan['clan']); ?> </a></span> <span class="score"><?php echo $clan['score']; ?> </span> </div> </div> <?php if ($show_players) { ?> <div class="players"> <ol><?php uasort($clan['players'], function ($b, $a) { return $a['flags'] <=> $b['flags']; }); foreach ($clan['players'] as $player) { render_war_clan_player($war, $clan, $player); } ?> </ol> </div> <?php } ?> </div> <?php }
require_once "../render.inc.php"; require "../render_game.inc.php"; $clans = json_decode(file_get_contents('http://api.actionfps.com/clans/'), true); ?> <article id="clans"> <ol> <?php foreach ($clans as $clan) { ?> <li> <a href="/clan/?id=<?php echo rawurlencode($clan['id']); ?> " title="<?php echo htmlspecialchars($clan['fullName']); ?> "> <?php clan_logo($clan); ?> </a> </li> <?php } ?> <ol> </article> <?php echo $foot;