コード例 #1
0
 protected function process()
 {
     $this->custom_search = TRUE;
     $this->documento = new documento();
     /// desactivamos la barra de botones
     $this->show_fs_toolbar = FALSE;
     if (isset($_POST['descripcion'])) {
         /// si tenemos el id, buscamos el documento y así lo modificamos
         if (isset($_POST['iddocumento'])) {
             $docu0 = $this->documento->get($_POST['iddocumento']);
         } else {
             $docu0 = new documento();
             $docu0->iddocumento = $this->documento->nuevo_numero();
         }
         $docu0->descripcion = $_POST['descripcion'];
         if ($docu0->save()) {
             $this->new_message('Datos guardados correctamente.');
         } else {
             $this->new_error_msg('Imposible guardar los datos.');
         }
     } else {
         if (isset($_GET['delete'])) {
             $docu0 = $this->documento->get($_GET['delete']);
             if ($docu0) {
                 if ($docu0->delete()) {
                     $this->new_message('Identificador ' . $_GET['delete'] . ' eliminado correctamente.');
                 } else {
                     $this->new_error_msg('Imposible eliminar los datos.');
                 }
             }
         }
     }
 }
コード例 #2
0
ファイル: registro.php プロジェクト: anthonycab15/colegio
<?php

include_once "../../login/check.php";
include_once "../../class/rude.php";
include_once "../../class/alumno.php";
include_once "../../class/documento.php";
include_once "../../class/curso.php";
if (!empty($_POST)) {
    $CodAlumno = $_POST['CodAlumno'];
    $rude = new rude();
    $alumno = new alumno();
    $cur = new curso();
    $documento = new documento();
    $alu = $rude->mostrarTodoDatos($CodAlumno);
    $al = $alumno->mostrarTodoDatos($CodAlumno);
    $alu = array_shift($alu);
    $al = array_shift($al);
    if (count($alu) >= 1) {
        //Si ya hay algun registro
        $archivo = "actualizarrude.php";
        $titulo = $idioma['ModificarRude'];
    } else {
        $archivo = "guardarrude.php";
        $titulo = $idioma['RegistrarRude'];
    }
    $doc = $documento->mostrarDocumento($CodAlumno);
    $doc = array_shift($doc);
    ?>
    <div class="alert alert-info centrar"><strong><?php 
    echo mayuscula($titulo);
    ?>
コード例 #3
0
ファイル: guardarRude.php プロジェクト: anthonycab15/colegio
<?php

include_once "../../login/check.php";
if (!empty($_POST)) {
    /*echo "<pre>";
    	print_r($_POST);
    	echo "</pre>";*/
    include_once "../../class/rude.php";
    include_once "../../class/alumno.php";
    include_once "../funciones.php";
    include_once "../../class/documento.php";
    $rude = new rude();
    $alumno = new alumno();
    $doc = new documento();
    $fechaReg = date("Y-m-d H:i:s");
    $values = array("CodRude" => "NULL", "CodAlumno" => $_POST['CodAlumno'], "PaisN" => "'" . mb_strtolower($_POST['paisNacA'], "UTF-8") . "'", "ProvinciaN" => "'" . mb_strtolower($_POST['provinciaNacA'], "UTF-8") . "'", "LocalidadN" => "'" . mb_strtolower($_POST['localidadNacA'], "UTF-8") . "'", "Documento" => 1, "CertOfi" => "'{$_POST['oficialiaA']}'", "CertLibro" => "'{$_POST['libroA']}'", "CertPartida" => "'{$_POST['partidaA']}'", "CertFolio" => "'{$_POST['folioA']}'", "Paralelo" => "'A'", "Turno" => "'M'", "CodigoSie" => "'{$_POST['codigoSIEA']}'", "NombreUnidad" => "'" . mb_strtolower($_POST['unidadEducativaA'], "UTF-8") . "'", "ProvinciaE" => "'" . mb_strtolower($_POST['provinciaA'], "UTF-8") . "'", "MunicipioE" => "'" . mb_strtolower($_POST['seccionA'], "UTF-8") . "'", "ComunidadE" => "'" . mb_strtolower($_POST['localidadA'], "UTF-8") . "'", "LenguaMater" => "'{$_POST['lenguaMaterna']}'", "CastellanoI" => $_POST['lenguaCastellano'], "AymaraI" => $_POST['lenguaAymara'], "InglesI" => $_POST['lenguaIngles'], "PerteneceA" => "'{$_POST['identificaA']}'", "CentroSalud" => $_POST['centroSalud'], "VecesCentro" => "'{$_POST['vecesSalud']}'", "Discapacidad" => "'{$_POST['deficiencia']}'", "AguaDomicilio" => $_POST['aguaPotable'], "Electricidad" => $_POST['electricidad'], "Alcantarillado" => $_POST['alcantarillado'], "Trabaja" => "'{$_POST['trabaja']}'", "InternetCasa" => $_POST['internet'], "Transporte" => "'{$_POST['traslado']}'", "TiempoLlegada" => "'{$_POST['tiempo']}'", "InstruccionP" => "'{$_POST['instruccionP']}'", "IdiomaP" => "'{$_POST['idiomaP']}'", "ParentescoP" => "'{$_POST['parentescoP']}'", "InstruccionM" => "'{$_POST['instruccionM']}'", "IdiomaM" => "'{$_POST['idiomaM']}'", "Lugar" => "'EL ALTO'", "FechaReg" => "'{$fechaReg}'");
    $usuarioPadre = usuarioPadre($_POST['CedulaPadre'], $_POST['CedulaMadre']);
    $valuesAlumno = array("Paterno" => "'" . mb_strtolower($_POST['paterno'], "UTF-8") . "'", "Materno" => "'" . mb_strtolower($_POST['materno'], "UTF-8") . "'", "Nombres" => "'" . mb_strtolower($_POST['nombres'], "UTF-8") . "'", "LugarNac" => "'" . mb_strtolower($_POST['departamentoNacA'], "UTF-8") . "'", "FechaNac" => "'" . fecha2Str($_POST['fechaNac'], 0) . "'", "Ci" => "'{$_POST['numeroDoc']}'", "Sexo" => $_POST['sexo'], "Zona" => "'" . mb_strtolower($_POST['zonaA'], "UTF-8") . "'", "Calle" => "'" . mb_strtolower($_POST['calleA'], "UTF-8") . "'", "Numero" => "'" . mb_strtolower($_POST['numeroViviendaA'], "UTF-8") . "'", "CodCurso" => $_POST['curso'], "TelefonoCasa" => "'{$_POST['telefonoA']}'", "Celular" => "'{$_POST['celularA']}'", "Rude" => "'{$_POST['rude']}'", "ApellidosPadre" => "'" . mb_strtolower($_POST['ApellidosP'], "UTF-8") . "'", "NombrePadre" => "'" . mb_strtolower($_POST['nombresP'], "UTF-8") . "'", "CiPadre" => "'" . mb_strtolower($_POST['CedulaPadre'], "UTF-8") . "'", "OcupPadre" => "'" . mb_strtolower($_POST['ocupacionP'], "UTF-8") . "'", "CelularP" => "'" . mb_strtolower($_POST['telefonoP'], "UTF-8") . "'", "ApellidosMadre" => "'" . mb_strtolower($_POST['paternoM'], "UTF-8") . "'", "NombreMadre" => "'" . mb_strtolower($_POST['nombresM'], "UTF-8") . "'", "CiMadre" => "'" . mb_strtolower($_POST['CedulaMadre'], "UTF-8") . "'", "OcupMadre" => "'" . mb_strtolower($_POST['ocupacionM'], "UTF-8") . "'", "CelularM" => "'" . mb_strtolower($_POST['telefonoM'], "UTF-8") . "'", "UsuarioPadre" => "'{$usuarioPadre}'");
    //print_r($valuesAlumno);
    $alumno->actualizarDatosAlumno($valuesAlumno, $_POST['CodAlumno']);
    $ru = $rude->mostrarTodoDatos($_POST['CodAlumno']);
    if (count($ru) == 0) {
        $rude->insertarAlumno($values);
    }
    //else{echo "Duplicado";}
    /*DOCUMENTOS*/
    $CertificadoNac = $_POST['CertificadoNac'];
    if ($CertificadoNac == "on") {
        $CertificadoNac = 1;
    } else {
        $CertificadoNac = 0;
コード例 #4
0
<?php

include_once "../../login/check.php";
if (!empty($_POST)) {
    include_once "../../class/rude.php";
    include_once "../../class/alumno.php";
    include_once "../../class/documento.php";
    include_once "../funciones.php";
    $alumno = new alumno();
    $rude = new rude();
    $doc = new documento();
    $CodAlumno = $_POST['CodAlumno'];
    $fechaReg = date("Y-m-d H:i:s");
    $values = array("CodAlumno" => $_POST['CodAlumno'], "PaisN" => "'" . mb_strtolower($_POST['paisNacA'], "UTF-8") . "'", "ProvinciaN" => "'" . mb_strtolower($_POST['provinciaNacA'], "UTF-8") . "'", "LocalidadN" => "'" . mb_strtolower($_POST['localidadNacA'], "UTF-8") . "'", "Documento" => 1, "CertOfi" => "'{$_POST['oficialiaA']}'", "CertLibro" => "'{$_POST['libroA']}'", "CertPartida" => "'{$_POST['partidaA']}'", "CertFolio" => "'{$_POST['folioA']}'", "Paralelo" => "'A'", "Turno" => "'M'", "CodigoSie" => "'{$_POST['codigoSIEA']}'", "NombreUnidad" => "'" . mb_strtolower($_POST['unidadEducativaA'], "UTF-8") . "'", "ProvinciaE" => "'" . mb_strtolower($_POST['provinciaA'], "UTF-8") . "'", "MunicipioE" => "'" . mb_strtolower($_POST['seccionA'], "UTF-8") . "'", "ComunidadE" => "'" . mb_strtolower($_POST['localidadA'], "UTF-8") . "'", "LenguaMater" => "'{$_POST['lenguaMaterna']}'", "CastellanoI" => $_POST['lenguaCastellano'], "AymaraI" => $_POST['lenguaAymara'], "InglesI" => $_POST['lenguaIngles'], "PerteneceA" => "'{$_POST['identificaA']}'", "CentroSalud" => $_POST['centroSalud'], "VecesCentro" => "'{$_POST['vecesSalud']}'", "Discapacidad" => "'{$_POST['deficiencia']}'", "AguaDomicilio" => $_POST['aguaPotable'], "Electricidad" => $_POST['electricidad'], "Alcantarillado" => $_POST['alcantarillado'], "Trabaja" => "'{$_POST['trabaja']}'", "InternetCasa" => $_POST['internet'], "Transporte" => "'{$_POST['traslado']}'", "TiempoLlegada" => "'{$_POST['tiempo']}'", "InstruccionP" => "'{$_POST['instruccionP']}'", "IdiomaP" => "'{$_POST['idiomaP']}'", "ParentescoP" => "'{$_POST['parentescoP']}'", "InstruccionM" => "'{$_POST['instruccionM']}'", "IdiomaM" => "'{$_POST['idiomaM']}'", "Lugar" => "'EL ALTO'");
    $usuarioPadre = usuarioPadre($_POST['CedulaPadre'], $_POST['CedulaMadre']);
    $valuesAlumno = array("Paterno" => "'" . mb_strtolower($_POST['paterno'], "UTF-8") . "'", "Materno" => "'" . mb_strtolower($_POST['materno'], "UTF-8") . "'", "Nombres" => "'" . mb_strtolower($_POST['nombres'], "UTF-8") . "'", "LugarNac" => "'" . mb_strtolower($_POST['departamentoNacA'], "UTF-8") . "'", "FechaNac" => "'" . fecha2Str($_POST['fechaNac'], 0) . "'", "Ci" => "'{$_POST['numeroDoc']}'", "Sexo" => $_POST['sexo'], "Zona" => "'" . mb_strtolower($_POST['zonaA'], "UTF-8") . "'", "Calle" => "'" . mb_strtolower($_POST['calleA'], "UTF-8") . "'", "Numero" => "'" . mb_strtolower($_POST['numeroViviendaA'], "UTF-8") . "'", "CodCurso" => $_POST['curso'], "TelefonoCasa" => "'{$_POST['telefonoA']}'", "Celular" => "'{$_POST['celularA']}'", "Rude" => "'{$_POST['rude']}'", "ApellidosPadre" => "'" . mb_strtolower($_POST['ApellidosP'], "UTF-8") . "'", "NombrePadre" => "'" . mb_strtolower($_POST['nombresP'], "UTF-8") . "'", "CiPadre" => "'" . mb_strtolower($_POST['CedulaPadre'], "UTF-8") . "'", "OcupPadre" => "'" . mb_strtolower($_POST['ocupacionP'], "UTF-8") . "'", "CelularP" => "'" . mb_strtolower($_POST['telefonoP'], "UTF-8") . "'", "ApellidosMadre" => "'" . mb_strtolower($_POST['paternoM'], "UTF-8") . "'", "NombreMadre" => "'" . mb_strtolower($_POST['nombresM'], "UTF-8") . "'", "CiMadre" => "'" . mb_strtolower($_POST['CedulaMadre'], "UTF-8") . "'", "OcupMadre" => "'" . mb_strtolower($_POST['ocupacionM'], "UTF-8") . "'", "CelularM" => "'" . mb_strtolower($_POST['telefonoM'], "UTF-8") . "'", "UsuarioPadre" => "'{$usuarioPadre}'");
    $rude->actualizarDatosAlumno($values, $CodAlumno);
    $alumno->actualizarDatosAlumno($valuesAlumno, $CodAlumno);
    /*DOCUMENTOS*/
    $CertificadoNac = $_POST['CertificadoNac'];
    if ($CertificadoNac == "on") {
        $CertificadoNac = 1;
    } else {
        $CertificadoNac = 0;
    }
    $LibretaEsc = $_POST['LibretaEsc'];
    if ($LibretaEsc == "on") {
        $LibretaEsc = 1;
    } else {
        $LibretaEsc = 0;
    }
コード例 #5
0
<?php

include_once "../login/check.php";
if (!empty($_POST)) {
    include_once "../class/alumno.php";
    include_once "../class/tmp_alumno.php";
    include_once "../class/cuota.php";
    include_once "../class/documento.php";
    include_once "../class/config.php";
    include_once "../class/rude.php";
    include_once "../class/tmp_rude.php";
    $folder = "../";
    $alumno = new alumno();
    $cuota = new cuota();
    $documento = new documento();
    $tmpalumno = new tmp_alumno();
    $conf = new config();
    $classrude = new rude();
    $tmp_rude = new tmp_rude();
    $CodAlu = $_POST['CodAlu'];
    $tmprude = $tmp_rude->mostrarDatos($CodAlu);
    $tmprude = array_shift($tmprude);
    //	print_r($tmprude);
    //	exit();
    /**/
    //$cnf=$conf->mostrarConfig();
    $CodAlu = $_POST['CodAlu'];
    $Matricula = $_POST['Matricula'];
    $CodCurso = $_POST['Curso'];
    $Paterno = $_POST['Paterno'];
    $Materno = $_POST['Materno'];
コード例 #6
0
ファイル: iniciarnueva.php プロジェクト: anthonycab15/colegio
<?php

include_once "login/check.php";
include_once "class/alumno.php";
include_once "class/documento.php";
include_once "class/rude.php";
include_once "class/factura.php";
include_once "class/facturadetalle.php";
include_once "class/cuota.php";
include_once "class/tmpcola.php";
include_once "class/tmp_alumno.php";
$alumno = new alumno();
$cuota = new cuota();
$rude = new rude();
$documento = new documento();
$tmp_alumno = new tmp_alumno();
$facturadetalle = new facturadetalle();
$factura = new factura();
$tmpcola = new tmpcola();
$alumno->vaciar();
$cuota->vaciar();
$rude->vaciar();
$documento->vaciar();
$factura->vaciar();
$facturadetalle->vaciar();
$tmpcola->vaciar();
$tmp_alumno->iniciar();
コード例 #7
0
ファイル: reportedatos.php プロジェクト: anthonycab15/colegio
<?php

include_once "../../login/check.php";
if (isset($_POST)) {
    $folder = "../../";
    $CodAlumno = $_POST['CodAlumno'];
    include_once "../../class/alumno.php";
    include_once "../../class/curso.php";
    include_once "../../class/documento.php";
    $curso = new curso();
    $alumno = new alumno();
    $documento = new documento();
    $al = $alumno->mostrarTodoDatos($CodAlumno);
    $al = array_shift($al);
    $cur = $curso->mostrarCurso($al['CodCurso']);
    $cur = array_shift($cur);
    $doc = $documento->mostrarDocumento($al['CodAlumno']);
    $doc = array_shift($doc);
    $ima = $folder . "imagenes/alumnos/" . $al['Foto'];
    if (!file_exists($ima) || empty($al['Foto'])) {
        $ima = $folder . "imagenes/alumnos/0.jpg";
    }
    ?>
    <div class="box-header"><h2><i class="icon-user"></i><span class="break"></span><?php 
    echo $idioma['DatosAlumno'];
    ?>
</h2></div>
    <div class="box-content">
    	<div class="thumbnail pull-right span2">
    				<img src="<?php 
    echo $ima;
コード例 #8
0
<?php

include "../ReglasNegocio/documento.php";
include "../ReglasNegocio/contiene.php";
$rutp1 = $_POST["rutp1"];
$rutp2 = $_POST["rutp2"];
$rut = $rutp1 . '-' . $rutp2;
$ndoc = $_POST["NDocumento"];
$tipod = $_POST["tipod"];
$fechad = $_POST["fecha_reclamo"];
$obra = $_POST["obras"];
$observ = $_POST["ObservacionDoc"];
$size = $_SESSION["size"];
$cont = new contiene();
$doc = new documento();
$arr = $_SESSION["lista"];
$docs = $doc->Select($ndoc);
$selectdoc = mysql_fetch_array($docs);
if ($selectdoc == null) {
    $doc->Add($ndoc, $tipod, $fechad, $observ);
    for ($i = 0; $i < $size; $i++) {
        $n = "cantidadr" . $i;
        $bod = $arr[$i][3] + $_POST["{$n}"];
        $numoc = $_SESSION['oc'];
        $cont->Add($arr[$i][0], $_SESSION['oc'], $ndoc, $rut, $arr[$i][2], $arr[$i][3], $bod, $_POST["{$n}"], 0);
        $sql = "update contiene set CANTIDADBODEGA_CONTIENE=" . $bod . " where ID_MATERIAL=" . $arr[$i][0] . "and NUMERO_OC=" . "'{$numoc}'" . " and ID_DOCUMENTO='0' AND RUT_PROVEEDOR=" . "'{$rut}'";
        $accion = mysql_query($sql);
    }
}
コード例 #9
0
 function autocompletefactura()
 {
     $texIni = $_REQUEST['term'];
     $documento = new documento();
     $data = $documento->autocompletefactura($texIni);
     echo json_encode($data);
 }
コード例 #10
0
 $obra = $_POST["obras"];
 //objeto obra para obtener el id de la obra
 if ($obra == "Ninguna") {
     $idobra = 0;
 } else {
     $idobra = $obra;
 }
 //$obra1=new obra();
 //$rowobra=$obra1->Select($obra);
 //$idobra=mysql_fetch_array($rowobra);
 //observacion
 $observ = $_POST["ObservacionDoc"];
 //objeto clase contiene
 $cont = new contiene();
 //objeto clase documento
 $doc = new documento();
 //objeto clase stock
 $stock = new stock();
 //lista de materiales
 $arr = $_SESSION["lista1"];
 //buscar documento
 $docs = $doc->Select($ndoc);
 //if($docs==null){
 //validar cantidades
 $a = 0;
 for ($i = 0; $i < count($arr); $i++) {
     $n = "cantidadr" . $i;
     if ($_POST["{$n}"] > $arr[$i][2] - $arr[$i][3]) {
         $a = $i + 1;
     }
 }