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

View File

@@ -0,0 +1,33 @@
<?php
$ruta = "../";
require_once "../class/c_login.php";
extract($_POST);
/* print_r($claves);
exit; */
$fecha = DateTime::createFromFormat('d/m/Y', $fecha);
if (isset($hora)) {
$claves = [[
'clave' => $clave,
'hora' => $hora,
'id' => $id
]];
}
foreach ($claves as $horario)
try {
$profesor_id = $horario["clave"];
query("SELECT fi_registrar_asistencia(:id::INT, FALSE, ARRAY[ NOW(), :fecha::DATE + :hora::TIME ]::TIMESTAMP[], :profesor_id::INT, TRUE)", [
":fecha" => $fecha->format('Y-m-d'),
":hora" => $horario["hora"],
":id" => $horario["id"],
":profesor_id" => $profesor_id
]);
}
catch (Exception $e) {
die( json_encode(["error" => $e->getMessage()]) );
}
die(json_encode(["success" => true]));