-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.php
More file actions
77 lines (75 loc) · 3.36 KB
/
menu.php
File metadata and controls
77 lines (75 loc) · 3.36 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
<?php
session_start();
include "connection.php";
if(isset($_POST['logout']) || $_SESSION["type"] == "none"){
header("location: index.php");
$_SESSION["type"] = "none";
}
?>
<html lang="pt">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Oswald&family=Roboto:wght@500&display=swap" rel="stylesheet">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="img/icon.ico">
<title>Sistema Escolar</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="logo-title">
<img src="img/logo.png">
<h3>Olá, <?php echo $_SESSION['type']; ?>!</h3>
<h3>Bem-vindo ao sistema escolar integrado <b><i>AnemoStudy</i></b></h3>
<button style="margin: 20px;" onclick="openNav();">Iniciar Sistema</button>
<form method="POST">
<input type="submit" value="Sair" name="logout">
</form>
<h5 class="logo-title" style="margin-top: 20px;">2022© Anemo System. All rights reserved</h5>
</div>
<div class="sidenav" id="mySidenav">
<h4 class="sidenav-title">ESCOLA</h4>
<?php if($_SESSION['type'] == "admin"): ?>
<a href="grade/grade.php">Ano Escolar</a>
<a href="subject_teacher/choose.php">Aulas</a>
<a href="function/function.php">Função</a>
<a href="employee/employee.php">Funcionário</a>
<a href="subject/subject.php">Matéria</a>
<a href="period/period.php">Período</a>
<a href="teacher/teacher.php">Professor</a>
<a href="teacher_classroom/teacher_classroom.php">Professor por Sala</a>
<a href="classroom/classroom.php">Sala</a>
<a href="student/choose.php">Estudante</a>
<a href="message/choose.php">Mensagens</a>
<?php endif; ?>
<a href="grades_attendance/choose.php">Notas</a>
<a href="student_absence/choose_classroom.php">Faltas e Presenças</a>
<?php
if($_SESSION['type'] != "admin") {
$sql = "SELECT id FROM teacher WHERE email = '".$_SESSION['email']."';";
$query = mysqli_query($connection, $sql);
while($row = mysqli_fetch_row($query)) {
$teacher_id = $row[0];
echo '<a href="teacher/edit.php?id='.$teacher_id.'">Editar conta</a>';
}
}
?>
<?php if($_SESSION['type'] == "admin"): ?>
<h4 class="sidenav-title">JOGO</h4>
<a href="user/user.php">Usuário de jogo</a>
<?php endif; ?>
</div>
</body>
<script type="text/javascript">
/* Set the width of the side navigation to 250px */
function openNav() {
document.getElementById("mySidenav").style.width = "300px";
}
/* Set the width of the side navigation to 0 */
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
}
</script>
</html>