2021-03-24 21:43:20 +01:00
|
|
|
<!DOCTYPE HTML>
|
2021-04-16 12:57:37 +02:00
|
|
|
<?php
|
|
|
|
//General Config File:
|
|
|
|
require_once('../assets/php/config.php');
|
2021-03-24 21:43:20 +01:00
|
|
|
|
2021-04-13 17:22:00 +02:00
|
|
|
//List of the tittles and descriptions of the movies:
|
2021-04-16 12:57:37 +02:00
|
|
|
require_once($prefix.'panel_admin/includes/film_dao.php');
|
|
|
|
$loadFilms = new Film_DAO("complucine");
|
|
|
|
$films = $loadFilms->allFilmData();
|
|
|
|
$titles = array();
|
|
|
|
$descriptions = array();
|
|
|
|
$times = array();
|
|
|
|
foreach($films as $key => $value){
|
|
|
|
$titles[$key] = $value->getTittle();
|
|
|
|
$descriptions[$key] = $value->getDescription();
|
|
|
|
$times[$key] = $value->getDuration();
|
|
|
|
}
|
2021-03-24 21:43:20 +01:00
|
|
|
?>
|
|
|
|
<!--
|
|
|
|
Práctica 2 - Sistemas Web | Grupo D
|
|
|
|
CompluCine - FDI-cines
|
|
|
|
-->
|
|
|
|
<html lang="es">
|
|
|
|
<!-- Head -->
|
|
|
|
<?php
|
|
|
|
$template->print_head();
|
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<!-- Header -->
|
|
|
|
<?php
|
|
|
|
$template->print_header();
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Main -->
|
|
|
|
<?php
|
|
|
|
$template->print_main();
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Films -->
|
|
|
|
<section id="films_billboard">
|
|
|
|
<div class='row'>
|
|
|
|
<?php
|
|
|
|
for($i = 0; $i < count($films); $i++){
|
2021-04-16 12:57:37 +02:00
|
|
|
$title = str_replace('_', ' ', $titles[$i]);
|
2021-03-24 21:43:20 +01:00
|
|
|
if($i%2 === 0){
|
|
|
|
if($i != 0) echo "</div>
|
|
|
|
";
|
|
|
|
echo "<div class='column side'>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
if($i != 0) echo "</div>
|
|
|
|
";
|
|
|
|
echo "<div class='column middle'>
|
|
|
|
";
|
|
|
|
}
|
2021-04-16 12:57:37 +02:00
|
|
|
echo "<section id='".$titles[$i]."'>
|
2021-03-24 21:43:20 +01:00
|
|
|
<div class='zoom'>
|
2021-04-13 17:22:00 +02:00
|
|
|
<div class='code showtimes'>
|
2021-04-16 12:57:37 +02:00
|
|
|
<div class='image'><img src='".$prefix."img/".$titles[$i].".jpg' alt='".$titles[$i]."' /></div>
|
2021-03-24 21:43:20 +01:00
|
|
|
<h2>".$title."</h2>
|
2021-04-13 17:22:00 +02:00
|
|
|
<hr />
|
|
|
|
<div class='blockquote'>
|
2021-04-16 12:57:37 +02:00
|
|
|
<p>".$descriptions[$i]."</p>
|
2021-04-13 17:22:00 +02:00
|
|
|
</div>
|
2021-04-16 12:57:37 +02:00
|
|
|
<p>Duración: ".$times[$i]." minutos</p>
|
2021-03-24 21:43:20 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "</div>\n";
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<!-- Footer -->
|
|
|
|
<?php
|
|
|
|
$template->print_footer();
|
|
|
|
?>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|