ニジカもんすたぁ!! トップ・ページ https://nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pagination.cmp.php 1.5 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. <nav class="d-flex justify-content-center" aria-label="...">
  2. <ul class="pagination">
  3. <?php if ($page > 1): ?>
  4. <li class="page-item">
  5. <a class="page-link no-wrap" href="?p=1">|&lt;</a>
  6. </li>
  7. <?php else: ?>
  8. <li class="page-item disabled">
  9. <span class="page-link">|&lt;</span>
  10. </li>
  11. <?php endif ?>
  12. <?php for ($i = max (min ($page + 5, $pages_max) - 10, 1); $i < $page; ++$i): ?>
  13. <li class="page-item">
  14. <a class="page-link" href="?p=<?= $i ?>"> <?= $i ?></a>
  15. </li>
  16. <?php endfor ?>
  17. <li class="page-item active" aria-current="page">
  18. <span class="page-link"><?= $page ?></span>
  19. </li>
  20. <?php for ($i = $page + 1; $i <= min (max ($page - 5, 1) + 10, $pages_max); ++$i): ?>
  21. <li class="pages-item">
  22. <a class="page-link" href="?p=<?= $i ?>"> <?= $i ?></a>
  23. </li>
  24. <?php endfor ?>
  25. <?php if ($page < $pages_max): ?>
  26. <li class="page-item">
  27. <a class="page-link no-wrap" href="?p=<?= $pages_max ?>">&gt;|</a>
  28. </li>
  29. <?php else: ?>
  30. <li class="page-item disabled">
  31. <span class="page-link">&gt;|</span>
  32. </li>
  33. <?php endif ?>
  34. </ul>
  35. </nav>