-
Notifications
You must be signed in to change notification settings - Fork 0
/
Libros.php
31 lines (28 loc) · 836 Bytes
/
Libros.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
<?php
session_start();
include 'Core/Controller.Vista.php';
$vista = new Vista();
$vista->ValidaAcceso($_SESSION['Usuario'], $vista->ObtienePagina(), "login.php?error=Error de permiso a las busquedas");
?>
<!DOCTYPE html>
<html>
<head>
<title>Buscar Libros</title>
</head>
<body>
<form action="Libros.php" method="GET">
<input type="text" name="txtBuscador" placeholder = "Ingrese un texto">
<select name="cbEstado">
<option value="1">Disponible</option>
<option value="0">Prestado</option>
</select>
<input type="submit" value="Buscar" name="btnBuscar">
<a href="AgregaLibro.php"><input type="button" value="Agregar nuevo libro"></a>
</form>
<?php
if (isset($_GET['txtBuscador']) && isset($_GET['cbEstado'])) {
echo $vista->BuscaLibros($_GET['txtBuscador'], $_GET['cbEstado']);
}
?>
</body>
</html>