-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
23 lines (21 loc) · 859 Bytes
/
Copy pathindex.php
File metadata and controls
23 lines (21 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php // index.php
/*
* Página principal del sistema
* @author Daniel (Nasty35)
*/
require 'core/brain.php'; // Núcleo del CMS
if(Logued) { // Comprobamos si está logado, y si lo está lo llevamos al me.php
header('Location: me.php');
} else { // Importamos la plantilla del documento index (cabecera y index-body.tpl)
$tpl->setHeader('Acceso', 'index.php');
if(isset($_GET['error'])) { // Nombre de usuario o contraseña incorrectos
echo '<h2 class="w3-card w3-center w3-red">'.
($_GET['error'] == 'incorrectos' ? 'Datos incorrectos' : 'No existe ese tag de error') .
'</h2>';
}
if(isset($_GET['registro'])) { // Se ha registrado el usuario con éxito
echo '<h2 class="w3-card w3-center w3-green">Usuario ' . $_GET['registro'] . ' registrado</h2>';
}
$tpl->add('index-body');
}
?>