-
Notifications
You must be signed in to change notification settings - Fork 138
/
read_news.php
59 lines (52 loc) · 1.91 KB
/
read_news.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
<?php
require 'classControllers/init.php';
if(!isset($_GET['id'])){
header("location:index.php");
}
$id = $_GET['id'];
$news = new Subscribers();
$the_news = $news->fetch_the_newsletter($id);
if(!is_array($the_news)){
header("location:index.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>News Page</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="stylesheet" type="text/css" href="css/read_news.css">
<link rel="stylesheet" type="text/css" href="css/header-footer.css">
<link rel="icon" type="img/png" href="images/hng-favicon.png">
</head>
<body>
<div class="container">
<div class="header">
<div class="image">
<img src="uploads/newsletter/<?php echo $the_news['image'];?>" alt="<?php echo $the_news['title'];?> image">
</div>
</div>
<figure>
<blockquote><strong><?php echo $the_news['title'];?></strong><br> <span class="time-text">on <?php echo $the_news['date_created'];?></span></blockquote>
</figure>
<div class="para">
<p>
<?php echo $the_news['content'];?>
</p>
</div>
<hr>
<div>
<a href="newsletter_history"><h6>Back to News Update Archive</h6></a>
</div>
</div>
</body>
</html>