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>
|
||||||
<select name="page">
|
<select name="page">
|
||||||
<?php
|
<?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++) {
|
for ($i = 0; $i < $pages; $i++) {
|
||||||
$x = $i + 1;
|
$x = $i + 1;
|
||||||
if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
|
if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
|
||||||
@ -103,4 +103,4 @@ if ($scores) {
|
|||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
include 'layout/overall/footer.php'; ?>
|
include 'layout/overall/footer.php'; ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user