SW/panel_admin/index.php

80 lines
2.3 KiB
PHP
Raw Normal View History

<!DOCTYPE HTML>
<?php
2021-04-16 12:57:10 +02:00
//General Config File:
2021-04-15 18:40:22 +02:00
include_once('../assets/php/config.php');
2021-04-16 12:57:10 +02:00
2021-03-26 15:08:47 +01:00
require_once('../panel_admin/panelAdmin.php');
2021-04-15 18:46:36 +02:00
2021-04-15 11:02:38 +02:00
$login=false;
if(isset($_SESSION["login"]) && $_SESSION["rol"] == "admin") $login = true;
if(isset($_GET['state'])) {
2021-04-15 11:02:38 +02:00
$panel = new Panel($_GET['state'], $login);
2021-03-26 15:08:47 +01:00
}
else {
2021-04-15 11:02:38 +02:00
$panel = new Panel('', $login);
2021-03-26 15:08:47 +01:00
}
// IMPORTANTE:
// VERIFICAR QUE ES ADMIN, SI NO, MOSTRAR MENSAJE DE "ERROR"
2021-03-26 15:08:47 +01:00
?>
<!--
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 -->
<?php
$template->print_main();
?>
<!-- Panel -->
<div class="row">
<!-- Left Sidebar -->
<div class="sidebar left">
<ul>
<li>Ver como:</li>
<ul>
2021-04-15 10:18:50 +02:00
<li><a href="index.php?state=un">Usuario no registrado</a></li>
<li><a href="index.php?state=ur">Usuario registrado</a></li>
<li><a href="index.php?state=ag">Gerente</a></li>
</ul><br />
<li>Añadir/Editar/Eliminar:</li>
<ul>
2021-03-26 15:08:47 +01:00
<li><a href="index.php?state=mc">Cines</a></li>
<li><a href="index.php?state=mf">Películas</a></li>
2021-04-15 10:18:50 +02:00
<li><a href="index.php?state=md">Promociones</a></li>
<li><a href="index.php?state=mg">Gerente</a></li>
</ul>
</ul>
</div>
<!-- Contents -->
<div class="row">
2021-03-26 15:08:47 +01:00
<div class="column side"></div>
<div class="column middle">
<?php
$template->print_msg();
2021-03-26 15:08:47 +01:00
$panel->showPanel();
?>
</div>
<div class="column side"></div>
</div>
</div>
<!-- Footer -->
<?php
$template->print_footer();
?>
</body>
</html>