-
Notifications
You must be signed in to change notification settings - Fork 1
/
historial.php
69 lines (55 loc) · 1.83 KB
/
historial.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
<?php
require "Class/Conexion.php";
require "Class/Planificador.php";
include 'plantillas/cabecera.php';
$titulo = "Historial";
$planificador = new Planificador();
$tareas = $planificador->mostrarTareas();
$cantidad = $planificador->getCantidad();
?>
<div class="container">
<h1 class="centrado"><?php echo $titulo; ?></h1>
<hr>
<h3 class="centrado">Tareas Realizadas</h3>
<table class="table">
<thead>
<tr>
<th>titulo</th>
<th>descripcion</th>
<th>fecha</th>
</tr>
</thead>
<?php foreach ($tareas as $fila){ ?>
<tbody>
<tr>
<?php
$colorEstadoRealizado = "alert-success";
$colorEstadoVencido = "alert-danger";
$colorEstadoEliminado = "alert-warning";
if ($fila['tra_estado'] == 0){
$estadoTarea = $colorEstadoEliminado;
} else if ($fila['tra_estado'] == 2){
$estadoTarea = $colorEstadoRealizado;
} else if (($fila['tra_estado'] == 3)){
$estadoTarea = $colorEstadoVencido;
}
?>
<td class="<?php echo $estadoTarea; ?>"><?php echo $fila['tra_titulo']; ?></td>
<td class="<?php echo $estadoTarea; ?>"><?php echo $fila['tra_descripcion']; ?></td>
<td class="<?php echo $estadoTarea; ?>"><?php echo $fila['tra_fecha']; ?></td>
</tr>
<?php
}
?>
</tbody>
<tr>
<td colspan="5" class="info"> Se han encontrado <?php echo $cantidad; ?> registros </td>
</tr>
</table>
<hr>
<div id ="wrapper">
<button class="btn btn-info center-block" onclick="return window.location = 'index.php';">Volver al inicio</button>
</div>
<hr>
</div>
<?php include 'plantillas/pie.php'; ?>