Example #1
0
<?php

require_once "../includes/initialize.php";
$num = 50;
$players = User::find_top($num);
include_once LIB_PATH . DS . "header.php";
?>
    <div id="mainContent">
	<table id="rankingGraczy" border="0" cellpadding="0" cellspacing="0" summary="Wyniki <?php 
echo $num;
?>
 najlepszych graczy.">
	    <caption>Ranking wszechwiedzÄ…cych</caption>
	    <thead>
		<tr>
		    <th scope="col" class="pozycja" abbr="pozycja">#</th>
		    <th colspan="2" scope="col" class="nick" abbr="nick">Nick</th>
		    <th scope="col" class="punkty" abbr="punkty">Punkty</th>
		    <th scope="col" class="czas" abbr="czas">Czas</th>
		    <th scope="col" class="poprawne" abbr="poprawne">Odp. pop.</th>
		    <th scope="col" class="procent" abbr="procent">%</th>
		</tr>
	    </thead>
	    <tbody>
		<?php 
$i = 1;
foreach ($players as $player) {
    echo "<tr title=\"{$i}\" id=\"{$player->id}\"";
    echo " class=\"";
    echo isset($last_id) && $last_id == $player->id ? "newRecord " : false;
    echo $i % 2 != 0 ? "odd" : "even";