-
Notifications
You must be signed in to change notification settings - Fork 0
/
ver_clase.php
71 lines (65 loc) · 2.24 KB
/
ver_clase.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
<?php
require_once __DIR__ . '/include/dao/DAO_Clases.php';
require_once __DIR__ . '/include/config.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ver_Clase</title>
<link rel="stylesheet" type="text/css" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
<body>
<div id ="ver_clase">
<?php
include("include/comun/cabecera.php");
if($_SESSION['rol'] == 'profesor'){
include("include/comun/sidebarIzqProfesor.php");
}
else{
include("include/comun/sidebarIzqPadre.php");
}
?>
<div class ="contenido" style="margin-left: 250px;">
<?php
$id = htmlspecialchars(trim(strip_tags($_GET["id"])));
$clase = new Clases();
$clase->setId($id);
$dao_clase = new DAO_Clases();
$result = $dao_clase->getAlumnos($id);
if ($_SESSION['rol'] == "profesor"){
$dao_clase->setClase($clase);
echo "<h1>Clase de ".$clase->getCurso()." ".$clase->getLetra()." ".$clase->getTitul()."</h1><br>";
echo "<div class='w3-container'><ul class=\"w3-ul\">";
while($fila = $result->fetch_assoc()){
echo
"<li>
<img src=".$fila["foto"]." class=\" w3-circle \" style=\"width:50px\">
<a href=\"ver_alumno.php?id=" .$fila["DNI"]. "\">"." ".$fila["nombre"]." ".$fila["apellido1"]." ".$fila["apellido2"]."</a><br>
</li>";
}
echo "</div>";
}
else{
$nombre = htmlspecialchars(trim(strip_tags($_GET["nombre"])));
$ap1 = htmlspecialchars(trim(strip_tags($_GET["ap1"])));
$ap2 = htmlspecialchars(trim(strip_tags($_GET["ap2"])));
echo "<h1>Clase de ".$nombre." ".$ap1." ".$ap2."</h1><br>";
echo "<div class='w3-container'><ul class=\"w3-ul\">";
while($fila = $result->fetch_assoc()){
echo "
<li>
<img src=".$fila["foto"]." class=\" w3-circle \" style=\"width:50px\">
<a>"." ".$fila["nombre"]." ".$fila["apellido1"]." ".$fila["apellido2"]."</a><br>
</li>";
}
echo "</div>";
}
?>
</div>
<?php
include("include/comun/pie.php");
?>
</div>
</body>
</html>