-
Notifications
You must be signed in to change notification settings - Fork 138
/
modal.php
168 lines (161 loc) · 8.77 KB
/
modal.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
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
if (isset($_GET['mentor_id'])) {
require_once 'classControllers/mentor.php';
require_once 'config/database.php';
?>
<!-- Button trigger modal -->
<div class="modal fade" id="mentor-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="text-center">Mentor Details</h3>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<?php
$ment = new Mentors;
$details = $ment->ById($_GET['mentor_id']);
?>
<div class="col-md-6 col-8">
<img src="<?php echo $details['photo_url'] ?>" class="img-thumbnail img-fluid " alt="">
</div>
</div>
<div class="row">
<div class="col-md-12 col-10 table-responsive">
<table class="table table-hover mt-3 mb-1">
<tbody>
<tr>
<th scope="row" class="table-primary">name</th>
<td class=""><?php echo $details['name']; ?></td>
</tr>
<tr>
<th scope="row">Area of Expertise</th>
<td class="text-wrap"><?php echo $details['area_of_expertise']; ?></td>
</tr>
<tr>
<th scope="row">Phone Number</th>
<td class="text-wrap"><?php echo $details['phone_no']; ?></td>
</tr>
<tr>
<th scope="row">Email</th>
<td class="text-wrap"><?php echo $details['email']; ?></td>
</tr>
<tr>
<th scope="row">Portfolio Link</th>
<td><?php echo $details['link_to_portfolio']; ?></td>
</tr>
<tr>
<th scope="row">Linkedin link</th>
<td class="text-wrap"><?php echo $details['link_to_linkedin']; ?></td>
</tr>
<tr>
<th scope="row">Link to Cv</th>
<td class="text-wrap"><?php echo $details['link_to_cv']; ?></td>
</tr>
<tr>
<th scope="row">Why Interested</th>
<td class="text-wrap"><?php echo $details['why_interested']; ?></td>
</tr>
<tr>
<th scope="row">Current State</th>
<td class="text-wrap"><?php echo $details['current_state']; ?></td>
</tr>
<tr>
<th scope="row">Employment Status</th>
<td class="text-wrap"><?php echo $details['employment_status']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<?php
}
if (isset($_GET['id'])) {
require_once 'classControllers/Interns.php';
require_once 'config/database.php';
$interns = new Intern;
$internDetails = $interns->view();
?>
<?php ob_start(); ?>
<!-- Modal to display each Intern -->
<div class="modal fade" id="details-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="text-center">Intern Details</h3>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 col-10 table-responsive">
<table class="table table-hover mt-3 mb-1">
<tbody>
<tr>
<th scope="row">Intern ID:</th>
<td class=""><?= $internDetails['intern_id']; ?></td>
</tr>
<tr>
<th scope="row">Name:</th>
<td class=""><?= $internDetails['name']; ?></td>
</tr>
<tr>
<th scope="row">Email:</th>
<td class=""><?= $internDetails['email']; ?></td>
</tr>
<tr>
<th scope="row">Phone No:</th>
<td class=""><?= $internDetails['phone_no']; ?></td>
</tr>
<tr>
<th scope="row">Link To Portfolio:</th>
<td class=""><?= $internDetails['link_to_portfolio']; ?></td>
</tr>
<tr>
<th scope="row">Link To CV:</th>
<td class=""><?= $internDetails['link_to_cv']; ?></td>
</tr>
<tr>
<th scope="row">Interest:</th>
<td class=""><?= $internDetails['interest']; ?></td>
</tr>
<tr>
<th scope="row">Current Location:</th>
<td class=""><?= $internDetails['current_location']; ?></td>
</tr>
<tr>
<th scope="row">Employment Status:</th>
<td class=""><?= $internDetails['employment_status']; ?></td>
</tr>
<tr>
<th scope="row">About:</th>
<td class=""><?= $internDetails['about']; ?></td>
</tr>
<tr>
<th scope="row">Tmie Registered:</th>
<td class=""><?= $internDetails['timestamp']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<?php echo ob_get_clean(); ?>
<?php
}
?>