<?php include_once "RestauranteDatos.php"; $RestauranteObj = new RestauranteDatos(); if (!empty($_POST)) { if (empty($_POST['personas']) || empty($_POST['inicio']) || empty($_POST['fin']) || empty($_POST['razon']) || empty($_POST['telefono']) || empty($_POST['correo']) || empty($_POST['sri']) || empty($_POST['autorizacion']) || empty($_POST['fax']) || empty($_POST['movil'])) { echo "Por favor ingrese los datos "; echo "<meta http-equiv='Refresh' content='2;crearRestaurante.php'>"; } //subida de imagen $target_dir = "../img/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION); //validar si el archivo es imagen if (isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if ($check !== false) { $uploadOk = 1; } else { echo "El archivo no es una imagen."; echo "<meta http-equiv='Refresh' content='2;crearRestaurante.php'>"; } } // Chequear si el archivo ya existe if (file_exists($target_file)) { echo "El archivo ya existe."; echo "<meta http-equiv='Refresh' content='2;crearRestaurante.php'>"; } // Chequear el tamanio 50kb if ($_FILES["fileToUpload"]["size"] > 50000) { echo "El archivo es demasiado grande.";
<?php //obtener el valor de ID que viene del metodo GET a traves de HTTP $id = $_POST['id']; include_once "RestauranteDatos.php"; $RestauranteObj = new RestauranteDatos(); //Ejecuto el metodo para eliminar el objeto Demo indicando el id $RestauranteObj->delete($id); echo "<meta http-equiv='Refresh' content='1;consultaRestaurante.php'>";
<?php include_once "RestauranteDatos.php"; $RestauranteObj = new RestauranteDatos(); if (!empty($_POST)) { if (empty($_POST['personas']) || empty($_POST['inicio']) || empty($_POST['fin']) || empty($_POST['razon']) || empty($_POST['telefono']) || empty($_POST['correo']) || empty($_POST['sri']) || empty($_POST['autorizacion']) || empty($_POST['fax']) || empty($_POST['movil'])) { echo "Existen campos vacios para actualizar restaurante"; echo "<meta http-equiv='Refresh' content='2;consultaRestaurante.php'>"; } //subida de imagen $target_dir = "../img/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION); //validar si el archivo es imagen if (isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if ($check !== false) { $uploadOk = 1; } else { echo "El archivo no es una imagen."; echo "<meta http-equiv='Refresh' content='2;consultaRestaurante.php'>"; } } // Chequear si el archivo ya existe //if (file_exists($target_file)) { //echo "El archivo ya existe."; //echo "<meta http-equiv='Refresh' content='2;consultaRestaurante.php'>"; //} // Chequear el tamanio 50kb if ($_FILES["fileToUpload"]["size"] > 50000) {
<?php include_once "RestauranteDatos.php"; $RestauranteObj = new RestauranteDatos(); ?> <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Refresh" content="300"> <!--Se refrescara la pagina cada 300 segundos es decir 5 minutos--> <meta name="application-name" content="Reserva de mesas,pedidos de menus personalizados y pagos via online para restaurantes gourmet"> <meta name="author" content="Claudia Torres, clao91torrestorres@gmail.com" /> <meta name="copyright" content="AlimFaster"> <!--Nombre de la compañia--> <meta name="organization" content="AlimFaster S.A." /> <!--Nombre de la Organizacion--> <meta name="language" content="es-ES" /> <!--Lenguaje de la pagina web español--> <meta name="classification" content="Reservas Restaurantes"> <meta name="description" content="Reservación de los restaurantes gourmets asociados" /> <!--Descripcion de la pagina web--> <meta name="generator" content="Bloc de notas"> <!--Cual es la herramienta que se utiliza para editar, crear la pagina web--> <meta name="keywords" content="elección de reserva de restaurantes gourmet, reservas de pedidos y pagos online de restaurantes gourmet, elección de restaurantes gourmet" /> <!--Palabras claves para que los navegadores puedan identificar y rankear nuestra pagina web--> <meta name="robots" content="index,follow"> <!--etiqueta que sirve para que los bucadores puedan recorrer tu pagina web--> <link href="../css/styleRestaurant.css" rel="stylesheet" type="text/css"> <link href="../css/bootstrap.css" rel="stylesheet" type="text/css"> <title>Consulta de restaurante Online - Restaurant</title> </head> <body > <!--Esto es para estilos responsive manueales --> <!--<div class="prueba">Probando</div> <div class="prueba">Probando</div> <div class="prueba">Probando</div> <div class="prueba alfa omega">Probando</div> -->