Complete functionality
Missing elements of design and security
This commit is contained in:
parent
cbbf66d128
commit
5a5a99ad80
30
panel_admin/deleteFilm.php
Normal file
30
panel_admin/deleteFilm.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
include_once('./includes/film_dto.php');
|
||||
include_once('./includes/formFilm.php');
|
||||
|
||||
if($_REQUEST['delete_film']) {
|
||||
echo'<div class="column size">
|
||||
<h2>Editar pelicula</h2>
|
||||
<form method="post" action="delete_film.php">
|
||||
<div class="row">
|
||||
<fieldset id="film_form">
|
||||
<legend>¿Estás seguro de que quieres eliminar esta pelicula?</legend>
|
||||
<input type="hidden" name="id" value='.$_REQUEST['id'].'/>
|
||||
<p>Id: '.$_REQUEST['id'].' </p>
|
||||
<p>Título: '.$_REQUEST['tittle'].' </p>
|
||||
<p>Duración: '.$_REQUEST['duration'].' </p>
|
||||
<p>Idioma: '.$_REQUEST['language'].' </p>
|
||||
<p>Descripción: '.$_REQUEST['description'].' </p>
|
||||
</fieldset>
|
||||
<div class="actions">
|
||||
<input type="submit" id="submit" value="Eliminar" name="confirm_delete_film" class="primary" />
|
||||
<input type="submit" id="submit" value="Cancelar" name="cancel_delete_film" class="primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
12
panel_admin/delete_film.php
Normal file
12
panel_admin/delete_film.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
session_start();
|
||||
include_once('./includes/film_dto.php');
|
||||
include_once('./includes/formFilm.php');
|
||||
if($_REQUEST['confirm_delete_film']) {
|
||||
$film = new FormFilm();
|
||||
$film->processesForm($_REQUEST['id'],null,null,null,null,"del");
|
||||
$_SESSION['message'] = $film->getReply();
|
||||
|
||||
}
|
||||
header("Location: ../panel_admin/index.php?state=mf");
|
||||
?>
|
@ -44,7 +44,16 @@
|
||||
<input type="submit" id="submit" value="Editar" name="edit_film" class="primary" />
|
||||
</form>
|
||||
</td>
|
||||
<td> <input type=submit name="submit" value="Borrar" class="button" formaction="delete_film.php"> </td>
|
||||
<td>
|
||||
<form method="post" action="./index.php?state=df">
|
||||
<input name="id" type="hidden" value="'.$f->getId().'">
|
||||
<input name="tittle" type="hidden" value="'.$f->getTittle().'">
|
||||
<input name="duration" type="hidden" value="'.$f->getDuration().'">
|
||||
<input name="language" type="hidden" value="'.$f->getLanguage().'">
|
||||
<input name="description" type="hidden" value="'.$f->getDescription().'">
|
||||
<input type="submit" id="submit" value="Eliminar" name="delete_film" class="primary" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo'<tbody>
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
function showPanel() {
|
||||
switch($this->state) {
|
||||
case 'df': require('deleteFilm.php');break;
|
||||
case 'ef': require('editFilm.php');break;
|
||||
case 'mc': require('manage_cinemas.php'); break;
|
||||
case 'mf': require('manage_films.php'); break;
|
||||
|
Loading…
Reference in New Issue
Block a user