예제 #1
0
 public function run()
 {
     Eloquent::unguard();
     DB::table('grados')->delete();
     Grado::create(['id' => 1, 'nombre' => 'Prejardín', 'abrev' => 'Prej', 'orden' => 1, 'nivel_educativo_id' => 1]);
     Grado::create(['id' => 2, 'nombre' => 'Jardín', 'abrev' => 'Jar', 'orden' => 2, 'nivel_educativo_id' => 1]);
     Grado::create(['id' => 3, 'nombre' => 'Preescolar', 'abrev' => 'Pree', 'orden' => 3, 'nivel_educativo_id' => 1]);
     Grado::create(['id' => 4, 'nombre' => 'Kínder', 'abrev' => 'Kin', 'orden' => 4, 'nivel_educativo_id' => 1]);
     Grado::create(['id' => 5, 'nombre' => 'Transición', 'abrev' => 'Tra', 'orden' => 5, 'nivel_educativo_id' => 1]);
     Grado::create(['id' => 6, 'nombre' => 'Primero', 'abrev' => '1', 'orden' => 6, 'nivel_educativo_id' => 2]);
     Grado::create(['id' => 7, 'nombre' => 'Segundo', 'abrev' => '2', 'orden' => 7, 'nivel_educativo_id' => 2]);
     Grado::create(['id' => 8, 'nombre' => 'Tercero', 'abrev' => '3', 'orden' => 8, 'nivel_educativo_id' => 2]);
     Grado::create(['id' => 9, 'nombre' => 'Cuarto', 'abrev' => '4', 'orden' => 9, 'nivel_educativo_id' => 2]);
     Grado::create(['id' => 10, 'nombre' => 'Quinto', 'abrev' => '5', 'orden' => 10, 'nivel_educativo_id' => 2]);
     Grado::create(['id' => 11, 'nombre' => 'Sexto', 'abrev' => '6', 'orden' => 11, 'nivel_educativo_id' => 3]);
     Grado::create(['id' => 12, 'nombre' => 'Séptimo', 'abrev' => '7', 'orden' => 12, 'nivel_educativo_id' => 3]);
     Grado::create(['id' => 13, 'nombre' => 'Octavo', 'abrev' => '8', 'orden' => 13, 'nivel_educativo_id' => 3]);
     Grado::create(['id' => 14, 'nombre' => 'Noveno', 'abrev' => '9', 'orden' => 14, 'nivel_educativo_id' => 3]);
     Grado::create(['id' => 15, 'nombre' => 'Décimo', 'abrev' => '10', 'orden' => 15, 'nivel_educativo_id' => 4]);
     Grado::create(['id' => 16, 'nombre' => 'Once', 'abrev' => '11', 'orden' => 16, 'nivel_educativo_id' => 4]);
     $this->command->info('Grados agregados con éxito.');
 }
예제 #2
0
 private function getParametros(Grado $grad)
 {
     $parametros = array(':idGrado' => $grad->getIdGrado(), ':nombre' => $grad->getNombre());
     return $parametros;
 }
예제 #3
0
    //comparamos el tiempo transcurrido
    if ($tiempo_transcurrido >= 600) {
        //si pasaron 10 minutos o más
        session_destroy();
        // destruyo la sesión
        header("Location: ../index.html");
        //envío al usuario a la pag. de autenticación
        //sino, actualizo la fecha de la sesión
    } else {
        $_SESSION["ultimoAcceso"] = $ahora;
    }
}
require '../header.php';
include_once "../Modelo/MAgente.php";
include_once "../Modelo/MGrado.php";
$mg = new Grado();
$ma = new Agente();
$sx = $ma->Cargar_Agentes();
$sy = $mg->Elegir_Grado();
while ($row = mysql_fetch_array($sy)) {
    $cmgrado .= " <option value='" . $row['Nombre'] . "'>" . $row['Nombre'] . "</option>";
}
?>

 <h1 style="margin-top: -60px;">AGENTES POLICIALES</h1>
<div class="row" style="margin-top: -200px;">
          <table class="table table-striped table-bordered" style="margin-top: 80px;">
            <thead>
              <tr>
                <th style="background:black; color:white; text-align: center;">ID</th>
                <th style="background:black; color:white; text-align: center;">CI</th>
예제 #4
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Grado the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Grado::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
예제 #5
0
 public function datosAcademicosMovil()
 {
     try {
         $idPersona = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL;
         $this->vista->set('titulo', 'Datos Academicos');
         $matricula = new Matricula();
         $matr = $matricula->leerMatriculaPorId($idPersona);
         $salon = new Salon();
         $sal = $salon->leerSalonePorId($matr->getIdSalon());
         $grado = new Grado();
         $grad = $grado->leerGradoPorId($sal->getIdGrado());
         $pensum = new Pensum();
         $pens = $pensum->leerPensum($matr->getIdSalon());
         $respuesta = "";
         $respuesta .= '<table >
                 <tr>
                 <td align="left" class="color-text-azul" colspan="6"><h3>Datos Academicos</h3></td>    
                 </tr>
                 </table>
                 <table style="font-size: 11px" width="98%" border="0" cellspacing="0" cellpadding="2" align="center" class="table tBlue">
                 <tr class="modo1">
                 <td width="25%"><b>Materia</td>
                 <td width="15%"><b>P.1</b></td>
                 <td width="15%"><b>P.2</b></td>
                 <td width="15%"><b>P.3</b></td>
                 <td width="15%"><b>P.4</b></td>
                 <td width="15%"><b>Prom.</b></td>
                 </tr>
                 
                 
                 ';
         $cont = 0;
         $s1 = 0;
         $s2 = 0;
         $s3 = 0;
         $s4 = 0;
         foreach ($pens as $pen) {
             $cont++;
             $respuesta .= '
                         <tr>';
             $mat = new Materia();
             $materia = $mat->leerMateriaPorId($pen->getIdMateria());
             foreach ($materia as $mate) {
                 $respuesta .= '<td width="25%"><b> ' . $mate->getNombreMateria() . '</b> </td>';
             }
             $nota = new Nota();
             $not = $nota->leerNotaEstudiante($idPersona, $pen->getIdMateria());
             $respuesta .= '<td width="15%">' . $not->getPrimerP() . '</td>';
             $respuesta .= '<td width="15%">' . $not->getSegundoP() . '</td>';
             $respuesta .= '<td width="15%">' . $not->getTercerP() . '</td>';
             $respuesta .= '<td width="15%">' . $not->getCuartoP() . '</td>';
             $prom = round($nota->calcularDef2($not->getprimerP(), $not->getSegundoP(), $not->getTercerP(), $not->getCuartoP()), 2);
             //$prom=$prom/4;
             $respuesta .= '<td width="15%" class="color-text-azul">' . $prom . '</td>';
             $respuesta .= '</tr>';
             $s1 += $not->getPrimerP();
             $s2 += $not->getSegundoP();
             $s3 += $not->getTercerP();
             $s4 += $not->getCuartoP();
         }
         $p1 = round($s1 / $cont, 2);
         $p2 = round($s2 / $cont, 2);
         $p3 = round($s3 / $cont, 2);
         $p4 = round($s4 / $cont, 2);
         //$pg = round((($p1 + $p2 + $p3 + $p4 ) /4), 2);
         $pg = round($nota->calcularDef2($p1, $p2, $p3, $p4), 2);
         $this->vista->set('grado', $grad);
         $this->vista->set('matricula', $matr);
         $this->vista->set('tabla', $respuesta);
         $this->vista->set('p1', $p1);
         $this->vista->set('p2', $p2);
         $this->vista->set('p3', $p3);
         $this->vista->set('p4', $p4);
         $this->vista->set('pg', $pg);
         return $this->vista->imprimir();
     } catch (Exception $exc) {
         echo 'Error de aplicacion: ' . $exc->getMessage();
     }
 }
예제 #6
0
    $tiempo_transcurrido = strtotime($ahora) - strtotime($fechaGuardada);
    //comparamos el tiempo transcurrido
    if ($tiempo_transcurrido >= 600) {
        //si pasaron 10 minutos o más
        session_destroy();
        // destruyo la sesión
        header("Location: ../index.html");
        //envío al usuario a la pag. de autenticación
        //sino, actualizo la fecha de la sesión
    } else {
        $_SESSION["ultimoAcceso"] = $ahora;
    }
}
require '../header.php';
include_once "../Modelo/MGrado.php";
$md = new Grado();
$ID = $_REQUEST['ID'];
$sx = $md->Modificar_Grado($ID);
$Nm = "";
$Dc = "";
$Tf = 0;
while ($row = mysql_fetch_array($sx)) {
    $Nm = $row['Nombre'];
    $Dc = $row['Direccion'];
    $Tf = $row['Telefono'];
}
?>
 <form action="../Controlador/C_Grado.php" method="POST">
<div class="container" >
<h2 style="font-size: 40px; color:black; margin-left: 55px; margin-top: 55px;">Modificar Grado Policial</h2>
 <section class="content bgcolor-1" style="margin-left: 80px;">
예제 #7
0
<?php

include_once '../Modelo/MGrado.php';
include_once '../Modelo/MBitacora.php';
$md = new Grado();
$bi = new Bitacora();
date_default_timezone_set("America/Asuncion");
$fecha = date("Y/m/d");
$hora = date("h:i:s");
$ac = "Eliminar Grado Policial";
if (isset($_POST['Registrar'])) {
    $datos['Nombre'] = $_POST['Nombre'];
    $datos['Cantidad'] = 0;
    $datos['Estado'] = 1;
    $sx = $md->Insertar($datos);
    header("Location: ../Vista/VGrado.php");
}
if (isset($_POST['Modificar'])) {
    $datos['Nombre'] = $_POST['Nombre'];
    $datos['ID'] = $_POST['ID'];
    $sx = $md->Modificar($datos);
    header("Location: ../Vista/VGrado.php");
}
if (isset($_POST['Eliminar'])) {
    $datos['Nombre'] = $_POST['Nombre'];
    $bt['CI_Oficial'] = 9001961;
    $bt['Fecha'] = $fecha;
    $bt['Hora'] = $hora;
    $bt['Accion'] = $ac;
    $bt['Motivo'] = $_POST['Motivo'];
    $sx = $md->Eliminar($datos);
 protected function guardar_combos($CODIGO_DANE_SEDE, $TIPO_JORNADA, $GRADO, $GRUPO_CURSO)
 {
     if ($CODIGO_DANE_SEDE != "") {
         if ($TIPO_JORNADA != "") {
             $jornada = Jornada::model()->find("idjornada=" . $TIPO_JORNADA . " AND codigo_dane_sede='" . $CODIGO_DANE_SEDE . "'");
             if ($jornada == null) {
                 $newjornada = new Jornada();
                 $newjornada->idjornada = $TIPO_JORNADA;
                 $newjornada->codigo_dane_sede = $CODIGO_DANE_SEDE;
                 $newjornada->jornada = JornadaEducativa::model()->findByPk($TIPO_JORNADA)->Descripcion;
                 $newjornada->save();
             }
             if ($GRADO != "") {
                 $grado = Grado::model()->find("idgrado=" . $GRADO . " AND jornada_id=" . $TIPO_JORNADA . " AND codigo_dane_sede='" . $CODIGO_DANE_SEDE . "'");
                 if ($grado == null) {
                     $newgrado = new Grado();
                     $newgrado->jornada_id = $TIPO_JORNADA;
                     $newgrado->codigo_dane_sede = $CODIGO_DANE_SEDE;
                     $newgrado->idgrado = $GRADO;
                     $newgrado->grado = GradoEducativo::model()->find("Codigo=" . $GRADO)->Descripcion;
                     $newgrado->save();
                 }
                 if ($GRUPO_CURSO != "") {
                     $grupo = Grupo::model()->find("grado=" . $GRADO . " AND grupo_curso=" . $GRUPO_CURSO . " AND codigo_dane_sede='" . $CODIGO_DANE_SEDE . "'");
                     if ($grupo == null) {
                         $newgrupo = new Grupo();
                         $newgrupo->grado = $GRADO;
                         $newgrupo->codigo_dane_sede = $CODIGO_DANE_SEDE;
                         $newgrupo->grupo_curso = $GRUPO_CURSO;
                         $newgrupo->save();
                     }
                 }
             }
         }
     }
 }
예제 #9
0
    $tiempo_transcurrido = strtotime($ahora) - strtotime($fechaGuardada);
    //comparamos el tiempo transcurrido
    if ($tiempo_transcurrido >= 600) {
        //si pasaron 10 minutos o más
        session_destroy();
        // destruyo la sesión
        header("Location: ../index.html");
        //envío al usuario a la pag. de autenticación
        //sino, actualizo la fecha de la sesión
    } else {
        $_SESSION["ultimoAcceso"] = $ahora;
    }
}
require '../header.php';
include_once "../Modelo/MGrado.php";
$md = new Grado();
$sx = $md->Cargar_Grado();
?>

 <h1 style="margin-top: -60px;">GRADO POLICIAL</h1>
<div class="row" style="margin-top: -90px;">
          <table class="table table-striped table-bordered">
            <thead>
              <tr>
                <th style="background:black; color:white; text-align: center;">Nombre</th>
                <th style="background:black; color:white; text-align: center;">Cantidad</th>
                <th style="background:black; color:white; text-align: center;">Acciones</th>
              </tr>
            </thead>
            <tbody>
                  <?php 
예제 #10
0
 public function actualizarLogrosMovil()
 {
     try {
         $this->vista->set('titulo', 'ingreso de Logros');
         $idDocente = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL;
         $carga = new Carga();
         $Cargas = $carga->leerCargasPorDocente($idDocente);
         $salones = array();
         foreach ($Cargas as $carga) {
             $salon = new Salon();
             $sal = $salon->leerSalonePorId($carga->getIdSalon());
             $salones[$sal->getIdSalon()] = $sal;
         }
         $grados = array();
         $i = 0;
         foreach ($salones as $salon) {
             $grados[$i] = $salon->getIdGrado();
             $i++;
         }
         $grads = array_unique($grados);
         $gradosNetos = array();
         for ($i = 0; $i < count($grads); $i++) {
             $gra = new Grado();
             $gradosNetos[$grads[$i]] = $gra->leerGradoPorId($grads[$i]);
         }
         $this->vista->set('grados', $gradosNetos);
         return $this->vista->imprimir();
     } catch (Exception $exc) {
         echo $exc->getTraceAsString();
     }
 }
예제 #11
0
 /**
  * Función Llamada Por Json Desde El formulario para Agregar Grado
  */
 public function agregarGrado()
 {
     try {
         $idGrado = isset($_POST['idGrado']) ? $_POST['idGrado'] : NULL;
         $nombre = isset($_POST['nombre']) ? $_POST['nombre'] : NULL;
         $grado = new Grado();
         $grado->setIdGrado($idGrado);
         $grado->setNombre($nombre);
         $grado->crearGrado($grado);
         echo json_encode(1);
     } catch (Exception $exc) {
         echo json_encode('Error de aplicacion: ' . $exc->getMessage());
     }
 }
예제 #12
0
<?php

include_once '../Modelo/MOficial.php';
include_once '../Modelo/MTipo_O.php';
include_once '../Modelo/MGrado.php';
include_once '../Modelo/MBitacora.php';
$md = new Oficial();
$mt = new Tipo_Oficial();
$mg = new Grado();
$bi = new Bitacora();
date_default_timezone_set("America/Asuncion");
$fecha = date("Y/m/d");
$hora = date("h:i:s");
$ac = "Eliminar Oficial Policial";
if (isset($_POST['Registrar'])) {
    $ID = $_POST['cmbTipo'];
    $Nombre = $_POST['cmbGrado'];
    $datos['CI'] = $_POST['CI'];
    $datos['Nombre'] = $_POST['Nombre'];
    $datos['Direccion'] = $_POST['Direccion'];
    $datos['Correo'] = $_POST['Correo'];
    $datos['Telefono'] = $_POST['Telefono'];
    $datos['Sexo'] = $_POST['cmbSexo'];
    $datos['Estado_Civil'] = $_POST['cmbEst_Civ'];
    $datos['Procedencia'] = $_POST['Procedencia'];
    $datos['Cargo'] = $_POST['cmbGrado'];
    $datos['Tipo'] = $_POST['cmbTipo'];
    $datos['Pass'] = $_POST['Password'];
    $datos['Servicio'] = 0;
    $datos['Estado'] = 1;
    $sx = $md->Insertar($datos);
예제 #13
0
 public function informePorSalon($idSalon)
 {
     $persona = new Persona();
     $pdf = new FPDF('P', 'cm', 'Letter');
     $personas = $persona->leerPorSalon($idSalon);
     foreach ($personas as $p) {
         $pdf->AddPage();
         $matricula = new Matricula();
         $matr = $matricula->leerMatriculaPorId($p->getIdPersona());
         $salon = new Salon();
         $sal = $salon->leerSalonePorId($matr->getIdSalon());
         $grado = new Grado();
         $grad = $grado->leerGradoPorId($sal->getIdGrado());
         $pensum = new Pensum();
         $pens = $pensum->leerPensum($matr->getIdSalon());
         $x = 1;
         $y = 1;
         $pdf->SetXY($x, $y);
         $pdf->SetFont("Times", "B", 12);
         $pdf->Cell(20, 1, 'Liceo Galois', 0, 0, "C");
         $y += 1;
         $pdf->SetXY($x, $y);
         $pdf->Cell(20, 1, utf8_decode('Reporte Académico'), 0, 0, "C");
         $y += 1;
         $pdf->SetXY($x, $y);
         $pdf->Cell(20, 1, strtoupper(utf8_decode($p->getPApellido() . " " . $p->getSApellido() . " " . $p->getNombres())), 0, 0, "C");
         $y += 1;
         $pdf->SetXY($x, $y);
         $pdf->SetFont("Times", "BI", 12);
         $pdf->Cell(5, 1, 'MATERIA', 1, 0, "C");
         $pdf->Cell(3, 1, '1er PERIODO', 1, 0, "C");
         $pdf->Cell(3, 1, '2do PERIODO', 1, 0, "C");
         $pdf->Cell(3, 1, '3er PERIODO', 1, 0, "C");
         $pdf->Cell(3, 1, '4to PERIODO', 1, 0, "C");
         $pdf->Cell(3, 1, 'PONDERADO', 1, 0, "C");
         $cont = 0;
         foreach ($pens as $pen) {
             $cont++;
             $y += 1;
             $pdf->SetXY($x, $y);
             $mat = new Materia();
             $materia = $mat->leerMateriaPorId($pen->getIdMateria());
             foreach ($materia as $mate) {
                 $pdf->Cell(5, 1, $mate->getNombreMateria(), 1, 0, "L");
             }
             $nota = new Nota();
             $not = $nota->leerNotaEstudiante($p->getIdPersona(), $pen->getIdMateria());
             $prom = round($nota->calcularDef2($not->getprimerP(), $not->getSegundoP(), $not->getTercerP(), $not->getCuartoP()), 2);
             $pdf->Cell(3, 1, $not->getPrimerP(), 1, 0, "C");
             $pdf->Cell(3, 1, $not->getSegundoP(), 1, 0, "C");
             $pdf->Cell(3, 1, $not->getTercerP(), 1, 0, "C");
             $pdf->Cell(3, 1, $not->getCuartoP(), 1, 0, "C");
             if ($prom < 30) {
                 $pdf->SetTextColor(190, 21, 34);
             } else {
                 $pdf->SetTextColor(0, 0, 0);
             }
             $pdf->Cell(3, 1, $prom, 1, 0, "C");
             $pdf->SetTextColor(0, 0, 0);
         }
     }
     $pdf->Output("REPORTE ACADEMICO GRADO " . $idSalon, "I");
 }