-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasse_prof.php
More file actions
151 lines (134 loc) · 4.06 KB
/
classe_prof.php
File metadata and controls
151 lines (134 loc) · 4.06 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?
include "sessme.php";
include "escola.class.php";
include "usuarios.class.php";
include "professor.class.php";
include "classes.class.php";
$user=new Usuario; // novo usuário
$user->setId($_SESSION["id"]); // seleciona o id de quem está logado
$user->getUser(); // pega os dados dele
$escola=new Escola; // novaescola
$escola->setId($user->getEscolaId()); // pega a escola que o user representa
$escola->getEscola(); // pega os dados da escola que ele representa
if($user->getTipo()>1){ // só visualiza caso seja admin em alguma escola
/*$aut=isset($_GET["aut"]) ? $_GET["aut"] : false;
$unaut=isset($_GET["unaut"]) ? $_GET["unaut"] : false;
$pend=isset($_GET["pend"]) ? $_GET["pend"] : false;
if($aut){
$escola->setProfessores($aut,2);
}
if($unaut){
$escola->setProfessores($unaut,0);
}
if($pend){
$escola->setProfessores($pend,1);
}*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery/jquery.tablesorter.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#tabela_escola").tablesorter( {sortList: [[0,0], [1,0]]} );
}
);
</script>
<style>
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
#swfupload-control p{ margin:10px 5px; font-size:0.9em; }
#log{ margin:0; padding:0; width:500px;}
#log li{ list-style-position:inside; margin:2px; border:1px solid #ccc; padding:10px; font-size:12px;
font-family:Arial, Helvetica, sans-serif; color:#333; background:#fff; position:relative;}
#log li .progressbar{ border:1px solid #333; height:5px; background:#fff; }
#log li .progress{ background:#999; width:0%; height:5px; }
#log li p{ margin:0; line-height:18px; }
#log li.success{ border:1px solid #339933; background:#ccf9b9; }
#log li span.cancel{ position:absolute; top:5px; rightright:5px; width:20px; height:20px;
background:url('../js/swfupload/images/cancel.png') no-repeat; cursor:pointer; }
</style>
<title>Professores</title>
</head>
<body>
<?
$obj_prof=$escola->getProfessores(2); // pega os professores atualmente na escola
?>
<table width="250" border="1">
<tr>
<td colspan="2">Professores Atualmente na escola <? echo $escola->getNome(); ?></td>
</tr>
<?
if($obj_prof!=false){
foreach($obj_prof as $obj){
?>
<tr>
<td><? echo $obj->getNome()." ".$obj->getSobreNome(); ?></td>
<td>
<?
$class=new Classes;
$obj_classes=$class->getClassesProf($obj->getId(),$escola->getId());
if($obj_classes!=false){
foreach($obj_classes as $obj_c){
echo $obj_c->getNome().",";
}
} else {
echo "Nenhuma sala atribuída <a href='atribuir.php?cod=".$obj->getId()."'>atribuir agora.</a>";
}
?>
</td>
</tr>
<?
}
} else { ?>
<tr>
<td colspan="2">Nenhum</td>
</tr>
<? } ?>
</table>
<br />
<br />
</body>
</html>
<? } else {
echo "Não Autorizado";
}?>