2021-04-13 21:16:07 +02:00
|
|
|
<?php
|
2021-04-15 20:53:01 +02:00
|
|
|
//General Config File:
|
|
|
|
require_once('../assets/php/config.php');
|
|
|
|
require_once('./includes/formSession.php');
|
|
|
|
$session = new FormSession();
|
|
|
|
$reply = "<p> ERROR DE ACCESO </p>" ;
|
|
|
|
|
2021-04-13 21:16:07 +02:00
|
|
|
if(isset($_POST['new'])){
|
2021-04-15 22:34:33 +02:00
|
|
|
$session->processesForm($_POST["film"], $_POST["hall"], $_SESSION["cinema"],$_POST["date"],$_POST["start"],$_POST["price"],$_POST["format"],$_POST["repeat"], "new");
|
2021-04-15 20:53:01 +02:00
|
|
|
$reply = $session->getReply();
|
2021-04-15 22:34:33 +02:00
|
|
|
$_SESSION["cinema"] = "";
|
|
|
|
$_SESSION["hall"] = "";
|
|
|
|
$_SESSION["date"] = "";
|
|
|
|
$_SESSION["start"] = "";
|
2021-04-15 20:53:01 +02:00
|
|
|
|
2021-04-13 21:16:07 +02:00
|
|
|
} else if (isset($_POST['edit'])){
|
2021-04-15 22:34:33 +02:00
|
|
|
$session->processesForm($_POST["film"], $_POST["hall"], $_SESSION["cinema"],$_POST["date"],$_POST["start"],$_POST["price"],$_POST["format"],"0", "edit");
|
2021-04-15 20:53:01 +02:00
|
|
|
$reply = $session->getReply();
|
2021-04-15 22:34:33 +02:00
|
|
|
$_SESSION["cinema"] = "";
|
|
|
|
$_SESSION["hall"] = "";
|
|
|
|
$_SESSION["date"] = "";
|
|
|
|
$_SESSION["start"] = "";
|
2021-04-15 20:53:01 +02:00
|
|
|
|
2021-04-13 21:16:07 +02:00
|
|
|
} else if (isset($_POST['del'])){
|
2021-04-15 22:34:33 +02:00
|
|
|
$session->processesForm($_POST["film"], $_POST["hall"], $_SESSION["cinema"],$_POST["date"],$_POST["start"],$_POST["price"],$_POST["format"],"0", "del");
|
2021-04-15 20:53:01 +02:00
|
|
|
$reply = $session->getReply();
|
2021-04-15 22:34:33 +02:00
|
|
|
$_SESSION["cinema"] = "";
|
|
|
|
$_SESSION["hall"] = "";
|
|
|
|
$_SESSION["date"] = "";
|
|
|
|
$_SESSION["start"] = "";
|
2021-04-13 21:16:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<!--
|
|
|
|
Práctica 2 - Sistemas Web | Grupo D
|
|
|
|
CompluCine - FDI-cines
|
|
|
|
-->
|
|
|
|
<html lang="es">
|
|
|
|
<!-- Head -->
|
|
|
|
<?php
|
|
|
|
$template->print_head();
|
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<!-- Header -->
|
|
|
|
<?php
|
|
|
|
$template->print_header();
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Main -->
|
|
|
|
<div class="main">
|
|
|
|
<div class="image"><img src="../img/logo_trasparente.png" /></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Reply -->
|
|
|
|
<section class="reply">
|
|
|
|
<div class ="row">
|
|
|
|
<div class="column side"></div>
|
|
|
|
<div class="column middle">
|
|
|
|
<div class="code info">
|
|
|
|
<?php
|
|
|
|
echo $reply;
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column side"></div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<!-- Footer -->
|
|
|
|
<?php
|
|
|
|
$template->print_footer();
|
|
|
|
?>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|