User restore session
This commit is contained in:
@@ -18,7 +18,7 @@ $user = unserialize($_SESSION['user']);
|
||||
try {
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$baseDate = $_GET['fecha'] ?? $_GET['fecha_fin'] ?? null;
|
||||
|
||||
|
||||
$params = [
|
||||
':periodo_id' => $user->periodo_id,
|
||||
':facultad_id' => $user->facultad['facultad_id'],
|
||||
@@ -27,13 +27,21 @@ try {
|
||||
];
|
||||
$data = $db->query(
|
||||
"WITH horarios AS (
|
||||
SELECT *,
|
||||
SELECT
|
||||
horario_id,
|
||||
horario_fecha_inicio,
|
||||
horario_fecha_fin,
|
||||
horario_grupo,
|
||||
horario_hora,
|
||||
periodo_fecha_inicio,
|
||||
periodo_fecha_fin,
|
||||
salon,
|
||||
materia_nombre as materia,
|
||||
carrera_nombre as carrera,
|
||||
facultad_nombre as facultad,
|
||||
nivel_nombre as nivel,
|
||||
horario_hora + duracion_interval as horario_fin
|
||||
FROM horario
|
||||
FROM horario
|
||||
left JOIN materia USING (materia_id)
|
||||
JOIN carrera USING (carrera_id)
|
||||
JOIN nivel USING (nivel_id)
|
||||
@@ -52,7 +60,11 @@ try {
|
||||
SELECT * FROM ESTADO_SUPERVISOR WHERE (estado_color, estado_icon) = ('dark', 'ing-cancelar')
|
||||
)
|
||||
SELECT
|
||||
usuario.*, registro.*, profesor.*, horarios.*, fechas.*,
|
||||
usuario.usuario_nombre,
|
||||
registro.registro_id, registro.registro_fecha, registro.registro_retardo, registro.registro_justificada, comentario, registro_fecha_supervisor justificacion, registro_fecha_justificacion,
|
||||
profesor.profesor_id, profesor_nombre, profesor_clave, profesor_correo,
|
||||
horarios.*,
|
||||
registro_fecha_ideal,
|
||||
COALESCE(estado_supervisor.estado_supervisor_id, sin_registro.estado_supervisor_id) as estado_supervisor_id,
|
||||
COALESCE(estado_supervisor.nombre, sin_registro.nombre) as nombre,
|
||||
COALESCE(estado_supervisor.estado_color, sin_registro.estado_color) as estado_color,
|
||||
|
||||
Reference in New Issue
Block a user