From 81a6296f017fd7ce56f12d99e4e0ccbcd2cf6d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Mon, 9 Aug 2021 11:12:39 +0200 Subject: [PATCH] Delete formPurchase-FER_SURFACE.php --- .../includes/formPurchase-FER_SURFACE.php | 121 ------------------ 1 file changed, 121 deletions(-) delete mode 100644 purchase/includes/formPurchase-FER_SURFACE.php diff --git a/purchase/includes/formPurchase-FER_SURFACE.php b/purchase/includes/formPurchase-FER_SURFACE.php deleted file mode 100644 index 8aa4eac..0000000 --- a/purchase/includes/formPurchase-FER_SURFACE.php +++ /dev/null @@ -1,121 +0,0 @@ -session = $sessionDAO->sessionData($_POST["sessions"]); - - $filmDAO = new Film_DAO("complucine"); - $this->film = $filmDAO->FilmData($this->session->getIdfilm()); - - $cinemaDAO = new Cinema_DAO("complucine"); - $this->cinema = $cinemaDAO->cinemaData($this->session->getIdcinema()); - - $TODAY = getdate(); - $year = "$TODAY[year]"; - - $this->years = array(); - for($i = $year; $i < $year+10; $i++) array_push($this->years, $i); - - $this->months = array(); - for($i = 1; $i <= 12; $i++) array_push($this->months, $i); - } - - protected function generaCamposFormulario($datos, $errores = array()){ - - // Se generan los mensajes de error si existen. - $htmlErroresGlobales = self::generaListaErroresGlobales($errores); - $errorNombre = self::createMensajeError($errores, 'name', 'span', array('class' => 'error')); - $errorPassword = self::createMensajeError($errores, 'pass', 'span', array('class' => 'error')); - - $monthsHTML = ""; - foreach($this->months as $value){ - $monthsHTML .= ""; - } - - $yearsHTML = ""; - foreach($this->years as $value){ - $yearsHTML .= ""; - } - - $html = "
-
- Resumen de la Compra -

Película: ".str_replace('_', ' ', strtoupper($this->film->getTittle()))."

-

Cine: ".$this->cinema->getName()."

-

Sala: ".$this->session->getIdhall()."

-

Fecha: ".date_format(date_create($this->session->getDate()), 'd-m-Y')."

-

Hora: ".$this->session->getStartTime()."

-

Precio: ".$this->session->getSeatPrice()."€

-
-
".$htmlErroresGlobales."
- Datos Bancarios -
- -
-
- - - - - - -
-
- - -
-
- - -
-
"; - - return $html; - } - - protected function procesaFormulario($datos){ - $result = array(); - - //$nombre = $this->test_input($datos['name']) ?? null; - $nombre = $datos['name'] ?? null; - $nombre = strtolower($nombre); - if ( empty($nombre) || mb_strlen($nombre) < 3 || mb_strlen($nombre) > 15 ) { - $result['name'] = "El nombre tiene que tener\n una longitud de al menos\n 3 caracteres\n y menos de 15 caracteres."; - } - - //$password = $this->test_input($datos['pass']) ?? null; - $password = $datos['pass'] ?? null; - if ( empty($password) || mb_strlen($password) < 4 ) { - $result['pass'] = "El password tiene que tener\n una longitud de al menos\n 4 caracteres."; - } - - if (count($result) === 0) { - $result[] = "La compra aun está en desarrollo. Vuelva en unos días."; - } - - return $result; - } -} -?> \ No newline at end of file