diff --git a/assets/php/common/session_dao.php b/assets/php/common/session_dao.php index d95226a..251e5e8 100644 --- a/assets/php/common/session_dao.php +++ b/assets/php/common/session_dao.php @@ -18,7 +18,7 @@ VALUES ('%d', '%d', '%d', '%d', '%s', '%s', '%d', '%s', '%d')", $id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format, "0"); - $resul = mysqli_query($this->mysqli, $sql) or die ('Error createSession'); + $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database'); return $sql; } @@ -35,7 +35,7 @@ public function filmTittle($idfilm){ $sql = sprintf("SELECT * FROM film JOIN session ON film.id = session.idfilm WHERE session.idfilm = '%d' ", $idfilm ); - $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database en filmTittle con idfilm= '. $idfilm); + $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database en sessionData con la id '. $idfilm); $resul = mysqli_fetch_array($resul); @@ -50,8 +50,7 @@ $sql = sprintf( "SELECT * FROM session WHERE idcinema = '%s' AND idhall = '%s' AND date = '%s' AND start_time = '%s'", $cinema, $hall, $date, $startTime); - - $resul = mysqli_query($this->mysqli, $sql) or die ('Error searchSession'); + $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database'); $session = mysqli_fetch_array($resul); diff --git a/assets/php/config.php b/assets/php/config.php index 2d8ef8e..894cc59 100644 --- a/assets/php/config.php +++ b/assets/php/config.php @@ -44,4 +44,9 @@ * @see http://php.net/manual/en/language.types.callable.php */ register_shutdown_function(array($app, 'shutdown')); + + //Depuración (BORRAR): + ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); + error_reporting(E_ALL); ?> diff --git a/assets/php/form.php b/assets/php/form.php index fa09d49..f5a057a 100644 --- a/assets/php/form.php +++ b/assets/php/form.php @@ -18,7 +18,7 @@ abstract class Form { * envío del formulario. */ private $action; - + private $printed; /** * Crea un nuevo formulario. * @@ -52,7 +52,7 @@ abstract class Form { $opcionesPorDefecto = array( 'action' => null, ); $opciones = array_merge($opcionesPorDefecto, $opciones); - $this->action = $opciones['action']; + $this->action = $opciones['action']; if ( !$this->action ) { $this->action = htmlentities($_SERVER['PHP_SELF']); @@ -77,7 +77,7 @@ abstract class Form { * */ public function gestiona() - { + { if ( ! $this->formularioEnviado($_POST) ) { return $this->generaFormulario(); } else { @@ -88,7 +88,7 @@ abstract class Form { header('Location: '.$result); exit(); } - } + } } /** @@ -152,10 +152,10 @@ abstract class Form { /* <<< Permite definir cadena en múltiples líneas. * Revisa https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc */ - $htmlForm = '
'; + $htmlForm = ""; return $htmlForm; } diff --git a/assets/php/template.php b/assets/php/template.php index bd394b7..74953e9 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -325,46 +325,6 @@ break; case "Panel de Gerente": - $html="