Implement report CRUD functionalities
This commit is contained in:
52
src/report.php
Normal file
52
src/report.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="es">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>Gestión de informes</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../static/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: right; margin-top: 20px;">
|
||||
<a href="forms/report_create_form.php" class="create_btn" >Crear</a>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titulo</th>
|
||||
<th>Fecha</th>
|
||||
<th>Hora</th>
|
||||
<th>Paciente</th>
|
||||
<th>Médico</th>
|
||||
<th colspan="2">Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
include 'database.php';
|
||||
|
||||
$pdo = connectDatabase();
|
||||
|
||||
$list = listReports($pdo);
|
||||
|
||||
foreach($list as $row) :
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $row[1]; ?></td>
|
||||
<td><?php echo $row[2]; ?></td>
|
||||
<td><?php echo $row[3]; ?></td>
|
||||
<td><?php echo $row[4]; ?></td>
|
||||
<td><?php echo $row[5]; ?></td>
|
||||
<td>
|
||||
<a href="forms/report_edit_form.php?edit=<?php echo $row[0]; ?>" class="edit_btn">Editar</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="report_management.php?delete=<?php echo $row[0]; ?>" class="del_btn">Borrar</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php closeDatabase($pdo); ?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user