-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
63 lines (56 loc) · 1.39 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
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SIPS</title>
<link rel="stylesheet" type="text/css" href="css/base.css">
</head>
<body>
<?php ?>
<div id="global">
<?php
include("php/main.php");
include("php/menu.php");
?>
<div class="content">
<section>
<h1>Informativos e Resultados</h1>
</section>
<section>
<?php
include("php/conexao_banco.php");
echo "<ul class='informativo'>";
$conexao_consulta = new Conexao();
$consulta = $conexao_consulta->conectar()->query("select * from informativo ORDER by data desc");
while ($linha = $consulta->fetch(PDO::FETCH_ASSOC)) {
$img;
if($linha['tipo'] === "informativo"){
$img = "img/informativo.png";
}else{
$img = "img/resultado.png";
}
$link;
if ($linha['arquivo'] == null || $linha['arquivo'] =='') {
$link = null;
}else{
$link ="<a download href='docs/{$linha['arquivo']}'>Baixar Anexo</a>";
}
echo "<li>
<div>
<img src='$img'>
<h2>{$linha['titulo']}</h2><br>
<p>{$linha['texto']}</p><br>"
.$link."
</div>
</li>";
}
echo '</ul>';
?>
</section>
</div>
</div>
</body>
</html>