-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgaleria.php
88 lines (68 loc) · 2.85 KB
/
galeria.php
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Galería de Imágenes</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="style/galeria.css">
</head>
<body>
<!-- Tu código de encabezado -->
<?php
include "include/conexion.php"
?>
<header class="cabecera bg-secondary-subtle bg-light">
<div class="contenido">
<div class="item item1">
<div>
<img src="img/logo_restaurante.jpg" alt="">
</div>
<h1>Taberna de Moe</h1>
</div>
<nav class="item item2 navbar navbar-expand-lg navbar-light menu align-items-center">
<ul class="navbar-nav fs-4">
<li class="nav-item">
<a class="nav-link" href="admin.php">Admin</a>
</li>
<li class="nav-item">
<a class="nav-link" href="galeriaAdmin.php">Editar galeria</a>
</li>
<li class="nav-item">
<a class="nav-link" href="index.php">Inicio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="ingles/ingles.php"><img src="img/ingles.png" alt="" class="img"></a>
</li>
</ul>
</nav>
</div>
</header>
<!-- ... -->
<div class="container mt-4">
<div class="row">
<?php
$sql = "SELECT * FROM imagenes";
$resultado = mysqli_query($mysqli, $sql);
if (mysqli_num_rows($resultado)) {
while ($fila = mysqli_fetch_assoc($resultado)) {
?>
<div class="col-12 col-md-6 col-lg-3 mt-2 ">
<div class="card">
<img src="img/galeria/<?php echo $fila["imagen"] ?>" class="card-img" alt="">
</div>
</div>
<?php
}
} else {
echo "<div class='col'><h2>Sin resultados</h2></div>";
}
?>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
</body>
</html>