-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtopics.php
69 lines (63 loc) · 2.41 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
include 'controllers/autoload.php';
include 'public/topic_navbar.php';
$get_id = $_GET['s'];
// ini_set( 'error_reporting', E_ALL);
// ini_set( 'display_errors', true );
?>
<style type="text/css">
html{
background-color: #eeeee1;
}
html,body{
height: 100%;
}
</style>
<div class="container">
<div class="row">
<div class="col s12 m12 l12 animated fadeIn">
<?php
$overallTopics = new Lessons();
$query_data = $overallTopics->getLessonTopics($mysqli,$get_id);
$query_count = $query_data->num_rows;
if ($query_count > 0) {
# code...
while ($row = $query_data->fetch_array(MYSQLI_BOTH))
{
$lesson_id = $row['id'];
$lesson_title = ucfirst($row['topics']);
$lessons = $row['lessons']; // this is the foreign key constraint
?>
<div class="card-panel">
<span style="text-transform: capitalize;font-size: 18px;"><a href="featured/<?php echo "$lessons"; ?>/<?php echo "$lesson_id"; ?>"><?php echo "$lesson_title"; ?></a></span>
<a href="#" class="dropdown-button waves-effect waves-ripple waves-circle" data-activates="dropdown<?php echo "$lesson_id";?>" id="view_details"><i class="material-icons vD123xLOd">more_vert</i></a>
<ul class="dropdown-content detail_dropdown" id="dropdown<?php echo "$lesson_id";?>">
<li class="waves-effect waves-ripple"><a href="featured/<?php echo "$lessons"; ?>/<?php echo "$lesson_id"; ?>"><i class="material-icons">visibility_on</i>Read ..</a></li>
<li class="divider"></li>
<li class="waves-effect waves-ripple"><a href="#"><i class="material-icons">description</i>Description</a></li>
<li class="divider"></li>
<li class="waves-effect waves-ripple"> <a href="bug_reports"><i class="material-icons">bug_report</i>Report Bug</a></li>
</ul>
<script type="text/javascript">
$("#dropdown<?php echo "$lesson_id";?>").dropdown({
gutter:1,
belowOrigin:true
});
</script>
</div>
<?php
}
}else
{
?>
<div class="card-panelm bg">
<img src="public/images/books1.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>
</div>