-
Notifications
You must be signed in to change notification settings - Fork 0
/
ver_profesor.php
109 lines (103 loc) · 4.91 KB
/
ver_profesor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
require_once __DIR__ . '/include/dao/DAO_Profesor.php';
require_once __DIR__ . '/include/config.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Profesor</title>
<link rel="stylesheet" type="text/css" href="css/vista_usuario.css">
<link rel="stylesheet" type="text/css" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body>
<div class ="profesor">
<?php
include("include/comun/cabecera.php");
if($_SESSION['rol'] == 'profesor'){
include("include/comun/sidebarIzqProfesor.php");
}
else{
include("include/comun/sidebarIzqPadre.php");
}
?>
<div class="flex_contenido">
<?php
$profesor = new Profesor();
$dao_profesor = new DAO_Profesor();
if ($_SESSION['rol'] == "profesor"){
$profesor->setUsuario(htmlspecialchars(trim(strip_tags($_SESSION["name"]))));
}
else{
$profesor->setUsuario(htmlspecialchars(trim(strip_tags($_GET["profesor"]))));
$id_padre = htmlspecialchars(trim(strip_tags($_GET["tutor"])));
}
$dao_profesor->getProfe($profesor);
$filaCentro = $dao_profesor->getCentro2($profesor->getIdCentro());
$filaDespacho = $profesor->getDespacho();
$filaCorreo = $profesor->getCorreo();
$filaAsignaturas = $dao_profesor->getAsignaturas($profesor->getId());
echo "<div class='flex_info'>";
if($_SESSION['rol'] == "padre"){
echo "<div><img src=\"" .$profesor->getFoto(). "\" width=\"150\" height=\"150\"></div>";
}
echo "<br><h1>".$profesor->getNombre(). " " .$profesor->getAp1(). " " .$profesor->getAp2()."</h1>";
echo "</div>";
echo "<div class='flex_funciones'>
<div class = 'column1'>
<div class = 'flex_informacion'>
<div class = 'detalles'>
<h4>Detalles del usuario</h4>
Correo: " .$filaCorreo. "<br>
Despacho: " .$filaDespacho. "<br>
Colegio: " .$filaCentro["nombre"]. " (" .$filaCentro["direccion"]. ", id:".$profesor->getUsuario()." " .$filaCentro["provincia"]. ")<br>";
echo "</div>";
echo "<div class = 'asignaturas'>";
echo "<h4>Asignaturas </h4>";
$filaAsignaturas = $dao_profesor->getAsignaturas($profesor->getId());
while($asignatura = $filaAsignaturas->fetch_assoc()){
echo "<ul>".$asignatura["nombre_asignatura"]."</ul>";
}
echo "</div>";
echo "</div>";
echo "<div class='funciones'>";
if ($_SESSION['rol'] == "profesor"){
//Editar perfil
echo "<div class='editarperfil'><a href=\"Editar_profesor.php?\"><img class='clase_imagen' src='./img/editarperfil.png' alt='logo' height='150' width='150'><a><br>
<a href = Editar_profesor.php>Editar Perfil</a></div>";
echo "<div class='msg'><a href=\"mensajeriaClases.php\"><img class='clase_imagen' src='./img/mensajeria.png' alt='logo' height='150' width='150'></a><br>
<a href= mensajeriaClases.php>Mensajeria</a></div>";
// Foro
echo "<div class='foro'><a href=\"foro_seleccion.php\"><img class='clase_imagen' src='./img/foro.png' alt='logo' height='150' width='150'></a><br>
<a href= foro_seleccion.php>Foro</a></div>";
//clases
echo "<div class='clase'><a href=\"cursos.php\"><img class='clase_imagen' src='./img/clase.png' alt='logo' height='150' width='150'></a><br>
<a href= cursos.php>Clases</a></div>";
//horario
echo "<div class='horario'><a href=\"horario_profesor.php\"><img class='clase_imagen' src='./img/horario.png' alt='logo' height='150' width='150'></a><br>
<a href= horario_profesor.php>Horario</a></div>";
//calendario
echo "<div class='calendario'><a href=\"calendario.php\"><img class='clase_imagen' src='./img/calendario.png' alt='logo' height='150' width='150'></a><br>
<a href= calendario.php>Calendario</a></div>";
}
else{
//Mensajeria
echo '<div class="msg">
<form name="myform" action="mensajeria.php" method="POST">
<input type="hidden" name="tutor" value="' .$id_padre. '">
<input type="hidden" name="profesor" value="' .$profesor->getId(). '">
<button type="submit">
<img class="clase_imagen" src="./img/mensajeria.png" alt="logo" height="150" width="150"><br>
Nuevo Mensaje
</button>
</form><br>
</div>';
}
echo "</div>";//funciones
echo "</div>";//columna1
echo "</div>";
?>
</div>
</div>
</body>
</html>