-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadminEventos.php
More file actions
86 lines (67 loc) · 1.67 KB
/
Copy pathadminEventos.php
File metadata and controls
86 lines (67 loc) · 1.67 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
<?php
require_once __DIR__.'/includes/config.php';
require_once __DIR__.'/includes/Eventos.php';
if (!isset($_SESSION['esAdmin'])) {
header('Location: eventos.php');
exit();
}
$errores = array();
$eventos = Eventos::listarEventos();
if(!isset($eventos))
{
$errores[] = "No hay registros disponibles";
}
else
{
$errores[] = "No puedes acceder al contenido";
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/estilo.css" />
<meta charset="utf-8">
<title>ADMINISTRAR EVENTOS</title>
</head>
<body>
<?php
require("includes/comun/cabecera.php");
?>
<?php
if ($_SESSION["esAdmin"] == true){
if(empty($errores == 0))
{
?>
<div id="contenido">
<form>
<button formaction='altaEvento.php' type='submit' class='login-equipos'>CREAR EVENTO</button></a>
<button formaction='editarEvento.php' type='submit' class='login-equipos'>EDITAR EVENTO</button></a>
<button formaction='eventos.php' type='submit' class='login-equipos'>VOLVER</button></a>
</form>
<div id="evento1">
<?php foreach ($eventos as $value) {?>
<div>
<fieldset id="evento1">
<h1 id="evento"><?=$value->nombre_evento();?></h1>
<p id="evento"><?=$value->deporte();?></p>
<p id="evento"><?=$value->ciudad();?></p>
<p id="evento"><?=$value->municipio();?></p>
<p id="evento"><?=$value->fecha_evento();?></p>
<p id="evento"><?=$value->hora_evento();?></p>
<p id="evento"><?=$value->descripcion();?></p>
</fieldset>
</div>
<?php
}
?>
</div>
</div>
<?php
}
}
?>
<?php
include("includes/comun/pie.php");
?>
</body>
</html>