Initial state
This commit is contained in:
24
action/action_carreras.php
Normal file
24
action/action_carreras.php
Normal 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));
|
||||
Reference in New Issue
Block a user