Add files via upload
This commit is contained in:
@ -11,28 +11,22 @@
|
||||
echo'<div class="column side"></div>
|
||||
<div class="column middle">
|
||||
<h2>Añadir pelicula</h2>
|
||||
<form method="post" action="index.php?state=mf">
|
||||
<form method="post" enctype="multipart/form-data" action="index.php?state=mf">
|
||||
<div class="row">
|
||||
<fieldset id="film_form">
|
||||
<legend>Datos de pelicula</legend>
|
||||
<div>
|
||||
<input type="text" name="tittle" id="tittle" placeholder="Título" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="number" name="duration" id="duration" placeholder="Duración" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" name="language" id="language" placeholder="Idioma" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" name="description" id="description" placeholder="Descripción" />
|
||||
</div>
|
||||
<input type="text" name="description" id="description" placeholder="Descripción" />
|
||||
<div class="file">Imagen promocional:<input type="file" name="file" placeholder="Imagen promocional" /></div>
|
||||
</fieldset>
|
||||
<div class="actions">
|
||||
<input type="submit" id="submit" value="Añadir pelicula" name="add_film" class="primary" />
|
||||
<input type="reset" id="reset" value="Borrar" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="column side"></div>
|
||||
@ -41,7 +35,7 @@
|
||||
function deleteFilm() {
|
||||
echo'<div class="column side"></div>
|
||||
<div class="column middle">
|
||||
<h2>Editar pelicula</h2>
|
||||
<h2>Eliminar pelicula</h2>
|
||||
<form method="post" action="index.php?state=mf">
|
||||
<div class="row">
|
||||
<fieldset id="film_form">
|
||||
@ -71,19 +65,12 @@
|
||||
<div class="row">
|
||||
<fieldset id="film_form">
|
||||
<legend>Datos de pelicula</legend>
|
||||
<input type="hidden" name="id" value='.$_POST['id'].'/>
|
||||
<div>
|
||||
<input type="hidden" name="id" value='.$_POST['id'].'/>
|
||||
<input type="text" name="tittle" value="'.$_POST['tittle'].'" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="number" name="duration" id="duration" value='.$_POST['duration'].' />
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" name="language" id="language" value="'.$_POST['language'].'" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" name="description" id="description" value="'.$_POST['description'].'"/>
|
||||
</div>
|
||||
<input type="text" name="description" id="description" value="'.$_POST['description'].'"/>
|
||||
<div class="file">Imagen promocional:<input type="file" name="file" placeholder="Imagen promocional" /></div>
|
||||
</fieldset>
|
||||
<div class="actions">
|
||||
<input type="submit" id="submit" value="Editar" name="confirm_edit_film" class="primary" />
|
||||
@ -99,19 +86,19 @@
|
||||
// Logic Functions
|
||||
function confirmDelete() {
|
||||
$film = new FormFilm();
|
||||
$film->processesForm($_POST['id'],null,null,null,null,"del");
|
||||
$film->processesForm($_POST['id'],null,null,null,null,null,"del");
|
||||
$_SESSION['message'] = $film->getReply();
|
||||
header('Location: ../panel_admin/index.php?state=mf');
|
||||
}
|
||||
function confirmEdit() {
|
||||
$film = new FormFilm();
|
||||
$film->processesForm($_POST['id'], $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], "edit");
|
||||
$film->processesForm($_POST['id'], $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], $_POST['file'], "edit");
|
||||
$_SESSION['message']= $film->getReply();
|
||||
header('Location: ../panel_admin/index.php?state=mf');
|
||||
}
|
||||
function confirmAdd() {
|
||||
$film = new FormFilm();
|
||||
$film->processesForm(null, $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], "new");
|
||||
$film->processesForm(null, $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], $_POST['file'], "new");
|
||||
$_SESSION['message'] = $film->getReply();
|
||||
header('Location: ../panel_admin/index.php?state=mf');
|
||||
}
|
||||
|
Reference in New Issue
Block a user