コード例 #1
0
 function perfilEstudiante()
 {
     $configbd = new configbd_model();
     $dbconn4 = $configbd->abrirSesion('estudiante');
     $consult2 = "SELECT * FROM VIEW_PERFIL_ESTUDIANTE WHERE K_NICKNAME='" . $_SESSION['codigo'] . "'";
     $resultConsult2 = pg_query($consult2) or die('La consulta fallo: ' . pg_last_error());
     $line = pg_fetch_array($resultConsult2, null, PGSQL_ASSOC);
     $estudiante = new Estudiante_model();
     $estudiante = $estudiante->crearEstudiante($line['k_nickname'], $line['n_nombre'], $line['n_apellido'], $line['o_correo'], "", "", $line['o_num_tel'], $line['n_colegio'], $line['o_grado_actual'], $line['o_imagen']);
     $configbd->cerrarSesion();
     $a = new dao_reino_model();
     $estudiante->setReino($a->obtenerReinosEstudiante());
     return $estudiante;
 }
コード例 #2
0
 function perfilProfesor()
 {
     $configbd = new configbd_model();
     $dbconn4 = $configbd->abrirSesion('profesor');
     $consult2 = "SELECT * FROM VIEW_PERFIL_PROFESOR WHERE N_NICKNAME='" . $_SESSION['codigo'] . "'";
     $resultConsult2 = pg_query($consult2) or die('La consulta fallo: ' . pg_last_error());
     $line = pg_fetch_array($resultConsult2, null, PGSQL_ASSOC);
     $profesor = new profesor_model();
     $profesor = $profesor->crearProfesor($line['k_cedula'], $line['n_nombre'], $line['n_apellido'], $line['o_correo'], $line['n_nickname'], $line['n_colegio'], $line['o_num_tel'], $line['o_imagen']);
     $configbd->cerrarSesion();
     $a = new dao_reino_model();
     $profesor->setReinos($a->obtenerReinosProfesor());
     return $profesor;
 }