Add files via upload

This commit is contained in:
Fernando Méndez 2021-06-04 12:38:17 +02:00 committed by GitHub
parent 22977e8091
commit 8dafa546b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 57 additions and 20 deletions

View File

@ -181,8 +181,8 @@
color: #dadada; color: #dadada;
} }
table tbody tr { table tbody tr {
color: #dadada; color: #1f2c3d;
border: solid 1px #dadada; border: solid 1px #1f2c3d;
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
} }
@ -193,7 +193,7 @@
padding: 0.75em 0.75em; padding: 0.75em 0.75em;
} }
table th { table th {
color: #dadada; color: #1f2c3d;
font-size: 0.9em; font-size: 0.9em;
font-weight: 600; font-weight: 600;
padding: 0.85em 0.85em 0.85em 0.85em; padding: 0.85em 0.85em 0.85em 0.85em;
@ -784,7 +784,7 @@ form select option {
footer button { footer button {
display: inline-block; display: inline-block;
margin: 1px; margin: 1px;
width: 115px; width: 120px;
height: 25px; height: 25px;
padding: 0px 0px; padding: 0px 0px;
text-align: center; text-align: center;

View File

@ -4,5 +4,21 @@
*/ */
function cambiarCSS(nuevo){ function cambiarCSS(nuevo){
document.getElementById('estilo').setAttribute('href', nuevo); if(nuevo.includes("main.css")){
var viejo = "{$prefix}assets/css/highContrast.css";
var oldName = "Alto Contraste";
} else {
var viejo = "{$prefix}assets/css/main.css";
var oldName = "Contrast Normal";
}
var url = "../assets/php/common/changeCSS.php?css=" + nuevo;
$.get(url);
/* La idea era que cambiase todo dinámicamente sin refrescar la página */
//document.getElementById('estilo').setAttribute('href', nuevo);
//document.getElementById('cssChange').innerHTML = oldName;
//document.getElementById('cssChange').setAttribute('onClick', 'cambiarCSS('+viejo+')');
location.reload();
} }

7
assets/js/goBack.js Normal file
View File

@ -0,0 +1,7 @@
$(document).ready(function(){
document.getElementById('go-back').addEventListener('click', function(event){
event.preventDefault();
history.back();
//window.history.go(-1);
});
});

View File

@ -1,4 +1,5 @@
$(document).ready(function(){ $(document).ready(function(){
$('.go-up').click(function(){ $('.go-up').click(function(){
$('body, html').animate({ $('body, html').animate({
scrollTop: '0px' scrollTop: '0px'

View File

@ -10,7 +10,7 @@ window.onload = function(){
function select_cinema(){ function select_cinema(){
var select = document.getElementById("select_cinema"); var select = document.getElementById("select_cinema");
console.log(select);
if(select != undefined){ if(select != undefined){
select.onchange = function(){ select.onchange = function(){
location.href += "&cinema=" + $('select[id=cinemas]').val(); location.href += "&cinema=" + $('select[id=cinemas]').val();

View File

@ -0,0 +1,9 @@
<?php
include('../../../assets/php/config.php');
switch(true){
case strpos($_GET["css"], "main.css"): $_SESSION["css"] = "main.css"; break;
case strpos($_GET["css"], "highContrast.css"): $_SESSION["css"] = "highContrast.css"; break;
default: $_SESSION["css"] = "main.css"; break;
}
?>

View File

@ -70,13 +70,15 @@
$page = $this->page; $page = $this->page;
$prefix = $this->prefix; $prefix = $this->prefix;
if(!isset($_SESSION["css"])) $_SESSION["css"] = "main.css";
$extraCSS = ""; $extraCSS = "";
if($page === "Comprar Entrada") $extraCSS = "\n<link id='estilo' rel='stylesheet' type='text/css' href='{$prefix}assets/css/seat.css'>"; if($page === "Comprar Entrada") $extraCSS = "\n<link id='estilo' rel='stylesheet' type='text/css' href='{$prefix}assets/css/seat.css'>";
echo"<head> echo"<head>
<title>CompluCine | {$page}</title> <title>CompluCine | {$page}</title>
<meta charset='utf-8' /> <meta charset='utf-8' />
<link id='estilo' rel='stylesheet' type='text/css' href='{$prefix}assets/css/main.css'>{$extraCSS} <link id='estilo' rel='stylesheet' type='text/css' href='{$prefix}assets/css/{$_SESSION['css']}'>{$extraCSS}
<noscript><h1>Esta página requiere JavaScript para su correcto funcionamiento. <noscript><h1>Esta página requiere JavaScript para su correcto funcionamiento.
Compruebe si JavaScript está deshabilitado en su navegador.</h1></noscript> Compruebe si JavaScript está deshabilitado en su navegador.</h1></noscript>
<meta name='viewport' content='width=device-width, initial-scale=1'> <meta name='viewport' content='width=device-width, initial-scale=1'>
@ -665,15 +667,13 @@
$prefix = $this->prefix; $prefix = $this->prefix;
$page = $this->page; $page = $this->page;
/* TODO */ if(!isset($_SESSION["css"]) || $_SESSION["css"] === "main.css"){
if(!isset($_SESSION["css"]) || $_SESSION["css"] === "assets/css/main.css"){
$css = "{$prefix}assets/css/highContrast.css"; $css = "{$prefix}assets/css/highContrast.css";
$nameCSS = "Alto Contraste"; $nameCSS = "Alto Contraste";
} else { } else {
$css = "{$prefix}assets/css/main.css"; $css = "{$prefix}assets/css/main.css";
$nameCSS = "Contraste Normal"; $nameCSS = "Contraste Normal";
} }
/****/
echo"<footer> echo"<footer>
@ -685,7 +685,7 @@
<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> |
<a href='{$prefix}contacto/'>Contacto</a> | <a href='{$prefix}contacto/'>Contacto</a> |
<button id='css' onclick=\"cambiarCSS('$css');\">$nameCSS</button> <button id='cssChange' onclick=\"cambiarCSS('$css');\">$nameCSS</button>
</footer>\n"; </footer>\n";
} }
@ -702,7 +702,8 @@
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";
if($page === "Comprar Entrada") echo"<script type='text/javascript' src='{$prefix}assets/js/selectTicket.js'></script> if($page === "Comprar Entrada") echo"<script type='text/javascript' src='{$prefix}assets/js/selectTicket.js'></script>
<script type='text/javascript' src='{$prefix}assets/js/checkPay.js'></script>\n"; <script type='text/javascript' src='{$prefix}assets/js/checkPay.js'></script>
<script type='text/javascript' src='{$prefix}assets/js/goBack.js'></script>\n";
} }
} }

View File

@ -160,6 +160,7 @@ class FormPurchase extends Form {
$html = "<div class='code info'> $html = "<div class='code info'>
<h2>No se ha seleccionado asiento(s).</h2> <h2>No se ha seleccionado asiento(s).</h2>
<p>Vuelva atrás para selecionar una butaca.</p> <p>Vuelva atrás para selecionar una butaca.</p>
<button id='go-back'>Volver</button>
</div>"; </div>";
} }
} }

View File

@ -78,7 +78,7 @@ class FormSelectCinemaSession extends Form {
$cinemasListHTML .= '</select> $cinemasListHTML .= '</select>
</section>'; </section>';
} else { } else {
$cinemasListHTML = '<select name="cinemas"><option value="" selected>No hay cines disponibles para esta película.</option></select>'; $cinemasListHTML = '<select name="cinemas"><option value="" selected>No hay cines disponibles para esta película.</option></select><button id="go-back">Volver</button>';
} }
$fiml_id = $film->getId(); $fiml_id = $film->getId();
@ -118,15 +118,15 @@ class FormSelectCinemaSession extends Form {
$sessionsListHTML .= '</select>'; $sessionsListHTML .= '</select>';
if($count == 0) { if($count == 0) {
$sessionsListHTML = '<select name="sessions"><option value="" selected>No hay sesiones disponibles para esta película.</option></select>'; $sessionsListHTML = '<select name="sessions"><option value="" selected>No hay sesiones disponibles para esta película.</option></select><button id="go-back">Volver</button>';
$pay = false; $pay = false;
} }
} else { } else {
$sessionsListHTML = '<select name="sessions"><option value="" selected>No hay sesiones disponibles para esta película.</option></select>'; $sessionsListHTML = '<select name="sessions"><option value="" selected>No hay sesiones disponibles para esta película.</option></select><button id="go-back">Volver</button>';
$pay = false; $pay = false;
} }
} else { } else {
$sessionsListHTML = '<select name="sessions"><option value="" selected>Primero seleccione un cine.</option></select>'; $sessionsListHTML = '<select name="sessions"><option value="" selected>Primero seleccione un cine.</option></select><button id="go-back">Volver</button>';
$pay = false; $pay = false;
} }
@ -192,7 +192,7 @@ class FormSelectCinemaSession extends Form {
</section>'; </section>';
} else { } else {
$filmsListHTML = '<select name="films"><option value="" selected>No hay películas disponibles para este cine.</option></select>'; $filmsListHTML = '<select name="films"><option value="" selected>No hay películas disponibles para este cine.</option></select><button id="go-back">Volver</button>';
} }
//Reply: Depends on whether the purchase is to be made from a selected movie or a cinema. //Reply: Depends on whether the purchase is to be made from a selected movie or a cinema.
@ -213,11 +213,13 @@ class FormSelectCinemaSession extends Form {
</div>'; </div>';
} else { } else {
$html = '<h1>No existe el cine.</h1>'; $html = '<h1>No existe el cine.</h1>
<button id="go-back">Volver</button>';
$pay = false; $pay = false;
} }
} else { } else {
$html = '<h1>No se ha encontrado película ni cine.</h1>'; $html = '<h1>No se ha encontrado película ni cine.</h1>
<button id="go-back">Volver</button>';
$pay = false; $pay = false;
} }