Add files via upload

This commit is contained in:
Markines16 2021-04-15 21:43:06 +02:00 committed by GitHub
parent 653d24a8ca
commit a3bc2311e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 130 additions and 130 deletions

View File

@ -1,6 +1,6 @@
<?php
//General Config File:
require_once('../assets/php/config.php');
require_once('../assets/php/config.php');
include_once('./includes/formHall.php');
require_once('./includes/hall_dto.php');
@ -16,118 +16,119 @@
$formHall->processesForm(null, $cinema, null, null, "list");
$filmList = new Film_DAO('complucine');
if($filmList){
$films = $filmList->allFilmData();
}else {
$films = null;
}
if(isset($_REQUEST['option']) && $_REQUEST['option'] == 'edit') {
echo "<div class = \"column middle\">
<h2>Editar/Eliminar Sesion</h2>
<form method=\"post\" id=\"edit_ses\" action=\"validateSession.php\">
<div class=\"row\">
<fieldset id=\"datos\">
<legend>Datos</legend>
<input name=\"cinema\" type=\"hidden\" value=\"". $_POST['idcinema']."\">
<input name=\"id\" type=\"hidden\" value=\"". $_POST['id']."\">
<div class=\"_price\">
<input type=\"number\" name=\"price\" id=\"price\" value=\"". $_POST['price'] ."\"min=\"0\" placeholder=\"Precio de la entrada\" required/>
if(isset($_REQUEST['option']) && $_REQUEST['option'] == 'edit') {
echo " <div class = \"column middle\">
<h2>Editar/Eliminar Sesion</h2>
<form method=\"post\" id=\"edit_ses\" action=\"validateSession.php\">
<div class=\"row\">
<fieldset id=\"datos\">
<legend>Datos</legend>
<input name=\"cinema\" type=\"hidden\" value=\"". $_POST['idcinema']."\">
<input name=\"id\" type=\"hidden\" value=\"". $_POST['id']."\">
<div class=\"_price\">
<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>
<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>
</form>
<div>
<div class=\"column side\">
<select name=\"film\" form=\"edit_ses\" class=\"button large\">";
</form>
<div>
<div class=\"column side\">
<select name=\"film\" form=\"edit_ses\" class=\"button large\">\n";
foreach($films as $f){
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{
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{
echo "<div class = \"column middle\">
<h2>Crear Sesion</h2>
<form method=\"post\" id=\"new_ses\" action=\"validateSession.php\">
<div class=\"row\">
<fieldset id=\"datos\">
<legend>Datos</legend>
<input type=\"hidden\" name=\"cinema\" value =\"1\" />
<div class=\"_price\">
<input type=\"number\" name=\"price\" id=\"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 = \"column middle\">
<h2>Crear Sesion</h2>
<form method=\"post\" id=\"new_ses\" action=\"validateSession.php\">
<div class=\"row\">
<fieldset id=\"datos\">
<legend>Datos</legend>
<input type=\"hidden\" name=\"cinema\" value =\"1\" />
<div class=\"_price\">
<input type=\"number\" name=\"price\" id=\"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=\"\" placeholder=\"Formato\" required/>
echo "
<div class=\"_format\">
<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>
</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>
</form>
<div>
<div class=\"column side\">
<select name=\"film\" form=\"new_ses\" class=\"button large\">";
</form>
<div>
<div class=\"column side\">
<select name=\"film\" form=\"new_ses\" class=\"button large\">\n";
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>";
}
?>

View File

@ -2,7 +2,8 @@
<?php
//General Config File:
require_once('../assets/php/config.php');
include_once('panel_manager.php');
include_once('panel_manager.php');
$login = false;
@ -37,7 +38,6 @@
<!-- Panel -->
<div class="row">
<!--Left Sidebar -->
<div class="sidebar left">
<ul>

View File

@ -50,46 +50,45 @@
</div>";
function drawSessions($sessions,$bd){
echo " <!--Session List -->
<div class=\"column side\">
<table class='alt'>
<thead>
<tr>
<th>Hora</th>
<th>Pelicula</th>
<th>Formato</th>
<th>Precio</th>
</tr>
</thead>
<tbody>";
echo "
<!--Session List -->
<div class=\"column side\">
<table class='alt'>
<thead>
<tr>
<th>Hora</th>
<th>Pelicula</th>
<th>Formato</th>
<th>Precio</th>
</tr>
</thead>
<tbody>";
foreach($sessions as $s){
$film = mysqli_fetch_array($bd->FilmData($s->getIdfilm()));
echo "
<tr>
<td> " . date('H:i', strtotime( $s->getStartTime())) . "</a></td>
<td> " . str_replace('_', ' ', $film["tittle"]) . "</a></td>
<td> " . $s->getFormat() . "</a></td>
<td> " . $s->getSeatPrice() . "</a></td>
<form method=\"post\" action=\"./?state=edit_session&option=edit\">
<input name=\"id\" type=\"hidden\" value=\"".$s->getId()."\">
<input name=\"idfilm\" type=\"hidden\" value=\"".$s->getIdfilm()."\">
<input name=\"idhall\" type=\"hidden\" value=\"".$s->getIdhall()."\">
<input name=\"idcinema\" type=\"hidden\" value=\"".$s->getIdcinema()."\">
<input name=\"date\" type=\"hidden\" value=\"".$s->getDate()."\">
<input name=\"start\" type=\"hidden\" value=\"".$s->getStartTime()."\">
<input name=\"price\" type=\"hidden\" value=\"".$s->getSeatPrice()."\">
<input name=\"format\" type=\"hidden\" value=\"".$s->getFormat()."\">
<td> <input type=\"submit\" id=\"submit\" value=\"Editar\" class=\"button\" > </td>
</form>
</tr>";
<tr>
<td> " . date('H:i', strtotime( $s->getStartTime())) . "</a></td>
<td> " . str_replace('_', ' ', $film["tittle"]) . "</a></td>
<td> " . $s->getFormat() . "</a></td>
<td> " . $s->getSeatPrice() . "</a></td>
<form method=\"post\" action=\"./?state=edit_session&option=edit\">
<input name=\"id\" type=\"hidden\" value=\"".$s->getId()."\">
<input name=\"idfilm\" type=\"hidden\" value=\"".$s->getIdfilm()."\">
<input name=\"hall\" type=\"hidden\" value=\"".$s->getIdhall()."\">
<input name=\"idcinema\" type=\"hidden\" value=\"".$s->getIdcinema()."\">
<input name=\"date\" type=\"hidden\" value=\"".$s->getDate()."\">
<input name=\"start\" type=\"hidden\" value=\"".$s->getStartTime()."\">
<input name=\"price\" type=\"hidden\" value=\"".$s->getSeatPrice()."\">
<input name=\"format\" type=\"hidden\" value=\"".$s->getFormat()."\">
<td> <input type=\"submit\" id=\"submit\" value=\"Editar\" class=\"button\" > </td>
</form>
</tr>";
}
echo "
<tbody>
</table>
<input type=\"submit\" name=\"submit\" form=\"addfilter\" value=\"Añadir\" class=\"button large\" formaction=\"./?state=edit_session&option=new\">
</div>";
<tbody>
</table>
<input type=\"submit\" name=\"submit\" form=\"addfilter\" value=\"Añadir\" class=\"button large\" formaction=\"./?state=edit_session&option=new\">
</div>\n";
}
if($formSession->getReply()){
@ -107,6 +106,6 @@
<div class=\"column side\">
<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\">
</div>";
</div>\n";
}
?>