Add files via upload
This commit is contained in:
parent
653d24a8ca
commit
a3bc2311e5
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
//General Config File:
|
//General Config File:
|
||||||
require_once('../assets/php/config.php');
|
require_once('../assets/php/config.php');
|
||||||
|
|
||||||
include_once('./includes/formHall.php');
|
include_once('./includes/formHall.php');
|
||||||
require_once('./includes/hall_dto.php');
|
require_once('./includes/hall_dto.php');
|
||||||
@ -16,6 +16,7 @@
|
|||||||
$formHall->processesForm(null, $cinema, null, null, "list");
|
$formHall->processesForm(null, $cinema, null, null, "list");
|
||||||
|
|
||||||
$filmList = new Film_DAO('complucine');
|
$filmList = new Film_DAO('complucine');
|
||||||
|
|
||||||
if($filmList){
|
if($filmList){
|
||||||
$films = $filmList->allFilmData();
|
$films = $filmList->allFilmData();
|
||||||
}else {
|
}else {
|
||||||
@ -23,111 +24,111 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_REQUEST['option']) && $_REQUEST['option'] == 'edit') {
|
if(isset($_REQUEST['option']) && $_REQUEST['option'] == 'edit') {
|
||||||
echo "<div class = \"column middle\">
|
echo " <div class = \"column middle\">
|
||||||
<h2>Editar/Eliminar Sesion</h2>
|
<h2>Editar/Eliminar Sesion</h2>
|
||||||
<form method=\"post\" id=\"edit_ses\" action=\"validateSession.php\">
|
<form method=\"post\" id=\"edit_ses\" action=\"validateSession.php\">
|
||||||
<div class=\"row\">
|
<div class=\"row\">
|
||||||
<fieldset id=\"datos\">
|
<fieldset id=\"datos\">
|
||||||
<legend>Datos</legend>
|
<legend>Datos</legend>
|
||||||
<input name=\"cinema\" type=\"hidden\" value=\"". $_POST['idcinema']."\">
|
<input name=\"cinema\" type=\"hidden\" value=\"". $_POST['idcinema']."\">
|
||||||
<input name=\"id\" type=\"hidden\" value=\"". $_POST['id']."\">
|
<input name=\"id\" type=\"hidden\" value=\"". $_POST['id']."\">
|
||||||
<div class=\"_price\">
|
<div class=\"_price\">
|
||||||
<input type=\"number\" name=\"price\" id=\"price\" value=\"". $_POST['price'] ."\"min=\"0\" placeholder=\"Precio de la entrada\" required/>
|
<input type=\"number\" name=\"price\" id=\"price\" value=\"". $_POST['price'] ."\"min=\"0\" placeholder=\"Precio de la entrada\" required/>
|
||||||
|
</div>
|
||||||
|
<select name=\"hall\" class=\"button large\">";
|
||||||
|
foreach($formHall->getReply() as $r){
|
||||||
|
if($r->getNumber() == $_POST['hall']){
|
||||||
|
echo "<option value=\"". $r->getNumber() ." \"selected> Sala ". $r->getNumber() . "</option>";
|
||||||
|
}else{
|
||||||
|
echo "<option value=\"". $r->getNumber() ." \"> Sala ". $r->getNumber() . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "
|
||||||
|
<div class=\"_format\">
|
||||||
|
<input type=\"text\" name=\"format\" id=\"format\" value=\"". $_POST['format'] ."\" placeholder=\"Formato\" required/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset id=\"Horario\">
|
||||||
|
<legend>Horario</legend>
|
||||||
|
<div class=\"_start_time\">
|
||||||
|
<input type=\"time\" name=\"start\" id=\"start_time\" value=\"". $_POST['start'] ."\" placeholder=\"Hora de inicio\" required/>
|
||||||
|
</div>
|
||||||
|
<div class=\"_date\">
|
||||||
|
<input type=\"date\" name=\"date\" id=\"date\" value=\"". $_POST['date'] ."\"Fecha de inicio\" required/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<div class=\"actions\">
|
||||||
|
<input type=\"submit\" name=\"edit\" value=\"Editar\" class=\"button\" />
|
||||||
|
<input type=\"reset\" id=\"reset\" value=\"Limpiar\" />
|
||||||
|
<input type=\"submit\" name=\"del\" value=\"Eliminar\" class=\"button\" />
|
||||||
</div>
|
</div>
|
||||||
<select name=\"hall\" class=\"button large\">";
|
|
||||||
foreach($formHall->getReply() as $r){
|
|
||||||
if($r->getNumber() == $_POST['hall']){
|
|
||||||
echo "<option value=\"". $r->getNumber() ." \"selected> Sala ". $r->getNumber() . "</option>";
|
|
||||||
}else{
|
|
||||||
echo "<option value=\"". $r->getNumber() ." \"> Sala ". $r->getNumber() . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "
|
|
||||||
<div class=\"_format\">
|
|
||||||
<input type=\"text\" name=\"format\" id=\"format\" value=\"". $_POST['format'] ."\" placeholder=\"Formato\" required/>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<fieldset id=\"Horario\">
|
|
||||||
<legend>Horario</legend>
|
|
||||||
<div class=\"_start_time\">
|
|
||||||
<input type=\"time\" name=\"start\" id=\"start_time\" value=\"". $_POST['start'] ."\" placeholder=\"Hora de inicio\" required/>
|
|
||||||
</div>
|
|
||||||
<div class=\"_date\">
|
|
||||||
<input type=\"date\" name=\"date\" id=\"date\" value=\"". $_POST['date'] ."\"Fecha de inicio\" required/>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<div class=\"actions\">
|
|
||||||
<input type=\"submit\" name=\"edit\" value=\"Editar\" class=\"button\" />
|
|
||||||
<input type=\"reset\" id=\"reset\" value=\"Limpiar\" />
|
|
||||||
<input type=\"submit\" name=\"del\" value=\"Eliminar\" class=\"button\" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</form>
|
<div>
|
||||||
<div>
|
<div class=\"column side\">
|
||||||
<div class=\"column side\">
|
<select name=\"film\" form=\"edit_ses\" class=\"button large\">\n";
|
||||||
<select name=\"film\" form=\"edit_ses\" class=\"button large\">";
|
|
||||||
foreach($films as $f){
|
foreach($films as $f){
|
||||||
if($f->getId() == $_POST['idfilm']){
|
if($f->getId() == $_POST['idfilm']){
|
||||||
echo "<option value=\"". $f->getId() ." \"selected> " . $f->getId() . "|" . $f->getTittle() ." Idioma: " . $f->getLanguage() . "</option>";
|
echo " <option value=\"". $f->getId() ." \"selected> " . $f->getId() . "|" . $f->getTittle() ." Idioma: " . $f->getLanguage() . "</option>\n";
|
||||||
}else{
|
}else{
|
||||||
echo "<option value=\"". $f->getId() ." \"> " . $f->getId() . "|" . $f->getTittle() ." Idioma: " . $f->getLanguage() . "</option>";
|
echo " <option value=\"". $f->getId() ." \"> " . $f->getId() . "|" . $f->getTittle() ." Idioma: " . $f->getLanguage() . "</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</div>";
|
echo " </div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
echo "<div class = \"column middle\">
|
echo " <div class = \"column middle\">
|
||||||
<h2>Crear Sesion</h2>
|
<h2>Crear Sesion</h2>
|
||||||
<form method=\"post\" id=\"new_ses\" action=\"validateSession.php\">
|
<form method=\"post\" id=\"new_ses\" action=\"validateSession.php\">
|
||||||
<div class=\"row\">
|
<div class=\"row\">
|
||||||
<fieldset id=\"datos\">
|
<fieldset id=\"datos\">
|
||||||
<legend>Datos</legend>
|
<legend>Datos</legend>
|
||||||
<input type=\"hidden\" name=\"cinema\" value =\"1\" />
|
<input type=\"hidden\" name=\"cinema\" value =\"1\" />
|
||||||
<div class=\"_price\">
|
<div class=\"_price\">
|
||||||
<input type=\"number\" name=\"price\" id=\"price\" min=\"0\" placeholder=\"Precio de la entrada\" required/>
|
<input type=\"number\" name=\"price\" id=\"price\" min=\"0\" placeholder=\"Precio de la entrada\" required/>
|
||||||
</div>
|
</div>
|
||||||
<select name=\"hall\" class=\"button large\">";
|
<select name=\"hall\" class=\"button large\">";
|
||||||
foreach($formHall->getReply() as $r){
|
foreach($formHall->getReply() as $r){
|
||||||
if($r->getNumber() == $_POST['hall']){
|
if($r->getNumber() == $_POST['hall']){
|
||||||
echo "
|
echo "
|
||||||
<option value=\"". $r->getNumber() ." \"selected> Sala ". $r->getNumber() . "</option>";
|
<option value=\"". $r->getNumber() ." \"selected> Sala ". $r->getNumber() . "</option>";
|
||||||
}else{
|
}else{
|
||||||
echo "
|
echo "
|
||||||
<option value=\"". $r->getNumber() ." \"> Sala ". $r->getNumber() . "</option>";
|
<option value=\"". $r->getNumber() ." \"> Sala ". $r->getNumber() . "</option>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
echo "
|
||||||
echo "
|
<div class=\"_format\">
|
||||||
<div class=\"_format\">
|
<input type=\"text\" name=\"format\" id=\"format\" value=\"\" placeholder=\"Formato\" required/>
|
||||||
<input type=\"text\" name=\"format\" id=\"format\" value=\"\" placeholder=\"Formato\" required/>
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset id=\"Horario\">
|
||||||
|
<legend>Horario</legend>
|
||||||
|
<div class=\"_start_time\">
|
||||||
|
<input type=\"time\" name=\"start\" id=\"start_time\" value=\"\" placeholder=\"Hora de inicio\" required/>
|
||||||
|
</div>
|
||||||
|
<div class=\"_date\">
|
||||||
|
<input type=\"date\" name=\"date\" id=\"date\" value=\"". $_POST['date'] . "\"Fecha de inicio\" required/>
|
||||||
|
</div>
|
||||||
|
<div class=\"_repeat\">
|
||||||
|
<br> Introducir un numero para añadir esta sesion a los futuros X dias
|
||||||
|
<input type=\"number\" name=\"repeat\" id=\"repeat\" title=\"Repetir esta sesion durante X dias\" min=\"0\" max=\"31\" placeholder=\"Repetir X dias\"/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<div class=\"actions\">
|
||||||
|
<input type=\"submit\" name=\"new\" value=\"Añadir\" class=\"primary\" />
|
||||||
|
<input type=\"reset\" id=\"reset\" value=\"Limpiar\" />
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
|
||||||
<fieldset id=\"Horario\">
|
|
||||||
<legend>Horario</legend>
|
|
||||||
<div class=\"_start_time\">
|
|
||||||
<input type=\"time\" name=\"start\" id=\"start_time\" value=\"\" placeholder=\"Hora de inicio\" required/>
|
|
||||||
</div>
|
|
||||||
<div class=\"_date\">
|
|
||||||
<input type=\"date\" name=\"date\" id=\"date\" value=\"". $_POST['date'] . "\"Fecha de inicio\" required/>
|
|
||||||
</div>
|
|
||||||
<div class=\"_repeat\">
|
|
||||||
<br> Introducir un numero para añadir esta sesion a los futuros X dias
|
|
||||||
<input type=\"number\" name=\"repeat\" id=\"repeat\" title=\"Repetir esta sesion durante X dias\" min=\"0\" max=\"31\" placeholder=\"Repetir X dias\"/>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<div class=\"actions\">
|
|
||||||
<input type=\"submit\" name=\"new\" value=\"Añadir\" class=\"primary\" />
|
|
||||||
<input type=\"reset\" id=\"reset\" value=\"Limpiar\" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</form>
|
<div>
|
||||||
<div>
|
<div class=\"column side\">
|
||||||
<div class=\"column side\">
|
<select name=\"film\" form=\"new_ses\" class=\"button large\">\n";
|
||||||
<select name=\"film\" form=\"new_ses\" class=\"button large\">";
|
|
||||||
foreach($films as $f){
|
foreach($films as $f){
|
||||||
echo "<option value=\"". $f->getId() ." \"> " . $f->getId() . "|" . $f->getTittle() ." Idioma: " . $f->getLanguage() . "</option>";
|
echo " <option value=\"". $f->getId() ." \"> " . $f->getId() . "|" . $f->getTittle() ." Idioma: " . $f->getLanguage() . "</option>\n";
|
||||||
}
|
}
|
||||||
echo "</div>";
|
echo " </div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
<?php
|
<?php
|
||||||
//General Config File:
|
//General Config File:
|
||||||
require_once('../assets/php/config.php');
|
require_once('../assets/php/config.php');
|
||||||
include_once('panel_manager.php');
|
|
||||||
|
include_once('panel_manager.php');
|
||||||
|
|
||||||
$login = false;
|
$login = false;
|
||||||
|
|
||||||
@ -37,7 +38,6 @@
|
|||||||
|
|
||||||
<!-- Panel -->
|
<!-- Panel -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<!--Left Sidebar -->
|
<!--Left Sidebar -->
|
||||||
<div class="sidebar left">
|
<div class="sidebar left">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -50,46 +50,45 @@
|
|||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
function drawSessions($sessions,$bd){
|
function drawSessions($sessions,$bd){
|
||||||
echo " <!--Session List -->
|
echo "
|
||||||
<div class=\"column side\">
|
<!--Session List -->
|
||||||
<table class='alt'>
|
<div class=\"column side\">
|
||||||
<thead>
|
<table class='alt'>
|
||||||
<tr>
|
<thead>
|
||||||
<th>Hora</th>
|
<tr>
|
||||||
<th>Pelicula</th>
|
<th>Hora</th>
|
||||||
<th>Formato</th>
|
<th>Pelicula</th>
|
||||||
<th>Precio</th>
|
<th>Formato</th>
|
||||||
</tr>
|
<th>Precio</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>";
|
</thead>
|
||||||
|
<tbody>";
|
||||||
foreach($sessions as $s){
|
foreach($sessions as $s){
|
||||||
$film = mysqli_fetch_array($bd->FilmData($s->getIdfilm()));
|
$film = mysqli_fetch_array($bd->FilmData($s->getIdfilm()));
|
||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td> " . date('H:i', strtotime( $s->getStartTime())) . "</a></td>
|
<td> " . date('H:i', strtotime( $s->getStartTime())) . "</a></td>
|
||||||
<td> " . str_replace('_', ' ', $film["tittle"]) . "</a></td>
|
<td> " . str_replace('_', ' ', $film["tittle"]) . "</a></td>
|
||||||
<td> " . $s->getFormat() . "</a></td>
|
<td> " . $s->getFormat() . "</a></td>
|
||||||
<td> " . $s->getSeatPrice() . "</a></td>
|
<td> " . $s->getSeatPrice() . "</a></td>
|
||||||
<form method=\"post\" action=\"./?state=edit_session&option=edit\">
|
<form method=\"post\" action=\"./?state=edit_session&option=edit\">
|
||||||
|
<input name=\"id\" type=\"hidden\" value=\"".$s->getId()."\">
|
||||||
<input name=\"id\" type=\"hidden\" value=\"".$s->getId()."\">
|
<input name=\"idfilm\" type=\"hidden\" value=\"".$s->getIdfilm()."\">
|
||||||
<input name=\"idfilm\" type=\"hidden\" value=\"".$s->getIdfilm()."\">
|
<input name=\"hall\" type=\"hidden\" value=\"".$s->getIdhall()."\">
|
||||||
<input name=\"idhall\" type=\"hidden\" value=\"".$s->getIdhall()."\">
|
<input name=\"idcinema\" type=\"hidden\" value=\"".$s->getIdcinema()."\">
|
||||||
<input name=\"idcinema\" type=\"hidden\" value=\"".$s->getIdcinema()."\">
|
<input name=\"date\" type=\"hidden\" value=\"".$s->getDate()."\">
|
||||||
<input name=\"date\" type=\"hidden\" value=\"".$s->getDate()."\">
|
<input name=\"start\" type=\"hidden\" value=\"".$s->getStartTime()."\">
|
||||||
<input name=\"start\" type=\"hidden\" value=\"".$s->getStartTime()."\">
|
<input name=\"price\" type=\"hidden\" value=\"".$s->getSeatPrice()."\">
|
||||||
<input name=\"price\" type=\"hidden\" value=\"".$s->getSeatPrice()."\">
|
<input name=\"format\" type=\"hidden\" value=\"".$s->getFormat()."\">
|
||||||
<input name=\"format\" type=\"hidden\" value=\"".$s->getFormat()."\">
|
<td> <input type=\"submit\" id=\"submit\" value=\"Editar\" class=\"button\" > </td>
|
||||||
|
</form>
|
||||||
<td> <input type=\"submit\" id=\"submit\" value=\"Editar\" class=\"button\" > </td>
|
</tr>";
|
||||||
</form>
|
|
||||||
</tr>";
|
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
<tbody>
|
<tbody>
|
||||||
</table>
|
</table>
|
||||||
<input type=\"submit\" name=\"submit\" form=\"addfilter\" value=\"Añadir\" class=\"button large\" formaction=\"./?state=edit_session&option=new\">
|
<input type=\"submit\" name=\"submit\" form=\"addfilter\" value=\"Añadir\" class=\"button large\" formaction=\"./?state=edit_session&option=new\">
|
||||||
</div>";
|
</div>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
if($formSession->getReply()){
|
if($formSession->getReply()){
|
||||||
@ -107,6 +106,6 @@
|
|||||||
<div class=\"column side\">
|
<div class=\"column side\">
|
||||||
<p> No hay ninguna session en la sala ". $placeholder_hall . " el dia ". $placeholder_date . "</p>
|
<p> No hay ninguna session en la sala ". $placeholder_hall . " el dia ". $placeholder_date . "</p>
|
||||||
<input type=\"submit\" name=\"submit\" form=\"addfilter\" value=\"Añadir\" class=\"button large\" formaction=\"./?state=edit_session&option=new\">
|
<input type=\"submit\" name=\"submit\" form=\"addfilter\" value=\"Añadir\" class=\"button large\" formaction=\"./?state=edit_session&option=new\">
|
||||||
</div>";
|
</div>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user