Esempio n. 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();
     }
 }
 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();
     }
 }