Add files via upload
This commit is contained in:
parent
a873ead5db
commit
22c329bb5b
37
assets/php/common/film_dto.php
Normal file
37
assets/php/common/film_dto.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
include_once('film_dto_interface.php');
|
||||
|
||||
class Film_DTO implements FilmDTO {
|
||||
|
||||
//Attributes:
|
||||
private $_id; //Film ID.
|
||||
private $_tittle; //Film tittle.
|
||||
private $_duration; //Film duration.
|
||||
private $_language; //Film language.
|
||||
private $_description; //Film description.
|
||||
|
||||
|
||||
//Constructor:
|
||||
function __construct($id, $tittle, $duration, $language, $description){
|
||||
$this->_id = $id;
|
||||
$this->_tittle = $tittle;
|
||||
$this->_duration = $duration;
|
||||
$this->_language = $language;
|
||||
$this->_description = $description;
|
||||
}
|
||||
|
||||
//Methods:
|
||||
|
||||
//Getters && Setters:
|
||||
public function setId($id){ $this->_id = $id; }
|
||||
public function getId(){ return $this->_id; }
|
||||
public function setTittle($tittle) {$this->_tittle = $tittle; }
|
||||
public function getTittle(){return $this->_tittle;}
|
||||
public function setDuration($duration){$this->_duration = $duration; }
|
||||
public function getDuration() {return $this->_duration;}
|
||||
public function setLanguage($language) {$this->_language = $language; }
|
||||
public function getLanguage(){return $this->_language;}
|
||||
public function setDescription($description){ $this->_description = $description;}
|
||||
public function getDescription(){return $this->_description;}
|
||||
}
|
||||
?>
|
14
assets/php/common/film_dto_interface.php
Normal file
14
assets/php/common/film_dto_interface.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
interface FilmDTO {
|
||||
public function setId($id);
|
||||
public function getId();
|
||||
public function setTittle($tittle);
|
||||
public function getTittle();
|
||||
public function setDuration($duration);
|
||||
public function getDuration();
|
||||
public function setLanguage($language);
|
||||
public function getLanguage();
|
||||
public function setDescription($description);
|
||||
public function getDescription();
|
||||
}
|
||||
?>
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
require_once('../assets/php/dao.php');
|
||||
include_once('../panel_manager/includes/hall.php');
|
||||
include_once('hall_dto.php');
|
||||
|
||||
class HallDAO extends DAO {
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
//Create a new Hall Data Transfer Object.
|
||||
public function loadHall($number, $idcinema, $numrows, $numcolumns){
|
||||
return new Hall($number, $idcinema, $numrows, $numcolumns);
|
||||
return new HallDTO($number, $idcinema, $numrows, $numcolumns);
|
||||
}
|
||||
|
||||
//Edit Hall.
|
||||
|
38
assets/php/common/hall_dto.php
Normal file
38
assets/php/common/hall_dto.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
include_once('hall_dto_interface.php');
|
||||
|
||||
class HallDTO implements HallsDTO {
|
||||
|
||||
//Attributes:
|
||||
private $_number; //Room number.
|
||||
private $_idcinema; //Cinema Id
|
||||
private $_numRows; //Num rows.
|
||||
private $_numCol; //Num columns.
|
||||
|
||||
//Constructor:
|
||||
function __construct($number, $idcinema, $numRows, $numCol){
|
||||
$this->_number = $number;
|
||||
$this->_idcinema = $idcinema;
|
||||
$this->_numRows = $numRows;
|
||||
$this->_numCol = $numCol;
|
||||
}
|
||||
|
||||
//Methods:
|
||||
|
||||
//Getters && Setters:
|
||||
public function setNumber($number){ $this->_number = $number; }
|
||||
public function getNumber(){ return $this->_number; }
|
||||
|
||||
public function setIdcinema($idcinema){ $this->_idcinema = $idcinema; }
|
||||
public function getIdcinema(){ return $this->_idcinema; }
|
||||
|
||||
public function setNumRows($numRows){ $this->_numRows = $numRows; }
|
||||
public function getNumRows(){ return $this->_numRows; }
|
||||
|
||||
public function setNumCol($numCol){ $this->_numCol = $numCol; }
|
||||
public function getNumCol(){ return $this->_numCol; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
12
assets/php/common/hall_dto_interface.php
Normal file
12
assets/php/common/hall_dto_interface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
interface HallsDTO {
|
||||
public function setNumber($number);
|
||||
public function getNumber();
|
||||
public function setIdcinema($idcinema);
|
||||
public function getIdcinema();
|
||||
public function setNumCol($numCol);
|
||||
public function getNumCol();
|
||||
public function setNumRows($numRows);
|
||||
public function getNumRows();
|
||||
}
|
||||
?>
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
require_once('../assets/php/dao.php');
|
||||
include_once('../panel_manager/includes/session.php');
|
||||
include_once('session_dto.php');
|
||||
|
||||
class SessionDAO extends DAO {
|
||||
//Constructor:
|
||||
@ -98,7 +98,7 @@
|
||||
|
||||
//Create a new Session Data Transfer Object.
|
||||
public function loadSession( $id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format){
|
||||
return new Session( $id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format);
|
||||
return new SessionDTO( $id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format);
|
||||
}
|
||||
|
||||
}
|
||||
|
56
assets/php/common/session_dto.php
Normal file
56
assets/php/common/session_dto.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
include_once('session_dto_interface.php');
|
||||
|
||||
class SessionDTO implements SessionsDTO {
|
||||
|
||||
//Attributes:
|
||||
private $_id;
|
||||
private $_idfilm;
|
||||
private $_idhall;
|
||||
private $_idcinema;
|
||||
private $_date;
|
||||
private $_startTime;
|
||||
private $_seatPrice;
|
||||
private $_format;
|
||||
|
||||
//Constructor:
|
||||
function __construct($id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format){
|
||||
$this->_id = $id;
|
||||
$this->_idfilm = $idfilm;
|
||||
$this->_idhall = $idhall;
|
||||
$this->_idcinema = $idcinema;
|
||||
$this->_date = $date;
|
||||
$this->_startTime = $startTime;
|
||||
$this->_seatPrice = $seatPrice;
|
||||
$this->_format = $format;
|
||||
}
|
||||
|
||||
//Methods:
|
||||
|
||||
//Getters && Setters:
|
||||
public function setId($id){ $this->_id = $id; }
|
||||
public function getId(){ return $this->_id; }
|
||||
|
||||
public function setIdfilm($idfilm){ $this->_idfilm = $idfilm; }
|
||||
public function getIdfilm(){ return $this->_idfilm; }
|
||||
|
||||
public function setIdhall($idhall){ $this->_idhall = $idhall; }
|
||||
public function getIdhall(){ return $this->_idhall; }
|
||||
|
||||
public function setIdcinema($cinema){ $this->_idcinema = $idcinema; }
|
||||
public function getIdcinema(){ return $this->_idcinema; }
|
||||
|
||||
public function setDate($date){ $this->_date = $date; }
|
||||
public function getDate(){ return $this->_date; }
|
||||
|
||||
public function setStartTime($startTime){ $this->_startTime = $startTime; }
|
||||
public function getStartTime(){ return $this->_startTime; }
|
||||
|
||||
public function setSeatPrice($seatPrice){ $this->_seatPrice = $seatPrice; }
|
||||
public function getSeatPrice(){ return $this->_seatPrice; }
|
||||
|
||||
public function setFormat($format){ $this->_format = $format; }
|
||||
public function getFormat(){ return $this->_format; }
|
||||
|
||||
}
|
||||
?>
|
20
assets/php/common/session_dto_interface.php
Normal file
20
assets/php/common/session_dto_interface.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
interface SessionsDTO {
|
||||
public function setId($id);
|
||||
public function getId();
|
||||
public function setIdfilm($idfilm);
|
||||
public function getIdfilm();
|
||||
public function setIdhall($film);
|
||||
public function getIdhall();
|
||||
public function setIdcinema($cinema);
|
||||
public function getIdcinema();
|
||||
public function setDate($date);
|
||||
public function getDate();
|
||||
public function setStartTime($startTime);
|
||||
public function getStartTime();
|
||||
public function setSeatPrice($seatPrice);
|
||||
public function getSeatPrice();
|
||||
public function setFormat($format);
|
||||
public function getFormat();
|
||||
}
|
||||
?>
|
@ -101,7 +101,7 @@
|
||||
<a href='{$prefix}cinemas/'><li>Nuestros Cines</li></a>
|
||||
<a href='{$prefix}fdicines/miembros/'><li>Quiénes somos</li></a>
|
||||
<a href='{$prefix}contacto/'><li>Contacto</li></a>
|
||||
<ul>
|
||||
</ul>
|
||||
</li>
|
||||
</nav>
|
||||
</div>
|
||||
@ -157,6 +157,75 @@
|
||||
</div>\n";
|
||||
}
|
||||
|
||||
//Print panel menu:
|
||||
function print_panelMenu($panel){
|
||||
$prefix = $this->prefix;
|
||||
$menus = array("<a href='{$prefix}'><li>Panel Principal</li></a>");
|
||||
|
||||
switch($panel){
|
||||
case "admin": array_push($menus, "<li>Ver como...
|
||||
<ul>
|
||||
<a href='./?state=un'><li>Usuario</li></a>
|
||||
<a href='./?state=ur'><li>Usuario registrado</li></a>
|
||||
<a href='./?state=ag'><li>Gerente</li></a>
|
||||
</ul>
|
||||
</li>");
|
||||
array_push($menus, "<li>Modificar
|
||||
<ul>
|
||||
<a href='./?state=mc'><li>Cines</li></a>
|
||||
<a href='./?state=mf'><li>Películas</li></a>
|
||||
<a href='./?state=md'><li>Promociones</li></a>
|
||||
<a href='./?state=mg'><li>Gerentes</li></a>
|
||||
</ul>
|
||||
</li>");
|
||||
break;
|
||||
|
||||
case "manager": array_push($menus, "<li>Ver como...
|
||||
<ul>
|
||||
<a href='./?state=us_u'><li>Usuario</li></a>
|
||||
<a href='./?state=us_r'><li>Usuario registrado</li></a>
|
||||
</ul>
|
||||
</li>");
|
||||
array_push($menus, "<li>Modificar
|
||||
<ul>
|
||||
<a href='./?state=rooms'><li>Salas</li></a>
|
||||
<a href='./?state=sessions'><li>Sesiones</li></a>
|
||||
</ul>
|
||||
</li>");
|
||||
break;
|
||||
|
||||
case "user": array_push($menus, "<a href='{$prefix}'><li>Historial Compras</li></a>");
|
||||
array_push($menus, "<a href='{$prefix}'><li>Datos Pago</li></a>");
|
||||
array_push($menus, "<a href='{$prefix}'><li>Contraseña</li></a>");
|
||||
array_push($menus, "<a href='{$prefix}'><li>Eliminar Usuario</li></a>");
|
||||
break;
|
||||
|
||||
default: $menus = array(); break;
|
||||
}
|
||||
|
||||
/*
|
||||
<li>Menú
|
||||
<ul>
|
||||
<a href='{$prefix}'><li>Inicio</li></a>
|
||||
<a href='{$prefix}showtimes/'><li>Cartelera</li></a>
|
||||
<a href='{$prefix}cinemas/'><li>Nuestros Cines</li></a>
|
||||
<a href='{$prefix}fdicines/miembros/'><li>Quiénes somos</li></a>
|
||||
<a href='{$prefix}contacto/'><li>Contacto</li></a>
|
||||
<ul>
|
||||
</li>
|
||||
*/
|
||||
|
||||
echo"<div class='header sub'>
|
||||
<div class='menu'>
|
||||
<nav>";
|
||||
foreach($menus as $value){
|
||||
echo $value;
|
||||
}
|
||||
echo"</nav>
|
||||
</div>
|
||||
</div>\n";
|
||||
}
|
||||
|
||||
//Print session MSG:
|
||||
function print_msg() {
|
||||
if(isset($_SESSION['message'])){
|
||||
|
@ -261,12 +261,12 @@
|
||||
<tr>
|
||||
<td>Práctica 2</td>
|
||||
<td>15 de Abril de 2021</td>
|
||||
<td>EN PROCESO</td>
|
||||
<td>ENTREGADO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Práctica 3</td>
|
||||
<td>7 de Mayo de 2021</td>
|
||||
<td>PENDIENTE</td>
|
||||
<td>EN PROCESO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Entrega Final</td>
|
||||
|
@ -39,37 +39,18 @@
|
||||
|
||||
<!-- Panel -->
|
||||
<div class="row">
|
||||
<!-- Left Sidebar -->
|
||||
<div class="sidebar left">
|
||||
<ul>
|
||||
<li>Ver como:</li>
|
||||
<ul>
|
||||
<li><a href="index.php?state=un">Usuario no registrado</a></li>
|
||||
<li><a href="index.php?state=ur">Usuario registrado</a></li>
|
||||
<li><a href="index.php?state=ag">Gerente</a></li>
|
||||
</ul><br />
|
||||
<li>Añadir/Editar/Eliminar:</li>
|
||||
<ul>
|
||||
<li><a href="index.php?state=mc">Cines</a></li>
|
||||
<li><a href="index.php?state=mf">Películas</a></li>
|
||||
<li><a href="index.php?state=md">Promociones</a></li>
|
||||
<li><a href="index.php?state=mg">Gerente</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Panel Menu -->
|
||||
<?php
|
||||
$template->print_panelMenu("admin");
|
||||
?>
|
||||
<!-- Contents -->
|
||||
<div class="row">
|
||||
<div class="column side"></div>
|
||||
<div class="column middle">
|
||||
<?php
|
||||
$template->print_msg();
|
||||
$panel->showPanel();
|
||||
?>
|
||||
</div>
|
||||
<div class="column side"></div>
|
||||
</div>
|
||||
<?php
|
||||
$template->print_msg();
|
||||
$panel->showPanel();
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
<?php
|
||||
$template->print_footer();
|
||||
|
@ -17,7 +17,7 @@
|
||||
$film->processesForm(null, null, null, null, null, "show");
|
||||
|
||||
function drawFilms($films){
|
||||
echo "
|
||||
echo "<div class='column left'>
|
||||
<table class='alt'>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -60,10 +60,11 @@
|
||||
</tr>';
|
||||
}
|
||||
echo'<tbody>
|
||||
</table>';
|
||||
</table>
|
||||
</div>';
|
||||
}
|
||||
function addFilm(){
|
||||
echo'<div class="column size">
|
||||
echo'<div class="column right">
|
||||
<h2>Añadir pelicula</h2>
|
||||
<form method="post" action="update_film.php">
|
||||
<div class="row">
|
||||
|
@ -1,5 +1,9 @@
|
||||
<div class="column side"></div>
|
||||
<div class="column middle">
|
||||
<h1> Bienvenido al panel de Gerente </h1>
|
||||
<br>
|
||||
<p> Espero que este pasando un buen dia <p>
|
||||
</div>
|
||||
<div class="code info">
|
||||
<h1> Bienvenido al panel de Gerente </h1>
|
||||
<br>
|
||||
<p> Espero que este pasando un buen dia <p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column side"></div>
|
@ -38,22 +38,11 @@
|
||||
|
||||
<!-- Panel -->
|
||||
<div class="row">
|
||||
<!--Left Sidebar -->
|
||||
<div class="sidebar left">
|
||||
<ul>
|
||||
<li>Ver como:</li>
|
||||
<ul>
|
||||
<li><a href='./?state=us_u'>Usuario no registrado</a></li>
|
||||
<li><a href='./?state=us_r'>Usuario registrado</a></li>
|
||||
</ul><br />
|
||||
<li>Añadir/Editar/Eliminar:</li>
|
||||
<ul>
|
||||
<li><a href='./?state=rooms'>Salas</a></li>
|
||||
<li><a href='./?state=sessions'>Sesiones</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<!--Contents -->
|
||||
<!-- Panel Menu -->
|
||||
<?php
|
||||
$template->print_panelMenu("manager");
|
||||
?>
|
||||
<!--Contents -->
|
||||
<div class="row">
|
||||
<?php $panel->showPanel(); ?>
|
||||
</div>
|
||||
|
@ -8,7 +8,8 @@
|
||||
$rooms = array($r1, $r2, $r3, $r4);
|
||||
|
||||
function drawHalls($ros){
|
||||
echo " <p> Esta vista esta en desarrollo <p>
|
||||
echo " <div class='column side'></div>
|
||||
<p> Esta vista esta en desarrollo <p>
|
||||
<div class=\"column middle\">
|
||||
<table class='alt'>
|
||||
<thead>
|
||||
@ -28,7 +29,8 @@
|
||||
echo "<tbody>
|
||||
</table>\n";
|
||||
echo "<a href=\"index.php?state=rooms\" class='button large'>Añadir</a>
|
||||
</div>";
|
||||
</div>
|
||||
<div class='column side'></div>";
|
||||
}
|
||||
drawHalls($rooms);
|
||||
?>
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
echo"
|
||||
<!--Session Filter -->
|
||||
<div class = \"column middle\">
|
||||
<div class = \"column left\">
|
||||
<form method=\"post\" id=\"addfilter\">
|
||||
<input type=\"date\" name=\"date\" value=\"". $placeholder_date . "\" min=\"2021-01-01\" max=\"2031-12-31\">
|
||||
<select name=\"hall\" class=\"button large\">";
|
||||
@ -53,7 +53,7 @@
|
||||
function drawSessions($sessions,$bd){
|
||||
echo "
|
||||
<!--Session List -->
|
||||
<div class=\"column side\">
|
||||
<div class=\"column right\">
|
||||
<table class='alt'>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -28,29 +28,10 @@
|
||||
|
||||
<!-- Panel -->
|
||||
<div class="row">
|
||||
<!-- Left Sidebar -->
|
||||
<div class="sidebar left">
|
||||
<ul>
|
||||
<li>Funcionalidad:</li>
|
||||
<ul>
|
||||
<li>Subfuncionalidad</li>
|
||||
<li>Subfuncionalidad</li>
|
||||
</ul><br />
|
||||
<li>Ver como:</li>
|
||||
<ul>
|
||||
<li>Usuario no registrado</li>
|
||||
<li>Usuario registrado</li>
|
||||
<li>Gerente</li>
|
||||
</ul><br />
|
||||
<li>Añadir/Editar/Eliminar:</li>
|
||||
<ul>
|
||||
<li>Cines</li>
|
||||
<li>Películas</li>
|
||||
<li>Promociones</li>
|
||||
<li>Gerente</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Panel Menu -->
|
||||
<?php
|
||||
$template->print_panelMenu("user");
|
||||
?>
|
||||
<!-- Contents -->
|
||||
<div class="row">
|
||||
<div class="column side"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user