mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
Merge pull request #209 from triath/dont-show-empty-pages-in-highscore
Don't display options for empty pages in highscores
This commit is contained in:
commit
9a1f08a5d1
@ -64,7 +64,7 @@ if ($scores) {
|
||||
</select>
|
||||
<select name="page">
|
||||
<?php
|
||||
$pages = (int)($highscore['rows'] / $highscore['rowsPerPage']);
|
||||
$pages = ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($scores[$type]) / $highscore['rowsPerPage'])));
|
||||
for ($i = 0; $i < $pages; $i++) {
|
||||
$x = $i + 1;
|
||||
if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
|
||||
@ -103,4 +103,4 @@ if ($scores) {
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
include 'layout/overall/footer.php'; ?>
|
||||
include 'layout/overall/footer.php'; ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user