<?php include_once "../Librerias/Datasource.php"; include_once "../Librerias/Solicitud.php"; include_once "../Librerias/SolicitudDao.php"; include_once "../Librerias/ArtesanoDao.php"; include_once "../Librerias/Artesano.php"; include_once "../Librerias/Variables.php"; $conn = new Datasource($dbhost, $dbName, $dbUser, $dbPassword); $sdao = new SolicitudDao(); $adao = new ArtesanoDao(); $evento = $_POST["evento"]; $nrostand = $_POST["nrostand"]; $id = $_POST["id"]; switch ($evento) { case 1: $aumento = 0; break; case 2: $aumento = 60; break; case 3: $aumento = 80; break; default: $aumento = 0; ?> <meta http-equiv="REFRESH" content="0,url=../Interfaces/reservarStand.php"> <script type="text/javascript"> alert("Error en el formulario"); </script>
<?php include_once "../Librerias/Datasource.php"; include_once "../Librerias/ArtesanoDao.php"; include_once "../Librerias/Artesano.php"; include_once "../Librerias/SolicitudDao.php"; include_once "../Librerias/Solicitud.php"; include_once "../Librerias/StandDao.php"; include_once "../Librerias/Stand.php"; include_once "../Librerias/Variables.php"; $conn = new Datasource($dbhost, $dbName, $dbUser, $dbPassword); $adao = new ArtesanoDao(); $sdao = new SolicitudDao(); $standDao = new StandDao(); $idSolicitud = $_GET["id"]; $solicitud = $sdao->getObject($conn, $idSolicitud); $stand = $standDao->getObject($conn, $solicitud->getIdstand()); $stand->setReservado(1); $stand->setIdartesano($solicitud->getIdartesano()); if ($standDao->save($conn, $stand)) { $busqueda = new Solicitud(); $busqueda->setIdstand($solicitud->getIdstand()); $lista = $sdao->searchMatching($conn, $busqueda); $errores = false; for ($i = 0; $i < count($lista); $i++) { if (!$sdao->delete($conn, $lista[$i])) { $errores = true; break; } } if ($errores) {
<?php } else { ?> <script> alert("No tienes permiso para ver esto. Ser\u00e1s redireccionado a tu p\u00e1gina de inicio"); </script> <meta http-equiv="refresh" content="0,url=principal.php"> <?php } } else { $conn = new Datasource($dbhost, $dbName, $dbUser, $dbPassword); $admdao = new AdministradorDao(); $busqueda = new Administrador(); $adao = new ArtesanoDao(); $admin = new Administrador(); $sdao = new SolicitudDao(); $busqueda->setIdAdministrador($_SESSION["ID"]); $list = $admdao->searchMatching($conn, $busqueda); $admin = $list[0]; ?> <!DOCTYPE html> <html> <head> <title>Manos de Oro - Admo Stands</title> <link rel="apple-touch-icon" sizes="57x57" href="../imgs/icono/apple-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="../imgs/icono/apple-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="../imgs/icono/apple-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="../imgs/icono/apple-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="../imgs/icono/apple-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="../imgs/icono/apple-icon-120x120.png">