Initial state

This commit is contained in:
2023-05-16 10:16:21 -06:00
commit c3c0108143
167 changed files with 20135 additions and 0 deletions

120
horario_profesor.php Normal file
View File

@@ -0,0 +1,120 @@
<?php
require_once 'class/c_login.php';
if (!isset($_SESSION['user']))
die(header('Location: index.php'));
$user = unserialize($_SESSION['user']);
$user->access();
if (!$user->admin && in_array($user->acceso, ['n']))
die(header('Location: main.php?error=1'));
$user->print_to_log('Consultar horario');
$write = $user->admin || in_array($user->acceso, ['w']);
// var_dump($user);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Consultar horario | <?= $user->facultad['facultad'] ?? 'General' ?></title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/plain; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php include_once "import/html_css_files.php"; ?>
<script src="js/scrollables.js" defer></script>
<script src="js/jquery.min.js" defer></script>
<script src="js/bootstrap/bootstrap.min.js" defer></script>
<script src="js/messages.js" defer></script>
<script src="js/horarios_profesor.js" defer></script>
</head>
<!-- -->
<body style="display: block;">
<?php
include('include/constantes.php');
include("import/html_header.php");
html_header("Consultar horario", "Sistema de gestión de checador");
?>
<?= "<!-- $user -->" ?>
<main class="container content marco content-margin" id="local-app">
<section id="message"></section>
<?php require('import/periodo.php') ?>
<form id="form" class="form-horizontal">
<div class="form-group">
<div class="form-box">
<input type="hidden" name="periodo" value="<?= $user->periodo ?>" />
<div class="form-box">
<div class="form-group row">
<label for="clave" class="col-4 col-form-label">Carrera</label>
<div class="col-6">
<input type="text" class="form-control" id="clave" name="clave" placeholder="Clave del profesor (opcional)" value="<?= $clave ?? '' ?>" pattern="(do)?[0-9]{3,6}" title="La clave debe tener 8 caracteres, los primeros 2 deben ser letras y los últimos 6 números" minlength="3" maxlength="8">
</div>
</div>
<div class="form-group row">
<label for="profesor" class="col-4 col-form-label">Nombre</label>
<div class="col-6 ">
<input type="text" class="form-control" id="profesor" name="nombre" placeholder="Nombre del profesor (opcional)">
</div>
</div>
</div>
<!-- ICO-BUSCAR FILTRAR & ICO-BORRAR LIMPIAR -->
<div class="form-group row justify-content-center">
<button class="btn btn-outline-primary mr-2">
<span class="ing-buscar icono"></span>
Buscar horario
</button>
<button type="button" class="btn btn-outline-danger" onclick="">
<span class="ing-borrar icono"></span>
Limpiar
</button>
</div>
</div>
</div>
</form>
<div class="form-group mt-4 row justify-content-center">
<?php if ($write) { ?>
<button type="button" id="nuevo" class="btn btn-outline-primary ml-4 d-none" title="Nuevo horario" data-toggle="modal" data-target="#modal-editar">
<span class="ing-mas ing-fw"></span> Nuevo
</button>
<?php } ?>
</div>
</div>
</div>
</form>
<!-- Horario is a (table with one a cell) within a table
7:15 - 8:45, 8:45 - 10:15, 10:30 - 12:00, 12:00 - 13:30
de lunes a viernes, a excepción de que tenga sábado
-->
<div id="btn-excel-horario" class="mb-2 float-right hidden">
<button class="btn btn-outline-secondary " title="Exportar a Excel">
<span class="ing-descarga ing-fw"></span> Exportar a Excel
</button>
</div>
<!-- Table responsive -->
<div class="table-responsive">
<table class="table table-bordered table-sm table-responsive-sm" id="table-horario">
<thead class="thead-dark">
<tr id="headers">
<th scope="col" class="text-center">Hora</th>
<th scope="col" class="text-center">Lunes</th>
<th scope="col" class="text-center">Martes</th>
<th scope="col" class="text-center">Miércoles</th>
<th scope="col" class="text-center">Jueves</th>
<th scope="col" class="text-center">Viernes</th>
<th scope="col" class="text-center">Sábado</th>
</tr>
</thead>
<tbody id="horario"></tbody>
</table>
</div>
</main>
</body>
</html>