Add files via upload
This commit is contained in:
parent
b80a9ae1db
commit
e9ef536815
@ -39,16 +39,16 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
//Comprueba que el NÚMERO de la tarjeta es válido.
|
//Comprueba que el NÚMERO de la tarjeta es válido.
|
||||||
$("#card-number-0").change(function(){
|
$("#card-number-0").change(function(){
|
||||||
|
const cardNumber0 = $("#card-number-0");
|
||||||
|
cardNumber0[0].setCustomValidity("");
|
||||||
$("#card-number-1").change(function(){
|
$("#card-number-1").change(function(){
|
||||||
|
const cardNumber1 = $("#card-number-1");
|
||||||
|
cardNumber1[0].setCustomValidity("");
|
||||||
$("#card-number-2").change(function(){
|
$("#card-number-2").change(function(){
|
||||||
|
const cardNumber2 = $("#card-number-2");
|
||||||
|
cardNumber2[0].setCustomValidity("");
|
||||||
$("#card-number-3").change(function(){
|
$("#card-number-3").change(function(){
|
||||||
const cardNumber0 = $("#card-number-0");
|
|
||||||
const cardNumber1 = $("#card-number-1");
|
|
||||||
const cardNumber2 = $("#card-number-2");
|
|
||||||
const cardNumber3 = $("#card-number-3");
|
const cardNumber3 = $("#card-number-3");
|
||||||
cardNumber0[0].setCustomValidity("");
|
|
||||||
cardNumber1[0].setCustomValidity("");
|
|
||||||
cardNumber2[0].setCustomValidity("");
|
|
||||||
cardNumber3[0].setCustomValidity("");
|
cardNumber3[0].setCustomValidity("");
|
||||||
|
|
||||||
if( (cardNumber0.val().length + cardNumber1.val().length + cardNumber2.val().length +cardNumber3.val().length) === 16 ){
|
if( (cardNumber0.val().length + cardNumber1.val().length + cardNumber2.val().length +cardNumber3.val().length) === 16 ){
|
||||||
|
@ -91,26 +91,26 @@
|
|||||||
static function purchases(){
|
static function purchases(){
|
||||||
require_once('../assets/php/includes/purchase_dao.php');
|
require_once('../assets/php/includes/purchase_dao.php');
|
||||||
|
|
||||||
|
$purchasesHTML = '';
|
||||||
|
|
||||||
$purchaseDAO = new PurchaseDAO("complucine");
|
$purchaseDAO = new PurchaseDAO("complucine");
|
||||||
$purchases = $purchaseDAO->allPurchasesData(unserialize($_SESSION['user'])->getId());
|
$purchases = $purchaseDAO->allPurchasesData(unserialize($_SESSION['user'])->getId());
|
||||||
|
|
||||||
$sessions = array();
|
if($purchases){
|
||||||
$halls = array();
|
$sessions = array();
|
||||||
$cinemas = array();
|
$halls = array();
|
||||||
$rows = array();
|
$cinemas = array();
|
||||||
$columns = array();
|
$rows = array();
|
||||||
$dates = array();
|
$columns = array();
|
||||||
foreach($purchases as $key=>$value){
|
$dates = array();
|
||||||
$sessions[$key] = $value->getSessionId();
|
foreach($purchases as $key=>$value){
|
||||||
$halls[$key] = $value->getHallId();
|
$sessions[$key] = $value->getSessionId();
|
||||||
$cinemas[$key] = $value->getCinemaId();
|
$halls[$key] = $value->getHallId();
|
||||||
$rows[$key] = $value->getRow();
|
$cinemas[$key] = $value->getCinemaId();
|
||||||
$columns[$key] = $value->getColumn();
|
$rows[$key] = $value->getRow();
|
||||||
$dates[$key] = $value->getTime();
|
$columns[$key] = $value->getColumn();
|
||||||
}
|
$dates[$key] = $value->getTime();
|
||||||
|
}
|
||||||
$purchasesHTML = '';
|
|
||||||
if(count($purchases) > 0){
|
|
||||||
for($i = 0; $i < count($purchases); $i++){
|
for($i = 0; $i < count($purchases); $i++){
|
||||||
if($i%2 === 0){
|
if($i%2 === 0){
|
||||||
if($i != 0) $purchasesHTML .= '</div>
|
if($i != 0) $purchasesHTML .= '</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user