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,24 @@
<?php
header('Content-Type: application/json');
$ruta = "../";
require_once "../class/c_login.php";
// check if the session is started
if (!isset($_SESSION['user']))
die(json_encode(['error' => 'No se ha iniciado sesión']));
$user = unserialize($_SESSION['user']);
$ruta = "../";
require_once "../include/bd_pdo.php";
$nivel = $db->where("id", $_POST['periodo'])->getOne("fs_periodo", "nivel_id");
$carreras = $db
->where("nivel", $nivel)
->where("facultad", $_POST['facultad'])
->get("fs_carrera", null, "id, carrera");
$user->print_to_log("Crea carrera", old: $_POST);
die(json_encode($carreras));