예제 #1
0
 public function usuarioAcudienteMovil()
 {
     try {
         $this->vista->set('titulo', 'Usuario Coordiandor');
         $idPersona = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL;
         $acudiente = new Acudiente();
         $acu = $acudiente->leerPorId($idPersona);
         $this->vista->set('acu', $acu);
         $persona = new Persona();
         $acudido = $persona->leerPorAcudiente($acu->getId_Acudiente());
         $this->vista->set('acudido', $acudido);
         return $this->vista->imprimir();
     } catch (Exception $exc) {
         echo 'Error de aplicacion: ' . $exc->getMessage();
     }
 }
예제 #2
0
 private function mapearAcudiente(Acudiente $acudiente, array $props)
 {
     if (array_key_exists('id_acudiente', $props)) {
         $acudiente->setId_acudiente($props['id_acudiente']);
     }
     if (array_key_exists('nombre', $props)) {
         $acudiente->setNombre($props['nombre']);
     }
     if (array_key_exists('apellido', $props)) {
         $acudiente->setApellido($props['apellido']);
     }
     if (array_key_exists('ocupacion', $props)) {
         $acudiente->setOcupacion($props['ocupacion']);
     }
     if (array_key_exists('direccion', $props)) {
         $acudiente->setDireccion($props['direccion']);
     }
     if (array_key_exists('tel_oficina', $props)) {
         $acudiente->setTel_oficina($props['tel_oficina']);
     }
     if (array_key_exists('telefono', $props)) {
         $acudiente->setTelefono($props['telefono']);
     }
 }
예제 #3
0
 public function destroy($id)
 {
     $acudiente = Acudiente::findOrFail($id);
     $acudiente->delete();
     return $acudiente;
 }
 public function panelMovil()
 {
     $idPersona = isset($_POST['idPersona']) ? $_POST['idPersona'] : NULL;
     $panel = isset($_POST['panel']) ? $_POST['panel'] : NULL;
     if ($panel == "acudiente") {
         $acudiente = new Acudiente();
         $acu = $acudiente->leerPorId($idPersona);
         $this->vista->set('acu', $acu);
         $persona = new Persona();
         $acudido = $persona->leerPorAcudiente($acu->getId_Acudiente());
         $this->vista->set('acudido', $acudido);
         $ruta = 'utiles/imagenes/fotos/';
         if (file_exists($ruta . $idPersona . '.jpg')) {
             $img = '<img height="90px" width="90px"  src="http://controlacademico.liceogalois.com/utiles/imagenes/fotos/' . $idPersona . '.jpg">';
         } elseif (file_exists($ruta . $idPersona . '.png')) {
             $img = '<img height="90px" width="90px"  src="http://controlacademico.liceogalois.com/utiles/imagenes/fotos/' . $idPersona . '.png">';
         } elseif (file_exists($ruta . $idPersona . '.jpeg')) {
             $img = '<img height="90px" width="90px"  src="http://controlacademico.liceogalois.com/utiles/imagenes/fotos/' . $idPersona . '.jpeg">';
         } else {
             $img = '<img height="90px" width="90px"  src="http://controlacademico.liceogalois.com/utiles/imagenes/avatarDefaul.png">';
         }
         $this->vista->set('img', $img);
         return $this->vista->imprimir();
     }
 }