Esempio n. 1
0
function mantenedorCurso($curso_ID)
{
    header('Content-Type: text/html; charset=iso-8859-1');
    $smarty = new Smarty();
    smartyTemplate($smarty, "../");
    require_once '../phpLib/SmartyToolbox.php';
    $class_curso = new curso();
    if ($curso_ID) {
        $titleCurso = "Editar Curso";
        $curso = $class_curso->obtenerCurso($curso_ID);
        $smarty->assign("curso_ID", $curso_ID);
        $smarty->assign("curso", $curso);
        $smarty->assign("cic_ID", $curso["FK_ciclo_cic_ID"]);
    } else {
        $titleCurso = "Crear Curso";
    }
    $smarty->assign("titleCurso", $titleCurso);
    $smarty->assign("listCiclos", $class_curso->listarCiclos());
    $smarty->display("ajax/mantenedorCurso.tpl");
}
Esempio n. 2
0
<?php

session_start();
require_once "../main_Lib.php";
validarAcceso(AuthUser::TIPO_UTP);
require_once "../smartyLib/Smarty.class.php";
include_once '../bean/EntityAlumnos.php';
include_once '../PHPCriteria/Criteria.php';
include_once '../PHPCriteria/criterion/Restrictions.php';
include_once '../PHPCriteria/criterion/Order.php';
$smarty = new Smarty();
smartyTemplate($smarty, "../");
require_once '../phpLib/SmartyToolbox.php';
$criteria = new Criteria();
$curso = $_GET['curso'];
$alumno = new EntityAlumnos();
$alumno->curso = $curso;
if (isset($_GET['exito']) && !isset($_POST['guardar']) && !isset($_POST['buscar'])) {
    if ($_GET['exito'] == "exito") {
        $smarty->assign("exito", "La Lista del curso ha sido guardada exitosamente");
    }
}
if (isset($_POST['guardar']) && postForm($_POST['postID'])) {
    if ($_POST['guardar'] == "guardar_lista") {
        $i = 1;
        foreach ($_POST['alumnos'] as $key => $rutAlumno) {
            $alumnoGuardar = new EntityAlumnos();
            $alumnoGuardar->rut = $rutAlumno;
            $criteria->find($alumnoGuardar);
            $alumnoGuardar->lista = $i++;
            $criteria->merge($alumnoGuardar);
Esempio n. 3
0
<?php

session_start();
require 'main_Lib.php';
include_once "class/class_style.php";
/***********************************
Librería para los templates
***********************************/
require "smartyLib/Smarty.class.php";
$smarty = new Smarty();
smartyTemplate($smarty);
$usuarioSIGA = new stdClass();
$colegioSIGA = new stdClass();
$bdSIGA = new stdClass();
$styleSIGA = new stdClass();
//$_SESSION['PATH'] = PATH;
DBconnect($dbh, "dorcl_siga");
//Seteando tiempo
$smarty->assign('fecha', $fecha_latin);
$smarty->assign('hora', HORA_SERVIDOR . " [hrs]");
$smarty->assign('ip', $_SERVER['REMOTE_ADDR']);
//Fin seteo de tiempo
$SQL = "SELECT * FROM usuarios";
$result = mysql_query($SQL, $dbh);
if (isset($_POST['login'])) {
    while ($usuarios = mysql_fetch_array($result, MYSQL_ASSOC)) {
        if ($_POST["login"] == $usuarios["login"] && $_POST["password"] == $usuarios["password"]) {
            $_SESSION["MATRICULA_ANIO"] = MATRICULA_ANIO;
            $_SESSION["token"] = "d076safs324szszfsfaeeqewrww15wwdsffgjf";
            $smarty->assign('name', $usuarios["login"]);
            $SQL = "SELECT * FROM colegios WHERE colegio_ID = '" . $usuarios['FK_colegios_colegio_ID'] . "'";