35 lines
871 B
PHP
35 lines
871 B
PHP
<?php
|
|
ini_set('display_errors', 1);
|
|
ini_set('display_startup_errors', 1);
|
|
error_reporting(E_ALL);
|
|
|
|
// Log errors to a file
|
|
ini_set('log_errors', 1);
|
|
ini_set('error_log', 'php-error.log');
|
|
|
|
session_start();
|
|
require_once 'db/config.php';
|
|
|
|
// Check if user is logged in and has an admin role
|
|
$allowed_roles = ['Administrador', 'admin'];
|
|
if (!isset($_SESSION['user_id']) || !isset($_SESSION['user_role']) || !in_array($_SESSION['user_role'], $allowed_roles)) {
|
|
header('Location: dashboard.php?error=access_denied');
|
|
exit;
|
|
}
|
|
|
|
$pageTitle = 'Inversión General';
|
|
include 'layout_header.php';
|
|
?>
|
|
|
|
<div class="container mt-4">
|
|
|
|
<!-- Content for Inversion General will go here -->
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<p>Esta sección está en construcción.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php include 'layout_footer.php'; ?>
|