Stable
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
<?
|
||||
header('Content-Type: application/json charset=utf-8');
|
||||
$ruta = "../";
|
||||
require_once "../class/c_login.php";
|
||||
|
||||
$universidad_la_salle = $db
|
||||
->where('salon', 'UNIVERSIDAD LA SALLE', 'ILIKE')
|
||||
->getOne('salon_view');
|
||||
|
||||
$rutas =
|
||||
array_map(
|
||||
function (&$ruta) use ($db) {
|
||||
$ruta['subrutas'] =
|
||||
$db
|
||||
->where('id_espacio_padre', $ruta['id_espacio_sgu'])
|
||||
->orderBy('salon')
|
||||
->get('salon_view');
|
||||
return $ruta;
|
||||
|
||||
},
|
||||
$db
|
||||
->where('id_espacio_padre', $universidad_la_salle['id_espacio_sgu'])
|
||||
->orderBy('salon')
|
||||
->get('salon_view')
|
||||
);
|
||||
|
||||
// echo json_encode($universidad_la_salle, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); EXIT;
|
||||
<?
|
||||
header('Content-Type: application/json charset=utf-8');
|
||||
$ruta = "../";
|
||||
require_once "../class/c_login.php";
|
||||
|
||||
$universidad_la_salle = $db
|
||||
->where('salon', 'UNIVERSIDAD LA SALLE', 'ILIKE')
|
||||
->getOne('salon_view');
|
||||
|
||||
$rutas =
|
||||
array_map(
|
||||
function ($ruta) use ($db) {
|
||||
$ruta['subrutas'] =
|
||||
$db
|
||||
->where('id_espacio_padre', $ruta['id_espacio_sgu'])
|
||||
->orderBy('salon')
|
||||
->get('salon_view');
|
||||
return $ruta;
|
||||
|
||||
},
|
||||
$db
|
||||
->where('id_espacio_padre', $universidad_la_salle['id_espacio_sgu'])
|
||||
->orderBy('salon')
|
||||
->get('salon_view')
|
||||
);
|
||||
|
||||
// echo json_encode($universidad_la_salle, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); EXIT;
|
||||
echo json_encode($rutas, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||
Reference in New Issue
Block a user