Add files via upload

This commit is contained in:
Fernando Méndez 2021-05-29 15:59:19 +02:00 committed by GitHub
parent e9ef536815
commit e12c79d493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 187 additions and 81 deletions

View File

@ -42,7 +42,7 @@
font-weight: bold; font-weight: bold;
position: relative; position: relative;
} }
.button.large { .button.large, button.danger {
width: 95%; width: 95%;
} }
button:hover, .button:hover { button:hover, .button:hover {
@ -51,6 +51,16 @@
color:#1f2c3d; color:#1f2c3d;
border-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 */
.header { .header {
@ -740,6 +750,19 @@ form select option {
color: red; 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 */
footer { footer {
text-align: left; text-align: left;

View File

@ -35,14 +35,14 @@ button, .button.large{
width: 150px; width: 150px;
height: 30px; height: 30px;
padding: 5px 10px; padding: 5px 10px;
background-color :#1f2c3d; background-color:#1f2c3d;
border: 1px solid #d3ebff; border: 1px solid #d3ebff;
text-align: center; text-align: center;
color :#d3ebff; color:#d3ebff;
font-weight: bold; font-weight: bold;
position: relative; position: relative;
} }
.button.large { .button.large, button.danger {
width: 95%; width: 95%;
} }
button:hover, .button:hover { button:hover, .button:hover {
@ -51,6 +51,16 @@ button:hover, .button:hover {
color:#1f2c3d; color:#1f2c3d;
border-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 */
.header { .header {
@ -734,6 +744,19 @@ fieldset pre {
color: red; 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 */
footer { footer {

View File

@ -41,17 +41,11 @@ $(document).ready(function() {
$("#card-number-0").change(function(){ $("#card-number-0").change(function(){
const cardNumber0 = $("#card-number-0"); const cardNumber0 = $("#card-number-0");
cardNumber0[0].setCustomValidity(""); cardNumber0[0].setCustomValidity("");
$("#card-number-1").change(function(){
const cardNumber1 = $("#card-number-1");
cardNumber1[0].setCustomValidity(""); cardNumber1[0].setCustomValidity("");
$("#card-number-2").change(function(){
const cardNumber2 = $("#card-number-2");
cardNumber2[0].setCustomValidity(""); cardNumber2[0].setCustomValidity("");
$("#card-number-3").change(function(){
const cardNumber3 = $("#card-number-3");
cardNumber3[0].setCustomValidity(""); cardNumber3[0].setCustomValidity("");
if( (cardNumber0.val().length + cardNumber1.val().length + cardNumber2.val().length +cardNumber3.val().length) === 16 ){ if(cardNumber0.val().length < 4){
$("#carNumberValid").show(); $("#carNumberValid").show();
$("#cardNumerInvalid").hide(); $("#cardNumerInvalid").hide();
cardNumber0[0].setCustomValidity(""); cardNumber0[0].setCustomValidity("");
@ -61,8 +55,56 @@ $(document).ready(function() {
cardNumber0[0].setCustomValidity("El número de tarjeta debe tener 16 dígitos."); 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.");
}
}); });

View File

@ -3,26 +3,22 @@
* CompluCine - FDI-cines * 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).ready(function() {
document.getElementById("submit").onclick=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."); let _delete = confirm("¿Está seguro de que desea eliminar su cuenta de usuario?\nEsta acción no se puede deshacer.");
if(_delete == true){ if(_delete){
//console.log(location.href += "&reply=" + _delete); document.formDeleteAccount.submit();
//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);
}
});
} }
} }
}); });
*/

16
assets/js/goUp.js Normal file
View File

@ -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);
}
});
});

View File

@ -683,7 +683,7 @@
<div class='footer'> <div class='footer'>
<p>© Práctica Final | Sistemas Web 2021 </p> <p>© Práctica Final | Sistemas Web 2021 </p>
</div> </div>
<a href='#'>▲Subir</a> | <span class='go-up'>&#x1F51D</span>
<a href='{$prefix}fdicines/about_us/'>Sobre FDI-Cines</a> | <a href='{$prefix}fdicines/about_us/'>Sobre FDI-Cines</a> |
<a href='{$prefix}fdicines/terms_conditions/'>Términos de uso</a> | <a href='{$prefix}fdicines/terms_conditions/'>Términos de uso</a> |
<a href='{$prefix}cinemas/'>Nuestros cines</a> | <a href='{$prefix}cinemas/'>Nuestros cines</a> |
@ -700,6 +700,7 @@
echo"<script type='text/javascript' src='{$prefix}assets/js/jquery-3.2.1.min.js'></script> echo"<script type='text/javascript' src='{$prefix}assets/js/jquery-3.2.1.min.js'></script>
<script type='text/javascript' src='{$prefix}assets/js/cambiarCSS.js'></script> <script type='text/javascript' src='{$prefix}assets/js/cambiarCSS.js'></script>
<script type='text/javascript' src='{$prefix}assets/js/checkForms.js'></script> <script type='text/javascript' src='{$prefix}assets/js/checkForms.js'></script>
<script type='text/javascript' src='{$prefix}assets/js/goUp.js'></script>
"; ";
if($page === "FDI-Cines") echo"<script type='text/javascript' src='{$prefix}assets/js/promotions.js'></script>\n"; if($page === "FDI-Cines") echo"<script type='text/javascript' src='{$prefix}assets/js/promotions.js'></script>\n";
if($page === "Panel de Usuario") echo"<script type='text/javascript' src='{$prefix}assets/js/deleteConfirm.js'></script>\n"; if($page === "Panel de Usuario") echo"<script type='text/javascript' src='{$prefix}assets/js/deleteConfirm.js'></script>\n";

View File

@ -37,8 +37,8 @@ class FormDeleteAccount extends Form {
<label for='verify'>Al marcar esta casilla, verifica y entiende que esta acción no se puede deshacer.</label> <label for='verify'>Al marcar esta casilla, verifica y entiende que esta acción no se puede deshacer.</label>
</div> </div>
<div class='actions'> <div class='actions'>
<input type='submit' id='submit' value='Eliminar Cuenta de Usuario' class='primary' /> <!-- <input type='submit' id='submit' value='Eliminar Cuenta de Usuario' class='primary' /> -->
<!-- <input type='submit' id='submit' value='Eliminar Cuenta de Usuario' class='primary' onclick=\"newWindow('confirm.php');\" /> --> <button class='danger' onclick='confirmDelete()'>Eliminar Cuenta de Usuario</button>
</div> </div>
</div>"; </div>";

View File

@ -10,7 +10,7 @@
include_once($prefix.'assets/php/includes/cinema_dao.php'); include_once($prefix.'assets/php/includes/cinema_dao.php');
include_once($prefix.'assets/php/includes/cinema.php'); include_once($prefix.'assets/php/includes/cinema.php');
if(isset($_SESSION["purchase"]) && isset($_SESSION["film_purchase"])){
$purchase = unserialize($_SESSION["purchase"]); $purchase = unserialize($_SESSION["purchase"]);
$film_purchase = unserialize($_SESSION["film_purchase"]); $film_purchase = unserialize($_SESSION["film_purchase"]);
$sessionDAO = new SessionDAO("complucine"); $sessionDAO = new SessionDAO("complucine");
@ -49,8 +49,13 @@
} else { } else {
$actions = '<h3>Guarde esta información y enséñela para entrar al cine.</h3><hr /> $actions = '<h3>Guarde esta información y enséñela para entrar al cine.</h3><hr />
<button onclick="javascript:window.print()">Imprimir<//button> <button onclick="javascript:window.print()">Imprimir<//button>
<!-- <button onclick="javascript:window.print()">Guardar<//button> -->
'; ';
} }
} else {
$reply = '<h2>No se han encontrado datos de compra<h2>';
$actions = '';
}
//Page-specific content: //Page-specific content:
$section = '<!-- Purchase Summary --> $section = '<!-- Purchase Summary -->