-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompartidos.php
More file actions
31 lines (29 loc) · 929 Bytes
/
compartidos.php
File metadata and controls
31 lines (29 loc) · 929 Bytes
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_once('sql/funciones_BBDD.php');
include_once('funciones_plantilla.php');
printHead("compartidos.php");
print "<h3>Libros compartidos Gratuitamente</h3>";
//cargamo los libros de la BBDD
$libros=lista_libros();
print "<table><tr><td width='70%'><table style='margin:0px'><tr><th>Nombre</th><th>Acciones</th></tr>";
//metodo de seguridad por si la bbdd no devolviera libros
if($libros){
foreach ($libros as $libro) {
print "<tr>";
print "<td>" . $libro['titulo'] ."</td>";
print "<td><a href='" . $libro['enlace']."'><img alt='Descargar' title='Descargar' src='imagenes/icono.png' width='20' /></a>";
print "</td>";
print "</tr>";
}
}else{
print "<td colspan=2>No hay libros disponibles</td>";
}
print "</table></td><td width='30%'>";
print "</table></td><td width='30%'>";
?>
<img src=imagenes/nube.png alt=imagenNube />
<td></tr></table>
<?PHP
printfoot();
?>