-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlessons.php
48 lines (47 loc) · 1.4 KB
/
lessons.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
<?php
require_once 'controllers/autoload.php';
include 'public/navbar.php';
//Instantiating the word concatenation
$_resizeWords = new WordTruncat();
?>
<div class="row">
<div class="col s12 m10 l10 offset-m1 offset-l1">
<?php
$overallTopics = new Lessons();
$query_data = $overallTopics::getTopics($mysqli);
$query_count = $query_data->num_rows;
if ($query_count > 0) {
# code...
while ($row = $query_data->fetch_array(MYSQLI_BOTH))
{
$id = $row['id'];
$title = $_resizeWords::truncatFunction($row['title'],19,"...");
$image = $row['image'];
?>
<div class="col s12 m3 l3 animated fadeIn">
<a href="collections/<?php echo "$id"; ?>">
<div class="card-panel col s12 m12 l12 waves-effect waves-ripple waves-block z-depth-2" id="pd-0">
<div class="image-header">
<img src="<?php echo "$image"; ?>" class="responsive-img"/>
</div>
<span class="caption center-align">
<?php echo "$title"; ?>
</span>
</div>
</a>
</div>
<?php
}
}else
{
?>
<div class="card-panelm bg animated fadeIn">
<img src="public/images/bookshelf.svg" alt="Help Desk" class="responsive-img help"/>
</div>
<h5 class="center-align grey-text text-darken-3">No Lessons Available</h5>
<h5 class="center-align grey-text text-darken-3 small-text">Go Back To Categories</h5>
<?php
}
?>
</div>
</div>