TDR Dirt Cup - Current Rankings ( Top50 )

\"; if (!$pos) $pos = 0; if (is_null($orderby)) $orderby = \"rank\"; if (is_null($sort)) $sort = \"ASC\"; $sorturl = \"?serv=$serv&lang=$lang&page=$page&orderby=%s&sort=\".(($sort == \"ASC\") ? \"DESC\" : \"ASC\"); echo \" print \"\"; $sql = \"SELECT * FROM ( SELECT t1.*, @r:=@r+1 AS rank FROM ( SELECT p.*, r.avg, r.avg IS NULL AS norank FROM players p LEFT JOIN rs_rank r ON p.Id = r.playerID ORDER BY norank ASC, r.avg ASC ) t1, (SELECT @r:=0) t2 ) t3 ORDER BY %s LIMIT $pos, $count\"; if ($orderby == \"rank\") { $sql = sprintf($sql, \"norank $sort, $orderby $sort\"); } else { $sql = sprintf($sql, \"$orderby $sort\"); } $result = mysql_query($sql) or die(mysql_error()); $totalrows = mysql_num_rows(mysql_query(\"SELECT * FROM players\")); if ($totalrows < 1) { print \"\"; } else { $new_pos_next = $pos + $count; $new_pos_prev = $pos - $count; $link_next = ($new_pos_next >= $totalrows) ? \"\" : \"?serv=$serv&lang=$lang&page=$page&pos=$new_pos_next&orderby=$orderby&sort=$sort\"; $link_prev = ($new_pos_prev < 0) ? \"\" : \"?serv=$serv&lang=$lang&page=$page&pos=$new_pos_prev&orderby=$orderby&sort=$sort\"; $bg = \'a\'; while($data = mysql_fetch_array($result)) { $MwTime = $data[\'TimePlayed\']; $hours = floor($MwTime/3600); $minutes = floor(($MwTime/60-$hours*60)); $seconds = substr($MwTime-$minutes*60-$hours*3600,-2); $time = sprintf(\"%02dh%02dm%02ds\", $hours, $minutes, $seconds); if (!is_null($data[\'avg\'])) { $avg = sprintf (\"%.1f\", $data[\'avg\']/10000); $rank = $data[\'rank\']; } else { $avg = \"-\"; $rank = \"-\"; } $bg = ($bg == \'b\') ? \'a\' : \'b\'; echo \"\"; if($rank==\"1\") { echo \"\"; } elseif($rank==\"2\") { echo \"\"; } elseif($rank==\"3\") { echo \"\"; } else{ echo \"\"; } if($data[\'Nation\']){ echo \"\"; } else { echo \"\"; } if($rank==\"1\") { echo \"\"; } elseif($rank==\"2\") { echo \"\"; } elseif($rank==\"3\") { echo \"\"; } else{ echo \"\"; } echo \"\"; echo \"\"; } } ?>
No results
\\\"Gold\\\"\\\"Silver\\\"\\\"Bronze\\\"\".$rank.\"\\\"\".$data[\'Nation\'].\"\\\"\\\"Unknown\\\"\".$cp->toHTML($data[\'NickName\']).\"\".$cp->toHTML($data[\'NickName\']).\"\".$cp->toHTML($data[\'NickName\']).\"\".$cp->toHTML($data[\'NickName\']).\"\".$avg.\"