-
Notifications
You must be signed in to change notification settings - Fork 0
/
single_result.php
155 lines (147 loc) · 4.55 KB
/
single_result.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
require_once 'connection.php';
$institution = $_GET["institution"];
$course_id = $_GET["course_id"];
$course_name;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
<meta name="description" content="" />
<title>Search Result</title>
<!-- shortcut icon -->
<link rel="shortcut icon" href="favicon.png">
<!-- css -->
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<!-- <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/> -->
<link href="css/materialdesignicons.min.css" media="all" rel="stylesheet" type="text/css" />
<style>
@media print{
footer, button.btn{
display: none;
}
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col m12 center-align">
<?php
$query = mysqli_query($dbc, "SELECT * FROM institutions WHERE institution_id='$institution'");
while ($data = mysqli_fetch_array($query)) {
$institution_name = $data["institution_name"];
$website = $data["website"];
?>
<h1><?php echo $institution_name; ?></h1>
<h5 class="flow-text"><a href="<?php echo $website; ?>"><?php echo $website; ?></a></h5>
<?php } ?>
<button class="btn" onclick="window.print()">Print</button>
</div>
</div>
<div class="row">
<div class="col s12 m7">
<h4 class="flow-text">Course Description</h4>
<div class="">
<table class="bordered striped">
<thead>
<tr>
<th width="25%">Name</th>
<th>Descripting</th>
</tr>
</thead>
<tbody>
<?php
$query = mysqli_query($dbc, "SELECT courses.course_name, requirements.jamb_subjects, requirements.jamb_score, requirements.waec_passes, courses.course_desc FROM courses INNER JOIN requirements ON courses.course_id=requirements.course_id AND requirements.institution_id='$institution' AND requirements.course_id='$course_id'");
while ($data = mysqli_fetch_array($query)) {
$course_name = $data["course_name"];
?>
<tr>
<td>Course Name</td>
<td><?php echo $data["course_name"]; ?></td>
</tr>
<tr>
<td>Jamb Subjects</td>
<td><?php echo $data["jamb_subjects"]; ?></td>
</tr>
<tr>
<td>Jamb Score</td>
<td><?php echo $data["jamb_score"]; ?></td>
</tr>
<tr>
<td>WAEC Passes</td>
<td><?php echo $data["waec_passes"]; ?></td>
</tr>
<tr>
<td>Courese Description</td>
<td><?php echo $data["course_desc"]; ?></td>
</tr>
<?php }
?>
</tbody>
</table>
</div>
</div>
<div class="col s12 m5">
<h4 class="flow-text">Other resources</h4>
<div class="">
<table class="bordered striped">
<thead>
<tr>
<th width="">Name</th>
<th width="">Resources</th>
</tr>
</thead>
<tbody>
<tr>
<td>Wikipedia</td>
<td>read more on <a href="https://en.wikipedia.org">wikpedia</a></td>
</tr>
<tr>
<td>Linkedin</td>
<td>View jobs on <a href="www.linkedin.com">linkedin</a></td>
</tr>
<tr>
<td>Jobber man</td>
<td>View Jobs on <a href="www.jobberman.com">Jober Man</a></td>
</tr>
<tr>
<td>EDX</td>
<td>Study free on <a href="https://www.edx.org">edx.org</a></td>
</tr>
</tbody>
</table>
</div>
<h4>Counselor(s)</h4>
<table class="bordered striped">
<thead>
<tr>
<th>Counselor Name</th>
<th>Email</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
<?php
$gq = mysqli_query($dbc, "SELECT * FROM counselors WHERE course_id='$course_id'");
while($d = mysqli_fetch_array($gq)):
?>
<tr>
<td><?php echo $d["name"]; ?></td>
<td><?php echo $d["email"]; ?></td>
<td><?php echo $d["phone"]; ?></td>
</tr>
<?php endwhile ?>
</tbody>
</table>
</div>
</div>
</div>
<!-- link to footer -->
<?php require_once 'includes/footer.php'; ?>
<!-- links to external javascript -->
<?php require_once 'includes/js_includes.php'; ?>
</body>
</html>