-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaginacion.php
More file actions
27 lines (24 loc) · 1.08 KB
/
paginacion.php
File metadata and controls
27 lines (24 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php $numero_paginas = numero_paginas($blog_config['post_por_pagina'], $conexion); ?>
<section class="paginacion">
<ul>
<?php if (pagina_actual() === 1) : ?>
<li class="disabled"><i class="fas fa-chevron-left"></i></li>
<?php else : ?>
<li><a href="index.php?p=<?php echo pagina_actual() - 1 ?>"><i class="fas fa-chevron-left"></i></a></li>
<?php endif; ?>
<?php for ($i = 1; $i <= $numero_paginas; $i++) : ?>
<?php if (pagina_actual() === $i) : ?>
<li class="active">
<?php echo $i; ?>
</li>
<?php else : ?>
<li><a href="index.php?p=<?php echo $i; ?>"><?php echo $i; ?></a></li>
<?php endif; ?>
<?php endfor; ?>
<?php if(pagina_actual() == $numero_paginas):?>
<li class="disabled"><i class="fas fa-chevron-right"></i></li>
<?php else:?>
<li><a href="index.php?p=<?php echo pagina_actual() + 1 ?>"><i class="fas fa-chevron-right"></i></a></li>
<?php endif;?>
</ul>
</section>