diff --git a/purchase/confirm.php b/purchase/confirm.php new file mode 100644 index 0000000..15c5adc --- /dev/null +++ b/purchase/confirm.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/purchase/index.php b/purchase/index.php index 33d57a7..59f4aa3 100644 --- a/purchase/index.php +++ b/purchase/index.php @@ -11,6 +11,7 @@ $film = null; $cinemas = []; + $sessions = []; if(isset($_GET["film"])){ $filmDAO = new Film_DAO("complucine"); $film = $filmDAO->FilmData($_GET["film"]); @@ -25,15 +26,15 @@ $cinemasNames[$key] = $value->getName(); } $cinemasIT = new MultipleIterator(MultipleIterator::MIT_KEYS_ASSOC); - $cinemasIT->attachIterator($cinemasIDs, "ID"); + $cinemasIT->attachIterator($cinemasIDs, "cID"); $cinemasIT->attachIterator($cinemasNames, "NAME"); $cinemasListHTML = ''; @@ -41,34 +42,43 @@ $cinemasListHTML = ''; } + $fiml_id = $film->getId(); + $cinema_id = $value["cID"]; + $cinemaDAO = new Cinema_DAO("complucine"); - $sessions = $cinemaDAO->getSessions($value["ID"]); + $sessions = $cinemaDAO->getSessions($value["cID"]); if(!empty($sessions)){ $sessionsDates = new ArrayIterator(array()); $sessionsStarts = new ArrayIterator(array()); + $sessionsHalls = new ArrayIterator(array()); $sessionsIDs = new ArrayIterator(array()); foreach($sessions as $key=>$value){ $sessionsIDs[$key] = $value->getId(); $sessionsDates[$key] = $value->getDate(); + $sessionsHalls[$key] = $value->getIdhall(); $sessionsStarts[$key] = $value->getStartTime(); } $sessionsIT = new MultipleIterator(MultipleIterator::MIT_KEYS_ASSOC); - $sessionsIT->attachIterator($sessionsIDs, "ID"); + $sessionsIT->attachIterator($sessionsIDs, "sID"); $sessionsIT->attachIterator($sessionsDates, "DATE"); + $sessionsIT->attachIterator($sessionsHalls, "HALL"); $sessionsIT->attachIterator($sessionsStarts, "HOUR"); $sessionsListHTML = ''; } else { $sessionsListHTML = ''; } + + $session_id = $value["sID"]; + $hall_id = $value["HALL"]; } @@ -82,8 +92,8 @@

Seleccione un Cine y una Sesión



Cines

- '.$cinemasListHTML.' -

Sesiones

+ '.$cinemasListHTML.'
+

Sesiones

'.$sessionsListHTML.'
'; @@ -95,6 +105,15 @@
'.$reply.'
+
+
+ + + + + +
+
';