|
12345678910111213141516171819202122232425262728293031323334353637383940 |
- <nav class="d-flex justify-content-center" aria-label="...">
- <ul class="pagination">
- <?php if ($page > 1): ?>
- <li class="page-item">
- <a class="page-link no-wrap" href="?p=1">|<</a>
- </li>
- <?php else: ?>
- <li class="page-item disabled">
- <span class="page-link">|<</span>
- </li>
- <?php endif ?>
-
- <?php for ($i = max (min ($page + 5, $pages_max) - 10, 1); $i < $page; ++$i): ?>
- <li class="page-item">
- <a class="page-link" href="?p=<?= $i ?>"> <?= $i ?></a>
- </li>
- <?php endfor ?>
-
- <li class="page-item active" aria-current="page">
- <span class="page-link"><?= $page ?></span>
- </li>
-
- <?php for ($i = $page + 1; $i <= min (max ($page - 5, 1) + 10, $pages_max); ++$i): ?>
- <li class="pages-item">
- <a class="page-link" href="?p=<?= $i ?>"> <?= $i ?></a>
- </li>
- <?php endfor ?>
-
- <?php if ($page < $pages_max): ?>
- <li class="page-item">
- <a class="page-link no-wrap" href="?p=<?= $pages_max ?>">>|</a>
- </li>
- <?php else: ?>
- <li class="page-item disabled">
- <span class="page-link">>|</span>
- </li>
- <?php endif ?>
- </ul>
- </nav>
-
|