This repository has been archived by the owner on Apr 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inicio.php
131 lines (103 loc) · 5.26 KB
/
inicio.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php include "head.php";
//INICIA A SESSÃO
session_start();
$consultaTipoUsuario = mysqli_query($con, "SELECT tipo FROM usuario WHERE cpf = '".$_SESSION["cpf"]."'");
$resultadoTipoUsuario = mysqli_fetch_array($consultaTipoUsuario);
$_SESSION["tipo"] = $resultadoTipoUsuario[0];
if(empty($_SESSION["cpf"])){
echo "<script>location.href='index.php?acao=deslogado';</script>";
}
?>
<!-- MENU -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#barraMenu" aria-expanded="false">
<span class="sr-only">Navegação alternada</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- TITULO DO MENU -->
<a class="navbar-brand" href="inicio.php">SICVIGO</a>
</div>
<!-- ITENS DO MENU -->
<div class="collapse navbar-collapse" id="barraMenu">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-bullhorn"></span> Chamado<span class="caret"></a>
<ul class="dropdown-menu">
<li><a href="?pagina=novoChamado"><span class="glyphicon glyphicon-plus"></span> Novo</a></li>
<li><a href="?pagina=consultarChamado"><span class="glyphicon glyphicon-search"></span> Consultar</a></li>
<li role="separator" class="divider"></li>
<li><a href="?pagina=cadastrarNatureza"><span class="glyphicon glyphicon-plus"></span> Cadastrar Natureza</a></li>
<li><a href="?pagina=consultarNatureza"><span class="glyphicon glyphicon-search"></span> Consultar Natureza</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-tree-deciduous"></span> Setor <span class="caret"></a>
<ul class="dropdown-menu">
<li><a href="?pagina=cadastrarSetor"><span class="glyphicon glyphicon-plus"></span> Cadastrar</a></li>
<li><a href="?pagina=consultarSetor"><span class="glyphicon glyphicon-search"></span> Consultar</a></li>
</ul>
</li>
<li><a href="?pagina=usuarios"><span class="glyphicon glyphicon-user"></span> Usuários</a></li>
<li><a href="?pagina=estoque"><span class="glyphicon glyphicon-list-alt"></span> Estoque</a></li>
<li><a href="?pagina=relatorio"><span class="glyphicon glyphicon-file"></span> Relatório</a></li>
<li><a href="?pagina=bancoConhecimento"><span class="glyphicon glyphicon-hddglyphicon glyphicon-education"></span> Banco de Conhecimento</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<p class="navbar-text">Bem vindo(a), <?php echo $_SESSION["nome"]; ?>!</p>
<li><a href="?pagina=sair">Sair</a></li>
</ul>
</div>
</div>
</nav>
<div class="container" style="margin-top:80px;">
<!-- CONTEÚDO -->
<?php
//CONTROLE DE EXIBIÇÃO DO CONTEÚDO
switch ($_REQUEST['pagina']) {
case 'novoChamado':
include "paginas/cadastro/cadastroChamado.php";
break;
case 'consultarChamado':
include "paginas/consulta/consultaChamado.php";
break;
case 'cadastrarNatureza':
include "paginas/cadastro/cadastroNatureza.php";
break;
case 'consultarNatureza':
include "paginas/consulta/consultaNatureza.php";
break;
case 'cadastrarSetor':
include "paginas/cadastro/cadastroSetor.php";
break;
case 'consultarSetor':
include "paginas/consulta/consultaSetor.php";
break;
case 'usuarios':
include "paginas/consulta/consultaUsuarios.php";
break;
case 'cadastrar':
include "paginas/cadastro/cadastrar.php";
break;
case 'escolherSetor':
include "paginas/cadastro/selecionarSetor.php";
break;
case 'estoque':
break;
case 'sair':
include "paginas/sair.php";
break;
case 'relatorio':
break;
case 'bancoConhecimento':
break;
default:
include "paginas/paginaInicial.php";
break;
}
?>
</div>
<?php include "footer.php"; ?>