-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.php
112 lines (106 loc) · 5.21 KB
/
navbar.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
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
<?php
require('base.php');
session_start();
if($_SESSION['user'] == null){
header('Location: login.php');
}
require "homeCtrl.php";
$user = isset($_SESSION['user']) ? $_SESSION['user'] : '';
?>
<nav style="position:fixed;z-index: 2; width: 100%" class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="homeUser.php">
HelpDesk
</a>
<button class="navbar-toggler " type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent" style="float: left">
<?php
echo '<ul class="navbar-nav mr-auto">';
if($user['is_admin'] == 1) {
echo '<li class="nav-item active">
<a class="nav-link" href="relatorio.php">Relatório <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" data-toggle="modal" data-target="#modalRegistrar">Registrar funcionário <span class="sr-only">(current)</span></a>
</li>';
}
echo '</ul>';
?>
<div class="dropdown">
<a class="text-white dropdown-toggle" id="navbarDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<img src="http://www.sixsigmahospital.com/wp-content/uploads/2018/04/person-icon-257x300.png"
width="28" height="28" alt=""> <?php echo $user['nome']; ?>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a href="?logout=true" class="dropdown-item">Sair</a>
</div>
</div>
</div>
</nav>
<div class="modal fade" data-backdrop="static" id="modalRegistrar" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel">
<div class="modal-dialog" style="max-width: 60%;" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Registrar funcionário</h4>
<button class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
</button>
</div>
<form action="cadastroFuncionarioCtrl.php" method="post">
<div class="modal-body">
<div class="form-group">
<div class="row">
<div class="col-md-3">
RA
<input id="inputRaCadastro" name="inputRaCadastro" class="form-control" type="text"
placeholder="RA">
</div>
<div class="col-md-9">
Nome completo
<input id="inputNomeCadastro" name="inputNomeCadastro" type="nome"
class="form-control"
aria-describedby="nomeHelp" placeholder="Nome">
</div>
</div>
<div class="row mt-3">
<div class="col-md-12">
Especialidade
<?php
require "cadastroFuncionarioCtrl.php";
getTipo();
?>
</div>
</div>
<div class="row mt-3">
<div class="col-md-6">
Email
<input id="inputEmailCadastro" name="inputEmailCadastro" class="form-control"
type="text"
placeholder="Email">
</div>
<div class="col-md-3">
Tipo
<select class="form-control" id="inputTipoCadastro" name="inputTipoCadastro">
<option>Funcionario</option>
</select>
</div>
<div class="col-md-3">
Senha
<input id="inputSenhaCadastro" name="inputSenhaCadastro" class="form-control"
type="password" autocomplete="off"
placeholder="Senha">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal">Fechar</button>
<button type="submit" id="realizarInsertCadastro" class="btn btn-primary">Cadastrar funcionário</button>
</div>
</form>
</div>
</div>
</div>