-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
47 lines (34 loc) · 1.1 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
<?php
include('control/logincontrol.php');
include('view.php');
$l = new LoginControl();
write_upper();
write_header();
?>
<?php
if (!$_SESSION['logado']) {
?>
<div id="menu">
<form id="frmLogin" method="post" action="index.php">
<?php if ($_SESSION['erros']['login']) printf(" <p class=\"erro\">login e/ou senha inválidos!</p>\n"); ?>
<label for="login">Login</label><input id="login" name="login|!" type="text" maxlength="255" value="<?php echo $_SESSION['usuario']['login'] ?>" />
<label for="senha">Senha</label><input id="senha" name="senha|!" type="password" maxlength="255" />
<input id="btnLogin" name="logar" class="botao" type="submit" value="Login" />
</form>
</div>
<div id="conteudo">
<?php
}
else {
write_menu();
}
?>
<h1>Últimas notícias</h1>
<h2>Inaugurado o site do cursinho comunitário da UFSCar</h2>
<p>Foi inaugurado este site. Usem-no com cuidado!</p>
<?php
unset($_SESSION['usuario']);
unset($_SESSION['erros']);
write_footer();
write_down();
?>