diff --git a/assets/css/highContrast.css b/assets/css/highContrast.css index d951cdd..8cbdcc5 100644 --- a/assets/css/highContrast.css +++ b/assets/css/highContrast.css @@ -42,7 +42,7 @@ font-weight: bold; position: relative; } - .button.large { + .button.large, button.danger { width: 95%; } button:hover, .button:hover { @@ -50,7 +50,17 @@ background-color:#dadada; color:#1f2c3d; border-color: #1f2c3d; - } + } + button.danger{ + background-color:#2c0000; + border: 2px solid #d3ebff; + } + button.danger:hover{ + background-color:#00020f; + border: 2px solid #791515; + color: #791515; + } + /* Header */ .header { @@ -739,6 +749,19 @@ form select option { fieldset pre { color: red; } + + /* Go Up button */ + .go-up { + display: none; + padding: 5px; + background:#1f2c3d; + font-size: 20px; + color:#d3ebff; + cursor: pointer; + position: fixed; + bottom: 5px; + right: 20px; + } /* Footer */ footer { diff --git a/assets/css/main.css b/assets/css/main.css index 5b8c3aa..1a34d46 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -35,14 +35,14 @@ button, .button.large{ width: 150px; height: 30px; padding: 5px 10px; - background-color :#1f2c3d; + background-color:#1f2c3d; border: 1px solid #d3ebff; text-align: center; - color :#d3ebff; + color:#d3ebff; font-weight: bold; position: relative; } -.button.large { +.button.large, button.danger { width: 95%; } button:hover, .button:hover { @@ -51,6 +51,16 @@ button:hover, .button:hover { color:#1f2c3d; border-color: #1f2c3d; } +button.danger{ + background-color:#2c0000; + border: 2px solid #d3ebff; +} +button.danger:hover{ + background-color:#d3ebff; + border: 2px solid #791515; + color: #791515; +} + /* Header */ .header { @@ -734,6 +744,19 @@ fieldset pre { color: red; } +/* Go Up button */ +.go-up { + display: none; + padding: 5px; + background:#1f2c3d; + font-size: 20px; + color:#d3ebff; + cursor: pointer; + position: fixed; + bottom: 5px; + right: 20px; +} + /* Footer */ footer { diff --git a/assets/js/checkPay.js b/assets/js/checkPay.js index 16bd9ab..9329f06 100644 --- a/assets/js/checkPay.js +++ b/assets/js/checkPay.js @@ -41,28 +41,70 @@ $(document).ready(function() { $("#card-number-0").change(function(){ const cardNumber0 = $("#card-number-0"); cardNumber0[0].setCustomValidity(""); - $("#card-number-1").change(function(){ - const cardNumber1 = $("#card-number-1"); - cardNumber1[0].setCustomValidity(""); - $("#card-number-2").change(function(){ - const cardNumber2 = $("#card-number-2"); - cardNumber2[0].setCustomValidity(""); - $("#card-number-3").change(function(){ - const cardNumber3 = $("#card-number-3"); - cardNumber3[0].setCustomValidity(""); + cardNumber1[0].setCustomValidity(""); + cardNumber2[0].setCustomValidity(""); + cardNumber3[0].setCustomValidity(""); - if( (cardNumber0.val().length + cardNumber1.val().length + cardNumber2.val().length +cardNumber3.val().length) === 16 ){ - $("#carNumberValid").show(); - $("#cardNumerInvalid").hide(); - cardNumber0[0].setCustomValidity(""); - } else { - $("#carNumberValid").hide(); - $("#cardNumerInvalid").show(); - cardNumber0[0].setCustomValidity("El número de tarjeta debe tener 16 dígitos."); - } - }); - }); - }); + if(cardNumber0.val().length < 4){ + $("#carNumberValid").show(); + $("#cardNumerInvalid").hide(); + cardNumber0[0].setCustomValidity(""); + } else { + $("#carNumberValid").hide(); + $("#cardNumerInvalid").show(); + cardNumber0[0].setCustomValidity("El número de tarjeta debe tener 16 dígitos."); + } + }); + $("#card-number-1").change(function(){ + const cardNumber1 = $("#card-number-1"); + cardNumber0[0].setCustomValidity(""); + cardNumber1[0].setCustomValidity(""); + cardNumber2[0].setCustomValidity(""); + cardNumber3[0].setCustomValidity(""); + + if(cardNumber1.val().length < 4){ + $("#carNumberValid").show(); + $("#cardNumerInvalid").hide(); + cardNumber1[0].setCustomValidity(""); + } else { + $("#carNumberValid").hide(); + $("#cardNumerInvalid").show(); + cardNumber1[0].setCustomValidity("El número de tarjeta debe tener 16 dígitos."); + } + }); + $("#card-number-2").change(function(){ + const cardNumber2 = $("#card-number-2"); + cardNumber0[0].setCustomValidity(""); + cardNumber1[0].setCustomValidity(""); + cardNumber2[0].setCustomValidity(""); + cardNumber3[0].setCustomValidity(""); + + if(cardNumber2.val().length < 4){ + $("#carNumberValid").show(); + $("#cardNumerInvalid").hide(); + cardNumber2[0].setCustomValidity(""); + } else { + $("#carNumberValid").hide(); + $("#cardNumerInvalid").show(); + cardNumber2[0].setCustomValidity("El número de tarjeta debe tener 16 dígitos."); + } + }); + $("#card-number-3").change(function(){ + const cardNumber3 = $("#card-number-3"); + cardNumber0[0].setCustomValidity(""); + cardNumber1[0].setCustomValidity(""); + cardNumber2[0].setCustomValidity(""); + cardNumber3[0].setCustomValidity(""); + + if(cardNumber3.val().length < 4){ + $("#carNumberValid").show(); + $("#cardNumerInvalid").hide(); + cardNumber3[0].setCustomValidity(""); + } else { + $("#carNumberValid").hide(); + $("#cardNumerInvalid").show(); + cardNumber3[0].setCustomValidity("El número de tarjeta debe tener 16 dígitos."); + } }); diff --git a/assets/js/deleteConfirm.js b/assets/js/deleteConfirm.js index 70ebd9c..faaae23 100644 --- a/assets/js/deleteConfirm.js +++ b/assets/js/deleteConfirm.js @@ -3,26 +3,22 @@ * CompluCine - FDI-cines */ -/* TO-DO: NO FUNCIONA LA PETICIÓN AJAX */ +function confirmDelete() { + let _delete = confirm("¿Está seguro de que desea eliminar su cuenta de usuario?\nEsta acción no se puede deshacer."); + if(_delete){ + document.formDeleteAccount.submit(); + } +} + +/* $(document).ready(function() { document.getElementById("submit").onclick=function(){ let _delete = confirm("¿Está seguro de que desea eliminar su cuenta de usuario?\nEsta acción no se puede deshacer."); - if(_delete == true){ - //console.log(location.href += "&reply=" + _delete); - //location.href += "&reply=" + _delete; - $.ajax({ - url:"./?option=delete_user", - type: "POST", - data: {reply: "true"}, - success:function(data){ - console.log(data.reply); - }, - error:function(data){ - console.log(data.reply); - } - }); + if(_delete){ + document.formDeleteAccount.submit(); } } -}); \ No newline at end of file +}); +*/ \ No newline at end of file diff --git a/assets/js/goUp.js b/assets/js/goUp.js new file mode 100644 index 0000000..2cf01f7 --- /dev/null +++ b/assets/js/goUp.js @@ -0,0 +1,16 @@ +$(document).ready(function(){ + $('.go-up').click(function(){ + $('body, html').animate({ + scrollTop: '0px' + }, 300); + }); + + $(window).scroll(function(){ + if( $(this).scrollTop() > 0 ){ + $('.go-up').slideDown(300); + } else { + $('.go-up').slideUp(300); + } + }); + +}); \ No newline at end of file diff --git a/assets/php/template.php b/assets/php/template.php index fc05490..7051192 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -683,7 +683,7 @@ - ▲Subir | + 🔝 Sobre FDI-Cines | Términos de uso | Nuestros cines | @@ -700,6 +700,7 @@ echo" + "; if($page === "FDI-Cines") echo"\n"; if($page === "Panel de Usuario") echo"\n"; diff --git a/panel_user/includes/formDeleteAccount.php b/panel_user/includes/formDeleteAccount.php index d686421..fb3aff0 100644 --- a/panel_user/includes/formDeleteAccount.php +++ b/panel_user/includes/formDeleteAccount.php @@ -37,8 +37,8 @@ class FormDeleteAccount extends Form {
- - + +
"; diff --git a/purchase/resume.php b/purchase/resume.php index fdbfaae..8d92906 100644 --- a/purchase/resume.php +++ b/purchase/resume.php @@ -10,46 +10,51 @@ include_once($prefix.'assets/php/includes/cinema_dao.php'); include_once($prefix.'assets/php/includes/cinema.php'); + if(isset($_SESSION["purchase"]) && isset($_SESSION["film_purchase"])){ + $purchase = unserialize($_SESSION["purchase"]); + $film_purchase = unserialize($_SESSION["film_purchase"]); + $sessionDAO = new SessionDAO("complucine"); + $session = $sessionDAO->sessionData($purchase->getSessionId()); + $cinemaDAO = new Cinema_DAO("complucine"); + $cinema = $cinemaDAO->cinemaData($purchase->getCinemaId()); - $purchase = unserialize($_SESSION["purchase"]); - $film_purchase = unserialize($_SESSION["film_purchase"]); - $sessionDAO = new SessionDAO("complucine"); - $session = $sessionDAO->sessionData($purchase->getSessionId()); - $cinemaDAO = new Cinema_DAO("complucine"); - $cinema = $cinemaDAO->cinemaData($purchase->getCinemaId()); + unset($_SESSION["purchase"]); + unset($_SESSION["film_purchase"]); - unset($_SESSION["purchase"]); - unset($_SESSION["film_purchase"]); + $reply = "

Se ha realizado su compra con éxito, a continuación puede ver el resumen:


+
+ ".$film_purchase->getTittle()." +

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

+

Duración: ".$film_purchase->getDuration()." minutos

+

Idioma: ".$film_purchase->getLanguage()."

+

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

+
+
+

Sesión (Fecha): ".$session->getDate()."

+

Sesión (Hora): ".$session->getStartTime()."

+

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

+

Sala: ".$purchase->getHallId()."

+

Asiento (Columna): ".$purchase->getRow()."

+

Asiento (Fila): ".$purchase->getColumn()."

+

Hora de la Compra: ".$purchase->getTime()."

+
+ "; - $reply = "

Se ha realizado su compra con éxito, a continuación puede ver el resumen:


-
- ".$film_purchase->getTittle()." -

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

-

Duración: ".$film_purchase->getDuration()." minutos

-

Idioma: ".$film_purchase->getLanguage()."

-

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

-
-
-

Sesión (Fecha): ".$session->getDate()."

-

Sesión (Hora): ".$session->getStartTime()."

-

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

-

Sala: ".$purchase->getHallId()."

-

Asiento (Columna): ".$purchase->getRow()."

-

Asiento (Fila): ".$purchase->getColumn()."

-

Hora de la Compra: ".$purchase->getTime()."

-
- "; - - if(isset($_SESSION["login"]) && $_SESSION["login"] == true){ - $actions = '

Guarde esta información y enséñela para entrar al cine.


-

Se ha guardado la información de la compra en su panel de usuario.

- - '; + if(isset($_SESSION["login"]) && $_SESSION["login"] == true){ + $actions = '

Guarde esta información y enséñela para entrar al cine.


+

Se ha guardado la información de la compra en su panel de usuario.

+ + '; + } else { + $actions = '

Guarde esta información y enséñela para entrar al cine.


+