-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft
77 lines (51 loc) · 3.66 KB
/
draft
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
70
71
72
73
74
75
76
77
<div class="box">
<div class="statues">
<div><i class=" fas fa-circle me-2 text-success"></i><span class="text-success"><?= $fetch_playlist['status']; ?></span></div>
<div><i class="fas fa-calendar me-2"></i><span><?= $fetch_playlist['date']; ?></span></div>
</div>
<div class="thumb">
<span class="badge bg-secondary"><?= $total_videos; ?> Videos</span>
<img src="uploaded_files/<?= $fetch_playlist['image']; ?>" class="img-fluid">
</div>
<h3 class="title mt-3"><?= $fetch_playlist['title']; ?></h3>
<p class="description"><?= $fetch_playlist['description']; ?></p>
<!-- Delete Playlist Form -->
</div>
<div class="close"><button onclick="document.getElementById('course-view').classList.add('Hidden');"><i class="fas fa-times"></i></button></div>
<div class="courses">
<!-- Playlist Items -->
<?php
$select_playlist = $con->prepare("SELECT * FROM `playlist`");
$select_playlist->execute();
if($select_playlist->rowCount() > 0){
while($fetch_playlist = $select_playlist->fetch(PDO::FETCH_ASSOC)){
$playlist_id = $fetch_playlist['id'];
$count_videos = $con->prepare("SELECT * FROM `content` WHERE playlist_id = ?");
$count_videos->execute([$playlist_id]);
$total_videos = $count_videos->rowCount();
?>
<div class="course">
<div class="statues">
<div class="state"> <i class=" fas fa-circle me-2 text-success"></i><span class="text-success"><?= $fetch_playlist['status']; ?></span></div>
<div><i class="fas fa-calendar me-2"></i><span><?= $fetch_playlist['date']; ?></span></div>
<span class="badge bg-secondary"><?= $total_videos; ?> Videos</span>
</div>
<div class="thumb">
<img draggable="false" src="uploaded_files/<?= $fetch_playlist['image']; ?>" class="img-fluid course-image">
</div>
<div class="course-details">
<div class="course-text">
<h3 class="title mt-3"><?= $fetch_playlist['title']; ?></h3>
<p class="description"><?= $fetch_playlist['description']; ?></p>
<button>View</button>
</div>
</div>
<!-- Delete Playlist Form -->
</div>
<?php
}
} else {
echo '<div class="col-md-4"><div class="box"><p class="empty">No playlist added yet!</p></div></div>';
}
?>
</div>