2021-05-08 15:17:51 +02:00
|
|
|
<?php
|
|
|
|
//General Config File:
|
2021-04-26 22:40:34 +02:00
|
|
|
require_once('../assets/php/config.php');
|
2021-05-05 16:52:04 +02:00
|
|
|
//Controller file:
|
|
|
|
include_once('panel_manager.php');
|
2021-05-06 23:25:38 +02:00
|
|
|
|
2021-05-05 16:52:04 +02:00
|
|
|
if($_SESSION["login"] && $_SESSION["rol"] === "manager"){
|
2021-05-10 16:45:36 +02:00
|
|
|
$_SESSION["cinema"] = 1;
|
2021-05-05 16:52:04 +02:00
|
|
|
switch($_GET["state"]){
|
|
|
|
case "view_ruser":
|
|
|
|
case "view_user":
|
|
|
|
$panel = '<div class="column side"></div>
|
|
|
|
<div class="column middle">
|
|
|
|
<div class="code info">
|
|
|
|
<h1>Esta vista aun no esta implementada.</h1><hr />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column side"></div>'."\n";
|
|
|
|
break;
|
|
|
|
case "manage_halls":
|
|
|
|
$panel = Manager_panel::manage_halls();
|
|
|
|
break;
|
|
|
|
case "new_hall":
|
|
|
|
$panel = Manager_panel::new_hall();
|
|
|
|
break;
|
|
|
|
case "edit_hall":
|
|
|
|
$panel = Manager_panel::edit_hall();
|
|
|
|
break;
|
|
|
|
case "manage_sessions":
|
|
|
|
$panel = Manager_panel::manage_sessions();
|
2021-05-05 21:10:46 +02:00
|
|
|
break;
|
|
|
|
case "new_session":
|
|
|
|
$panel = Manager_panel::new_session();
|
|
|
|
break;
|
|
|
|
case "edit_session":
|
|
|
|
$panel = Manager_panel::edit_session();
|
2021-05-07 13:48:20 +02:00
|
|
|
break;
|
|
|
|
case "select_film":
|
|
|
|
$panel = Manager_panel::select_film($template);
|
2021-05-05 16:52:04 +02:00
|
|
|
break;
|
|
|
|
case "success":
|
|
|
|
$panel = Manager_panel::success();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$panel = Manager_panel::welcome();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$panel = '<div class="column side"></div>
|
|
|
|
<div class="column middle">
|
|
|
|
<div class="code info">
|
|
|
|
<h1>Debes iniciar sesión para ver el Panel de Manager.</h1><hr />
|
|
|
|
<p>Inicia Sesión en una cuenta con permisos.</p>
|
|
|
|
<a href="'.$prefix.'login/" ><button class="button large">Iniciar Sesión</button></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column side"></div>'."\n";
|
|
|
|
}
|
2021-04-26 22:40:34 +02:00
|
|
|
?>
|
2021-05-10 18:15:58 +02:00
|
|
|
<!DOCTYPE HTML>
|
2021-04-26 22:40:34 +02:00
|
|
|
<!--
|
2021-05-03 21:58:47 +02:00
|
|
|
Práctica - Sistemas Web | Grupo D
|
2021-04-26 22:40:34 +02:00
|
|
|
CompluCine - FDI-cines
|
|
|
|
-->
|
|
|
|
<html lang="es">
|
2021-05-09 17:50:30 +02:00
|
|
|
<link id='estilo' rel='stylesheet' type='text/css' href='../assets/css/manager.css'>
|
2021-04-26 22:40:34 +02:00
|
|
|
<!-- Head -->
|
|
|
|
<?php
|
|
|
|
$template->print_head();
|
2021-05-06 23:25:38 +02:00
|
|
|
|
2021-04-26 22:40:34 +02:00
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<!-- Header -->
|
|
|
|
<?php
|
|
|
|
$template->print_header();
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Main -->
|
|
|
|
<?php
|
|
|
|
$template->print_main();
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Panel -->
|
|
|
|
<div class="row">
|
2021-04-30 20:49:21 +02:00
|
|
|
<!-- Panel Menu -->
|
2021-05-05 21:10:46 +02:00
|
|
|
<?php $template->print_panelMenu($_SESSION["rol"]); ?>
|
|
|
|
</div>
|
2021-04-30 20:49:21 +02:00
|
|
|
<!--Contents -->
|
2021-05-05 21:10:46 +02:00
|
|
|
<div class="row">
|
|
|
|
<?php echo $panel; ?>
|
|
|
|
</div>
|
|
|
|
|
2021-04-26 22:40:34 +02:00
|
|
|
<!-- Footer -->
|
|
|
|
<?php
|
|
|
|
$template->print_footer();
|
|
|
|
?>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|