Stable 2-ago-2023

This commit is contained in:
2023-08-02 09:12:46 -06:00
parent 6a7c6b7ed9
commit f0cc3c585d
60 changed files with 6497 additions and 908 deletions

View File

@@ -0,0 +1,42 @@
<?
#input $_GET['id_espacio_sgu']
define("INFORMATION", [
'GET' => [
],
]);
#output rutas: [ ...ruta, salones: [{...salon}] ]
header('Content-Type: application/json charset=utf-8');
#return html
$ruta = "../";
require_once "../class/c_login.php";
// check method
try {
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// check parameters
$raw = file_get_contents('php://input');
$post_get = json_decode($raw, true);
$data = $db->get('estado_supervisor');
echo json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
} else {
http_response_code(405);
echo json_encode(['error' => 'method not allowed']);
exit;
}
} catch (PDOException $th) {
http_response_code(500);
echo json_encode([
'error' => $th->getMessage(),
'query' => $db->getLastQuery(),
'post_data' => $post_get,
], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
exit;
} catch (Exception $th) {
http_response_code(500);
echo json_encode([
'error' => $th->getMessage(),
], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
exit;
}