Exemplo n.º 1
0
 function index()
 {
     moveLocation('index.html', 0);
     //echo "XD";
     //header("http://localhost/SIGA1.2/index.html");
     //$data['titulo'] = "Este es el titulo";
     //$data['cuerpo'] = "Este es el cuerpo";
     //$this->load->view('welcome_message', $data);
 }
Exemplo n.º 2
0
 function Ciclos()
 {
     $class_curso = new curso();
     $class_transversales = new transversal();
     if (isset($_POST['cic_nombre'])) {
         $datos_ciclo['cic_nombre'] = $_POST['cic_nombre'];
         $class_curso->insertarCiclo($datos_ciclo);
         unset($_POST);
         moveLocation("", 0, "", "");
     }
     switch ($_POST['estado']) {
         case "guardar":
             $elementos['con'] = explode(",", $_POST['elementos']['con']);
             $elementos['sin'] = explode(",", $_POST['elementos']['sin']);
             $elementos['ciclo'] = $class_curso->obtenerCursosDelCiclo($_SESSION['aux_ciclo']);
             $elementos['nuevos'] = count($elementos['ciclo']) > 0 ? array_diff($elementos['con'], $elementos['ciclo']) : $elementos['con'];
             $elementos['eliminados'] = array_diff($elementos['ciclo'], $elementos['con']);
             $class_curso->guardarCursosEnCiclo(crearListado($elementos['con']), $_SESSION['aux_ciclo']);
             $class_curso->guardarCursosEnCiclo(crearListado($elementos['sin']), "NULL");
             $class_transversales->modificarTransversalesAlumnos($elementos['nuevos'], true);
             $class_transversales->modificarTransversalesAlumnos($elementos['eliminados'], false);
             //moveLocation("", 0, "", "");
             break;
         case "borrar":
             $class_curso->borrarCiclo($_SESSION['aux_ciclo']);
             moveLocation("", 0, "", "");
             break;
     }
     $cursos_sin_ciclo = $class_curso->obtenerCurosSinCiclos();
     $data['cursos_sin'] = $cursos_sin_ciclo;
     $data['ciclos'] = $class_curso->obtenerCiclos();
     //dpr($data['ciclos']);
     $data['titulo_der'] = "Ciclos de Educación";
     $data['path'] = "../../images/" . $_SESSION['path'];
     $this->load->view('UTP-ciclos.php', $data);
 }
Exemplo n.º 3
0
 function Ventas_menores()
 {
     $_SESSION['pagina_anterior'] = "ventas_menores";
     $class_transaccion = new transaccion();
     $class_mensualidad = new mensualidad();
     if (isset($_POST['tipo_pago'])) {
         $datos_historial['rut'] = $datos_transaccion['FK_alumnos_rut'] = '1-1';
         $datos_historial['abono'] = $datos_transaccion['trans_monto'] = $_POST['monto'];
         $datos_historial['tipo'] = $datos_transaccion['trans_tipo_pago'] = $_POST['tipo_pago'] == 'boleta' ? "IVA19" : "memo";
         $datos_historial['numboleta'] = $datos_transaccion['trans_num_boleta'] = $_POST['num_boleta'];
         $datos_historial['observacion'] = $datos_transaccion['trans_observaciones'] = $_POST['observaciones'];
         $datos_transaccion['trans_forma_pago'] = $_POST['forma_pago'];
         $datos_transaccion['trans_fecha_pago'] = date("Y-m-d");
         $datos_historial['fechapago'] = date("d-m-Y");
         if ($_POST['forma_pago'] != "efectivo") {
             $datos_transaccion['trans_banco'] = $_POST['banco'];
             $datos_transaccion['trans_num_documento'] = $_POST['num_doc'];
             if ($_POST['forma_pago'] == "cheque") {
                 $datos_transaccion['trans_fecha_vencimiento'] = $_POST['anio_cheque'] . "-" . $_POST['mes_cheque'] . "-" . $_POST['dia_cheque'];
             }
         }
         $trans_ID = $class_transaccion->insertarTransaccion($datos_transaccion);
         $datos_historial['FK_transaccion_trans_ID'] = $trans_ID;
         $datos_historial['hora'] = HORA_SERVIDOR;
         $datos_historial['user'] = $_SESSION['usuario']->login;
         $datos_historial['cuota'] = "IVA19";
         $class_mensualidad->insertarHistorial($datos_historial);
         $class_transaccion->insertarDetalleTransaccion($trans_ID, $_POST['monto'], "venta", "c0");
         unset($_POST);
         moveLocation(PATH_HTTP . "index.php/secretaria/ventas_menores", 0, "", "");
     }
     $data['titulo1'] = "Ventas ";
     $data['titulo2'] = "Menores";
     $data['usuario'] = $_SESSION['usuario']->login;
     $this->load->view('SEC-ventas_menores.php', $data);
 }
Exemplo n.º 4
0
$db = $_POST['db'];
$rut = $_POST['rut'];
$curso = $_POST['curso'];
$ramo = $_POST['ramo'];
$profesor = $_POST['profesor'];
$apellidop = $_POST['apellidop'];
$apellidom = $_POST['apellidom'];
$nombres = $_POST['nombres'];
$rut = $_POST['rut'];
$sexo = $_POST['sexo'];
$fechanac = $_POST['fechanac'];
$fechamatric = $_POST['fechamatric'];
$matricula = $_POST['matricula'];
$email = $_POST['email'];
$rutapo = $_POST['rutapo'];
$nombreapo = $_POST['nombreapo'];
$comuna = $_POST['comuna'];
$direccion = $_POST['direccion'];
$telefono = $_POST['telefono'];
$ocupacion = $_POST['ocupacion'];
$dbh = mysql_connect($host, $usuariodb, $clave) or die('I cannot connect to the database because: 							' . mysql_error());
mysql_select_db($db);
echo "La información del alumno {$apellidop} se está guardando, por favor tenga paciencia!!!<br>";
$sql = 'UPDATE `alumnos` SET `apellidop` = \'' . $apellidop . '\',`apellidom` = \'' . $apellidom . '\', `nombres` = \'' . $nombres . '\' WHERE CONVERT(`rut` USING utf8) = \'' . $rut . '\'';
mysql_query($sql, $dbh);
$sql2 = "UPDATE `apoderados` SET `rutapoderado` = " . "'" . $rutapo . "'," . "`telefono`=" . "'" . $telefono . "'," . "`direccion`=" . "'" . $direccion . "'," . "`nombre`=" . "'" . $nombreapo . "'," . " `comuna` = " . "'" . $comuna . "'," . "`sexo` = " . "'" . $sexo . "'," . "`fechanac` = " . "'" . $fechanac . "'," . "`fechamatric` = " . "'" . $fechamatric . "'," . "`ocupacion` = " . "'" . $ocupacion . "'," . "`email` = " . "'" . $email . "'," . "`estado` = 'matriculado' WHERE CONVERT( `rut` USING utf8 ) =" . "'" . $rut . "';";
mysql_query($sql2, $dbh);
moveLocation("ficha.php", 1, $rut, "rut");
?>
</body>
</html>
Exemplo n.º 5
0
$anios = array($anio - 3 => "Base de Datos a&ntilde;o " . ($anio - 3), $anio - 2 => "Base de Datos a&ntilde;o " . ($anio - 2), $anio - 1 => "Base de Datos a&ntilde;o " . ($anio - 1), $anio => "Base de Datos a&ntilde;o " . $anio, $anio + 1 => "Base de Datos a&ntilde;o " . ($anio + 1));
foreach ($anios as $key_anio => $valor_anio) {
    $vals_anio[] = $key_anio;
    $output_anio[] = $valor_anio;
    if ($_SESSION['base_datos']->anio == $key_anio) {
        $select_anio = $key_anio;
    }
}
$anio_cambio = $_POST['select_anio'];
if ($_POST['cambio_bd'] == 'temporal') {
    $_SESSION['base_datos']->anio = $anio_cambio;
    $_SESSION['base_datos']->nombrebd = "dorcl_" . $_SESSION['base_datos']->bd . $anio_cambio;
    moveLocation("UTP-cambiar_BD.php", 0);
}
if ($_POST['cambio_bd'] == 'permanente') {
    $_SESSION['base_datos']->anio = $anio_cambio;
    $_SESSION['base_datos']->nombrebd = "dorcl_" . $_SESSION['base_datos']->bd . $anio_cambio;
    DBCambioPermanente($anio_cambio);
    moveLocation("UTP-cambiar_BD.php", 0);
}
$menu[] = array("img" => "", "url" => "utp.php", "text" => "Volver", "title" => "Volver", "alt" => "Volver");
$menu[] = array("img" => "", "url" => "#", "text" => "Cambio BD", "title" => "Cambio BD " . $_SESSION['base_datos']->anio, "alt" => "", "id" => "", "class" => "current_page_item");
$smarty->assign("menu", $menu);
$smarty->assign("vals_anio", $vals_anio);
$smarty->assign("output_anio", $output_anio);
$smarty->assign("select_anio", $select_anio);
$smarty->assign("titulo_principal", "Cambio Base de Datos");
$smarty->assign("title", "UTP: Cambio Base de Datos");
$smarty->assign("titulo_secundario", "BD->" . $_SESSION['base_datos']->anio);
$smarty->assign("file_content", "utp/UTP-cambiar_BD.tpl");
$smarty->display('layout/main.tpl');
Exemplo n.º 6
0
smartyTemplate($smarty, "../");
$smarty->assign("titulo_browser", "Profesores");
$smarty->assign("colegio", $_SESSION['colegio']->nombre);
$smarty->assign("titulo_principal", "Unidad T&eacute;cnica Pedag&oacute;gica");
$smarty->assign("titulo_secundario", "BD->" . $_SESSION['base_datos']->anio);
$smarty->assign("path", $_SESSION['path']);
//$smarty->display("utp.tpl");
$smarty->assign("title", "U.T.P.");
$smarty->assign("file_sidebar", "SIDEBAR-utp.tpl");
$smarty->assign("menu", menuProfesores());
$smarty->assign("file_content", "utp.tpl");
$smarty->display('layout/main.tpl');
setHistoryGoBack();
if (!isset($_GET['code'])) {
    $code = null;
} else {
    $code = $_GET['code'];
}
switch ($code) {
    case 1:
        break;
    case 2:
        moveLocation("modificar_cursos.php", 0);
        break;
    case 3:
        moveLocation("notas/ramos.php", 0);
        break;
    case 4:
        moveLocation("profesores.php", 0);
        break;
}
Exemplo n.º 7
0
            $_SESSION['style'] = $styleSIGA;
            switch ($usuarios["tipo"]) {
                case "profesor":
                    moveLocation("profesor/profesores.php");
                    break;
                case "utp":
                    moveLocation("profesor/profesores.php");
                    break;
                case "secretaria":
                    moveLocation("secretaria/SEC-buscas.php");
                    break;
                case "super_usuario":
                    moveLocation("super_usuario.php");
                    break;
                case "matriculas":
                    moveLocation("matriculas/matriculas.php");
                    break;
                default:
                    echo "Este perfil no esta creado";
                    exit;
            }
            exit;
        }
    }
}
switch ($_GET['code']) {
    case 2:
        /* Error al poner la página en la URL */
        paginaError("02", "INGRESO INVALIDO");
        break;
    case 4:
Exemplo n.º 8
0
<?php

require 'main_Lib.php';
include_once 'class/class_siga.php';
include_once "class/class_style.php";
$sistema = $_GET['sistema'];
$_SESSION['path'] = $_GET['colegio_ID'];
$class_siga = new siga();
$_SESSION["MATRICULA_ANIO"] = MATRICULA_ANIO;
$_SESSION['colegio'] = $class_siga->obtenerColegio($_GET['colegio_ID']);
$_SESSION['base_datos'] = $class_siga->obtenerDB($_SESSION['colegio']->FK_db_db_ID);
$_SESSION['base_datos']->nombrebd = "dorcl_" . $_SESSION['path'] . $_SESSION['base_datos']->anio;
$styleSIGA = new stdClass();
$class_style = new style();
$style = $class_style->obtenerStyle($_SESSION['colegio']->colegio_ID);
$styleSIGA->style_ID = $style['style_ID'];
$styleSIGA->FK_colegios_colegio_ID = $style['FK_colegios_colegio_ID'];
$styleSIGA->style_css = $style['style_css'];
$styleSIGA->style_path = $style['style_path'];
$_SESSION['style'] = $styleSIGA;
switch ($sistema) {
    case "notas":
        moveLocation("profesor/profesores.php", 0);
        break;
    case "pagos":
        moveLocation("secretaria/SEC-buscas.php", 0);
        break;
}
exit;
Exemplo n.º 9
0
             /**
              *CAMBIO DE RUT EN BD COLEGIO 
              */
             $tablesRut = $class_siga->getTableWithRut($baseSelected);
             foreach ($tablesRut as $key => $table) {
                 $datos_set = array($table["field"] => $rut_nuevo);
                 $datos_where = array($table["field"] => $rut_viejo);
                 $class_alumno->cambiarRut($datos_set, $datos_where, $table["name"]);
             }
             dpr("El rut se ha cambiado de forma exitosa");
         }
     }
     break;
 case "salir":
     session_destroy();
     moveLocation("index-1.html", 0);
     break;
 case "guardarTheme":
     $datosStyle = $class_style->obtenerStyle($_GET['colegio_ID']);
     $datosStyle["style_path"] = $_GET['style_path'];
     $style_ID = $class_style->guardarStyle($datosStyle);
     $_SESSION['style']->style_ID = $style_ID;
     $_SESSION['style']->style_path = $_GET['style_path'];
     moveLocationFast("super_usuario.php");
     break;
 case "1":
     echo "Empesando el script que actualiza datos..";
     set_time_limit(9000);
     mysql_select_db(getBD());
     $alumnos = $class_alumno->obtenerAlumnos();
     $cursos = $class_curso->obtenerCursos();
Exemplo n.º 10
0
function validarAcceso($permisos = "todos", $path = PATH_HTTP)
{
    if ($_SESSION['token'] != TOKEN) {
        session_destroy();
        moveLocation($path . "ingreso.php", 0, 2);
    }
    switch ($permisos) {
        case "super_usuario":
            if ($_SESSION['usuario']->tipo != $permisos) {
                moveLocation($path . "ingreso.php", 0, 5);
            }
            break;
        case "utp":
            if ($_SESSION['usuario']->tipo != $permisos && $_SESSION['usuario']->tipo != AuthUser::TIPO_SUPER_USUARIO) {
                moveLocation($path . "ingreso.php", 0, 5);
            }
            break;
        case "profesor":
            if ($_SESSION['usuario']->tipo != $permisos && $_SESSION['usuario']->tipo != AuthUser::TIPO_SUPER_USUARIO && $_SESSION['usuario']->tipo != AuthUser::TIPO_UTP) {
                moveLocation($path . "ingreso.php", 0, 5);
            }
            break;
        case "secretaria":
            if ($_SESSION['usuario']->tipo != $permisos && $_SESSION['usuario']->tipo != AuthUser::TIPO_SUPER_USUARIO) {
                moveLocation($path . "ingreso.php", 0, 5);
            }
            break;
        default:
            break;
    }
    return true;
}
Exemplo n.º 11
0
 function index()
 {
     $ingreso_valido = false;
     session_destroy();
     $alumnoSIGA = new stdClass();
     $colegioSIGA = new stdClass();
     $bdSIGA = new stdClass();
     $rut = $_POST['rut'];
     DBconnect($dbh, "dorcl_siga");
     $SQL = "SELECT * FROM db INNER JOIN colegios AS c ON c.FK_db_db_ID = db_ID";
     $result = DBQuery($SQL, $dbh);
     while ($row = DBFetchArray($result)) {
         $bd = "dorcl_" . $row['bd'] . $row['anio'];
         $bdSIGA->db_ID = $row['db_ID'];
         $_SESSION['path'] = $bdSIGA->bd = $row['bd'];
         $bdSIGA->anio = $row['anio'];
         $bdSIGA->nombrebd = $bd;
         $_SESSION['base_datos'] = $bdSIGA;
         $SQL = "SELECT * FROM colegios WHERE FK_db_db_ID = '{$row['db_ID']}'";
         $colegioSIGA->nombre = $row['nombre'];
         $colegioSIGA->direccion = $row['direccion'];
         $colegioSIGA->telefono = $row['telefono'];
         $colegioSIGA->rbd = $row['rbd'];
         $_SESSION['colegio'] = $colegioSIGA;
         mysql_select_db($bd);
         //dpr($bd);
         $SQL = "SELECT * FROM alumnos WHERE rut = '{$rut}' AND ultima_matricula = '" . $row['anio'] . "'";
         $result3 = DBQuery($SQL, $dbh);
         //dpr($SQL);
         if ($row3 = DBFetchArray($result3)) {
             //dpr($row3);
             //dpr($_SESSION);
             $alumnoSIGA->rut = $row3['rut'];
             $alumnoSIGA->curso = $row3['curso'];
             $alumnoSIGA->nombres = $row3['nombres'];
             $alumnoSIGA->apellidop = $row3['apellidop'];
             $_SESSION['alumno'] = $alumnoSIGA;
             $data['nombre_alumno'] = $row3['nombres'] . " " . $row3['apellidop'];
             $_SESSION['token'] = TOKEN;
             $_SESSION['bd_siga'] = "dorcl_siga";
             //echo "XS";
             $ingreso_valido = true;
             break;
         }
     }
     //dpr($_SESSION);
     if ($ingreso_valido) {
         //dpr($_SESSION);
         //$ses = $_SERVER['HTTP_COOKIE'];
         //dpr($ses);
         $class_alumno = new alumno();
         $class_apoderado = new apoderado();
         $class_notas = new notas();
         $class_mensualidad = new mensualidad();
         $data['apoderado'] = $class_apoderado->obtenerApoderado($rut);
         $data['notas'] = $class_notas->obtenerNotasAlumno($rut);
         $data['mensualidad'] = $class_mensualidad->obtenerMensualidad($rut);
         //moveLocation("alumnos/ingreso",2,"","");
         $this->load->view('ALUM-ingreso_valido', $data);
         //moveLocation("alumnos/ingreso",2,"","");
     } else {
         moveLocation("../ingreso.php", 0, 6);
     }
 }
Exemplo n.º 12
0
    if ($_POST['forma_pago'] != "efectivo") {
        $datos_transaccion['trans_banco'] = $_POST['banco'];
        $datos_transaccion['trans_num_documento'] = $_POST['num_doc'];
        if ($_POST['forma_pago'] == "cheque") {
            $datos_transaccion['trans_fecha_vencimiento'] = $_POST['anio_cheque'] . "-" . $_POST['mes_cheque'] . "-" . $_POST['dia_cheque'];
        }
    }
    $trans_ID = $class_transaccion->insertarTransaccion($datos_transaccion);
    $datos_historial['FK_transaccion_trans_ID'] = $trans_ID;
    $datos_historial['hora'] = HORA_SERVIDOR;
    $datos_historial['user'] = $_SESSION['usuario']->login;
    $class_mensualidad->insertarHistorial($datos_historial);
    $class_mensualidad->pagoDeudaHistorica($_POST['monto'], $_POST['descuento'], $_POST['rut'], $trans_ID);
    unset($_POST);
    echo "Efectuando el movelocation";
    moveLocation("SEC-mensualidad.php", 0, $rut, "rut");
}
?>
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pago Deuda Histórica</title>
<link href="../css/dock_menu.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div style="width:650px;">
<fieldset>
    <legend>
        PAGO: <?php 
Exemplo n.º 13
0
    //------------------------------------------------------
    $observacion = "Pago de matrícula";
    $tipo = "matricula";
    $cuotaaux = "c0";
    echo "Guardando la información de la matrícula...<br>";
    $sql1 = 'INSERT INTO `historial` (`rut`, `fechapago`, `abono`, `tipo`,`cuota`, `hora`, `observacion`,`user`) VALUES (\'' . $rut . '\',\'' . $fechapago . '\',\'' . $c0 . '\',\'' . $cuotaaux . "','" . $tipo . "','" . HORA_SERVIDOR . "','" . $observacion . "','" . $usuario . '\');';
    mysql_query($sql1, $dbh);
    $sql2 = 'UPDATE `mensualidades` SET `c0` =\'' . $c0 . '\' WHERE CONVERT( `rut` USING utf8 ) = \'' . $rut . '\'';
    mysql_query($sql2, $dbh);
}
if ($pagodeuda) {
    echo "Guardando la información del abono...";
    $tipo = "deuda";
    //echo"O.o ------ > $pagodeuda<br> o.O ------------> $detalles";
    $deuda = $deuda - $pagodeuda;
    $observacion = $detalles;
    $abono = $deuda;
    if ($abono < 0) {
        echo "Ingresó una cantidad erronea";
    } else {
        $sql1 = 'INSERT INTO `historial` (`rut`, `fechapago`, `abono`, `tipo`, `hora`, `observacion`,`user`) VALUES (\'' . $rut . '\',\'' . $fechapago . '\',\'' . $pagodeuda . '\',\'' . $tipo . "','" . $horapago . "','" . $observacion . "','" . $usuario . '\');';
        mysql_query($sql1, $dbh);
        $sql2 = 'UPDATE `mensualidades` SET deuda =\'' . $deuda . '\' WHERE CONVERT( `rut` USING utf8 ) = \'' . $rut . '\'';
        //	echo "<br><br>$sql2";
        mysql_query($sql2, $dbh);
    }
}
//echo "SQL= $sql <br> N Cuota= $cuota Valor cuota acumulada=$valorcuota<br>";
//			echo" <meta http-equiv=`refresh` content=`2;URL=mensualidades.php?rut=$rut&token=$token&usuario=$usuario&clave=$clave&host=$host&usuariodb=$usuariodb&db=$db`>";
moveLocation("mensualidades.php", 0, "1&rut={$rut}");
Exemplo n.º 14
0
        foreach ($alumnos_sacar as $key => $rut_sacar) {
            $class_alumno->modificarCursoAlumno($rut_sacar);
        }
    }
    $_SESSION['curso_seleccionado'] = $_POST['curso'];
    unset($_POST);
    moveLocation("modificar_cursos.php", 0);
} elseif (isset($_POST['libt_ID2'])) {
    if (is_array($vals_alum_sin)) {
        $alumnos_sacar = array_diff($_POST['libt_ID2'], $vals_alum_sin);
    } else {
        $alumnos_sacar = $_POST['libt_ID2'];
    }
    if (count($alumnos_sacar) > 0) {
        foreach ($alumnos_sacar as $key => $rut_sacar) {
            $class_alumno->modificarCursoAlumno($rut_sacar);
        }
    }
    $_SESSION['curso_seleccionado'] = $_POST['curso'];
    unset($_POST);
    moveLocation("modificar_cursos.php", 0);
} elseif (isset($_POST['modificar_alumno'])) {
    $dato_alumno = array("rut" => $_POST['_rut'], "apellidop" => $_POST['_apellidop'], "apellidom" => $_POST['_apellidom'], "nombres" => $_POST['_nombres'], "lista" => $_POST['_lista'], "matricula" => $_POST['_matricula'], "curso" => $_POST['_curso']);
    DBConnect($dbh);
    DBBegin($dbh);
    $class_alumno->modificarAlumno($dato_alumno, $_POST['_rut_antiguo']);
    DBCommit($dbh);
    //DBRollback($dbh);
    $_SESSION['curso_seleccionado'] = $_POST['curso'];
    moveLocation("modificar_cursos.php", 0);
}
Exemplo n.º 15
0
    }
    $_SESSION['curso_seleccionado'] = $_POST['curso'];
    $_SESSION['ramo_seleccionado'] = $_POST['ramo'];
    unset($_POST);
    moveLocation("modificar_ramos.php", 0);
} elseif (isset($_POST['libt_ID2'])) {
    if (is_array($vals_alum_sin)) {
        $alumnos_sacar = array_diff($_POST['libt_ID2'], $vals_alum_sin);
    } else {
        $alumnos_sacar = $_POST['libt_ID2'];
    }
    if (count($alumnos_sacar) > 0) {
        foreach ($alumnos_sacar as $key => $rut_sacar) {
            $class_ramo->desincribirAlumno($rut_sacar);
        }
    }
    $_SESSION['curso_seleccionado'] = $_POST['curso'];
    $_SESSION['ramo_seleccionado'] = $_POST['ramo'];
    unset($_POST);
    moveLocation("modificar_ramos.php", 0);
}
unset($_SESSION['ramo_seleccionado']);
$menu[] = array("img" => "", "url" => "modificar_cursos.php", "text" => "Volver", "title" => "Volver", "alt" => "Volver");
$menu[] = array("img" => "", "url" => "#", "text" => "Curso " . mostrar_curso($curso), "title" => "Curso", "alt" => "", "id" => "", "class" => "current_page_item");
$menu[] = array("img" => "", "url" => "UTP-mantenedorRamos.php?curso=" . $curso, "text" => "Mantenedor Ramos", "title" => "Agregar/Eliminar Ramos", "alt" => "");
$smarty->assign("menu", $menu);
$smarty->assign("titulo_principal", mostrar_curso($curso, true));
$smarty->assign("title", "Modificar Cursos");
$smarty->assign("titulo_secundario", "Modificar curso");
$smarty->assign("file_content", "profesor/PROF-modificar_ramos.tpl");
$smarty->display('layout/main.tpl');
Exemplo n.º 16
0
$class_alumno = new alumno();
DBConnect($dbh);
$cursos = $class_alumno->obtenerAlumnosPorCurso();
$fp = fopen("libro_registros.xls", "w");
fwrite($fp, "Matrícula" . "\t" . "Apellidop" . "\t" . "Apellidom" . "\t" . "Nombres" . "\t" . "Sexo" . "\t" . "RUT" . "\t" . "Fec. Nac." . "\t" . "Curso" . "\t" . "Dirección" . "\t" . "Comuna" . "\t" . "Matrícula" . "\t" . "Procedencia" . "\t" . "Fec. Inc." . "\t" . "Curso Repite" . "\t" . "Fecha Retiro" . "\t" . "Causal Retiro" . "\t" . "Nivel Padre" . "\t" . "Nivel Madre" . "\t" . "Con quien vive" . "\t" . "RUT Apo" . "\t" . "Apoderado" . "\t" . "Teléfono" . "\n");
flock($fp, 2);
$matricula = 0;
$repite = null;
$fecharetiro = null;
$causalretiro = null;
$nivelpadre = null;
$nivelmadre = null;
$conquienvive = null;
foreach ($cursos as $curso => $datos) {
    $lista = 0;
    if (count($datos["alumnos"]) > 0) {
        foreach ($datos["alumnos"] as $rut => $datos_alumno) {
            $matricula++;
            $lista++;
            fwrite($fp, $matricula . "\t" . $datos_alumno["dato_alumno"]["apellidop"] . "\t" . $datos_alumno["dato_alumno"]["apellidom"] . "\t" . $datos_alumno["dato_alumno"]["nombres"] . "\t" . $datos_alumno["dato_apoderado"]["sexo"] . "\t" . $rut . "\t" . $datos_alumno["dato_apoderado"]["fechanac"] . "\t" . mostrar_curso($datos_alumno["dato_alumno"]["curso"]) . "\t" . $datos_alumno["dato_apoderado"]["direccion"] . "\t" . $datos_alumno["dato_apoderado"]["comuna"] . "\t" . $matricula . "\t" . $datos_alumno["dato_apoderado"]["procedencia"] . "\t" . $datos_alumno["dato_apoderado"]["fechamatric"] . "\t" . $repite . "\t" . $fecharetiro . "\t" . $causalretiro . "\t" . $nivelpadre . "\t" . $nivelmadre . "\t" . $conquienvive . "\t" . $datos_alumno["dato_apoderado"]["rutapoderado"] . "\t" . $datos_alumno["dato_apoderado"]["nombre"] . "\t" . $datos_alumno["dato_apoderado"]["telefono"] . "\n");
            $SQL = "update alumnos SET matricula = '{$matricula}', lista = '{$lista}' WHERE rut = '{$rut}'";
            DBQuery($SQL, $dbh);
            flock($fp, 3);
        }
    }
}
echo "Su información se está procesando, por favor espere un momento...<br>";
echo "Si no carga de forma automática favor hacer click <a href='libro_registros.xls'>acá</a> ";
fclose($fp);
moveLocation("libro_registros.xls");
Exemplo n.º 17
0
<?php

session_start();
require "../main_Lib.php";
if ($_SESSION['token'] != $token) {
    session_destroy();
    moveLocation("../ingreso.php", 0, 2);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>IVA</title>
</head>

<body>
<table width="600" border="1">
<tr>
    <td width="100">Fecha</td>
    <td width="100">Boleta Inicial</td>
	<td width="100">Boleta Final</td>
    <td width="300">Total</td>
  </tr>
<?php 
//require('../tiempo.php');
DBConnect($dbh);
$totalmes = 0;
for ($i = 1; $i <= 31; $i++) {
    $fechadia = "{$i}/" . $mes . "/2008";
    $totaldia = 0;
Exemplo n.º 18
0
$transacciones = $class_transaccion->obtenerTransacciones($rut);
$alumno = $class_alumno->obtenerAlumno($rut);
if ($_SESSION['token'] != $token) {
    session_destroy();
    moveLocation("../ingreso.php", 0, 2);
}
if (isset($_POST['trans'])) {
    foreach ($_POST['trans'] as $trans_ID => $datos) {
        $datos_historial['numboleta'] = $datos['trans_num_boleta'];
        $datos_historial['tipo'] = $datos['tipo'];
        if ($datos_historial['numboleta'] > 0) {
            $class_transaccion->actualizarHistorial($datos_historial, array('FK_transaccion_trans_ID' => $trans_ID));
            $class_transaccion->actualizarTransacciones(array("trans_num_boleta" => $datos['trans_num_boleta'], 'trans_tipo_pago' => $datos['tipo']), array('trans_ID' => $trans_ID));
        }
    }
    moveLocation("SEC-historial.php", 0, $rut, "rut");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" href="../jquery.tablesorter/css/jq.css" type="text/css" media="print, projection, screen" />
    <link rel="stylesheet" href="../jquery.tablesorter/themes/blue/style.css" type="text/css" id="" media="print, projection, screen" />
    <link rel="stylesheet" href="../css/main.css" type="text/css" id="" media="print, projection, screen" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Historial</title>
    <link href="../css/dock_menu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="banner">
	<h1><?php