-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathartigo2.php
53 lines (45 loc) · 1.91 KB
/
artigo2.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
<?php
include 'head.php';
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Retrospect by TEMPLATED</title>
</head>
<body style="background-color: #195128">
<header>
<a href="testpage1.php">
<img src="imagens/LogoIF.png" alt="logo">
</a>
<h1>Eventos - IFSP </h1>
<div id="contato">
<img src="imagens/logoinstagram.png" alt="Instagramlogo">
<a href="#instagram">Instagram</a>
</div>
<hr>
</header>
<section id="artigo">
<?php
$tittle=$_GET['tittle'];
$sql="SELECT texto_noticia,titulo,data_noticia,link_noticia,img,descricao_noticia, nome_atividade FROM `eventos_atividades_noticias` inner join eventos_atividades on eventos_atividades.cod_atividade=eventos_atividades_noticias.cod_atividade WHERE titulo='$tittle'";
$result=$conn->query($sql);
if($result->num_rows>0){
while($row=$result->fetch_assoc()){
$datatime=strtotime($row['data_noticia']);
$dataformatada=date('d/m/y',$datatime);
echo"<div class='informacoes-artigo'>
<h2>".$row['titulo']."</h2>
<p>".$row['descricao_noticia']."</p>
<img src=data:image/jpeg;base64,".base64_encode($row['img'])." alt='Logo'>
<p>".$row['texto_noticia']."</p>
<h5>".$dataformatada."</h5>
<h3>Atividade correspondente:".$row['nome_atividade']."</h3>
<button id='botaosite'><a href=".$row['link_noticia']." class='aab'>Site da Notícia</a></button>
</div>
";
}
}
?>
</section>
</body>
</html>