-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmicrociclo.php
More file actions
126 lines (111 loc) · 4.18 KB
/
microciclo.php
File metadata and controls
126 lines (111 loc) · 4.18 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
session_start();
require_once("gestionBD.php");
require_once("gestionarMicrociclos.php");
if (!isset($_SESSION['Perfil']))
Header("Location: login.php");
if (isset($_REQUEST["unset"])){
unset($_SESSION["formulario"]);
unset($_REQUEST);
}
$conexion = crearConexionBD();
$microciclos = get10Microciclos($conexion, $_SESSION["Perfil"]);
$titulo = "Microciclo Actual";
if (!empty($_POST)) {
$microMostrado = getMicrociclo($conexion, $_POST["select"]);
$titulo = "Microciclo Seleccionado";
unset($_POST);
} else {
$microMostrado = getMicroActual($conexion, $microciclos);
}
if (isset($microMostrado)) $ejercicios = getEjercicios($conexion, $microMostrado["IDMICROCICLO"]);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FiTrainer</title>
<meta name="description" content="Perfil">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="icon" href="img/logoFT.png">
</head>
<body>
<?php
include("header.php");
?>
<div class="WhiteBackgroundContainer">
<div class="bigContainer">
<h3><?php echo $titulo ?></h3>
<p>Tipo: <?php echo $microMostrado["TIPO"] ?> </p>
<p>Fecha Inicio: <?php echo $microMostrado["FECHAINICIO"] ?></p>
<p>Fecha Fin: <?php echo $microMostrado["FECHAFIN"] ?></p>
<div class="smallScroll">
<table>
<tr>
<th>Ejercicios</th>
<th>Repeticiones</th>
<th>Distancia (KM)</th>
<th>Descripción</th>
</tr>
<?php
if (isset($ejercicios))
foreach ($ejercicios as $ej) {
?>
<tr>
<td><?php echo $ej["TITULO"] ?> </td>
<td><?php echo $ej["REPETICIONES"] ?> </td>
<td><?php echo $ej["DISTANCIA"] ?> </td>
<td><?php echo $ej["DESCRIPCION"] ?> </td>
</tr>
<?php
}
?>
</table>
</div>
<p>Descripción: </p>
<p class="textBox"><?php echo $microMostrado["DESCRIPCION"] ?></p>
<p>Recuperación: </p>
<p class="textBox"><?php echo $microMostrado["RECUPERACION"] ?></p>
</div>
<div class="smallContainer">
<h3>Anteriores</h3>
<div class="smallScroll">
<table>
<tr>
<th>Inicio</th>
<th>Fin</th>
<th>Ver</th>
</tr>
<?php
if (isset($microciclos))
foreach ($microciclos as $micro) {
if (($micro != $microMostrado)) {
?>
<tr>
<form class="noStyle" method="post" action="microciclo.php">
<td>
<?php echo $micro["FECHAINICIO"] ?> <?php if ($micro == getMicroActual($conexion, $microciclos)) echo "(Actual)" ?>
</td>
<td>
<?php echo $micro["FECHAFIN"] ?>
</td>
<td>
<input type="text" name="select" hidden value="<?php echo $micro["IDMICROCICLO"] ?>">
<input type="submit" value="Ver">
</form>
</td>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</div>
<?php
include("footer.php");
cerrarConexionBD($conexion);
?>
</body>
</html>