-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
115 lines (109 loc) · 4.4 KB
/
header.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
113
114
115
<style>
.bouton-image:before {
content: "";
width: 50px;
height: 50px;
background-size: 100% 100%;
display: inline-block;
margin-right: 5px;
vertical-align: text-top;
background-position : center center;
background-repeat:no-repeat;
}
.monBouton:before{
background-image : url("img/icon2.png");
}
.btn-rounded {
font-family: Verdana;
font-size: 15px;
color: white;
letter-spacing: 1px;
line-height: 15px;
border-radius: 40px;
background: transparent;
transition: all 0.3s ease 0s;
padding: 5% 0;
}
#footer {
width:100%;
height:auto;
background: #0b2e13;
color: white;
}
</style>
<?php
require 'web/model/Usuario.php';
session_start();
$usuario = unserialize(serialize($_SESSION['usuario']));
?>
<div class="row">
<div class="col-12">
<div class="text-right">
<div class="btn-group">
<button type="button" class="btn btn-lg btn-success float-right btn-rounded bouton-image monBouton"
style="background-color: #D2DE38;">
<?php
if ($usuario != null){
echo 'Olá, '.$usuario->getNome();
}else {
echo "Olá, faça seu login";
}
?>
</button>
<button type="button" class="btn btn-lg btn-success dropdown-toggle dropdown-toggle-split
float-right" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
data-trigger="hover" style="background-color: #D2DE38;">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu pull-right">
<a class="dropdown-item btn-primary" data-toggle="modal"
data-target="#loginModal">Login</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="cadastroUsuario.php">Cadastre-se</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="esqueciMinhaSenha.php">Esqueceu sua senha?</a>
<div class="dropdown-divider"></div>
<?php
if ($usuario != null){
?>
<form method="POST" action="web/controller/UsuarioController.php" id="formSair">
<input type="submit" style="visibility: hidden;" name="btn-sair" id="btSair"/>
<a class="dropdown-item" href="#"
onclick="btSair.click();">Sair</a>
</form>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<!-- Modal login -->
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="loginModalLabel">Login</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form method="POST" action="web/controller/UsuarioController.php">
<div class="modal-body">
<div class="row">
<input id="identificador" name="identificador" type="text" required
class="form-control form-control-sm" placeholder="Informe Email, CPF ou telefone"/>
<br><br>
<input id="senha" name="senha" type="password" required
class="form-control form-control-sm" placeholder="Senha"/>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancelar</button>
<input type="submit" class="btn btn-success" value="Login" name="btn-login">
</div>
</form>
</div>
</div>
</div>