-
Notifications
You must be signed in to change notification settings - Fork 0
/
OS.php
96 lines (54 loc) · 4 KB
/
OS.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
<?php
// This will set the title of the page.
$title = 'Operating Systems';
require 'header.php';
if (isset($_COOKIE['userID'])) { ?>
<!-- the code below will set out the cards on the course webpage. a for loop is used to generate the cards with the statements below to differentiate the data. -->
<div class="container">
<div class="row text-center">
<?php
for ($i = 1; $i < 7; $i++) {
if ($i == 1) {
$img = 'images/image1.jpg';
$href = 'courses/OS/1.php';
$ref = 'Image by <a href="https://pixabay.com/photos/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=336378">Free-Photos</a> from <a href="https://pixabay.com/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=336378">Pixabay</a>';
} else if ($i == 2) {
$img = 'images/image2.jpg';
$href = 'courses/OS/2.php';
$ref = 'Image by <a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=3382507">Gerd Altmann</a> from <a href="https://pixabay.com/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=3382507">Pixabay</a>';
} else if ($i == 3) {
$img = 'images/image3.jpg';
$href = 'courses/OS/3.php';
$ref = 'Image by <a href="https://pixabay.com/users/DarkWorkX-1664300/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=4261549">DarkWorkX</a> from <a href="https://pixabay.com/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=4261549">Pixabay</a>';
} else if ($i == 4) {
$img = 'images/image4.jpg';
$href = 'courses/OS/4.php';
$ref = 'Image by <a href="https://pixabay.com/users/stevepb-282134/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=2836842">Steve Buissinne</a> from <a href="https://pixabay.com/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=2836842">Pixabay</a>';
} else if ($i == 5) {
$img = 'images/image5.jpg';
$href = 'courses/OS/5.php';
$ref = 'Image by <a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=3233653">Gerd Altmann</a> from <a href="https://pixabay.com/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=3233653">Pixabay</a>';
} else if ($i == 6) {
$img = 'images/image6.jpg';
$ref ='Image by <a href="https://pixabay.com/users/GraphicsSC-1426978/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=1135176">GraphicsSC</a> from <a href="https://pixabay.com/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=1135176">Pixabay</a>';
$href = 'courses/OS/6.php';
}
?>
<div class="col-lg-4 col-sm-6 my-1 d-flex align-items-stretch">
<div class="card">
<img src="<?php echo $img ?>" class="card-img-top img-fluid" alt="project pic">
<p><?php echo $ref ?></p>
<div class="card-body">
<h5 class="card-title"><?php echo 'Lecture ' . $i ?></h5>
<p> <a class="btn btn-success btn-sm" href="<?php echo $href ?>">Go to Notes!</a></p>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<?php
} ?>
<?php
require 'footer.php';
?>