-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathallCourses.php
More file actions
73 lines (57 loc) · 2.43 KB
/
allCourses.php
File metadata and controls
73 lines (57 loc) · 2.43 KB
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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>All Courses</title>
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,700|Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="css/styles-merged.css">
<link rel="stylesheet" href="css/style.min.css">
</head>
<body>
<!-- Fixed navbar -->
<?php include "include/navbar.php"; ?>
<section class="probootstrap-section">
<div class="container">
<div class="row">
<?php
$i=1;
$html=[];
$allCourses=displayAllCourse();
if(is_array($allCourses))
{
foreach ($allCourses as $key => $value)
{
$words = explode(" ", $value['c_description']);
$words = array_slice($words, 0, 25);
$description=implode(" ", $words);
echo '<div class="col-md-6">
<div class="probootstrap-service-2 probootstrap-animate">
<div class="image">
<div class="image-bg">
<img src="img/course_img/'.$value['c_image'].'">
</div>
</div>
<div class="text">
<span class="probootstrap-meta"><i class="icon-calendar2"></i> '.formatDate($value['created_at']).'</span><br>
<span class="badge" style="background:#6fd96f">'.ucwords(htmlspecialchars($value['program'])).'</span>
<h3>'.ucwords(htmlspecialchars($value['c_name'])).'</h3>
<p>'.$description.'</p>
<p><a href="" p_id='.$value['p_id'].' c_id='.$value['id'].' data-target=".courseEnroll" class="btn btn-primary applyCourse" data-toggle="modal" >Enroll</a>
<a href="" c_id='.$value['id'].' class="btn btn-info detailCourse" data-target=".viewCourseDetail" data-toggle="modal" >Detail</a> </p></p>
</div>
</div>
</div>';
}
}
?>
</div>
</div>
</section>
<?php include "include/footer.php"; ?>
<!-- END wrapper -->
</body>
</html>