2021-04-26 22:40:34 +02:00
|
|
|
<?php
|
2021-04-28 21:46:10 +02:00
|
|
|
include_once($prefix.'assets/php/common/film_dto.php');
|
|
|
|
include_once($prefix.'assets/php/common/formFilm.php');
|
2021-04-26 22:40:34 +02:00
|
|
|
|
|
|
|
if(isset($_POST['add_film'])) {
|
|
|
|
$film = new FormFilm();
|
|
|
|
$film->processesForm(null, $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], "new");
|
|
|
|
$_SESSION['message'] = $film->getReply();
|
|
|
|
}
|
|
|
|
else if(isset($_POST['confirm_delete_film'])) {
|
|
|
|
$film = new FormFilm();
|
|
|
|
$film->processesForm($_POST['id'],null,null,null,null,"del");
|
|
|
|
$_SESSION['message'] = $film->getReply();
|
|
|
|
}
|
|
|
|
else if(isset($_POST['confirm_edit_film'])) {
|
|
|
|
$film = new FormFilm();
|
|
|
|
$film->processesForm($_POST['id'], $_POST['tittle'], $_POST['duration'], $_POST['language'], $_POST['description'], "edit");
|
|
|
|
$_SESSION['message']= $film->getReply();
|
|
|
|
}
|
|
|
|
header('Location: ../panel_admin/index.php?state=mf');
|
|
|
|
|
|
|
|
?>
|