public function buscarEstudiantexCodigo($codigo)
 {
     $estudiante = new Estudiante();
     $sqltxt = "select * from s_estudiante where k_codigo_est = " . $codigo . "";
     $stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
     //echo $sqltxt;
     oci_execute($stid);
     while (oci_fetch($stid)) {
         //$persona->setCodigo_persona(oci_result($stid, 'CODIGO'));
         $estudiante->setCodigo_estudiante(oci_result($stid, 'K_CODIGO_EST'));
         $estudiante->setDocumento_estudiante(oci_result($stid, 'K_DOCUMENTO'));
         $estudiante->setMatriculas_estudiante(oci_result($stid, 'C_MATRICULA'));
         $estudiante->setActivo_estudiante(oci_result($stid, 'N_ACTIVO'));
         $estudiante->setCarrera_estudiante(oci_result($stid, 'N_CARRERA'));
         $estudiante->setPromedio_estudiante(oci_result($stid, 'C_PROMEDIO'));
         $estudiante->setAval_solicitud(oci_result($stid, 'B_AVALSOL'));
     }
     //echo (string)$estudiante->getCodigo_estudiante();
     //echo $estudiante->getCarrera_estudiante();
     //echo $estudiante->getMatriculas_estudiante();
     //echo $estudiante->getCodigo_estudiante();
     //echo $persona->getApellido_persona();
     return $estudiante;
 }
Example #2
0
<?php

require "persona.php";
$persona = new Persona("45368554G", "Paco", 32121, "ayer", 3);
$persona1 = new Persona("45368556K", "Fabricio", 35116, "14/12/1993", 0);
$estudiante = new Estudiante("45368554G", "Paco", 32121, "ayer", 0, 3, 1);
$estudiante1 = new Estudiante("45368556K", "Fabricio", 35116, "14/12/1993", 4, 2, 2);
$estudiante2 = new Estudiante("45365987G", "Juan", 35124, "hoy", 5, 1, 3);
// array normal
$arrayEstudiantes = array($estudiante, $estudiante1, $estudiante2);
// array con clave - valor
$arrayEstudiantes1 = array($estudiante->getId() => $estudiante, $estudiante1->getId() => $estudiante1, $estudiante2->getId() => $estudiante2);
// recorrer array normal
goto a;
foreach ($arrayEstudiantes as $valor) {
    echo $valor->getNombre();
}
a:
// recorrer array con clave - valor
$a = $estudiante->getId();
foreach ($arrayEstudiantes1 as $a => $valor) {
    echo $valor->getNombre();
}
function conectar()
{
    include "connection.php";
}
// echo "<br>DNI: " . $persona->getNif() . "<br>";
// echo "Nombre: " . $persona->getNombre() . "<br>";
// echo "Codigo postal: " . $persona->getCPostal() . "<br>";
// echo "Fecha nacimiento: " . $persona->getFnac() . "<br>";
 /**
  * Eliminar un Estudiante Dado el $estudianteId
  *
  * @param $estudianteId
  */
 public function removeEstudiante($estudianteId)
 {
     $objetoPerdidoBean = new ObjetoPerdidoBean($this->persistenceManager);
     $prestamoBean = new PrestamoBean($this->persistenceManager);
     $impresionBean = new ImpresionBean($this->persistenceManager);
     $monitorBean = new MonitorBean($this->persistenceManager);
     $estudiante = new Estudiante();
     $estudiante->setId($estudianteId);
     # Validamos los campos
     if (!EntityValidator::validateId($estudianteId)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 148);
     }
     # Verificamos que la entidad exista.
     if (!$this->estudianteBean->getEstudiante($estudiante)) {
         throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 149);
     }
     # Verificamos que la entidad no esté siendo utilziada en alguna otra.
     # Verificamos que la entidad no esté siendo utilziada en ObjetoPerdido->objetoPerdidoEstudiante
     $objetoPerdidos = $objetoPerdidoBean->getObjetoPerdidosByObjetoPerdidoEstudiante($estudiante);
     if (count($objetoPerdidos) > 0) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_LINKED_FAIL, $this->ID + 144);
     }
     # Verificamos que la entidad no esté siendo utilziada en Prestamo->prestamoEstudiante
     $prestamos = $prestamoBean->getPrestamosByPrestamoEstudiante($estudiante);
     if (count($prestamos) > 0) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_LINKED_FAIL, $this->ID + 145);
     }
     # Verificamos que la entidad no esté siendo utilziada en Impresion->impresionEstudiante
     $impresions = $impresionBean->getImpresionsByImpresionEstudiante($estudiante);
     if (count($impresions) > 0) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_LINKED_FAIL, $this->ID + 146);
     }
     # Verificamos que la entidad no esté siendo utilziada en Monitor->monitorEstudiante
     $monitors = $monitorBean->getMonitorsByMonitorEstudiante($estudiante);
     if (count($monitors) > 0) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_LINKED_FAIL, $this->ID + 147);
     }
     # Eliminamos la entidad
     if (!$this->estudianteBean->removeEstudiante($estudiante)) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_FAIL, $this->ID + 150);
     }
 }
 public function getAsignarCitacion($id = null)
 {
     $citas = Citacion::all();
     $estudiantes = Estudiante::all();
     return View::make('administrador.asignarcitacion')->with('estudiantes', $estudiantes)->with('citas', $citas);
 }
Example #5
0
 public function observadorSantaTeresita($idPersona)
 {
     $estudiante = new Estudiante();
     $est = $estudiante->leerPorId($idPersona);
     $estudiante->leerDatos($idPersona, $est);
     $estudiante->leerNacimiento($idPersona, $est);
     $estudiante->leerUbicacion($idPersona, $est);
     $estudiante->leerPadre($idPersona, $est);
     $estudiante->leerMadre($idPersona, $est);
     $estudiante->leerAcudiente($idPersona, $est);
     $ape = $est->getPApellido() . " " . $est->getSApellido();
     $nom = $est->getNombres();
     $sexo = $est->getSexo();
     $tel = $est->getTelefono();
     $fecha_nac = $est->getFNacimiento();
     $lugar_nac = $est->getMunicipioNacimiento();
     $direccion = $est->getDireccion();
     $barrio = $est->getBarrio();
     $tipo_doc = $est->getTipoDocumento();
     $eps = $est->getEps();
     $procedencia = $est->getInstProcedencia();
     $id_padre = $est->getIdPadre();
     $nom_padre = $est->getNombresPadre();
     $ape_padre = $est->getApellidosPadre();
     $ocupacion_padre = $est->getOcupacionPadre();
     $tel1_padre = $est->getTelPadre();
     $tel2_padre = $est->getTelOficinaPadre();
     $direccion_padre = $est->getDirPadre();
     $id_madre = $est->getIdMadre();
     $nom_madre = $est->getNombresMadre();
     $ape_madre = $est->getApellidosMadre();
     $ocupacion_madre = $est->getOcupacionMadre();
     $tel1_madre = $est->getTelMadre();
     $tel2_madre = $est->getTelOficinaMadre();
     $direccion_madre = $est->getDirMadre();
     $id_acud = $est->getIdAcudiente();
     $nom_acu = $est->getNombresAcudiente();
     $ape_acu = $est->getApellidosAcudiente();
     $ocupacion_acu = $est->getOcupacionAcudiente();
     $tel1_acu = $est->getTelAcudiente();
     $tel2_acu = $est->getTelOficinaAcudiente();
     $direccion_acu = $est->getDirAcudiente();
     $fecha = getdate();
     $FechaTxt = $fecha["year"] . "-" . $fecha["mon"] . "-" . $fecha["mday"];
     if ($fecha["month"] == 'December' or $fecha["month"] == 'November' or $fecha["month"] == 'October') {
         $año = $fecha["year"];
         $añoLectivo = $año + 1;
     } else {
         $añoLectivo = $fecha["year"];
     }
     $matricula = new Matricula();
     $mat = $matricula->leerMatriculaPorId($idPersona);
     $matriculas = $matricula->leerMatriculasPorId($idPersona);
     $pdf = new FPDF('L', 'cm', 'Legal');
     $pdf->AddPage();
     $x = 2;
     $y = 1;
     $pdf->SetFont("Arial", "B", 20);
     $pdf->SetXY($x - 1, $y);
     $pdf->Cell(18, 1, "COLEGIO SANTA TERESITA", 0, 0, "C");
     $pdf->SetFont("Arial", "B", 20);
     $pdf->SetXY($x + 13, $y);
     $pdf->Cell(18, 1, "OBSERVADOR DEL ALUMNO", 0, 0, "C");
     $pdf->SetFont("Arial", "", 14);
     $y += 1;
     $pdf->SetXY($x - 1, $y);
     $pdf->cell(18, 0.5, "Educamos para hacer posible la vida y la felicidad", 0, 0, "C");
     $pdf->Image('utiles/imagenes/escudoSantaTeresita.jpg', 0.5, 0.5, 3, 3);
     $pdf->Image('utiles/imagenes/escudoSantaTeresita.jpg', 30, 0.5, 2, 3);
     $x = 0.5;
     $y += 2;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->cell(5, 0.5, "APELIIDOS Y NOMBRES:", 0, 0, "l");
     //Linea1
     $pdf->Line($x + 4.5, $y + 0.5, $x + 15, $y + 0.5);
     $pdf->SetXY($x + 5, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($est->getPApellido() . " " . $est->getSApellido() . " " . $est->getNombres())), 0, 0, "L");
     $pdf->SetXY($x + 16.5, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(7.5, 0.5, "N. Padre:", 0, 0, "L");
     //Linea2
     $pdf->Line($x + 18.5, $y + 0.5, $x + 27, $y + 0.5);
     $pdf->SetXY($x + 18.5, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($nom_padre . " " . $ape_padre)), 0, 0, "L");
     $pdf->SetXY($x + 27.5, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2.5, 0.5, "VIVE:", 0, 0, "L");
     $pdf->SetXY($x + 29, $y - 0.25);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 1, "SI", 1, 0, "C");
     $pdf->SetXY($x + 30, $y - 0.25);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 1, "NO", 1, 0, "C");
     $vec = ["P", "J", "T", "1°", "2°", "3°", "4°", "5°", "6°", "7°", "8°", "9°", "10°", "11°"];
     $y += 0.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "", 11);
     $pdf->Cell(2, 1, utf8_decode("GRADO"), 0, 0, "L");
     $pdf->SetXY($x, $y + 1);
     $pdf->SetFont("Arial", "", 11);
     $pdf->Cell(2, 1, utf8_decode("AÑO"), 0, 0, "L");
     $pdf->SetXY($x + 16.5, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Ocupación:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 18.5, $y + 0.75, $x + 24, $y + 0.75);
     $pdf->SetXY($x + 18.5, $y + 0.25);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($ocupacion_padre)), 0, 0, "L");
     $pdf->SetXY($x + 24, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Tel Emergencia:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 26.5, $y + 0.75, $x + 32, $y + 0.75);
     $pdf->SetXY($x + 27, $y + 0.25);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($tel1_padre)), 0, 0, "L");
     //____________MADRE
     $pdf->SetXY($x + 16.5, $y + 1.25);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(7.5, 0.5, "N. Madre:", 0, 0, "L");
     //Linea2
     $pdf->Line($x + 18.5, $y + 1.75, $x + 27, $y + 1.75);
     $pdf->SetXY($x + 18.5, $y + 1.25);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($nom_madre . " " . $ape_madre)), 0, 0, "L");
     $pdf->SetXY($x + 27.5, $y + 1.25);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2.5, 0.5, "VIVE:", 0, 0, "L");
     $pdf->SetXY($x + 29, $y + 1);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 1, "SI", 1, 0, "C");
     $pdf->SetXY($x + 30, $y + 1);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 1, "NO", 1, 0, "C");
     $pdf->SetXY($x + 16.5, $y + 1.75);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Ocupación:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 18.5, $y + 2.5, $x + 24, $y + 2.5);
     $pdf->SetXY($x + 18.5, $y + 2);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($ocupacion_madre)), 0, 0, "L");
     $pdf->SetXY($x + 24, $y + 1.75);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Tel Emergencia:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 26.5, $y + 2.5, $x + 32, $y + 2.5);
     $pdf->SetXY($x + 27, $y + 2);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($tel1_madre)), 0, 0, "L");
     //_______________________ACUDIENTE
     $pdf->SetXY($x + 16.5, $y + 2.75);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(7.5, 0.5, "Acudiente:", 0, 0, "L");
     //Linea2
     $pdf->Line($x + 18.5, $y + 3.25, $x + 27, $y + 3.25);
     $pdf->SetXY($x + 18.5, $y + 2.75);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($nom_acu . " " . $ape_acu)), 0, 0, "L");
     $pdf->SetXY($x + 27.5, $y + 2.75);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2.5, 0.5, "PARENTESCO:", 0, 0, "L");
     //Linea2
     $pdf->Line($x + 30.25, $y + 3.25, $x + 32, $y + 3.25);
     $pdf->SetXY($x + 29, $y + 1);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 1, "SI", 1, 0, "C");
     $pdf->SetXY($x + 30, $y + 1);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 1, "NO", 1, 0, "C");
     $pdf->SetXY($x + 16.5, $y + 3.25);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Ocupación:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 18.5, $y + 4, $x + 24, $y + 4);
     $pdf->SetXY($x + 18.5, $y + 3.5);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($ocupacion_acu)), 0, 0, "L");
     $pdf->SetXY($x + 24, $y + 3.25);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Tel Emergencia:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 26.5, $y + 4, $x + 32, $y + 4);
     $pdf->SetXY($x + 27, $y + 3.5);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($tel1_acu)), 0, 0, "L");
     $pdf->SetXY($x + 16.5, $y + 3.75);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Dirección:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 18.5, $y + 4.5, $x + 25, $y + 4.5);
     $pdf->SetXY($x + 18.5, $y + 4);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($direccion)), 0, 0, "L");
     $pdf->SetXY($x + 25, $y + 3.75);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Barrio:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 26.5, $y + 4.5, $x + 32, $y + 4.5);
     $pdf->SetXY($x + 27, $y + 4);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($barrio)), 0, 0, "L");
     $pdf->SetXY($x + 16.5, $y + 4.5);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Correo Electronico:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 19.75, $y + 5.25, $x + 27, $y + 5.25);
     $pdf->SetXY($x + 27.2, $y + 4.5);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Ciudad:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 28.6, $y + 5.25, $x + 32, $y + 5.25);
     $pdf->SetXY($x + 28.5, $y + 4.75);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($est->getMunicipioResidencia())), 0, 0, "L");
     $pdf->SetXY($x + 16.5, $y + 5);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Aficiones Personales:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 20, $y + 5.75, $x + 32, $y + 5.75);
     $grupo = "";
     $x += 2;
     //CICLO
     foreach ($vec as $v) {
         $band = 0;
         $pdf->SetXY($x, $y);
         $pdf->SetFont("Arial", "B", 11);
         if (strlen($v) == 4) {
             $g = substr($v, 0, 2);
         } else {
             $g = $v[0];
         }
         if ($matriculas != null) {
             foreach ($matriculas as $ma) {
                 $salon = new Salon();
                 $sal = $salon->leerSalonePorId($ma->getIdSalon());
                 if ($sal->getIdGrado() == $g) {
                     $band++;
                     $pdf->Cell(1, 1, utf8_decode($v), 1, 0, "C");
                     $pdf->SetXY($x, $y + 1);
                     $pdf->SetFont("Arial", "", 11);
                     $pdf->Cell(1, 1, utf8_decode(substr($ma->getAnoLectivo(), 2, 2)), 1, 0, "C");
                 }
             }
         }
         $salon = new Salon();
         $sal = $salon->leerSalonePorId($mat->getIdSalon());
         if ($sal->getIdGrado() == $g) {
             $band++;
             $pdf->Cell(1, 1, utf8_decode($v), 1, 0, "C");
             $pdf->SetXY($x, $y + 1);
             $pdf->SetFont("Arial", "", 11);
             $pdf->Cell(1, 1, utf8_decode(substr($mat->getAnoLectivo(), 2, 2)), 1, 0, "C");
             $grupo = $sal->getGrupo();
         }
         if ($band == 0) {
             $pdf->Cell(1, 1, utf8_decode($v), 1, 0, "C");
             $pdf->SetXY($x, $y + 1);
             $pdf->SetFont("Arial", "", 11);
             $pdf->Cell(1, 1, utf8_decode(""), 1, 0, "C");
         }
         $x++;
     }
     $y += 2.25;
     $x = 0.5;
     $pdf->SetXY($x, $y);
     $pdf->Cell(4, 0.5, utf8_decode("Fecha de Ingreso:"), 0, 0, "L");
     $pdf->SetXY($x + 3.5, $y);
     $pdf->Cell(1, 0.5, utf8_decode(""), 1, 0, "L");
     $pdf->SetXY($x + 4.5, $y);
     $pdf->Cell(1, 0.5, utf8_decode(""), 1, 0, "L");
     $pdf->SetXY($x + 5.5, $y);
     $pdf->Cell(1, 0.5, utf8_decode(""), 1, 0, "L");
     $pdf->SetXY($x + 7, $y);
     $pdf->Cell(1.5, 0.5, utf8_decode("GRUPO:"), 0, 0, "L");
     $pdf->SetXY($x + 8.75, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 0.5, utf8_decode($grupo), 1, 0, "L");
     $pdf->SetXY($x + 10.5, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1.5, 0.5, utf8_decode("Repitente:"), 0, 0, "L");
     $pdf->SetXY($x + 13, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 0.5, utf8_decode("SI"), 1, 0, "C");
     $pdf->SetXY($x + 14, $y);
     $pdf->Cell(1, 0.5, utf8_decode("NO"), 1, 0, "C");
     $y += 0.6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1.5, 0.5, utf8_decode("Fecha de Nacimiento:"), 0, 0, "L");
     $f = explode("-", $fecha_nac);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->SetXY($x + 4, $y);
     $pdf->Cell(1, 0.5, utf8_decode($f[2]), 1, 0, "C");
     $pdf->SetXY($x + 5, $y);
     $pdf->Cell(1, 0.5, utf8_decode($f[1]), 1, 0, "C");
     $pdf->SetXY($x + 6, $y);
     $pdf->Cell(1, 0.5, utf8_decode($f[0]), 1, 0, "C");
     $pdf->SetXY($x + 7.25, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1.5, 0.5, utf8_decode("Sexo:"), 0, 0, "L");
     $pdf->SetXY($x + 8.5, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 0.5, utf8_decode($sexo), 1, 0, "C");
     $pdf->SetXY($x + 9.75, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1, 0.5, utf8_decode("L. Nacimiento:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 12.5, $y + 0.5, $x + 16, $y + 0.5);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->SetXY($x + 12.5, $y);
     $pdf->Cell(1, 0.5, utf8_decode($lugar_nac), 0, 0, "L");
     $y += 0.6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1.5, 0.5, utf8_decode("Cuidado Especial:"), 0, 0, "L");
     $pdf->SetXY($x + 3.1, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(1, 0.5, utf8_decode("SI"), 1, 0, "C");
     $pdf->SetXY($x + 4.1, $y);
     $pdf->Cell(1, 0.5, utf8_decode("NO"), 1, 0, "C");
     $pdf->SetXY($x + 5.5, $y - 0.25);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("Teléfono:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 7.2, $y + 0.5, $x + 10, $y + 0.5);
     $pdf->SetXY($x + 7.2, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($tel)), 0, 0, "L");
     $pdf->SetXY($x + 10.5, $y - 0.25);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("E.P.S:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 11.7, $y + 0.5, $x + 16, $y + 0.5);
     $pdf->SetXY($x + 11.7, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($eps)), 0, 0, "L");
     $y += 0.6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1.5, 0.5, utf8_decode("Enfermedad De Cuidado:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 4.2, $y + 0.5, $x + 12, $y + 0.5);
     $pdf->SetXY($x + 12.5, $y - 0.25);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(2, 1, utf8_decode("R.H:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 13.7, $y + 0.5, $x + 16, $y + 0.5);
     $pdf->SetXY($x + 13.7, $y);
     $pdf->SetFont("Arial", "B", 10);
     $pdf->Cell(7.5, 0.5, utf8_decode(strtoupper($est->getTipoSanguineo())), 0, 0, "L");
     $y += 0.6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1.5, 0.5, utf8_decode("Medicamentos Exclusivos:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 4.5, $y + 0.5, $x + 16, $y + 0.5);
     $y += 0.6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "", 10);
     $pdf->Cell(1.5, 0.5, utf8_decode("Institución educativa de donde procede:"), 0, 0, "L");
     //Linea2
     $pdf->Line($x + 6.5, $y + 0.5, $x + 16, $y + 0.5);
     //TABLAAA_________________
     $y += 0.6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "b", 12);
     $pdf->Cell(2.5, 0.75, utf8_decode("FECHA"), 1, 0, "C");
     $pdf->SetXY($x + 2.5, $y);
     $pdf->Cell(0.75, 0.75, utf8_decode("P"), 1, 0, "C");
     $pdf->SetXY($x + 3.25, $y);
     $pdf->Cell(0.75, 0.75, utf8_decode("T"), 1, 0, "C");
     $pdf->SetXY($x + 4, $y);
     $pdf->Cell(9, 0.75, utf8_decode("EXPLICACIÓN DE LA SITUACIÓN"), 1, 0, "C");
     $pdf->SetXY($x + 13, $y);
     $pdf->Cell(6.5, 0.75, utf8_decode("PROCEDIMIENTO"), 1, 0, "C");
     $pdf->SetXY($x + 19.5, $y);
     $pdf->Cell(6.5, 0.75, utf8_decode("COMPROMISO"), 1, 0, "C");
     $pdf->SetXY($x + 26, $y);
     $pdf->Cell(4, 0.75, utf8_decode("F. ALUMNO"), 1, 0, "C");
     $pdf->SetXY($x + 30, $y);
     $pdf->Cell(4, 0.75, utf8_decode("F.PROFESOR"), 1, 0, "C");
     //____________ESPACIOS
     $y += 0.75;
     $pdf->SetFont("Arial", "", 12);
     for ($i = 0; $i < 15; $i++) {
         $pdf->SetXY($x, $y);
         $pdf->Cell(2.5, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 2.5, $y);
         $pdf->Cell(0.75, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 3.25, $y);
         $pdf->Cell(0.75, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 4, $y);
         $pdf->Cell(9, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 13, $y);
         $pdf->Cell(6.5, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 19.5, $y);
         $pdf->Cell(6.5, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 26, $y);
         $pdf->Cell(4, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 30, $y);
         $pdf->Cell(4, 0.5, utf8_decode(""), 1, 0, "C");
         $y += 0.5;
     }
     $pdf->AddPage();
     //TABLAAA_________________
     $y = 0.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "b", 12);
     $pdf->Cell(2.5, 0.75, utf8_decode("FECHA"), 1, 0, "C");
     $pdf->SetXY($x + 2.5, $y);
     $pdf->Cell(0.75, 0.75, utf8_decode("P"), 1, 0, "C");
     $pdf->SetXY($x + 3.25, $y);
     $pdf->Cell(0.75, 0.75, utf8_decode("T"), 1, 0, "C");
     $pdf->SetXY($x + 4, $y);
     $pdf->Cell(9, 0.75, utf8_decode("EXPLICACIÓN DE LA SITUACIÓN"), 1, 0, "C");
     $pdf->SetXY($x + 13, $y);
     $pdf->Cell(6.5, 0.75, utf8_decode("PROCEDIMIENTO"), 1, 0, "C");
     $pdf->SetXY($x + 19.5, $y);
     $pdf->Cell(6.5, 0.75, utf8_decode("COMPROMISO"), 1, 0, "C");
     $pdf->SetXY($x + 26, $y);
     $pdf->Cell(4, 0.75, utf8_decode("F. ALUMNO"), 1, 0, "C");
     $pdf->SetXY($x + 30, $y);
     $pdf->Cell(4, 0.75, utf8_decode("F.PROFESOR"), 1, 0, "C");
     //____________ESPACIOS
     $y += 0.75;
     for ($i = 0; $i < 23; $i++) {
         $pdf->SetXY($x, $y);
         $pdf->Cell(2.5, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 2.5, $y);
         $pdf->Cell(0.75, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 3.25, $y);
         $pdf->Cell(0.75, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 4, $y);
         $pdf->Cell(9, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 13, $y);
         $pdf->Cell(6.5, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 19.5, $y);
         $pdf->Cell(6.5, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 26, $y);
         $pdf->Cell(4, 0.5, utf8_decode(""), 1, 0, "C");
         $pdf->SetXY($x + 30, $y);
         $pdf->Cell(4, 0.5, utf8_decode(""), 1, 0, "C");
         $y += 0.5;
     }
     $y += 0.25;
     $pdf->SetFont("Arial", "B", 15);
     $pdf->SetXY($x, $y);
     $pdf->Cell(34, 0.5, utf8_decode("CITAS ACUDIENTE"), 0, 0, "C");
     //Linea2
     $pdf->Line($x, $y + 1, $x + 8, $y + 1);
     $pdf->SetXY($x + 8, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 9, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 10, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $x += 11.5;
     $pdf->Line($x, $y + 1, $x + 8, $y + 1);
     $pdf->SetXY($x + 8, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 9, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 10, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $x += 11.5;
     $pdf->Line($x, $y + 1, $x + 8, $y + 1);
     $pdf->SetXY($x + 8, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 9, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 10, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $y += 1.1;
     $x = 0.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(8, 0.5, "FIRMA", 0, 0, "C");
     $pdf->SetXY($x + 8, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(3, 0.5, "FECHA", 0, 0, "C");
     $x += 11.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(8, 0.5, "FIRMA", 0, 0, "C");
     $pdf->SetXY($x + 8, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(3, 0.5, "FECHA", 0, 0, "C");
     $x += 11.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(8, 0.5, "FIRMA", 0, 0, "C");
     $pdf->SetXY($x + 8, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(3, 0.5, "FECHA", 0, 0, "C");
     //______COPIA FIRMAS
     $y += 0.75;
     $x = 0.5;
     $pdf->Line($x, $y + 1, $x + 8, $y + 1);
     $pdf->SetXY($x + 8, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 9, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 10, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $x += 11.5;
     $pdf->Line($x, $y + 1, $x + 8, $y + 1);
     $pdf->SetXY($x + 8, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 9, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 10, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $x += 11.5;
     $pdf->Line($x, $y + 1, $x + 8, $y + 1);
     $pdf->SetXY($x + 8, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 9, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $pdf->SetXY($x + 10, $y + 0.5);
     $pdf->Cell(1, 0.5, "", 1, 0, "C");
     $y += 1.1;
     $x = 0.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(8, 0.5, "FIRMA", 0, 0, "C");
     $pdf->SetXY($x + 8, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(3, 0.5, "FECHA", 0, 0, "C");
     $x += 11.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(8, 0.5, "FIRMA", 0, 0, "C");
     $pdf->SetXY($x + 8, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(3, 0.5, "FECHA", 0, 0, "C");
     $x += 11.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(8, 0.5, "FIRMA", 0, 0, "C");
     $pdf->SetXY($x + 8, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(3, 0.5, "FECHA", 0, 0, "C");
     //______________________
     $x = 0.5;
     $y += 1;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(6, 0.5, "ENTREGA DE BOLETINES", 0, 0, "R");
     $x += 6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 0.5, "PRIMER PERIODO", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 0.5, "SEGUNDO PERIODO", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 0.5, "TERCER PERIODO", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 0.5, "CUARTO PERIODO", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 0.5, "QUINTO INFORME", 1, 0, "C");
     $x = 0.5;
     $y += 0.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(6, 1, "FIRMA ACUDIENTE", 0, 0, "R");
     $x += 6;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 1, "", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 1, "", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 1, "", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 1, "", 1, 0, "C");
     $x += 5.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 1, "", 1, 0, "C");
     $y += 1;
     $x = 0.5;
     $pdf->SetXY($x, $y);
     $pdf->SetFont("Arial", "B", 12);
     $pdf->Cell(5.5, 1, "DIRECTOR DE GRUPO:", 0, 0, "C");
     $pdf->Line($x + 5.75, $y + 0.75, $x + 30, $y + 0.75);
     $pdf->Output("Observador " . $nom . " " . $ape, "I");
 }
 /**
  * Listar algunos Prestamo dado el $prestamoEstudianteId
  * 
  * @param $prestamoEstudianteId
  * @param $performSize
  * @param $firstResultNumber
  * @param $numResults
  */
 public function listPrestamosByPrestamoEstudianteId($prestamoEstudianteId, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER)
 {
     $objBean = new EstudianteBean($this->persistenceManager);
     $obj = new Estudiante();
     $obj->setId($prestamoEstudianteId);
     # Validamos los campos
     if ($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 103);
     }
     if (!EntityValidator::validateGlobalOrderPriority($orderPriority)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 105);
     }
     if (!EntityValidator::validateId($prestamoEstudianteId)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 107);
     }
     # Verificamos que la entidad exista
     if (!$objBean->getEstudiante($obj)) {
         throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 109);
     }
     # Listamos las entidades
     if ($performSize) {
         $this->lastRequestSize = $this->prestamoBean->countGetPrestamosByPrestamoEstudiante($obj);
     }
     return PrestamoDTO::loadFromEntities($this->prestamoBean->listPrestamosByPrestamoEstudiante($obj, $firstResultNumber, $numResults, $orderBy, $orderPriority));
 }
 public function darEstudiantesResponsables()
 {
     $estudiantes = array();
     $res = $this->persistenceManager->performCustomQuery("SELECT * FROM persona, estudiante WHERE persona_id = estudiante_persona AND EXISTS\r\n                (SELECT * FROM responsable WHERE persona_id = responsable_persona)");
     if (!$res) {
         return $estudiantes;
     }
     foreach ($res as $rsEntity) {
         $entityTmp = new Estudiante();
         $entityTmp->loadFromSqlResultQuery($rsEntity);
         $estudiantes[] = $entityTmp;
     }
     return $estudiantes;
 }
Example #8
0
 public function Actualizar($nombre, $carnet, $carrera, $indice, $direccion)
 {
     $est = new Estudiante($nombre, $carnet, $carrera, $indice, $direccion);
     return $est->Modificar($nombre, $carrera, $indice, $direccion);
 }
 public function updateMonitorEstudiante(Monitor $entity, Estudiante $monitorEstudiante)
 {
     $entity->setMonitorEstudiante($monitorEstudiante->getId());
     return $this->persistenceManager->update($entity);
 }
Example #10
0
<?php

include "Persona.php";
$est1 = new Estudiante("3486769K", "PEDRO PEREZ", 35012, 19791109, 17, 34);
$est2 = new Estudiante("3445699G", "MARIA PEREZ", 35018, 19981024, 15, 34);
$est3 = new Estudiante("12345769K", "ESTUDIANTE PEREZ", 35012, 19791109, 12, 34);
echo $est1->get_TotalPasos() . "<br>";
$est1->caminar();
echo $est1->get_TotalPasos() . "<br>";
// $est1-> caminar(3);
echo "Numero de personas creadas : " . Persona::get_Num_personas();
// echo $persona->getNif();
// creamos un asociativo de estudiantes.
$estudiantes = array($est1, $est2, $est3);
$estudiantes2 = array($est1->getNif() => $est1, $est2->getNif() => $est2, $est3->getNif() => $est3);
 public function updateObjetoPerdidoEstudiante(ObjetoPerdido $entity, Estudiante $objetoPerdidoEstudiante)
 {
     $entity->setObjetoPerdidoEstudiante($objetoPerdidoEstudiante->getId());
     return $this->persistenceManager->update($entity);
 }
 public function eliminar(Estudiante $obj)
 {
     $sql = "delete from estudiante where id =" . $obj->getId();
     $resultado = $this->object->ejecutar($sql);
     $this->object->respuesta($resultado, 'estudiantes');
 }
 public function updateImpresionEstudiante(Impresion $entity, Estudiante $impresionEstudiante)
 {
     $entity->setImpresionEstudiante($impresionEstudiante->getId());
     return $this->persistenceManager->update($entity);
 }
Example #14
0
 public function estudianteAcudiente(Estudiante $estudiante)
 {
     $sql = "INSERT INTO acudiente_estudiante (id_persona,id_acudiente) VALUES (:idPersona,:idAcudiente)";
     $this->__setSql($sql);
     $this->ejecutar(array(':idPersona' => $estudiante->getIdPersona(), ':idAcudiente' => $estudiante->getIdAcudiente()));
 }
 public static function toEntity(EstudianteDTO $estudianteDTO)
 {
     $estudiante = new Estudiante();
     $estudiante->setId($estudianteDTO->getId());
     $estudiante->setEstudianteCodigo($estudianteDTO->getEstudianteCodigo());
     $estudiante->setEstudianteFacultad($estudianteDTO->getEstudianteFacultad());
     $estudiante->setEstudianteCarrerra($estudianteDTO->getEstudianteCarrerra());
     $estudiante->setEstudiantePersona($estudianteDTO->getEstudiantePersona());
     return $estudiante;
 }
Example #16
0
 private function getParametros(Estudiante $estudiante)
 {
     $parametros = array(':idEstudiantes' => $estudiante->getIdEstudiante(), ':Nombres' => $estudiante->getNombres(), ':Apellidos' => $estudiante->getApellidos(), ':Telefono' => $estudiante->getTelefono(), ':Email' => $estudiante->getEmail(), ':Direccion' => $estudiante->getDireccion(), ':Fecha' => date('Y-m-d G:i:s'));
     return $parametros;
 }
if (isset($_POST['cedula'])) {
    $cedula = $_POST['cedula'];
} else {
    $cedula = "";
}
if (isset($_POST['edad'])) {
    $edad = $_POST['edad'];
} else {
    $edad = "";
}
if (isset($_POST['semestre'])) {
    $semestre = $_POST['semestre'];
} else {
    $semestre = "";
}
$conex = new Estudiante($codigo, $nombre, $apellido, $cedula, $edad, $semestre);
$conex->conectar();
if ($_POST['type'] == 'save') {
    $conex->guardar();
}
if ($_POST['type'] == 'search') {
    $conex->buscar();
}
if ($_POST['type'] == 'delete') {
    $conex->eliminar();
}
if ($_POST['type'] == 'update') {
    $conex->modificar();
}
if ($_POST['type'] == 'list') {
    $conex->listar();
 public function eliminarPersona()
 {
     try {
         $idPersona = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL;
         $estudiante = new Estudiante();
         $estudiante->eliminarEstudiante($idPersona);
         echo json_encode(1);
     } catch (Exception $exc) {
         echo json_encode($exc->getTraceAsString());
     }
 }
Example #19
0
        $this->nombre = $nombre;
        $this->cpostal = $cpostal;
        $this->fecha = $fecha;
        self::$num_personas++;
    }
    public function getNif()
    {
        return $this->nif;
    }
    public static function get_Num_personas()
    {
        return self::$num_personas;
    }
}
class Estudiante extends Persona
{
    private $id;
    private $grupo;
    function __construct($nif, $nombre, $cpostal, $fecha, $id, $grupo)
    {
        parent::__construct($nif, $nombre, $cpostal, $fecha);
        $this->id = $id;
        $this->grupo = $grupo;
    }
}
// $persona = new Persona("3486769K","PEDRO PEREZ", 35012,19791109);
// $persona = new Persona("3445699G","MARIA PEREZ", 35018,19981024);
$est = new Estudiante("12345769K", "ESTUDIANTE PEREZ", 35012, 19791109, 12, 34);
echo $est->getNif();
echo "Numero de personas creadas : " . Persona::get_Num_personas();
// echo $persona->getNif();
Example #20
0
 public function actualizaMadre()
 {
     try {
         $idPersona = isset($_POST['idEstudiante']) ? $_POST['idEstudiante'] : NULL;
         $idMadre = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL;
         $nombresMadre = isset($_POST['nombres']) ? $_POST['nombres'] : NULL;
         $apellidosMadre = isset($_POST['apellidos']) ? $_POST['apellidos'] : NULL;
         $telMadre = isset($_POST['telefono']) ? $_POST['telefono'] : NULL;
         $telOficinaMadre = isset($_POST['telOfi']) ? $_POST['telOfi'] : NULL;
         $dirMadre = isset($_POST['direccion']) ? $_POST['direccion'] : NULL;
         $ocupacionMadre = isset($_POST['ocupacion']) ? $_POST['ocupacion'] : NULL;
         $estudiante = new Estudiante();
         $estudiante->setIdMadre($idMadre);
         $estudiante->setNombresMadre($nombresMadre);
         $estudiante->setApellidosMadre($apellidosMadre);
         $estudiante->setOcupacionMadre($ocupacionMadre);
         $estudiante->setTelMadre($telMadre);
         $estudiante->setTelOficinaMadre($telOficinaMadre);
         $estudiante->setDirMadre($dirMadre);
         if (count($estudiante->verificarMadre($idMadre)) > 0) {
             $estudiante->actDatosMadre($estudiante);
         } else {
             $estudiante->setIdPersona($idPersona);
             $estudiante->crearDatosMadre($estudiante);
             $estudiante->estudianteMadre($estudiante);
         }
         echo json_encode(1);
     } catch (Exception $exc) {
         echo json_encode('Error de aplicacion: ' . $exc->getMessage());
     }
 }
 public function updatePrestamoEstudiante(Prestamo $entity, Estudiante $prestamoEstudiante)
 {
     $entity->setPrestamoEstudiante($prestamoEstudiante->getId());
     return $this->persistenceManager->update($entity);
 }
    $apll = $obj->__GetApellidos();
    $obj->__SetEdad($_POST['edad']);
    $ed = $obj->__GetEdad();
    $obj->__SetTelefono($_POST['tel']);
    $tel = $obj->__GetTelefono();
    $obj->__SetDireccion($_POST['direccion']);
    $dir = $obj->__GetDireccion();
    $obj->__SetGenero($_POST['genero']);
    $gen = $obj->__GetGenero();
    if ($gen != 0) {
        $gen = 'M';
    } else {
        $gen = 'F';
    }
    $obj2 = new Metodos();
    $obj2->insertar($id, $nombre, $apll, $ed, $tel, $dir, $gen);
}
if (isset($_POST['buscar'])) {
    $obj = new Estudiante();
    $obj->__SetIdentificacion($_POST['ident1']);
    $ident = $obj->__GetIdentificacion();
    $obj2 = new Metodos();
    $obj2->buscar($ident);
}
if (isset($_POST['eliminar'])) {
    $obj = new Estudiante();
    $obj->__SetIdentificacion($_POST['ident1']);
    $ident = $obj->__GetIdentificacion();
    $obj2 = new Metodos();
    $obj2->eliminar($ident);
}
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="apDiv1">
                            <input type="image" src="imagenes/consultar.png" onClick="return valtxtvac();"  />
                        </div>
                    </td>
                </tr>
            </table>
        </form>

        <?php 
if (isset($_POST[cedula])) {
    $estudiante = new Estudiante();
    $estudiante->sel_estudiante($_POST[cedula]);
    //var_dump($estudiante->datosestudiante);
    if ($estudiante->datosestudiante === null) {
        ?>
                <p>El Estudiante no se encuentra registrado.</p>
                <?php 
    } else {
        ?>
                <p><?php 
        echo utf8_decode($estudiante->datosestudiante[Apellidos] . "," . $estudiante->datosestudiante[Nombres]);
        ?>
</p>

                <div class="formula">
                    <h1>Paso 2:</h1>
Example #24
0
<?php

class Estudiante
{
    private $nombre = '';
    private $puntuacion = 0;
    public function __construct($nombre, $puntuacion)
    {
        $this->nombre = $nombre;
        $this->puntuacion = $puntuacion;
    }
    public function show()
    {
        echo $this->nombre . ' ' . $this->puntuacion . '<br>';
    }
    function __sleep()
    {
        echo 'Ejecutando el sleep...';
        return array('nombre', 'puntuacion');
    }
    function __wakeup()
    {
        echo 'Waking up...';
    }
}
//codigo principal
$alumno = new Estudiante('Juan Perez', 20);
$alumno->show();
$datos_alumno = serialize($alumno);
echo $datos_alumno;