-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArticlesHandler.php
More file actions
29 lines (25 loc) · 912 Bytes
/
ArticlesHandler.php
File metadata and controls
29 lines (25 loc) · 912 Bytes
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
<?php
require_once("controller.php");
$ac = new ArticleController();
$start = $_POST["start"];
$limit = $_POST["limit"];
$max = $ac->getNbrArticles();
if ($start >= $max){
$start = $max - $limit;
}
$r = $ac->getArticles($start, $limit);
foreach($r as $lg){
echo ' <div class="clean-blog-post">
<div class="row">
<div class="col-lg-5"><img class="rounded img-fluid" src="uploads/Articles/'.$lg["Image"].'"></div>
<div class="col-lg-7">
<h3>'.$lg["Titre"].'</h3>
<div class="info"><span class="text-muted">'.$lg["Date"].' by <a href="#">'.$lg["auteur"].'</a></span></div>
<p class="body-article">'.$lg["body"].'</p>
<button class="btn btn-outline-primary btn-sm" type="button">Read More</button>
</div>
</div>
</div>
<hr/>';
}
?>