FilmData($_GET["film"]); $tittle = $film->getTittle(); $cinemas = $filmDAO->getCinemas($_GET["film"]); if(!empty($cinemas)){ $cinemasNames = array(); $cinemasIDs = array(); foreach($cinemas as $key=>$value){ $cinemasIDs[$key] = $value->getId(); $cinemasNames[$key] = $value->getName(); } $cinemasListHTML = ''; } else { $cinemasListHTML = ''; } $cinemaDAO = new Cinema_DAO("complucine"); $sessions = $cinemaDAO->getSessions($id); if(!empty($sessions)){ $sessionsDates = new ArrayIterator(array()); $sessionsStarts = new ArrayIterator(array()); $sessionsIDs = new ArrayIterator(array()); foreach($sessions as $key=>$value){ $sessionsIDs[$key] = $value->getId(); $sessionsDates[$key] = $value->getDate(); $sessionsStarts[$key] = $value->getStartTime(); } $sessionsIT = new MultipleIterator(MultipleIterator::MIT_KEYS_ASSOC); $sessionsIT->attachIterator($sessionsIDs, "ID"); $sessionsIT->attachIterator($sessionsDates, "DATE"); $sessionsIT->attachIterator($sessionsStarts, "HOUR"); $sessionsListHTML = ''; } else { $sessionsListHTML = ''; } } //Reply: Depends on whether the purchase is to be made from a selected movie or a cinema. $reply = '

Película seleccionada: '.str_replace('_', ' ', $tittle).'


'.$tittle.'

Duración: '.$film->getDuration().' minutos

Idioma: '.$film->getLanguage().'

Seleccione un Cine y una Sesión



Cines

'.$cinemasListHTML.'

Sesiones

'.$sessionsListHTML.'
'; //Page-specific content: $section = '
'.$reply.'
'; //General page content: require RAIZ_APP.'/HTMLtemplate.php'; ?>