<div class="link"> <a href="index.php?a=top">> Kõik</a> </div> </div> <div class="top-list"> <?php foreach ($scores as $score) { ?> <?php $class = $rank < 3 ? sprintf("position-0%d", $rank) : ""; ?> <div class="position <?php echo $class; ?> "><span class="number"><?php echo str_pad($rank, 2, '0', STR_PAD_LEFT); ?> </span></span> <?php echo lookup_name($score->user_id); ?> </div> <?php $rank++; ?> <?php } ?> </div> </div> </div>
<h2><?php echo $n + 1; ?> - <?php echo $n + 30; ?> </h2> <?php foreach ($scores_3 as $s) { $n++; ?> <div class="position"><span class="number"><?php echo str_pad($n, 2, '0', STR_PAD_LEFT); ?> </span></span> <?php echo lookup_name($s->user_id); ?> </div> <?php } ?> </div> <?php } ?> <div class="clear"></div> <?php $total = R::getCell('SELECT COUNT(*) FROM game WHERE ended_at IS NOT NULL');