-
Notifications
You must be signed in to change notification settings - Fork 138
/
pending_request.php
229 lines (194 loc) · 7.39 KB
/
pending_request.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
226
227
228
229
<?php
require 'classControllers/init.php';
if (!isset($_SESSION["role"])) {
header('Location:login');
}
$sponsors = new Certificate;
$data = $sponsors->getAllPendingRequest();
$status = $sponsors->pending();
if ($status) {
header('location: pending_request.php');
$_SESSION['success'] = "Action successful";
}
?>
<!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>Pending Certificate</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: 200px;
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="cert processing heading">Pending Certificate Request </h2>
<div class="mentor-buttons certificate">
<a href="finished_request" class="btn btn-default">Finished Request</a>
<a href="processing_request" class="btn btn-default reduce">Processing Request</a>
</div>
<!-- <section id="intern-section">
Populated by `js/dashboard.js`
</section> -->
<?php
if (isset($_SESSION['success'])) {
echo $_SESSION['success'];
unset($_SESSION['success']);
}
?>
<div>
<div class="row cert-message">
<?php
if ($data == "0") {
echo "<h2>There are no requests right now</h2>";
} else {
?>
<!--<div class="col-md-3">-->
<!-- <a href="exports/export-to-excel-sponsors.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" class="sponsors">
<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 sponsor-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="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="slack_username">Slack_username
<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>-->
</th>
<th data-heading="year">Year
<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>-->
</th>
<th data-heading="file">File
<!--<i class="fas fa-sort-up"></i><i class="fas fa-sort-down"></i>-->
</th>
<th colspan="1">Action</th>
</tr>
</thead>
<tbody>
<?= $data; ?>
</tbody>
</table>
</div>
</div>
<?php
}
?>
<div class="buttonDiv">
<!--<a href="exports/export-to-pdf-sponsors.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>Certificate Details</h2>
<em id="no-intern">No Details Selected</em>
<br />
<p class="details">Name: <span id="name"></span></p>
<p class="details">Email: <span id="email"></span></p>
<p class="details">Slack_username: <span id="slack_username"></span></p>
<p class="details">Year: <span id="year"></span></p>
<p class="details">File:<span id="file"></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>