SW/panel_admin/update_film.php

23 lines
936 B
PHP
Raw Normal View History

2021-04-13 22:29:25 +02:00
<?php
session_start();
include_once('./includes/film_dto.php');
include_once('./includes/formFilm.php');
if(isset($_POST['add_film'])) {
2021-04-13 22:29:25 +02:00
$film = new FormFilm();
$film->processesForm(null, $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], "new");
2021-04-13 22:29:25 +02:00
$_SESSION['message'] = $film->getReply();
}
else if(isset($_POST['confirm_delete_film'])) {
2021-04-13 22:29:25 +02:00
$film = new FormFilm();
$film->processesForm($_POST['id'],null,null,null,null,"del");
2021-04-13 22:29:25 +02:00
$_SESSION['message'] = $film->getReply();
}
else if(isset($_POST['confirm_edit_film'])) {
2021-04-13 22:29:25 +02:00
$film = new FormFilm();
$film->processesForm($_POST['id'], $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], "edit");
$_SESSION['message']= $film->getReply();
2021-04-13 22:29:25 +02:00
}
header('Location: ../panel_admin/index.php?state=mf');
2021-04-13 22:29:25 +02:00
?>