-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
34 lines (27 loc) · 1.01 KB
/
Copy pathindex.php
File metadata and controls
34 lines (27 loc) · 1.01 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
28
29
30
31
32
33
34
<?php require_once 'includes/cabecera.php' ?>
<?php require_once 'includes/lateral.php'; ?>
<!--MAIN-->
<div id="principal">
<h1>Últimas entradas</h1>
<?php
$entradas = conseguirEntradas($db, true);
if(!empty($entradas)):
while($entrada = mysqli_fetch_assoc($entradas)):
?>
<article class="entrada">
<!--<?php var_dump($entrada); ?>-->
<a href="entrada.php?id=<?=$entrada['id']?>">
<h2><?=$entrada['titulo']?></h2>
<span class="fecha"><?= $entrada['continente'].' | '.$entrada['fecha']?></span>
<p><?=substr($entrada['descripcion'], 0, 180). "..."?></p>
</a>
</article>
<?php
endwhile;
endif;
?>
<div id="ver-todas">
<a href="entradas.php">Ver todas las entradas</a>
</div>
</div> <!-- fin principal-->
<?php require_once 'includes/pie.php'; ?>