SW/panel_user/index.php

81 lines
2.2 KiB
PHP
Raw Normal View History

2021-04-26 22:40:34 +02:00
<!DOCTYPE HTML>
<?php
//General Config File:
require_once('../assets/php/config.php');
2021-05-03 15:11:59 +02:00
//Controller file:
include_once('panelUser.php');
if($_SESSION["login"]){
switch($_GET["option"]){
case "manage_profile":
$reply = UserPanel::manage();
break;
case "purchases":
$reply = UserPanel::purchases();
break;
case "payment":
$reply = UserPanel::payment();
break;
case "delete_user";
$reply = UserPanel::delete();
break;
default:
$reply = '<div class="code info">
<h1>Bienvenido al Panel de Usuario.</h1><hr />
</div>'."\n";
break;
}
}
else{
$reply = '<div class="code info">
<h1>Debes iniciar sesión para ver tu Panel de Usuario.</h1><hr />
<p>Inicia Sesión si estás registrado.</p>
<a href="'.$prefix.'login/"><button>Iniciar Sesión</button></a>
<p>Registrate si no lo habías hecho previamente.</p>
<form method="post" action="'.$prefix.'login/"><button name="register" id="register">Registro</button></form>
</div>'."\n";
}
2021-04-26 22:40:34 +02: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">
2021-04-30 20:49:21 +02:00
<!-- Panel Menu -->
<?php
$template->print_panelMenu("user");
?>
2021-04-26 22:40:34 +02:00
<!-- Contents -->
<div class="row">
2021-05-03 15:11:59 +02:00
<?php
echo $reply;
?>
2021-04-26 22:40:34 +02:00
</div>
<!-- Footer -->
<?php
$template->print_footer();
?>
</body>
</html>