Add files via upload
This commit is contained in:
@ -8,10 +8,10 @@
|
||||
$template = new Template();
|
||||
|
||||
if(isset($_REQUEST['state'])) {
|
||||
$panel = new Panel($_REQUEST['state']);
|
||||
$panel = new Panel($_REQUEST['state']); //CHICOS, UNA CLASE CREADA ASÍ ESTÁ HORRIBLE, ADEMÁS NO SÉ QUÉ FUNCIÓN TIENE EXCACTAMENTE ESTA CLASE, PERO DEBÉIS REHACERLA
|
||||
}
|
||||
else {
|
||||
$panel = new Panel('');
|
||||
$panel = new Panel(''); //ESTO NO PUEDE SER ASÍ
|
||||
}
|
||||
// IMPORTANTE:
|
||||
// VERIFICAR QUE ES MANAGER(GERENTE), SI NO, MOSTRAR MENSAJE DE "ERROR"
|
||||
@ -55,12 +55,14 @@
|
||||
</div>
|
||||
<!-- Contents -->
|
||||
<div class="row">
|
||||
<div class="column side"></div>
|
||||
<div class="column middle">
|
||||
<?php
|
||||
$panel->showPanel();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column side"></div>
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
<?php
|
||||
|
@ -8,19 +8,29 @@
|
||||
$rooms = array($r1, $r2, $r3, $r4);
|
||||
|
||||
function drawRooms($ros){
|
||||
echo "<table>";
|
||||
echo "
|
||||
<table class='alt'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sala</th>
|
||||
<th>Opción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>";
|
||||
foreach($ros as $r){
|
||||
echo "
|
||||
<tr>
|
||||
<td> <button type=\"button\"> Sala ". $r->getId() ."</button> </td>
|
||||
<td> <button type=\"button\" onClick=\"Javascript:window.location.href = 'index.php?edit_rooms=true';\")\">Editar</button> </td>
|
||||
</tr>";
|
||||
<tr>
|
||||
<!-- AUN NO HEMOS VISTO JAVASCRIPT -->
|
||||
<!-- ADEMÁS, AUNQUE USÁSEMOS JS, ESO NO SE HARÍA CON UN WINDOWS.LOCATION.HREF, DE MOMENTO, USAD LOS BOTONES COMO OS PONGO EL DE AÑADIR -->
|
||||
<!--<td> <button type=\"button\"> Sala ". $r->getId() ."</button> </td> -->
|
||||
<td><a href=\"\" class='button'>Sala". $r->getId() ."</a></td>
|
||||
<!--<td> <button type=\"button\" onClick=\"Javascript:window.location.href = 'index.php?edit_rooms=true';\")\">Editar</button> </td> MAL, POR LO MISMO-->
|
||||
<td><a href=\"index.php?edit_rooms=true\" class='button'>Editar</a></td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<td> <button type=\"button\" onClick=\"Javascript:window.location.href = 'index.php?edit_rooms=true';\")\">Añadir</button> </td>
|
||||
</tr>
|
||||
</table>\n";
|
||||
echo "<tbody>
|
||||
</table>\n";
|
||||
echo "<a href=\"index.php?edit_sessions=true\" class='button large'>Añadir</a>";
|
||||
}
|
||||
drawRooms($rooms);
|
||||
?>
|
@ -2,6 +2,9 @@
|
||||
require('room_dto.php');
|
||||
require('session_dto.php');
|
||||
?>
|
||||
<!-- DEBEIS RECOLOCAR LAS COLUMNAS, ESTÁIS METIENDO UN COLUMN LEFT Y COLUMN RIGHT DENTRO DEL COLUMN MIDDLE DE PANEL_MANAGER -->
|
||||
<!-- ESO HACE QUE QUEDE TODO EN EL MEDIO APELOTONADO Y LO DE LA DERECHA VACÍO -->
|
||||
<!-- DEBÉIS QUITAR LOS COLUMN LEFT Y RIGHT Y METER LO DEL COLUMN LEFT DENTRO DEL COLUMN MIDDLE DE PANEL_MANAGER Y EL CONTENIDO DEL COLUMN RIGHT DENTRO DEL SEGUNDO COLUMN SIDE DE PANEL_MANAGER -->
|
||||
<div class="column left">
|
||||
<input type="date" name="fecha" min="2021-01-01" max="2031-12-31">
|
||||
<?php
|
||||
@ -37,22 +40,33 @@
|
||||
|
||||
function drawSessions($ses){
|
||||
|
||||
echo "<table>";
|
||||
foreach($ses as $s){
|
||||
echo "
|
||||
echo "
|
||||
<table class='alt'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Hora</th>
|
||||
<th>Película</th>
|
||||
<th>Tipo</th>
|
||||
<th>Precio</th>
|
||||
<!-- <th>Opción</th> --> <!-- HAY QUE ELIMINAR ESTA COLUMNA, COMO EXPLICÓ IVÁN EN CLASE, -->
|
||||
<!-- LAS TABLAS TIENEN EL PROBLEMA DE QUE CON MUCHAS COLUMNAS SE EXPANDEN FUERA DE LOS LÍMITES -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>";
|
||||
foreach($ses as $s){
|
||||
echo "
|
||||
<tr>
|
||||
<td>" . $s->getStartTime() . "</td>
|
||||
<td>" . $s->getFilm() . "</td>
|
||||
<td>" . $s->getFormat() . "</td>
|
||||
<td>". $s->getSeatPrice() . "</td>
|
||||
<td> <button type=\"button\" onClick=\"Javascript:window.location.href = 'index.php?edit_sessions=true';\")\">Editar</button> </td>
|
||||
<!-- <td> <button type=\"button\" onClick=\"Javascript:window.location.href = 'index.php?edit_sessions=true';\")\">Editar</button> </td> -->
|
||||
<!-- LA SOLUCIÓN PUEDE SER PONER EN ELACE DE EDICIÓN EN CADA UNO DE LOS ELEMENTOS DE LA COLUMNA -->
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
<tr>
|
||||
<td> <button type=\"button\" onClick=\"Javascript:window.location.href = 'index.php?edit_sessions=true';\")\">Añadir</button> </td>
|
||||
</tr>
|
||||
</table>";
|
||||
}
|
||||
echo "<tbody>
|
||||
</table>\n";
|
||||
echo "<a href=\"index.php?edit_sessions=true\" class='button large'>Añadir</a>";
|
||||
}
|
||||
drawSessions($sessions);
|
||||
?>
|
||||
|
Reference in New Issue
Block a user