index.php
5.98 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?php
/**********************************************************************************
Sistema e-SIC Livre: sistema de acesso a informação baseado na lei de acesso.
Copyright (C) 2014 Prefeitura Municipal do Natal
Este programa é software livre; você pode redistribuí-lo e/ou
modificá-lo sob os termos da Licença GPL2.
***********************************************************************************/
require_once("../inc/security.php");
//require_once('../class/recaptchalib.php');
$login = $_POST["login"];
$password = $_POST["password"];
$tipo = $_REQUEST['t'];
$msg = "";
if(usaRecaptcha($login))
$usarecap = true;
else
$usarecap = false;
if ($_POST['btsub'])
{
if($usarecap)
{
$error = null;
//$recaptcha_ok = checkRecaptcha($error);
$recaptcha_ok = (strtoupper($_POST["palavra"]) == strtoupper($_SESSION["palavra"]));
}
else
$recaptcha_ok = true;
if($recaptcha_ok)
{
if(autentica($login, $password, $tipo))
{
Redirect("../solicitacao");
}
else
{
$msg = "<font color='red'>Erro: falha no login.</font>";
$usarecap = true;
}
}
else
$msg = "<font color='red'>Erro: falha no login.</font>";
}
include("../inc/topo.php");
?>
<div id="migalha_de_Pao">Você está em: Principal</div>
<div id="principal">
<div id="banner">
<img src="../css/img/sic.png" alt="Imagem E-sic Livre"/>
</div>
<?php if (empty($_SESSION[SISTEMA_CODIGO])) { ?>
<div id="login">
<form action="index.php" method="post">
<div class="titulo_caixa_login"> Acesse o sistema</div>
<span class="Mensagem">Preencha o Nome do Usuário e senha para acessar o Sistema de Informações.</span>
<div id="campos">
<table cellpadding="1" cellspacing="5" width="80%">
<tr align="right">
<td>
<span class="labelLogin"><label for="login">Usuário: </label> </span>
</td>
<td>
<span class="inputLogin"><input type="text" name="login" maxlength="20"> </span>
</td>
</tr>
<tr align="right">
<td>
<span class="labelLogin"><label for="Senha">Senha: </LABEL> </span>
</td>
<td>
<span class="inputLogin"><input type="password" name="password" maxlength="100"> </span>
</td>
</tr>
<?php /*if ($usarecap) echo '<tr>
<td colspan="2">'.recaptcha_get_html(PUBLIC_KEY, $error).'<td>
<tr>' ; */?>
<?php if ($usarecap) { ?>
<tr>
<td colspan="2" align="right">
<br>
<img src="../inc/captcha.php?l=150&a=50&tf=20&ql=5" id="imgcaptcha">
<img src="../img/refresh.gif" title="Clique aqui para recarregar a imagem" alt="Clique aqui para recarregar a imagem" onclick="getElementById('imgcaptcha').src ='../inc/captcha.php?l=150&a=50&tf=20&ql=5';">
<br><span class="labelLogin">Informe o código acima:</span><br><input type="text" name="palavra" />
</td>
</tr>
<?php } ?>
<tr align="right">
<td>
</td>
<td>
<br><input type="submit" class="inputBotao" name="btsub" value="Entrar">
</td>
</tr>
<tr align="right">
<td colspan="2">
<a class="class_cadastrese" href="../cadastro">Cadastre-se</a> |
<a class="class_senha" href="../reset">Esqueci a senha</a>
</td>
</tr>
</table>
</div>
</form>
</div>
<?php } else {?>
<div id="login">
<span class="Mensagem">
<br>
Olá <?php echo getSession("nomeusuario");?>!
<br><br>
Caso não seja você [<a href="../index/logout.php" class="class_cadastrese">clique aqui</a>]
</span>
</div>
<?php } ?>
</div>
<div id="notificacoes">
<div id="linha"></div>
<div id="links">
<table width="100%">
<tr>
<th width="40%">
SIC - Serviço de informação ao Cidadão
</th>
<th width="30%">
Lei de Acesso
</th>
<th width="30%">
Links úteis
</th>
</tr>
<tr>
<td>
<a href="../manual/informacao.php">Como pedir uma informação</a>
</td>
<td>
<a href="../manual/decreto.php">Decreto</a>
</td>
<td>
<a href="http://www.acessoainformacao.gov.br/acessoainformacaogov/">Acesso à informação CGU</a>
</td>
</tr>
<tr>
<td>
<a href="../manual/pedido.php">Como acompanhar seu pedido</a>
</td>
<td>
<a href="../manual/LegislacaoRelacionada.php">Legislação relacionada</a>
</td>
<td>
<a href="http://portal2.tcu.gov.br/portal/page/portal/TCU/transparencia">Acesso à informação TCU</a>
</td>
</tr>
<tr>
<td>
<a href="../manual/recurso.php">Como entrar com um recurso</a>
</td>
<td>
Leis
</td>
<td>
</td>
</tr>
</table>
</div>
<div id="postagens"></div>
</div>
<?php include("../inc/rodape.php"); ?>