-
Notifications
You must be signed in to change notification settings - Fork 138
/
pending_mentors.php
225 lines (198 loc) · 9.74 KB
/
pending_mentors.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?php
require 'classControllers/init.php';
if (!isset($_SESSION["role"])) {
header('Location:login');
}
$mentors = new Mentor;
$display = $mentors->pendingMentors();
if (isset($_GET['acceptMentorId'])) {
$mentor_id = $_GET['acceptMentorId'];
$message = $mentors->AcceptMentor($mentor_id);
$_SESSION['msg'] = "<div class='alert alert-success'>Mentor accepted successfully</div>";
}
if (isset($_GET['rejectMentorId'])) {
$mentor_id = $_GET['rejectMentorId'];
$message = $mentors->RejectMentor($mentor_id);
$_SESSION['msg'] = "<div class='alert alert-info'>Mentor rejected successfully</div>";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Mentors</title>
<link rel="icon" type="img/png" href="images/hng-favicon.png">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<!--This contains the styling for the side bar -->
<link href="css/dashboard.css?v=<?php echo time(); ?>" rel="stylesheet" type="text/css" />
<link href="css/newDashboard.css?v=<?php echo time(); ?>" rel="stylesheet" type="text/css" />
<!-- This version required for Pagination -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<style type="text/css">
/* .card {
height: 150px;
background: #ccc;
margin: 15px;
padding: 10px;
border-radius: 15px;
}
@media (max-width: 320px){
.heading{
width: 170px;
margin-left: 50px !important;
margin-right: auto !important;
text-align: center !important;
}
.searchBox {
margin-top: 70px;
}
.fa-search{
margin-top: 10px;
}
} */
</style>
</head>
<body>
<main class="reg">
<div id="overlay"></div>
<div id="export-modal">
<span class="close">×</span>
<div>
<input type="radio" id="csv" name="exportOptions"><label for="csv">Export to CSV</label>
</div>
<div>
<input type="radio" id="pdf" name="exportOptions"><label for="pdf">Export to PDF</label>
</div>
<p id="message"></p>
<button type="button" class="exports" id="download">Download</button>
</div>
<input type="text" class="searchBox"><i class="fas fa-search"></i>
<section id="overview-section">
<!-- <h1>Dashboard</h1> -->
<h2 class="heading">Pending Mentors </h2>
<div class="mentor-buttons">
<a href="registered_mentors" class="btn btn-default">Active Mentors</a>
<a href="declined_mentors" class="btn btn-default">Declined Mentors</a>
</div>
<!-- <section id="intern-section">
Populated by `js/dashboard.js`
</section> -->
<div>
<div class="row">
<?php
if(isset($_SESSION['msg'])){
echo $_SESSION['msg'];
unset($_SESSION['msg']);
}
if ($display == "0") {
echo "<h2>There are no pending mentors</h2>";
} else {
?>
<!--<div class="col-md-3">-->
<!-- <a href="exports/export-to-excel-mentors.php">-->
<!-- <button type="button" id="export">Export to Spreadsheet</button>-->
<!-- </a>-->
<!--</div>-->
<!-- <div class="col-md-3">
<a href="#" onclick="javascript:printDiv('printablediv')">
<button type="button" class="btn btn-primary btn-sm" id="export">Export to PDF</button>
</a> -->
</div>
<!-- <div id="printablediv" class="table-responsive"> -->
<div id="printablediv">
<div class="scroll">
<!-- <table id="my-table" class="table table-hover table-bordered mt-3 mb-1"> -->
<table id="my-table" class="table table-hover mentor-table">
<!-- <thead class="table-primary"> -->
<thead>
<tr>
<th data-heading="sn">SN<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="expertise">Area Of Expertise<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="photo">Photo<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="name">Name<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="email">Email<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="phone">Phone<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<!-- <th>Link To Linkedin</th> -->
<th data-heading="cv">Link To Cv<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="Interest">Why Interested<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="state">Current State<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="employment-status">Employment Status<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th data-heading="timeStamp">Timestamp<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>--></th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
echo $display;
?>
</tbody>
</table>
</div>
</div>
<?php
}
?>
<div class="buttonDiv">
<!--<a href="exports/export-to-pdf-mentors.php">-->
<a href="#" onclick="javascript:printDiv('printablediv')">
<button type="button" class="exports" id="export">Print</button>
</a>
<a href="#" >
<button type="button" class="exports" id="exportAs">Export</button>
</a>
</div>
</div>
</div>
<!-- <button id="export">Export to Spreadsheet</button> -->
</section>
<section id="details-section">
<div id="details-back" class="details-back">
<div class="details-back">
<!-- <a href="overview.html" id="newitem-go-back" title="Go back">
<div></div>
</a> -->
</div>
</div>
<div id="centralize">
<h2>Mentor Details</h2>
<em id="no-intern">No mentor selected</em>
<br />
<p class="details" style="margin-left:10%;"><span id="photo"></span></p>
<p class="details">Name: <span id="name"></span></p>
<p class="details">Email: <span id="email"></span></p>
<p class="details">Phone Number: <span id="phone"></span></p>
<p class="details">Expertise: <span id="expertise"></span></p>
<p class="details">CV link: <span id="cv"></span></p>
<p class="details">State of residence: <span id="state"></span></p>
<p class="details">Employment Status: <span id="employment-status"></span></p>
<p class="details">Why Interested: <span id="Interest"></span></p>
<p class="details">Timestamp: <span id="timeStamp"></span></p>
<!-- <div href="" id="details-return">Back to Overview</div> -->
<div id="navigator">
<i class="fas fa-chevron-left fa-2x left navigator"></i>
<p class="details"><span id="sn"></span></p>
<i class="fas fa-chevron-right fa-2x right navigator"></i>
</div>
</div>
</section>
</main>
<input type="checkbox" id="mobile-bars-check" />
<label for="mobile-bars-check" id="mobile-bars">
<div class="stix" id="stik1"></div>
<div class="stix" id="stik2"></div>
<div class="stix" id="stik3"></div>
</label>
<?php include('fragments/sidebar.php'); ?>
</body>
</html>
<script src="js/jspdf.js"></script>
<script src="js/jspdf.plugin.autotable.min.js"></script>
<script src="js/paginator.js"></script>
<script type="text/javascript" src="js/sidebar.js"></script>
<script type="text/javascript" src="js/newDashboard.js"></script>