From d075d04a2a413e444dfbf24b1aa104a00c32cb04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Sun, 9 May 2021 20:31:54 +0200 Subject: [PATCH] Add files via upload --- assets/php/common/session_dao.php | 7 ++--- assets/php/config.php | 5 +++ assets/php/form.php | 16 +++++----- assets/php/template.php | 42 +------------------------ panel_user/includes/formChangeEmail.php | 34 ++++++++++---------- panel_user/includes/formChangeName.php | 40 ++++++++++++----------- panel_user/includes/formChangePass.php | 34 ++++++++++---------- panel_user/panelUser.php | 2 ++ 8 files changed, 74 insertions(+), 106 deletions(-) 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="