Initial state
This commit is contained in:
65
main.php
Normal file
65
main.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
require_once 'class/c_login.php';
|
||||
if (!isset($_SESSION['user']))
|
||||
die(header('Location: index.php'));
|
||||
|
||||
$user = unserialize($_SESSION['user']);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Editar Horarios | <?php echo $user->facultad['facultad'] ?? "Administrador"; ?></title>
|
||||
<?php
|
||||
include 'import/html_css_files.php';
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
include "import/html_header.php";
|
||||
html_header(
|
||||
"Menú Inicio",
|
||||
"Sistema de gestión de checador ",
|
||||
);
|
||||
?>
|
||||
<main class="content marco">
|
||||
<section id="message"></section>
|
||||
<h3 class="text-center mt-3">
|
||||
<b><?= $user->user['nombre']; ?></b> | <?= $user->facultad['facultad'] ?? "General"; ?> | <?= $user->rol['rol']; ?>
|
||||
</h3>
|
||||
<hr>
|
||||
|
||||
</main>
|
||||
<?php
|
||||
include "import/html_footer.php";
|
||||
?>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/bootstrap/bootstrap.min.js"></script>
|
||||
<?php include_once 'js/messages.php'; ?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// constantly update the date and time
|
||||
setInterval(function() {
|
||||
$('.fecha_hora').html(new Date().toLocaleString());
|
||||
}, 1000);
|
||||
|
||||
<?php if (isset($_GET['error'])) { ?>
|
||||
var error = <?php echo $_GET['error'] ?? 0; ?>;
|
||||
switch (error) {
|
||||
case 1:
|
||||
triggerMessage('No tienes permiso de acceso a esta página', 'Error de permisos', 'danger');
|
||||
break;
|
||||
|
||||
default:
|
||||
triggerMessage('Error desconocido', 'Error', 'danger');
|
||||
break;
|
||||
}
|
||||
<?php } ?>
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user