Add files via upload
This commit is contained in:
parent
4e1cdc6522
commit
b4f2d17d0e
@ -373,13 +373,19 @@
|
||||
.code.purchase {
|
||||
text-align: center;
|
||||
}
|
||||
.code.purchase h3 {
|
||||
margin-top: 2em;
|
||||
}
|
||||
.code.purchase img {
|
||||
margin: 0.1em 0 0.8em 0;
|
||||
width: 100%;
|
||||
box-shadow: 0 4px 8px 0 #00020f, 0 6px 20px 0 #00020f;
|
||||
box-shadow: 0 4px 8px 0 #d3ebff, 0 6px 20px 0 #d3ebff;
|
||||
}
|
||||
.code.purchase select, .code.purchase select option {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
margin: 0.1em 0.5em 1em 0.5em;
|
||||
font-weight: bold !important;
|
||||
color: #1f2c3d !important;
|
||||
background-color: #d3ebff;
|
||||
@ -679,6 +685,53 @@
|
||||
height: 110%;
|
||||
}
|
||||
|
||||
.card-holder {
|
||||
width: 75%;
|
||||
display: inline-block;
|
||||
}
|
||||
.input-cart-number, .fieldset-cvv, .select {
|
||||
width: 70px;
|
||||
max-width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form select {
|
||||
display: inline-block;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
color: #1f2c3d;
|
||||
line-height: 1.3;
|
||||
padding: .4em 1.4em .3em .8em;
|
||||
width: 75px;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
margin: 10px auto;
|
||||
border: 1px solid #d3ebff;
|
||||
box-shadow: 0 1px 0 1px #1f2c3d;
|
||||
border-radius: .3em;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
form select::-ms-expand {
|
||||
display: none;
|
||||
}
|
||||
form select:hover {
|
||||
border-color: #d3ebff;
|
||||
}
|
||||
form select:focus {
|
||||
border-color: #d3ebff;
|
||||
box-shadow: 0 0 1px 3px #1f2c3d;
|
||||
box-shadow: 0 0 0 3px -moz-mac-focusring;
|
||||
color: #1f2c3d;
|
||||
outline: none;
|
||||
}
|
||||
form select option {
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
|
||||
/* Preformatted Text */
|
||||
pre {
|
||||
font-weight: bold;
|
||||
|
@ -371,13 +371,19 @@ main img {
|
||||
.code.purchase {
|
||||
text-align: center;
|
||||
}
|
||||
.code.purchase h3 {
|
||||
margin-top: 2em;
|
||||
}
|
||||
.code.purchase img {
|
||||
margin: 0.1em 0 0.8em 0;
|
||||
width: 100%;
|
||||
box-shadow: 0 4px 8px 0 #d3ebff, 0 6px 20px 0 #d3ebff;
|
||||
}
|
||||
.code.purchase select, .code.purchase select option {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
margin: 0.1em 0.5em 1em 0.5em;
|
||||
font-weight: bold !important;
|
||||
color: #1f2c3d !important;
|
||||
background-color: #d3ebff;
|
||||
@ -664,6 +670,7 @@ textarea {
|
||||
border:#000000;
|
||||
background-color: #791515;
|
||||
}
|
||||
|
||||
.file{
|
||||
margin-top: 10px;
|
||||
}
|
||||
@ -671,6 +678,53 @@ textarea {
|
||||
height: 110%;
|
||||
}
|
||||
|
||||
.card-holder {
|
||||
width: 75%;
|
||||
display: inline-block;
|
||||
}
|
||||
.input-cart-number, .fieldset-cvv, .select {
|
||||
width: 70px;
|
||||
max-width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form select {
|
||||
display: inline-block;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
color: #1f2c3d;
|
||||
line-height: 1.3;
|
||||
padding: .4em 1.4em .3em .8em;
|
||||
width: 75px;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
margin: 10px auto;
|
||||
border: 1px solid #d3ebff;
|
||||
box-shadow: 0 1px 0 1px #1f2c3d;
|
||||
border-radius: .3em;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
form select::-ms-expand {
|
||||
display: none;
|
||||
}
|
||||
form select:hover {
|
||||
border-color: #d3ebff;
|
||||
}
|
||||
form select:focus {
|
||||
border-color: #d3ebff;
|
||||
box-shadow: 0 0 1px 3px #1f2c3d;
|
||||
box-shadow: 0 0 0 3px -moz-mac-focusring;
|
||||
color: #1f2c3d;
|
||||
outline: none;
|
||||
}
|
||||
form select option {
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
|
||||
/* Preformatted Text */
|
||||
pre {
|
||||
font-weight: bold;
|
||||
@ -680,6 +734,7 @@ fieldset pre {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
||||
/* Footer */
|
||||
footer {
|
||||
text-align: left;
|
||||
|
3
assets/js/deleteConfirm.js
Normal file
3
assets/js/deleteConfirm.js
Normal file
@ -0,0 +1,3 @@
|
||||
function newWindow(page){
|
||||
window.open(page, 'Ventana de Confirmación', 'width=500, height=300');
|
||||
}
|
@ -44,7 +44,14 @@
|
||||
public function cinemaData($id){
|
||||
$sql = sprintf( "SELECT * FROM cinema WHERE cinema.id = '%d'", $id);
|
||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||
return $resul;
|
||||
|
||||
$cinema = null;
|
||||
while($fila=$resul->fetch_assoc()){
|
||||
$cinema = $this->loadCinema($fila["id"], $fila["name"], $fila["direction"], $fila["phone"]);
|
||||
}
|
||||
$resul->free();
|
||||
|
||||
return $cinema;
|
||||
}
|
||||
|
||||
//Deleted film by "id".
|
||||
|
@ -121,24 +121,6 @@
|
||||
return $cinemas;
|
||||
}
|
||||
|
||||
//Get sessions associated with a film.
|
||||
public function getSessions($id){
|
||||
include_once('session_dao.php');
|
||||
$session = new SessionDAO("complucine");
|
||||
|
||||
$sql = sprintf( " SELECT DISTINCT * FROM session WHERE session.id in
|
||||
(SELECT session.id FROM session JOIN film ON session.idfilm = film.id WHERE film.id = '%d'); ", $id);
|
||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||
|
||||
$sessions = null;
|
||||
while($fila = $resul->fetch_assoc()){
|
||||
$sessions[] = $session->loadSession($fila["id"], $fila["idfilm"], $fila["idhall"], $fila["idcinema"], $fila["date"], $fila["start_time"], $fila["seat_price"], $fila["format"], $fila["seats_full"]);
|
||||
}
|
||||
$resul->free();
|
||||
|
||||
return $sessions;
|
||||
}
|
||||
|
||||
//Create a new film Data Transfer Object.
|
||||
public function loadFilm($id, $tittle, $duration, $language,$description, $img){
|
||||
return new Film( $id, $tittle, $duration, $language,$description, $img);
|
||||
|
@ -80,6 +80,19 @@
|
||||
return $sessions;
|
||||
}
|
||||
|
||||
public function getSessions_Film_Cinema($idFiml, $idCinema){
|
||||
$sql = sprintf( "SELECT * FROM session WHERE session.idfilm = '%d' AND session.idcinema = '%d' ", $idFiml, $idCinema);
|
||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||
|
||||
$sessions = null;
|
||||
while($fila = $resul->fetch_assoc()){
|
||||
$sessions[] = $this->loadSession($fila["id"], $fila["idfilm"], $fila["idhall"], $fila["idcinema"], $fila["date"], $fila["start_time"], $fila["seat_price"], $fila["format"], $fila["seats_full"]);
|
||||
}
|
||||
$resul->free();
|
||||
|
||||
return $sessions;
|
||||
}
|
||||
|
||||
public function editSession($idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format, $origin){
|
||||
$format = $this->mysqli->real_escape_string($format);
|
||||
$date = date('Y-m-d', strtotime( $date ) );
|
||||
|
@ -690,6 +690,7 @@
|
||||
<script type='text/javascript' src='{$prefix}assets/js/checkForms.js'></script>
|
||||
";
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
1
panel_user/confirm.php
Normal file
1
panel_user/confirm.php
Normal file
@ -0,0 +1 @@
|
||||
<?php echo"HOLA MUNDO"; ?>
|
@ -38,6 +38,7 @@ class FormDeleteAccount extends Form {
|
||||
</div>
|
||||
<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' onclick=\"newWindow('confirm.php');\" /> -->
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
|
@ -2,10 +2,7 @@
|
||||
//General Config File:
|
||||
require_once('../assets/php/config.php');
|
||||
|
||||
$sessionDAO = new SessionDAO("complucine");
|
||||
//$session = $sessionDAO->loadSession($_POST["session_id"], $_POST["film_id"], $_POST["hall_id"], $_POST["cinema_id"], $_POST["date_"], $_POST["hour_"], "12", null, null);
|
||||
$session = $sessionDAO->sessionData($_POST["session_id"]);
|
||||
|
||||
//echo $_POST["session_id"];
|
||||
|
||||
//Purchase form:
|
||||
require_once('includes/formPurchase.php');
|
||||
|
@ -1,15 +1,41 @@
|
||||
<?php
|
||||
include_once($prefix.'assets/php/form.php');
|
||||
//include_once($prefix.'assets/php/includes/session_dao.php');
|
||||
include_once($prefix.'assets/php/includes/session_dao.php');
|
||||
include_once($prefix.'assets/php/includes/session.php');
|
||||
include_once($prefix.'assets/php/includes/film_dao.php');
|
||||
include_once($prefix.'assets/php/includes/film.php');
|
||||
include_once($prefix.'assets/php/includes/cinema_dao.php');
|
||||
include_once($prefix.'assets/php/includes/cinema.php');
|
||||
|
||||
class FormPurchase extends Form {
|
||||
|
||||
//Atributes:
|
||||
private $user; // User who is going to log-in.
|
||||
private $session; // Session of the film to be purchased.
|
||||
private $cinema; // Cinema of the film to be purchased.
|
||||
private $film; // Film to be purchased.
|
||||
private $years; // Actual year.
|
||||
private $months; // Months of the year.
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct('formPurchase');
|
||||
|
||||
$sessionDAO = new SessionDAO("complucine");
|
||||
$this->session = $sessionDAO->sessionData($_POST["session_id"]);
|
||||
|
||||
$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()){
|
||||
@ -19,17 +45,46 @@ class FormPurchase extends Form {
|
||||
$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 .= "<option>".$value."</option>";
|
||||
}
|
||||
|
||||
$yearsHTML = "";
|
||||
foreach($this->years as $value){
|
||||
$yearsHTML .= "<option>".$value."</option>";
|
||||
}
|
||||
|
||||
$html = "<div class='row'>
|
||||
<fieldset id='pagar_entrada'><pre>".$htmlErroresGlobales."</pre>
|
||||
<fieldset id='datos_entrada'>
|
||||
<legend>Resumen de la Compra</legend>
|
||||
<p>Película: ".$session->getIdfilm()."</p>
|
||||
<p>Cine: ".$session->getIdcinema()."</p>
|
||||
<p>Sala: ".$session->getIdhall()."</p>
|
||||
<p>Fecha: ".date_format(date_create($session->getDate()), 'd-m-Y')."</p>
|
||||
<p>Hora: ".$session->getStartTime()."</p>
|
||||
<p>Precio: ".$session->getSeatPrice()."€</p>
|
||||
<p>Película: ".str_replace('_', ' ', strtoupper($this->film->getTittle()))."</p>
|
||||
<p>Cine: ".$this->cinema->getName()."</p>
|
||||
<p>Sala: ".$this->session->getIdhall()."</p>
|
||||
<p>Fecha: ".date_format(date_create($this->session->getDate()), 'd-m-Y')."</p>
|
||||
<p>Hora: ".$this->session->getStartTime()."</p>
|
||||
<p>Precio: ".$this->session->getSeatPrice()."€</p>
|
||||
</fieldset>
|
||||
<fieldset id='pagar_entrada'><pre>".$htmlErroresGlobales."</pre>
|
||||
<legend>Datos Bancarios</legend>
|
||||
<input type='text' name='account' id='account' value='' placeholder='Cuenta Bancaria [En desarrollo...]' required/><pre>".$errorNombre."</pre>
|
||||
<label for='card-holder'>Titular de la Tarjeta:</label><br />
|
||||
<input type='text' id='card-holder' class='card-holder' required />
|
||||
<br />
|
||||
<label for='card-number'>Número de Tarjeta: </label><br />
|
||||
<input type='num' id='card-number-0' class='input-cart-number' placeholder='XXXX' maxlength='4' required />
|
||||
<input type='num' id='card-number-1' class='input-cart-number' placeholder='XXXX' maxlength='4' required />
|
||||
<input type='num' id='card-number-2' class='input-cart-number' placeholder='XXXX' maxlength='4' required />
|
||||
<input type='num' id='card-number-3' class='input-cart-number' placeholder='XXXX' maxlength='4' required />
|
||||
<label for='card-cvv'>CVV: </label>
|
||||
<input type='text' id='card-cvv' class='fieldset-cvv' maxlength='3' placeholder='XXX' required />
|
||||
<br />
|
||||
<label for='card-expiration'>Fecha de Expiración:</label><br />
|
||||
<select id='card-expiration-month' required>
|
||||
".$monthsHTML."
|
||||
</select>
|
||||
<select id='card-expiration-year' required>
|
||||
".$yearsHTML."
|
||||
</select>
|
||||
</fieldset>
|
||||
<div class='actions'>
|
||||
<input type='submit' id='submit' value='Pagar' class='primary' />
|
||||
|
@ -7,6 +7,7 @@
|
||||
include_once($prefix.'assets/php/includes/film.php');
|
||||
include_once($prefix.'assets/php/includes/cinema_dao.php');
|
||||
include_once($prefix.'assets/php/includes/cinema.php');
|
||||
include_once($prefix.'assets/php/includes/session_dao.php');
|
||||
include_once($prefix.'assets/php/includes/session.php');
|
||||
|
||||
$TODAY = getdate();
|
||||
@ -50,7 +51,9 @@
|
||||
$fiml_id = $film->getId();
|
||||
$cinema_id = $value["cID"];
|
||||
|
||||
$sessions = $filmDAO->getSessions($_GET["film"]);
|
||||
$sessionsDAO = new SessionDAO("complucine");
|
||||
$sessions = $sessionsDAO->getSessions_Film_Cinema($fiml_id, $cinema_id);
|
||||
//print_r($sessions);
|
||||
if(!empty($sessions)){
|
||||
$sessionsDates = new ArrayIterator(array());
|
||||
$sessionsStarts = new ArrayIterator(array());
|
||||
@ -71,10 +74,10 @@
|
||||
$sessionsListHTML = '<select name="sessions">';
|
||||
foreach ($sessionsIT as $value) {
|
||||
if($TODAY <= $value["DATE"]){
|
||||
if($value == reset($sessionsIT)){
|
||||
$sessionsListHTML .= '<option value="'.$value["sID"].'" selected>'.$value["DATE"].' | '.$value["HOUR"].' (Sala: '.$value["HALL"].') '.'</option>';
|
||||
if($value === reset($sessionsIT)){
|
||||
$sessionsListHTML .= '<option value="'.$value["sID"].'" selected>Fecha: '.$value["DATE"].' || Hora: '.$value["HOUR"].' || Sala: '.$value["HALL"].'</option>';
|
||||
} else {
|
||||
$sessionsListHTML .='<option value="'.$value["sID"].'">'.$value["DATE"].' | '.$value["HOUR"].' (Sala: '.$value["HALL"].') '.'</option>';
|
||||
$sessionsListHTML .='<option value="'.$value["sID"].'">Fecha: '.$value["DATE"].' || Hora:'.$value["HOUR"].' || Sala: '.$value["HALL"].'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -97,9 +100,9 @@
|
||||
</div>
|
||||
<div class="column right">
|
||||
<h2>Seleccione un Cine y una Sesión</h2><hr />
|
||||
<br /><h3>Cines</h3>
|
||||
'.$cinemasListHTML.'<br />
|
||||
<br/><h3>Sesiones</h3>
|
||||
<h3>Cines</h3>
|
||||
'.$cinemasListHTML.'
|
||||
<h3>Sesiones</h3>
|
||||
'.$sessionsListHTML.'
|
||||
</div>
|
||||
';
|
||||
|
Loading…
Reference in New Issue
Block a user