<?php require '../clases/AutoCarga.php'; $bd = new DataBase(); $gestorArtista = new ManageArtista($bd); $gestorLugar = new ManageLugar($bd); $gestorTipoEvento = new ManageTipoEvento($bd); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <a href="../login/administrador.php">Volver al Menú</a> <h3>Añadir Evento</h3> <form action="insertEvento.php" method="post" > Nombre evento<input type="text" name="nombre"/></br> Fecha<input type="date" name="fecha"/></br> Artista<?php echo Util::getSelect("ID_artista", $gestorArtista->getValuesSelect()); ?> <br> Lugar<?php echo Util::getSelect("ID_lugar", $gestorLugar->getValuesSelect()); ?> <br> Tipo evento<?php echo Util::getSelect("nombre_tipo", $gestorTipoEvento->getValuesSelect());
</div> <div id="cuerpoIndex"> <?php $nombre = $artista->getNombre_artista(); $imagen = $artista->getImagen(); echo "<h1>" . $nombre . "</h1>"; $url = "./imagenesArtistas/" . $nombre . "/" . $imagen; echo '<div id="imagen"><img src="' . $url . '" width="500" height="300" /></div>'; ?> <h1>Eventos</h1> <?php $id = $artista->getID_artista(); $manageEvento = new ManageEvento($bd); $manageLugar = new ManageLugar($bd); $manageArtista = new ManageArtista($bd); $listaEventos = $manageEvento->getList(); ?> <table border="1" class="tablaEventos" id="tablaArt"> <thead> <th>Evento</th> <th>Fecha</th> <th>Lugar</th> </thead> <?php foreach ($listaEventos as $indice => $evento) { $id2 = $evento->getID_artista(); $lugar = $manageLugar->get($evento->getID_lugar());
<?php require '../clases/AutoCarga.php'; $bd = new DataBase(); $gestorEvento = new ManageEvento($bd); $id = Request::get("ID_evento"); $evento = $gestorEvento->get($id); $gestorArtista = new ManageArtista($bd); $gestorLugar = new ManageLugar($bd); $gestorTipo = new ManageTipoEvento($bd); // var_dump($gestorCountry->getValuesSelect()); ?> <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <form action="phpEditarEvento.php" method="post" > <input type="hidden" name="pkID" value="<?php echo $evento->getID_evento(); ?>
<?php require '../clases/AutoCarga.php'; $bd = new DataBase(); $gestor = new ManageLugar($bd); $nombre = Request::post("nombre"); $aforo = Request::post("aforo"); $lugar = new Lugar(0, $nombre, $aforo); $r = $gestor->insert($lugar); // var_dump($bd->getError()); $bd->close(); header("Location: anadirLugar.php");