-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVerAntes.php
More file actions
95 lines (72 loc) · 2.58 KB
/
Copy pathVerAntes.php
File metadata and controls
95 lines (72 loc) · 2.58 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
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
89
90
91
92
93
94
95
<?php
session_start();
//valida si existe una sesión, si no regresa a la pagina de login
if(empty($_SESSION['access']))
{
header("Location: index.php");
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="style2.css" media="screen"/>
<title>Ver Documento</title>
</head>
<?php include ("conexion.php");?>
<?php
if(isset($_POST['criterio']))
{
$criterio = $_POST['criterio'];
$query = "SELECT nombre,Descripcion
FROM documentos WHERE nombre like '$criterio%' ORDER BY nombre ASC";
$result = mysqli_query($conexion,$query) or die("no se pudo realizar la consulta");
mysqli_close($conexion);
}
?>
<body>
<div id="container">
<?php include("cabecera.php");?>
<?php include("lateral.php") ;?>
<form action="" method="post" name="form1" id="form1">
<div class="busqueda">
<label>Nombre del Archivo</label>
<input name="criterio" type="text" id="criterio" value="" size="50" />
<input type="submit" id="btbuscar" value="Buscar" />
<br />
<br />
</form>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<?php
if(isset($_POST['criterio']))
{
while ($row = mysqli_fetch_assoc($result))
{
?>
<tr>
<td colspan="5">
<?php //echo "<a align=\"left\" href=\"docs/".$row['nombre']."\"> "
// .$row['nombre']." <a /><br />"."<hr>";
echo "<a align=\"left\">"
.$row['nombre']." <a /><br />"."<hr>";
echo "Descripcion: ".$row['Descripcion'];
?>
</td>
</tr>
<tr>
<td><img src="images/icono_compartir.png" > </td>
<td><img src="images/icono_descargar.png" > </td>
<td><a href="editar.php?nombre=<?php echo $row['nombre']?>">
<img src="images/icono_editar.png" ></a> </td>
<td><a href="eliminar.php?nombre=<?php echo $row['nombre']?>">
<img src="images/icono_eliminar.png" > </a> </td>
<td><a href="docs/<?php echo $row['nombre']?>">
<img src="images/icono_ver.png" ></a> </td>
</tr>
<?php } //fin del while
}//fin del if
?>
</table>
</div><!--fin del div = main-->
</div><!-- fin del div = container-->
</body>
</html>