-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
120 lines (113 loc) · 3.13 KB
/
index.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
<?php
setlocale(LC_ALL, 'pt_BR');
date_default_timezone_set('America/Sao_Paulo');
session_start();
@$pag = $_GET['pg'];
if($pag == NULL || $pag == ''){
if(!isset($_SESSION['logado'])){
$_SESSION['logado'] = 0;
$_SESSION['cod_usuario'] = '';
}
?>
<script type="text/javascript">
document.location.href = "index.php?&pg=!";
</script>
<?php
}
if ($pag =='erro1') {
?>
<script type="text/javascript">
alert("Você não tem permissão para acessar o painel!");
document.location.href = "index.php";
</script>
<?php
}
if ($pag == 'logout') {
?>
<script type="text/javascript">
alert("Até breve!");
document.location.href = "index.php?&pg=!";
</script>
<?php
$_SESSION['logado'] = 0;
}
include('pags/cabecalho.php');
include('pags/menu.php');
switch($pag) {
//Menu
case 'inicio':
include('pags/inicio.php');
break;
case 'galeria':
include('pags/galeria.php');
break;
case 'eventos':
include('pags/eventos.php');
break;
case 'noticias':
include('pags/noticias.php');
break;
// case 'contato':
// include('pags/contato.php');
// break;
case 'login':
include('pags/login.php');
break;
case 'cadastro':
include('pags/cadastro.php');
break;
case 'pesquisar':
include('pags/pesquisar.php');
break;
//Login
case 'recuperarsenha':
include('pags/recuperarsenha.php');
break;
case 'redefinirsenha':
include('pags/redefinirsenha.php');
break;
case 'adm':
include('pags/adm.php');
break;
//Noticias
case 'noticia':
include('pags/noticia.php');
break;
case 'publicarnoticia':
include('pags/publicarnoticia.php');
break;
case 'noticiaspendentes':
include('pags/noticiaspendentes.php');
break;
case 'editarnoticia':
include('pags/editarnoticia.php');
break;
//Usuário
case 'todosusuarios':
include('pags/todosusuarios.php');
break;
case 'editarusuario':
include('pags/editarusuario.php');
break;
case 'editandousuario':
include('pags/editandousuario.php');
break;
case 'usuariopg':
include('pags/usuariopg.php');
break;
//Galeria
case 'publicarfoto':
include('pags/publicarfoto.php');
break;
case 'editarfoto':
include('pags/editarfoto.php');
break;
case 'foto':
include('pags/foto.php');
break;
default:
include('pags/inicio.php');
break;
}
include('pags/rodape.php');
?>