tieneAcceso()){ header("Location: ".$pag."?error=3"); exit(); } unset($objValida); if(!isset($_POST["mat"], $_POST["gpo"])){ header("Location: ".$pag."?error=0"); exit(); } $mat = filter_input(INPUT_POST, "mat", FILTER_SANITIZE_NUMBER_INT);//limpia texto $gpo = filter_input(INPUT_POST, "gpo", FILTER_SANITIZE_NUMBER_INT);//limpia texto $gpo_nom = trim(filter_input(INPUT_POST, "gpo_nom", FILTER_SANITIZE_STRING,array('flags' => FILTER_FLAG_STRIP_LOW)));//limpia texto if(!empty($_POST["sub"])){ $sub = filter_input(INPUT_POST, "sub", FILTER_SANITIZE_NUMBER_INT);//limpia texto } $usr = $_SESSION["usuario_id"]; $usr_nombre = $_SESSION["usuario_nombre"]." ".$_SESSION["usuario_apellidos"]; if(isset($_POST["prof"]) && !empty($_POST["prof"])){ $usr = filter_input(INPUT_POST, "prof", FILTER_SANITIZE_NUMBER_INT);//limpia texto $stmt = $pdo->prepare('Select * from fs_usuario(:usr)'); $stmt->bindParam(":usr", $usr); if(!$stmt->execute()){ header("Location: ".$pag."?error=5"); exit(); }else{ $usr_rs = $stmt->fetch(); $usr_nombre = $usr_rs["Usuario_nombre"]." ".$usr_rs["Usuario_apellidos"]; } $stmt->closeCursor(); } //------- include_once('../../include/xTemplate/xtemplate.class.php'); // including mpdf.php include_once('../../include/mpdf/autoload.php'); // including mpdf.php include_once('../classes/PlanCatedra.php'); $stylesheet = ""; $planObj = new PlanCatedra($pdo); if(!$planObj->generaCalendario($usr, $usr_nombre, $mat, $gpo, $gpo_nom, $sub)){ header("Location: ../syllabus.php?error=3"); exit(); } $planObj->pdfPlan($stylesheet); ?>