-
Notifications
You must be signed in to change notification settings - Fork 1
/
navbar.php
85 lines (74 loc) · 2.49 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
<?php
$default_profile_image = "http://z2.cheggcdn.com/sites/default/files/imagecache/50x50/imagefield_default_images/zinch-user-default_0.png";
session_start();
?>
<!-- NAV BAR -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar icon-white"></span>
<span class="icon-bar icon-white"></span>
<span class="icon-bar icon-white"></span>
</a>
<a href="/rockinriobd/" class="brand">ROCK IN RIO 2013</a>
<div class="nav-collapse collapse">
<ul class="nav pull-left">
<li><a href="/rockinriobd/">LINE-UP</a></li>
<li><a href="/rockinriobd/dias/">DIAS</a></li>
<!-- <li><a href="/rockinriobd/ambientes/">AMBIENTES</a></li> -->
<li><a href="/rockinriobd/bandas/">BANDAS</a></li>
<li><a href="/rockinriobd/artistas/">ARTISTAS</a></li>
<?php if(isLoggedIn())
{?>
<li><a href="/rockinriobd/minhaconta/">MINHA CONTA</a></li>
<?php }?>
</ul>
<div id="nav-log-bar">
<?php
if(isLoggedIn()){
$nome = $_SESSION['nome'];
$email = $_SESSION['emailMD5'];
$senha = $_SESSION['senha'];
?>
<div class="nav-collapse collapse pull-right">
<ul class="nav"><li><a href="/rockinriobd/minhaconta/"><?php echo $nome; ?></a></li></ul>
<a href="/rockinriobd/minhaconta/"><img src="https://secure.gravatar.com/avatar/<?php echo $email; ?>?d=<?php echo $default_profile_image ?>&s=50"/></a>
<button id="nav-logout" style="margin-left: 30px" class="btn btn-primary">Sair</button>
</div>
<?php
}else{
?>
<form id="nav_logar" method="POST" data-async class="navbar-form pull-right">
<input id="nav_email" name="nav_email" class="span2" type="text" placeholder="E-mail">
<input id="nav_senha" name="nav_senha" class="span2" type="password" placeholder="Senha">
<button type="submit" class="btn btn-primary">Entrar</button>
<a style="margin-left: 30px" href="/rockinriobd/cadastros/cadastro_usuario.php" class="btn btn-primary">Cadastre-se</a>
</form>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<div id="error_message">
</div>
<!-- END NAV BAR -->
<?php
function isAdmin(){
if(isset($_SESSION['funcionario']) && $_SESSION['funcionario'] == true){
return true;
}else{
return false;
}
}
function isLoggedIn(){
if(isset($_SESSION['documento'])){
return true;
}else{
return false;
}
}
?>