-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmobile-pro-registration.php
306 lines (245 loc) · 11.5 KB
/
mobile-pro-registration.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<?php
require_once ('includes/db.php');
require_once ('includes/common.php');
require_once ('includes/training.php');
///////////////////////////////////////
use Training\coupon AS couponClass;
use Training\getSeats AS getSeatNum;
///////////////////////////////////////
// Set Course ID
$_SESSION['course'] = 1;
///////////////////////////////////////
if (!empty($_REQUEST['day'])){
$day = $_REQUEST['day'];
} else {
$day = "Monday";
}
if (!empty($_GET['month'])){
if ($_GET['month'] == 'this'){
$month = date("F");
} else {
$month = $_GET['month'];
}
$ddates = \get_date_range($day, $month);
} else {
$ddates = \get_date_range($day);
}
////////////////////////////////////////
// If an agent is registering for a user
if (!empty($_GET['agent'])){
if ($agent_id = get_agent($link, $_GET['agent'])){
$_SESSION['proxy'] = $_SESSION['agent'] = $agent_id;
}
} else if (!empty($_GET['ref'])){ // If user is referred by an agent
if ($agent_id = get_agent($link, "", $_GET['ref'])){
$_SESSION['agent'] = $agent_id;
}
}
////////////////////////////////////////
if (!empty($_GET['coupon'])){
$_SESSION['coupon'] = $_GET['coupon'];
}
if (!empty($_SESSION['coupon'])){
$discount = new couponClass($_SESSION['coupon']);
$coupon = $discount->get_coupon($link);
}
////////////////////////////////////////
// Get number of remaining seats
$seatsClass = new getSeatNum;
$seats = maxSeats - intval($seatsClass->seats($link, $day, $ddates['my']));
// Force maximum number of seats if coupon covers less seats
if (!empty($coupon['seats']) && $seats > $coupon['seats']){
$seats = $coupon['seats'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-7718160-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-7718160-1');
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Samuel Anyaele">
<title>Mobile Business Productivity Training</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome CSS -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/modern-business.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,300,700' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" type="image/x-icon" href="assets/favicon.png">
<style>
body {
padding-top: 15px;
}
</style>
</head>
<body>
<!-- Page Content -->
<div class="container">
<form action="process.php" method="post" target="pay_frame">
<div class="row">
<strong class="text-danger pl-4">* <span class="text-dark"><?php echo $seats; ?> seat(s) available</span> in <span class="text-muted"><?php echo $ddates['my']; ?></span> for <span class="text-muted"><?php echo $day; ?></span> Classes</strong>
</div>
<div class="row mt-2 mb-4">
<div class="col-6">
<select class="form-control form-control-lg bg-muted" name="day" id="day">
<option value="Monday" <?php echo ($day == "Monday") ? "selected" : ""; ?>>Mondays</option>
<option value="Tuesday" <?php echo ($day == "Tuesday") ? "selected" : ""; ?>>Tuesdays</option>
<option value="Wednesday" <?php echo ($day == "Wednesday") ? "selected" : ""; ?>>Wednesdays</option>
<option value="Thursday" <?php echo ($day == "Thursday") ? "selected" : ""; ?>>Thurdays</option>
<option value="Friday" <?php echo ($day == "Friday") ? "selected" : ""; ?>>Fridays</option>
</select>
</div>
<div class="col-6">
<select name="seats" id="seats" class="form-control form-control-lg bg-muted">
<?php
if (!empty($seats)){
echo "<option value=\"1\">1 Seat</option>";
for ($i=2; $seats >= $i; $i++){
echo "<option value=\"$i\">$i Seats</option>";
}
} else {
echo "<option>No Seats</option>";
}
?>
</select>
</div>
</div>
<div class="row">
<div class="cal-date col-6">
<div><input type="checkbox" name="week1" id="week1" value="week1" class="training_check" <?php echo !empty($coupon['week1']) ? "checked" : "checked"; ?>>I'm Interested</div>
<p><?php echo $ddates['first']; ?></p>
<?php
if (!empty($coupon['week1'])){
?>
<div class="font-weight-bold"> <s class="text-danger">N6,250</s> <span class="text-primary">Free</span></div>
<?php
} else {
?>
<div class="text-primary font-weight-bold">N6,250</div>
<?php
}
?>
</div>
<div class="cal-details col-6">
<div class="text-info"><strong>Documents:</strong> Covers office documents creation and editing using Google Docs / Microsoft Word and Working with PDFs</div>
<ul>
<li>Microsoft Word</li>
<li>Google Docs</li>
</ul>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="cal-date col-6">
<div><input type="checkbox" name="week2" id="week2" value="week2" class="training_check" <?php echo !empty($coupon['week2']) ? "checked" : "checked"; ?>>I'm Interested</div>
<p><?php echo $ddates['second'];?></p>
<?php
if (!empty($coupon['week2'])){
?>
<div class="font-weight-bold"> <s class="text-danger">N6,250</s> <span class="text-primary">Free</span></div>
<?php
} else {
?>
<div class="text-primary font-weight-bold">N6,250</div>
<?php
}
?>
</div>
<div class="cal-details col-6">
<div class="text-info"><strong>Spreadsheets:</strong> Explains how to use Excel and Google Sheet to work with various Spreadsheets and Charts</div>
<ul>
<li>Microsoft Excel</li>
<li>Google Sheets </li>
</ul>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="cal-date col-6">
<div><input type="checkbox" name="week3" id="week3" value="week3" class="training_check" <?php echo !empty($coupon['week3']) ? "checked" : "checked"; ?>>I'm Interested</div>
<p><?php echo $ddates['third'];?></p>
<?php
if (!empty($coupon['week3'])){
?>
<div class="font-weight-bold"> <s class="text-danger">N6,250</s> <span class="text-primary">Free</span></div>
<?php
} else {
?>
<div class="text-primary font-weight-bold">N6,250</div>
<?php
}
?>
</div>
<div class="cal-details col-6">
<div class="text-info"><strong>Presentations:</strong> Discusses how to create captivating Presentations and Demos on Powerpoint and Google Slides</div>
<ul>
<li>Microsoft Powerpoint</li>
<li>Google Slides</li>
</ul>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="cal-date col-6">
<div><input type="checkbox" name="week4" id="week4" value="week4" class="training_check" <?php echo !empty($coupon['week4']) ? "checked" : "checked"; ?>>I'm Interested</div>
<p><?php echo $ddates['fourth'];?></p>
<?php
if (!empty($coupon['week4'])){
?>
<div class="font-weight-bold"> <s class="text-danger">N6,250</s> <span class="text-primary">Free</span></div>
<?php
} else {
?>
<div class="text-primary font-weight-bold">N6,250</div>
<?php
}
?>
</div>
<div class="cal-details col-6">
<div class="text-info"><strong>Cloud Storage & Document Sharing:</strong> Focuses on how teams can work on the same documents at the same time irrespective of their current location</div>
<ul>
<li>Google Drive</li>
<li>DropBox</li>
<li>Microsoft OneBox</li>
<li>File Sharing</li>
</ul>
</div>
</div>
<div class="row ">
<input name="firstname" placeholder="Firstname" onblur="this.placeholder = 'Firstname'" class="form-control m-1" required="" type="text" required>
<input name="lastname" placeholder="Lastname" onblur="this.placeholder = 'Lastname'" class="form-control m-1" required="" type="text" required>
<input name="email" placeholder="Email" onblur="this.placeholder = 'Email'" class="form-control m-1" required="" type="email" required>
<input name="mobile" placeholder="Telephone" onblur="this.placeholder = 'Telephone'" class="form-control m-1" required="" type="text" required>
<button type="submit" class="btn btn-primary form-control" data-toggle="modal" data-target="#payModal">Register for Class</button>
<input type="hidden" name="for" id="for" value="Mobile Productivity Training">
<input type="hidden" name="pg" id="pg" value="mobile-business-training">
<input type="hidden" name="monthYear" id="monthYear" value="<?php echo $ddates['my']; ?>">
<input type="hidden" name="coupon" id="coupon" value="<?php echo $_SESSION['coupon']; ?>">
</div>
<!-- /.row -->
</form>
</div>
<!-- /.container -->
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script>
$(document).ready(function(){
$('#day').change(function() {
var day = $(this).children("option:selected").val();
window.location.replace("mobile-pro-registration.php?day=" + day);
});
});
</script>
</body>
</html>