tieneAcceso()){
$objSesion->terminaSesion();
}
$objSesion->validaPeriodoUsuario();//si no tiene periodo manda a main
?>
printMenu();
//Obtiene grupos
$query = "";
if(isset($_POST["plan"]) && is_numeric($_POST["plan"])){
$query .= ":plan,";
$filter_plan = filter_input(INPUT_POST, "plan", FILTER_SANITIZE_NUMBER_INT);//limpia texto
}else{
$query .= "NULL,";
}
if((isset($_POST["prof"]) && is_numeric($_POST["prof"])) /*|| (!$_SESSION["administrativo"] && $_SESSION["profesor"]) */ ){
$query .= ":prof,";
//if($_SESSION["administrativo"])
$filter_prof = filter_input(INPUT_POST, "prof", FILTER_SANITIZE_NUMBER_INT);//limpia texto
//else
//$filter_prof = $_SESSION["usuario_id"];
}else{
$query .= "NULL,";
}
if(isset($_POST["fechai"]) && $_POST["fechai"]!= ""){
$query .= ":fechai,";
$filter_fecha_ini = fechaGuion(trim(filter_input(INPUT_POST, "fechai", FILTER_SANITIZE_STRING,array('flags' => FILTER_FLAG_STRIP_LOW))));//limpia texto
}else{
$query .= "NULL,";
}
if(isset($_POST["fechaf"]) && $_POST["fechaf"]!= ""){
$query .= ":fechaf,";
$filter_fecha_fin = fechaGuion(trim(filter_input(INPUT_POST, "fechaf", FILTER_SANITIZE_STRING,array('flags' => FILTER_FLAG_STRIP_LOW))));//limpia texto
}else{
$query .= "NULL,";
}
$stmt = $pdo->prepare('Select * from fs_reposicion(NULL, :periodo, '.$query.' 3, 0, '.MAX_ROWS.' )');//estado 3
$stmt->bindParam(":periodo", $_SESSION["periodo_id"]);
//if(isset($filter_extra)) $stmt->bindParam(":extra", $filter_extra);
if(isset($filter_plan)) $stmt->bindParam(":plan", $filter_plan);
if(isset($filter_prof)) $stmt->bindParam(":prof", $filter_prof);
if(isset($filter_fecha_ini)) $stmt->bindParam(":fechai", $filter_fecha_ini);
if(isset($filter_fecha_fin)) $stmt->bindParam(":fechaf", $filter_fecha_fin);
if(!$stmt->execute()){
print_r($stmt->errorInfo());
$errorDesc = "Ocurrió un error al cargar las reposiciones";
}else{
$reposiciones_rs = $stmt->fetchAll();
}
$stmt->closeCursor();
//Obtiene plan de estudios
$stmt = $pdo->prepare('Select * from fs_planestudio(:nivel, NULL, NULL, true, NULL, NULL)');
$stmt->bindParam(":nivel", $_SESSION["nivel_id"]);
if(!$stmt->execute()){
//print_r($stmt->errorInfo());
$errorDesc = "Ocurrió un error al cargar los planes de estudios";
}else
$plan_rs = $stmt->fetchAll();
$stmt->closeCursor();
//Profesores
if(!$_SESSION["administrativo"]){
$stmt = $pdo->prepare('Select * from fs_profesoresperiodo(:periodo, :prof, 0, NULL)');
$stmt->bindParam(":prof", $_SESSION["usuario_id"]);
}else
$stmt = $pdo->prepare('Select * from fs_profesoresperiodo(:periodo, NULL, 0, NULL)');
$stmt->bindParam(":periodo", $_SESSION["periodo_id"]);
if(!$stmt->execute()){
$errorDesc = "Error al obtener los profesores";
//print_r($stmt->errorInfo());
}
$profesores_rs = $stmt->fetchAll();
$stmt->closeCursor();
$stmt = null;
if(count($plan_rs) == 0){
header("Location: planestudios.php?error=4");
exit();
}
?>
Se muestran los primeros resultados. Utiliza los filtros para encontrar el examen que buscas.
Estado |
Profesor |
Materia |
Grupo |
Fecha |
Salón |
" id="id">
" title="">
"; ?>
|
|
|
|
|
|