-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_topics.php
41 lines (40 loc) · 1.59 KB
/
view_topics.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
<?php
$title = "All Book Categories";
$sub_title = "";
?>
<!-- Header-->
<header class="bg-dark py-5" id="main-header">
<div class="container px-4 px-lg-5 my-5">
<div class="text-center text-white">
<h1 class="display-4 fw-bolder"><?php echo $title ?></h1>
</div>
</div>
</header>
<!-- Section-->
<section class="py-5">
<div class="container px-4 px-lg-5 mt-5">
<div class="row gx-2 gx-lg-5 row-cols-1 row-cols-md-2 row-cols-xl-2 justify-content-center">
<?php
$whereData = "";
$categories = $conn->query("SELECT * FROM `topics` where status = 1 order by name asc ");
while($row = $categories->fetch_assoc()):
foreach($row as $k=> $v){
$row[$k] = trim(stripslashes($v));
}
$row['description'] = strip_tags(stripslashes(html_entity_decode($row['description'])));
?>
<div class="col mb-6 mb-2">
<a href="./?p=articles&t=<?php echo md5($row['id']) ?>" class="card category-item text-dark">
<div class="card-body p-4">
<div class="">
<!-- Product name-->
<h5 class="fw-bolder border-bottom border-primary"><?php echo $row['name'] ?></h5>
</div>
<p class="m-0 truncate"><?php echo $row['description'] ?></p>
</div>
</a>
</div>
<?php endwhile; ?>
</div>
</div>
</section>