2021-03-24 21:44:07 +01:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<?php
|
2021-04-16 12:57:37 +02:00
|
|
|
//General Config File:
|
|
|
|
require_once('./assets/php/config.php');
|
2021-04-13 17:22:07 +02:00
|
|
|
|
|
|
|
//List of the tittles of the movies:
|
2021-04-16 12:57:37 +02:00
|
|
|
require_once($prefix.'panel_admin/includes/film_dao.php');
|
|
|
|
$films = new Film_DAO("complucine");
|
|
|
|
$films_array = $films->allFilmData();
|
|
|
|
$tittles = array();
|
|
|
|
foreach($films_array as $key => $value){
|
|
|
|
$tittles[$key] = $value->getTittle();
|
|
|
|
}
|
2021-03-24 21:44:07 +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 -->
|
|
|
|
<div class="main">
|
|
|
|
<div class="image"><a href='./'><img src="./img/logo_trasparente.png" alt="logo_FDI-Cines" /></a></div>
|
|
|
|
<?php
|
|
|
|
if(isset($_SESSION["nombre"])){
|
|
|
|
echo "<h1>Bienvenido {$_SESSION["nombre"]}</h1>\n";
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
echo "<h1>Bienvenido a CompluCine</h1>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<hr />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Undercard -->
|
|
|
|
<section id="cartelera">
|
|
|
|
<div class="row">
|
|
|
|
<div class="code">
|
|
|
|
<div class="column left">
|
|
|
|
<div class="galery">
|
|
|
|
<h1>Últimos Estrenos</h1><hr />
|
|
|
|
<?php
|
|
|
|
$count = 0;
|
2021-04-16 12:57:37 +02:00
|
|
|
for($i = count($tittles)-4; $i < count($tittles); $i++){
|
2021-03-24 21:44:07 +01:00
|
|
|
if($count%2===0){
|
|
|
|
if($count != 0) echo "</div>
|
|
|
|
";
|
|
|
|
echo "<div class='fila'>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
echo "<div class='zoom'>
|
|
|
|
<div class='columna'>
|
2021-04-16 12:57:37 +02:00
|
|
|
<a href='".$prefix."showtimes/#".$tittles[$i]."'><div class='image'><img src='img/".$tittles[$i].".jpg' alt='".$tittles[$i]."' /></div></a>
|
2021-03-24 21:44:07 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
";
|
|
|
|
$count++;
|
|
|
|
}
|
|
|
|
echo "</div>\n";
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column right">
|
|
|
|
<div class="galery">
|
|
|
|
<?php
|
2021-04-16 12:57:37 +02:00
|
|
|
$count = rand(0, count($tittles)-1);
|
|
|
|
$title = str_replace('_', ' ', $tittles[$count]);
|
2021-03-24 21:44:07 +01:00
|
|
|
echo "<h1>{$title}</h1><hr />
|
|
|
|
<div class='zoom'>
|
2021-04-16 12:57:37 +02:00
|
|
|
<a href='".$prefix."showtimes/#".$tittles[$count]."'><div class='image main'><img src='img/".$tittles[$count].".jpg' alt='".$tittles[$count]."' /></div></a>
|
2021-03-24 21:44:07 +01:00
|
|
|
</div>\n";
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Footer -->
|
|
|
|
<?php
|
|
|
|
$template->print_footer();
|
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|