-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoordenadores.php
More file actions
88 lines (62 loc) · 2.67 KB
/
coordenadores.php
File metadata and controls
88 lines (62 loc) · 2.67 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
<?php
require_once 'includes/config.php';
require_once 'header.php';
?>
<script type="text/javascript">
function deleteCoordenador(p_id) {
if(confirm("Tem certeza que deseja apagar o coordenador? Isso irá apagar todos os registros filhos.")) {
var action = '/actions/deleteCoordenador.php';
var form_data = {
id: p_id
};
$.ajax({
type: "POST",
url: action,
data: form_data,
success: function(response)
{
location.reload();
}
});
}
}
</script>
<div class="main">
<div class="speedbar">
<div class="speedbar-nav">Cadastro Famílias</div>
</div>
<?php
$sql = 'SELECT idCoordenador, nmCoordenador, docCoordenador FROM coordenador';
$result = $db->query($sql);
?>
<!--Table Styling-->
<div class="grid-1">
<div class="title-grid">Coordenadores</div>
<div class="content-gird">
<table class="display" id="example">
<thead>
<tr>
<th class="th_id">Código</th>
<th class="th_status">Nome</th>
<th class="th_date">Documento</th>
<th class="th_chexbox"> </th>
</tr>
</thead>
<tbody>
<?php
while ($row = $result->fetch_assoc()) { ?>
<tr class="item">
<td class="subject"><a href="addCoordenador.php?id=<?=$row['idCoordenador']?>"><?=$row['idCoordenador']?></a></td>
<td><span class="published"><?=$row['nmCoordenador']?></span></td>
<td><?=$row['docCoordenador']?></td>
<td class="action"><a href="#"><img onclick="deleteCoordenador(<?=$row['idCoordenador']?>);" src="images/del.png" alt="delete"></a></td>
</tr>
<?php } ?>
</table>
<div class="clear"> </div>
</div>
</div>
</div><!-- END MAIN-->
<?php
require_once 'barralateral.php';
require_once 'footer.php';