Commit Bulk
This commit is contained in:
26
action/asistenciasprofesor_select.php
Normal file
26
action/asistenciasprofesor_select.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
$ruta = "../";
|
||||
require_once "../class/c_login.php";
|
||||
|
||||
// check if the session is started
|
||||
if (!isset($_SESSION['user']))
|
||||
die('No se ha iniciado sesión');
|
||||
|
||||
$user = unserialize($_SESSION['user']);
|
||||
|
||||
if(!isset($_POST["id"]) || !isset($_POST["hor"])){
|
||||
$return["error"] = "Error! No se recibió la información del usuario.";
|
||||
}else{
|
||||
$id = filter_input(INPUT_POST, "id", FILTER_SANITIZE_NUMBER_INT);//limpia texto
|
||||
$hor = filter_input(INPUT_POST, "hor", FILTER_SANITIZE_NUMBER_INT);//limpia texto
|
||||
|
||||
$rs = $db->query('SELECT * from fs_asistenciaprofesor_horario(:id, :hor)', [':id' => $id, ':hor' => $hor]);
|
||||
$asistArr = array();
|
||||
|
||||
foreach($rs as $row){
|
||||
$asistArr[] = $row["registro_fecha_ideal"];
|
||||
}
|
||||
$return["asistenciaArr"] = $asistArr;
|
||||
}
|
||||
echo json_encode($return);
|
||||
?>
|
||||
Reference in New Issue
Block a user