***********************************/ require "../smartyLib/Smarty.class.php"; $smarty = new Smarty(); smartyTemplate($smarty, "../"); $class_ramo = new ramo(); $areas = $class_ramo->obtenerAreas(); $tipos = $class_ramo->obtenerTipos(); $class_personas = new Personas(); $curso = $_GET["curso"]; $colegio_ID = $_SESSION["colegio"]->colegio_ID; $mostrac_curso = ""; if (str_word_count($curso) == 0) { $smarty->assign("error", "Debe tener seleccionado un curso"); } else { $mostrar_curso = mostrar_curso($curso); $personas = $class_personas->listaPersonal($colegio_ID, "docente"); } if (postForm($_POST['postID']) && $_POST['postID'] > 0) { $ramo = PHPBind::post(new EntityRamos()); $persona = new EntityPersonas(); if (!($ramo->profesor > 0)) { $smarty->assign("error", "Debe seleccionar un profesor"); } else { $persona->per_ID = $ramo->profesor; $persona = $class_personas->buscarPersona($persona); $ramo->profesor = $persona->per_nombres . " " . $persona->per_apellidop . " " . $persona->per_apellidom; $criteria->persist($ramo); $smarty->assign("exito", "El ramo ha sido creado exitosamente"); } } $num = $class_ramo->lastNum($curso);
<?php session_start(); require "../main_Lib.php"; validarAcceso(AuthUser::TIPO_UTP); require "../smartyLib/Smarty.class.php"; $smarty = new Smarty(); smartyTemplate($smarty, "../"); require_once '../phpLib/SmartyToolbox.php'; include_once '../class/class_personas.php'; $class_personas = new Personas(); $listaPersonalTipo = $class_personas->listaPersonalTipo(); $pers_tipo = $_GET['tipo']; $listPersonas = $class_personas->listaPersonal($_SESSION['colegio']->colegio_ID, $pers_tipo); $smarty->assign("titulo_principal", "Docentes"); $smarty->assign("titulo_secundario", "Listado"); $smarty->assign("listPersonas", $listPersonas); $smarty->assign("listaPersonalTipo", $listaPersonalTipo); $smarty->assign("file_content", "persona/PER-listado.tpl"); //$smarty->display("utp.tpl"); $smarty->assign("title", "Listado Personas"); $smarty->assign("pers_tipo", $pers_tipo); $menu[] = array("img" => "../images/xls.png", "url" => getHistoryGoBack(), "text" => "Volver", "title" => "Volver", "alt" => "Volver"); $menu[] = array("img" => "", "url" => "#", "text" => "Listado Profesores", "title" => "Listado Personal", "alt" => "Listado Personal", "id" => "", "class" => "current_page_item"); $smarty->assign("menu", $menu); $smarty->display('layout/main.tpl');