177 lines
5.5 KiB
PHP
177 lines
5.5 KiB
PHP
<?php
|
|
if (session_status() === PHP_SESSION_NONE) {
|
|
session_start();
|
|
}
|
|
|
|
// Logout
|
|
if (isset($_GET['action']) && $_GET['action'] === 'logout') {
|
|
session_destroy();
|
|
header('Location: inicio.php');
|
|
exit;
|
|
}
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['role'])) {
|
|
session_unset();
|
|
$_SESSION['role'] = $_POST['role'];
|
|
if ($_POST['role'] === 'admin') {
|
|
header('Location: sesion.php');
|
|
} else {
|
|
header('Location: FormularioInicial.php');
|
|
}
|
|
exit;
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
<title>Inicio</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
font-family: 'Roboto', sans-serif;
|
|
background: linear-gradient(to right, #eef7ff, #7597b4);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 100vh;
|
|
margin: 0;
|
|
padding: 20px;
|
|
box-sizing: border-box;
|
|
}
|
|
.login-wrapper {
|
|
display: flex;
|
|
background-color: #ffffff;
|
|
border-radius: 10px;
|
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
|
overflow: hidden;
|
|
max-width: 900px;
|
|
width: 100%;
|
|
}
|
|
.login-image-section {
|
|
flex: 1;
|
|
background: url('assets/inicio.png') no-repeat center center;
|
|
background-size: cover;
|
|
min-height: 350px;
|
|
display: none;
|
|
}
|
|
@media (min-width: 768px) {
|
|
.login-image-section {
|
|
display: block;
|
|
}
|
|
}
|
|
.login-form-section {
|
|
flex: 1;
|
|
padding: 40px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
.login-form-section h2 {
|
|
margin-bottom: 25px;
|
|
color: #484848;
|
|
text-align: center;
|
|
font-weight: 700;
|
|
}
|
|
.login-form-section .form-label {
|
|
font-weight: 500;
|
|
color: #343a40;
|
|
}
|
|
.login-form-section .form-control {
|
|
border-radius: 5px;
|
|
border: 1px solid #ced4da;
|
|
padding: 10px 15px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
.login-form-section .form-control:focus {
|
|
border-color:rgb(115, 120, 138);
|
|
box-shadow: 0 0 0 0.25rem rgba(19, 61, 213, 0.25);
|
|
}
|
|
.btn-primary, .btn-light {
|
|
background-color: #5691cc;
|
|
border-color: #99b1c9;
|
|
padding: 10px 20px;
|
|
font-size: 1.1em;
|
|
font-weight: 600;
|
|
border-radius: 5px;
|
|
transition: all 0.3s ease;
|
|
color: white;
|
|
}
|
|
.btn-primary:hover, .btn-light:hover {
|
|
background-color: #3e4c82;
|
|
border-color:rgba(10, 36, 138, 0.31);
|
|
transform: translateY(-2px); /* Pequeño efecto al pasar el mouse */
|
|
}
|
|
.btn-outline-light {
|
|
background-color: transparent;
|
|
color: #133dd5;
|
|
border: 1px solid rgb(173, 174, 179);
|
|
}
|
|
.btn-outline-light:hover {
|
|
background-color: #3e4c82;
|
|
color: white;
|
|
}
|
|
|
|
|
|
.alert {
|
|
margin-top: 20px;
|
|
text-align: center;
|
|
border-radius: 5px;
|
|
font-weight: 400;
|
|
}
|
|
.text-center.mt-4 p {
|
|
color: #6c757d;
|
|
font-size: 0.9em;
|
|
}
|
|
.social-login-buttons .btn {
|
|
border-radius: 50px; /* Botones más redondeados para redes sociales */
|
|
padding: 8px 20px;
|
|
font-size: 0.9em;
|
|
margin: 0 5px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
.social-login-buttons .btn:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.login-logo {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
.login-logo img {
|
|
max-width: 120px;
|
|
height: auto;
|
|
}
|
|
.btn-role {
|
|
width: 100%;
|
|
margin-bottom: 1rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="login-wrapper">
|
|
<div class="login-image-section">
|
|
</div>
|
|
<div class="login-form-section">
|
|
<div class="login-logo">
|
|
<img src="assets/logo.png" alt="Logo LANIA" class="img-fluid">
|
|
</div>
|
|
<h2>Seleccionar tipo de usuario</h2>
|
|
<form method="post">
|
|
<button type="submit" name="role" value="aspirant" class="btn btn-outline-light btn-role">
|
|
<i class="fas fa-user-graduate me-2"></i> Iniciar como Aspirante
|
|
</button>
|
|
<button type="submit" name="role" value="admin" class="btn btn-primary btn-role">
|
|
<i class="fas fa-user-shield me-2"></i> Iniciar como Administrador
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|