-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
82 lines (55 loc) · 2.37 KB
/
index.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
<!-- Sort out .includes -->
<!-- Delete old shit and make template -->
<!-- Connecting to the Database -->
<?php include 'includes/dbc.php' ?>
<!-- Start of HTML Page -->
<!DOCTYPE html>
<html lang="en">
<!-- Constants.php should incude: Site title & other constants -->
<?php include 'includes/constants.php'; ?>
<head>
<title><?php echo $title ?></title>
<?php include 'includes/head.php'; ?>
</head>
<body>
<div id="background-image"></div>
<div id="body-wrapper">
<?php include 'includes/header.php'; ?>
<div class="title-page">
<div id="title-container">
<h1 class="title-text"><?php echo $title ?></h1>
</div>
<div class="container">
<p class="body-text"><?php echo $title ?> is a website designed and developed to inform and educate the students and families of Onslow College about the College's history, its surrounding whenua (area), the people who contribute to it, and what Onslow College contributes back to the community. All done In an engaging manor using Spaced Repetition Software (SRS) developed by <?php echo $authorName ?>.</p>
</div>
</div>
<div class="lesson-cards">
<?php
// Setting up the query
$dbc = mysqli_connect("localhost", "root", 'admin', "srs");
$subjectsQuery = 'CALL GetSubjects()';
$subjectsResult = mysqli_query($dbc, $subjectsQuery);
// echo each Team into a drop down menu
while($subjectsRecord = mysqli_fetch_assoc($subjectsResult)){
// $subjectsRecord['subjectName']
echo '<div class="card-wrapper">';
echo '<div class="card-container">';
echo '<a class="card" href="question.php?id=' . $subjectsRecord['subjectID'] . '">';
echo '<div class="card-title">';
echo '<img class="illustration card-top" src="imgs/lesson-card-top.svg" alt="">';
echo '<h1 class="card-title">' . $subjectsRecord['subjectName'] .'</h1>';
echo '</div>';
echo '<img class="illustration" src="' . $subjectsRecord['subjectImg'] . '" alt="An illustration depicting' . $subjectsRecord['subjectName'] . ' ">';
echo '</a>';
echo '</div>';
echo '</div>';
}
?>
</div>
</div>
<footer> <!-- Nav bar inspired by https://www.youtube.com/watch?v=PwWHL3RyQgk -->
<?php include 'includes/footer.php'; ?>
</footer>
<?php include 'includes/scripts.php'; ?>
</body>
</html>