-
Notifications
You must be signed in to change notification settings - Fork 0
/
aluno.php
78 lines (66 loc) · 2.72 KB
/
aluno.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
<?php
if (!isset($_SESSION)) session_start();
$nivel_necessario = 3;
if (!isset($_SESSION['UsuarioID']) OR ($_SESSION['UsuarioNivel'] != $nivel_necessario)) {
session_destroy();
header("Location: index.php"); exit;
}
require_once "conex.php";
require_once 'Controle.php';
$grupo = selecionaTudoBusca();
?>
<html>
<head>
<meta charset="utf-8">
<title> Editar Alunos </title>
<link rel="stylesheet" type="text/css" href="css/estiloaluno.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<link rel="stylesheet" href="css/buscaaluno.css">
</head>
<body>
<form name="editar" action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST" class="form-wrapper cf">
<input type="hidden" name="acao" value="lista" /><br>
<input type="text" id="aluno" name="aluno_edit" class="busca" placeholder=" Digite um nome">
<button type="submit" name="lista">Procurar</button>
</form>
<br>
<?php if(isset($grupo)){
?>
<table class="container">
<thead>
<tr>
<th>Nome</th>
<th>Matricula</th>
<th>Telefone</th>
<th>Nascimento</th>
<th>E-mail</th>
<th>Editar</th>
</tr>
</thead>
<tbody>
<?php
foreach($grupo as $aluno) { ?>
<tr>
<td><?=$aluno["alu_nome"]?></td>
<td><?=$aluno["alu_matricula"]?></td>
<td><?=$aluno["alu_telefone"]?></td>
<td><?=$aluno["alu_nascimento"]?></td>
<td><?=$aluno["alu_email"]?></td>
<td>
<form name="alterar" action="editarAluno.php" method="POST" >
<input type="hidden" name="alunoId" value="<?=$aluno["alu_id"]?>" id="botao1" />
<input type="submit" value="Editar" name="editar" id="botao1"/>
</form>
</td>
</tr>
<?php
}
?>
</tbody>
</table><br>
<?php }else{
echo "<center>É necessário informar um aluno.</center>";
} ?>
<input type="button" value="Voltar" id="botaovoltar" onclick="window.location='2tela_aluno.php';">
</body>
</html>