-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcourse.php
144 lines (102 loc) · 4.62 KB
/
course.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
session_start();
$_SESSION['loggedin'] = true;
if (isset($_SESSION['username']))
{
echo $_SESSION['username'];
}
include'admin/connect.php';
include'includes/functions/functions.php';
$pic ='';
if ($pic != NULL || $pic != '')
{
$_SESSION['profilePic'] = $pic;
}
else
{
$pic = "/assets/userImages/DefualtUser.png";
$_SESSION['profilePic'] = $pic;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../layout/css/main.css">
<link rel="stylesheet" href="./layout/css/index.css">
<link rel="stylesheet" href="./layout/css/courses.css">
<link rel="stylesheet" href="./layout/assets/css/">
<!-- Fonts and icons -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
<!-- Nucleo Icons -->
<link href="layout/assets/css/nucleo-icons.css" rel="stylesheet" />
<link href="layout/assets/css/nucleo-svg.css" rel="stylesheet" />
<!-- Font Awesome Icons -->
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
<link href="layout/assets/css/nucleo-svg.css" rel="stylesheet" />
<!-- CSS Files -->
<link id="pagestyle" href="layout/assets/css/soft-ui-dashboard.css?v=1.0.7" rel="stylesheet" />
<title>Home</title>
</head>
<body>
<?php include 'includes/template/navhome.php'?>
<!--
<div class="container-l">
<div class="hero-image">
<img src="https://images.unsplash.com/photo-1616400619175-5beda3a17896?q=80&w=1674&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="">
</div>
<div class="hero-text">
<div class="quotes">
<h3>Learn</h3>
<h2>grow</h2>
<h1>prosper</h1>
</div>
</div>
</div> -->
<div style="flex:1;">
</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>
<div>
<div class="course-view Hidden" id="course-view " >
</div>
</div>
<script src="./layout/js/index.js"></script>
</body>
</html>