-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcaptive_portal.php
540 lines (450 loc) · 34.1 KB
/
captive_portal.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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
<?php
register_menu("Captive Portal", true, "captive_portal_overview", 'AFTER_SETTINGS', 'ion ion-earth');
function captive_portal_overview()
{
global $ui, $routes;
_admin();
$ui->assign('_title', Lang::T('Captive Portal Dashboard'));
$ui->assign('_system_menu', '');
$admin = Admin::_info();
$ui->assign('_admin', $admin);
$action = $routes['1'];
if ($admin['user_type'] != 'SuperAdmin' && $admin['user_type'] != 'Admin' && $admin['user_type'] != 'Sales') {
r2(U . "dashboard", 'e', Lang::T("You Do Not Have Access"));
}
$ui->display('captive_portal_overview.tpl');
}
function captive_portal_slider()
{
global $ui, $routes;
_admin();
$ui->assign('_title', Lang::T('Captive Portal Sliders'));
$ui->assign('_system_menu', '');
$admin = Admin::_info();
$ui->assign('_admin', $admin);
$action = $routes['1'];
if ($admin['user_type'] != 'SuperAdmin' && $admin['user_type'] != 'Admin' && $admin['user_type'] != 'Sales') {
r2(U . "dashboard", 'e', Lang::T("You Do Not Have Access"));
}
// Read JSON data from file
$jsonFile = 'system/plugin/captive_portal/slider.json';
$jsonData = file_get_contents($jsonFile);
$data = json_decode($jsonData, true);
// Check if the form is submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Retrieve form data and process it
$newSlide = [
"title" => $_POST['title'],
"description" => $_POST['description'],
"link" => $_POST['link'],
"button" => $_POST['button']
];
// Upload image
$targetDirectory = 'system/plugin/captive_portal/sliders/';
$timestamp = time();
$imageExtension = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION);
$imageFilename = $timestamp . '.' . $imageExtension;
$targetFile = $targetDirectory . $imageFilename;
// Move uploaded image to target directory
move_uploaded_file($_FILES['image']['tmp_name'], $targetFile);
// Check if image creation was successful
// Open the uploaded image
$image = null;
switch (strtolower($imageExtension)) {
case 'jpeg':
case 'jpg':
$image = imagecreatefromjpeg($targetFile);
break;
case 'png':
$image = imagecreatefrompng($targetFile);
break;
case 'gif':
$image = imagecreatefromgif($targetFile);
break;
default:
r2(U . "plugin/captive_portal_slider", 'e', Lang::T("Unsupported image format"));
break;
}
if ($image !== false) {
// Get image dimensions
$imageWidth = imagesx($image);
$imageHeight = imagesy($image);
// Calculate the aspect ratio
$aspectRatio = $imageWidth / $imageHeight;
// Define the maximum width and height of the resized image
$maxWidth = 2200; // Adjust the desired maximum width
$maxHeight = 900; // Adjust the desired maximum height
// Calculate the new dimensions while maintaining the aspect ratio
if ($imageWidth > $maxWidth || $imageHeight > $maxHeight) {
if ($maxWidth / $maxHeight > $aspectRatio) {
$newWidth = $maxHeight * $aspectRatio;
$newHeight = $maxHeight;
} else {
$newWidth = $maxWidth;
$newHeight = $maxWidth / $aspectRatio;
}
} else {
$newWidth = $imageWidth;
$newHeight = $imageHeight;
}
// Create a new image with the resized dimensions
$resizedImage = imagecreatetruecolor($newWidth, $newHeight);
// Perform the resize
imagecopyresampled($resizedImage, $image, 0, 0, 0, 0, $newWidth, $newHeight, $imageWidth, $imageHeight);
// Save the resized image
switch (strtolower($imageExtension)) {
case 'jpeg':
case 'jpg':
imagejpeg($resizedImage, $targetFile);
break;
case 'png':
imagepng($resizedImage, $targetFile);
break;
case 'gif':
imagegif($resizedImage, $targetFile);
break;
}
// Generate thumbnail
$thumbnailDirectory = 'system/plugin/captive_portal/sliders/thumbnails/';
$thumbnailWidth = 80; // Adjust the desired thumbnail width
$thumbnailHeight = 40; // Adjust the desired thumbnail height
$thumbnailFilename = $timestamp . '_thumbnail.' . $imageExtension;
$thumbnailFile = $thumbnailDirectory . $thumbnailFilename;
// Create a new image with the desired thumbnail size
$thumbnailImage = imagecreatetruecolor($thumbnailWidth, $thumbnailHeight);
// Resize the resized image to the thumbnail size
imagecopyresampled($thumbnailImage, $resizedImage, 0, 0, 0, 0, $thumbnailWidth, $thumbnailHeight, $newWidth, $newHeight);
// Save the thumbnail
switch (strtolower($imageExtension)) {
case 'jpeg':
case 'jpg':
imagejpeg($thumbnailImage, $thumbnailFile);
break;
case 'png':
imagepng($thumbnailImage, $thumbnailFile);
break;
case 'gif':
imagegif($thumbnailImage, $thumbnailFile);
break;
}
// Add the image and thumbnail paths to the new slide data
$newSlide['image'] = $targetFile;
$newSlide['thumbnail'] = $thumbnailFile;
// Add the new slider to the data array
$data[] = $newSlide;
// Write JSON data back to file
$jsonData = json_encode($data, JSON_PRETTY_PRINT);
file_put_contents($jsonFile, $jsonData);
r2(U . "plugin/captive_portal_slider", 's', Lang::T("Slider Added Successfully"));
} else {
// Handle the case when image creation fails
r2(U . "plugin/captive_portal_slider", 'e', Lang::T("Failed to create the image"));
}
}
// Assign slider data to the template variable only if the data exists
if (!empty($data)) {
$ui->assign('slides', $data);
}
$ui->display('captive_portal_slider.tpl');
}
// Edit page for a specific slider
function captive_portal_slider_edit()
{
global $ui, $routes;
_admin();
$admin = Admin::_info();
$ui->assign('_admin', $admin);
$action = $routes['1'];
if ($admin['user_type'] != 'SuperAdmin' && $admin['user_type'] != 'Admin' && $admin['user_type'] != 'Sales') {
r2(U . "dashboard", 'e', Lang::T("You Do Not Have Access"));
}
// Read JSON data from file
$jsonFile = 'system/plugin/captive_portal/slider.json';
$jsonData = file_get_contents($jsonFile);
$data = json_decode($jsonData, true);
// Retrieve the slider index or identifier from the request
$slideIndex = $_GET['slideIndex']; // Modify this based on your URL structure
// Check if the slider index is valid
if (!isset($data[$slideIndex])) {
r2(U . "plugin/captive_portal_slider", 'e', Lang::T("Invalid Slide Index"));
}
// Retrieve the existing slider details
$existingSlide = $data[$slideIndex];
// Check if the form is submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Retrieve form data and process it
$editedSlide = [
"title" => $_POST['title'],
"description" => $_POST['description'],
"link" => $_POST['link'],
"button" => $_POST['button'],
"image" => $existingSlide['image'], // Preserve the existing image path
"thumbnail" => $existingSlide['thumbnail'] // Preserve the existing thumbnail path
];
// Update the specific slider with the edited data
$data[$slideIndex] = $editedSlide;
// Write JSON data back to file
$jsonData = json_encode($data, JSON_PRETTY_PRINT);
file_put_contents($jsonFile, $jsonData);
r2(U . "plugin/captive_portal_slider", 's', Lang::T("Slider Updated Successfully"));
}
// Assign the existing slider details to the template variable
$ui->assign('slide', $existingSlide);
$ui->assign('slideIndex', $slideIndex);
$ui->display('captive_portal_slider.tpl');
}
// Delete a specific slider
function captive_portal_slider_delete()
{
global $ui, $routes;
_admin();
$admin = Admin::_info();
$ui->assign('_admin', $admin);
$action = $routes['1'];
if ($admin['user_type'] != 'SuperAdmin' && $admin['user_type'] != 'Admin' && $admin['user_type'] != 'Sales') {
r2(U . "dashboard", 'e', Lang::T("You Do Not Have Access"));
}
// Read JSON data from file
$jsonFile = 'system/plugin/captive_portal/slider.json';
$jsonData = file_get_contents($jsonFile);
$data = json_decode($jsonData, true);
// Retrieve the slider index or identifier from the request
$slideIndex = $_GET['slideIndex']; // Modify this based on your URL structure
// Check if the slide index is valid
if (!isset($data[$slideIndex])) {
r2(U . "plugin/captive_portal_slider", 'e', Lang::T("Invalid Slider Index"));
}
// Retrieve the slider to be deleted
$slideToDelete = $data[$slideIndex];
// Remove the slider from the array
unset($data[$slideIndex]);
// Delete the associated image files
$imagePath = $slideToDelete['image'];
$thumbnailPath = $slideToDelete['thumbnail'];
// Delete the image file
if (file_exists($imagePath)) {
unlink($imagePath);
}
// Delete the thumbnail file
if (file_exists($thumbnailPath)) {
unlink($thumbnailPath);
}
// Write JSON data back to file
$jsonData = json_encode($data, JSON_PRETTY_PRINT);
file_put_contents($jsonFile, $jsonData);
r2(U . "plugin/captive_portal_slider", 's', Lang::T("Slider Deleted Successfully"));
}
function captive_portal_login()
{
global $ui;
/* Iterate through $_POST array and echo key-value pairs
//foreach ($_POST as $key => $value) {
// echo $key . ': ' . $value . '<br>';
}*/
$mac = $_POST['mac'];
$ip = $_POST['ip'];
$username = $_POST['username'];
$linklogin = $_POST['link-login'];
$linkorig = $_POST['link-orig'];
$error = $_POST['error'];
$trial = $_POST['trial'];
$blocked = $_POST['blocked'];
$loginby = $_POST['login-by'];
$chapid = $_POST['chap-id'];
$chapchallenge = $_POST['chap-challenge'];
$linkloginonly = $_POST['link-login-only'];
$linkorigesc = $_POST['link-orig-esc'];
$macesc = $_POST['mac-esc'];
$identity = $_POST['identity'];
$bytesinnice = $_POST['bytes-in-nice'];
$bytesoutnice = $_POST['bytes-out-nice'];
$sessiontimeleft = $_POST['session-time-left'];
$uptime = $_POST['uptime'];
$refreshtimeout = $_POST['refresh-timeout'];
$refreshtimeoutsecs = $_POST['refresh-timeout-secs'];
$linkstatus = $_POST['link-status'];
$linkadvert = $_POST['link-advert'];
// Read the JSON file
$jsonFile = 'system/plugin/captive_portal/slider.json';
$jsonData = file_get_contents($jsonFile);
// Parse the JSON data
$slides = json_decode($jsonData, true);
$configFile = 'system/plugin/captive_portal/config.json';
$configData = file_get_contents($configFile);
$config = json_decode($configData, true);
// Assign the data to Smarty variables
$ui->assign('slides', $slides);
$ui->assign('mac', $mac);
$ui->assign('ip', $ip);
$ui->assign('username', $username);
$ui->assign('linklogin', $linklogin);
$ui->assign('linkorig', $linkorig);
$ui->assign('error', $error);
$ui->assign('trial', $trial);
$ui->assign('blocked', $blocked);
$ui->assign('chapid', $chapid);
$ui->assign('loginby', $loginby);
$ui->assign('chapchallenge', $chapchallenge);
$ui->assign('linkloginonly', $linkloginonly);
$ui->assign('linkorigesc', $linkorigesc);
$ui->assign('macesc', $macesc);
$ui->assign('identity', $identity);
$ui->assign('bytesinnice', $bytesinnice);
$ui->assign('bytesoutnice', $bytesoutnice);
$ui->assign('sessiontimeleft', $sessiontimeleft);
$ui->assign('uptime', $uptime);
$ui->assign('refreshtimeout', $refreshtimeout);
$ui->assign('refreshtimeoutsecs', $refreshtimeoutsecs);
$ui->assign('linkstatus', $linkstatus);
$ui->assign('linkadvert', $linkadvert);
$ui->assign('config', $config);
$ui->display('captive_portal_login.tpl');
}
function captive_portal_settings()
{
global $ui, $routes;
_admin();
$admin = Admin::_info();
$ui->assign('_title', 'Captive Portal General Settings');
$ui->assign('_admin', $admin);
$action = $routes['1'];
if ($admin['user_type'] != 'SuperAdmin' && $admin['user_type'] != 'Admin' && $admin['user_type'] != 'Sales') {
r2(U . "dashboard", 'e', Lang::T("You Do Not Have Access"));
}
// Load the existing settings from the JSON file
$configFile = 'system/plugin/captive_portal/config.json';
$defaultConfig = array(
'hotspot_title' => '',
'hotspot_name' => '',
'favicon' => '',
'logo' => ''
);
$settings = file_exists($configFile) ? json_decode(file_get_contents($configFile), true) : $defaultConfig;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Retrieve the form values and update the settings
$hotspot_title = $_POST['title'];
$hotspot_name = $_POST['name'];
$hotspot_trial = $_POST['trial'];
$hotspot_member = $_POST['member'];
// Process the logo image
if (isset($_FILES['logo']) && $_FILES['logo']['error'] === UPLOAD_ERR_OK) {
$logo_tmp = $_FILES['logo']['tmp_name'];
$logo_name = $_FILES['logo']['name'];
$logo_ext = pathinfo($logo_name, PATHINFO_EXTENSION);
$logo_destination = 'system/plugin/captive_portal/img/logo.' . $logo_ext;
move_uploaded_file($logo_tmp, $logo_destination);
$settings['logo'] = $logo_destination;
}
// Process the favicon image
if (isset($_FILES['favicon']) && $_FILES['favicon']['error'] === UPLOAD_ERR_OK) {
$favicon_tmp = $_FILES['favicon']['tmp_name'];
$favicon_name = $_FILES['favicon']['name'];
$favicon_ext = pathinfo($favicon_name, PATHINFO_EXTENSION);
$favicon_destination = 'system/plugin/captive_portal/img/favicon.' . $favicon_ext;
move_uploaded_file($favicon_tmp, $favicon_destination);
$settings['favicon'] = $favicon_destination;
}
// Update the title and name in the settings array
$settings['hotspot_title'] = $hotspot_title;
$settings['hotspot_name'] = $hotspot_name;
$settings['hotspot_trial'] = $hotspot_trial;
$settings['hotspot_member'] = $hotspot_member;
// Save the updated settings to the JSON file
file_put_contents($configFile, json_encode($settings));
// Redirect or display a success message
r2(U . "plugin/captive_portal_settings", 's', Lang::T("Settings Saved"));
}
// Pass the settings to the template
$ui->assign('settings', $settings);
$ui->display('captive_portal_settings.tpl');
}
function captive_portal_download_login()
{
global $ui, $routes;
_admin();
$admin = Admin::_info();
$ui->assign('_title', Lang::T('Captive Portal General Settings'));
$ui->assign('_admin', $admin);
$action = $routes['1'];
if ($admin['user_type'] != 'SuperAdmin' && $admin['user_type'] != 'Admin' && $admin['user_type'] != 'Sales') {
r2(U . "dashboard", 'e', Lang::T("You Do Not Have Access"));
}
$configFile = 'system/plugin/captive_portal/config.json';
$configData = file_get_contents($configFile);
$config = json_decode($configData, true);
$hotspotTitle = $config['hotspot_title'];
$hotspotName = $config['hotspot_name'];
$loginUrl = U . "plugin/captive_portal_login";
$content = <<<HTML
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>$hotspotTitle - redirecting..</title>
<style type="text/css" media="screen">
.ui.button,.ui.menu .item{vertical-align:middle;line-height:1;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.ui.button,.ui.center.aligned.segment{text-align:center}.ui.button{cursor:pointer;display:inline-block;min-height:1em;outline:0;border:0;background-color:#FAFAFA;color:gray;margin:0;padding:.8em 1.5em;font-size:1rem;text-transform:uppercase;font-weight:700;font-style:normal;background-image:-webkit-gradient(linear,top left,bottom left,from(rgba(0,0,0,0)),to(rgba(0,0,0,.05)));background-image:-webkit-linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.05));background-image:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.05));border-radius:0;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.08) inset;box-shadow:0 0 0 1px rgba(0,0,0,.08) inset;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-transition:opacity .25s ease,background-color .25s ease,color .25s ease,background .25s ease,-webkit-box-shadow .25s ease;transition:opacity .25s ease,background-color .25s ease,color .25s ease,background .25s ease,box-shadow .25s ease}.ui.button:hover{background-image:-webkit-gradient(linear,top left,bottom left,from(rgba(0,0,0,0)),to(rgba(0,0,0,.08)));background-image:-webkit-linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.08));background-image:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.08));color:rgba(0,0,0,.7)}.ui.button:active{background-color:#F1F1F1;color:rgba(0,0,0,.7);-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.05) inset!important;box-shadow:0 0 0 1px rgba(0,0,0,.05) inset!important}.ui.green.button{background-color:#5BBD72;color:#FFF}.ui.green.button:hover{background-color:#58cb73;color:#FFF}.ui.green.button:active{background-color:#4CB164;color:#FFF}.ui.menu,.ui.segment{background-color:#FFF}.ui.header{border:0;margin:1em 0 1rem;padding:0;font-size:1.33em;font-weight:700;line-height:1.33}.ui.header:first-child{margin-top:0}.ui.header:last-child{margin-bottom:0}h1.ui.header{min-height:1rem;line-height:1.33;font-size:2rem}.ui.dividing.header{padding-bottom:.2rem;border-bottom:1px solid rgba(0,0,0,.1)}.ui.loader{display:none;position:absolute;top:50%;left:50%;margin:0;z-index:1000;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.ui.loader.active{display:block}.ui.loader.large{width:64px;height:64px;background-image:url(data:image/gif;base64,R0lGODlhQABAAIQAAIyOjMzKzKyurOTm5KSmpNza3MTCxJSWlPT29LS2tOTi5JSSlNTS1LSytOzq7KyqrNze3MTGxJyanPz+/P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQAUACwAAAAAQABAAAAFkSAljmRpjkgRJI8kAYtLJEGBnHiu72IDA8AfcCFcEG68pLIUIf6I0GdwSV0qpFhpoMrlFYfZRaRLxhkWAkNAoRg4FBCG4UEs20uICW+iuPv/gIGCg4SFhoeIiYq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HrIZHoqgtS5Wvf0+ukmKqu2Y3sbm1uxxMQLWwVsiTtMvGt8MFmbfICk2ozJBBodmuoKfInNqwqdDHiZHG7tJ06tsb06bvDI2y4tkY2990r3d75Kn6Dvad/LD4lMsF+eBF44QkmMQV3ppnwh1dDKQjATJVakeHFWRiiMNhIK8RXvDEg3PXjQKHJnZI0XHoOoXElQ00sXKNXNfGbMR8eWGAoAADs=)}.ui.inline.loader{position:static;vertical-align:middle;margin:0;-webkit-transform:none;-ms-transform:none;transform:none}.ui.inline.loader.active{display:inline-block}.ui.menu{margin:1rem 0;font-size:0;font-weight:400;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1);box-shadow:0 0 0 1px rgba(0,0,0,.1);border-radius:.1875rem}.ui.menu:first-child{margin-top:0}.ui.menu:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui.menu .item{box-sizing:border-box;-webkit-transition:opacity .2s ease,background .2s ease,-webkit-box-shadow .2s ease;transition:opacity .2s ease,background .2s ease,box-shadow .2s ease;color:rgba(0,0,0,.75);position:relative;display:inline-block;padding:.83em .95em;border-top:0 solid transparent;-webkit-tap-highlight-color:transparent;-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-size:1rem}.ui.menu .menu{margin:0}.ui.menu .menu.right{float:right}.ui.menu .item:before{position:absolute;content:'';top:0;right:0;width:1px;height:100%;background-image:-webkit-gradient(linear,top left,bottom left,from(rgba(0,0,0,.05)),color-stop(50%,rgba(0,0,0,.1)),to(rgba(0,0,0,.05)));background-image:-webkit-linear-gradient(rgba(0,0,0,.05) 0,rgba(0,0,0,.1) 50%,rgba(0,0,0,.05) 100%);background-image:linear-gradient(rgba(0,0,0,.05) 0,rgba(0,0,0,.1) 50%,rgba(0,0,0,.05) 100%)}.ui.menu .item>img:only-child{display:block;max-width:100%;margin:0 auto}.ui.menu.fixed{position:fixed;z-index:10;margin:0;border:0;width:100%}.ui.menu.fixed,.ui.menu.fixed .item:first-child{border-radius:0!important}.ui.segment{position:relative;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1);box-shadow:0 0 0 1px rgba(0,0,0,.1);margin:1em 0;padding:1em;border-radius:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui.segment:first-child,.ui.segment>:first-child{margin-top:0}.ui.segment:last-child,.ui.segment>:last-child{margin-bottom:0}.ui.segment:after{content:'';display:block;height:0;clear:both;visibility:hidden}body,html{font-size:15px;height:100%}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background-color:#ffffff;margin:0;padding:0;color:#323a2d;text-rendering:optimizeLegibility;min-width:320px}.container{width:auto;margin-right:100px;margin-left:100px}.main.menu .container{margin-right:0!important}.karmalogo{padding-top:7px!important;padding-bottom:7px!important}.karmalogo img{height:26px}::-webkit-selection{background-color:#FFC;color:#555}::-moz-selection{background-color:#FFC;color:#555}::selection{background-color:#FFC;color:#555}h1::-moz-selection,h2::-moz-selection,h3::-moz-selection{background-color:#F1C1C2;color:#222}h1::selection,h3::selection{background-color:#F1C1C2;color:#222}.ui ::-moz-selection{background-color:#CCE2FF}.ui ::selection{background-color:#CCE2FF}@media only screen and (max-width:1024px){.container{margin-right:3em;margin-left:3em}}@media only screen and (max-width:770px){body{overflow:hidden;overflow-y:auto}.container{margin-right:.3em;margin-left:.3em}h1.header{font-size:1.2rem}}@media only screen and (min-width:1725){.container{width:1200px;margin:0 auto}}body>.segment{margin:0;padding-top:70px;padding-bottom:30px}
</style>
<script type="text/javascript">
// JavaScript code here
</script>
</head>
<body id="login">
\$(if chap-id)
<noscript>
<center><b>JavaScript required. Enable JavaScript to continue.</b></center>
</noscript>
\$(endif)
<div class="segment">
<div class="container symetric">
<div class="introduction">
<h1 class="ui dividing header">
<font color="red"> $hotspotName </font>
</h1>
</div>
</div>
</div>
<div class="main container">
<div class="ui center aligned segment">
<h3>
You will be redirected Shortly...
</h3>
<div class="ui active inline large loader" id="loader"></div>
<form name="redirect" action="$loginUrl" method="post">
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="ip" value="$(ip)">
<input type="hidden" name="username" value="$(username)">
<input type="hidden" name="link-login" value="$(link-login)">
<input type="hidden" name="link-orig" value="$(link-orig)">
<input type="hidden" name="error" value="$(error)">
<input type="hidden" name="trial" value="$(trial)">
<input type="hidden" name="chap-id" value="$(chap-id)">
<input type="hidden" name="chap-challenge" value="$(chap-challenge)">
<input type="hidden" name="link-login-only" value="$(link-login-only)">
<input type="hidden" name="link-orig-esc" value="$(link-orig-esc)">
<input type="hidden" name="mac-esc" value="$(mac-esc)">
<input type="hidden" name="identity" value="$(identity)">
<input type="hidden" name="bytes-in-nice" value="$(bytes-in-nice)">
<input type="hidden" name="bytes-out-nice" value="$(bytes-out-nice)">
<input type="hidden" name="session-time-left" value="$(session-time-left)">
<input type="hidden" name="uptime" value="$(uptime)">
<input type="hidden" name="refresh-timeout" value="$(refresh-timeout)">
<div id="manual_login">
<p>If this does not happen automatically, click</p>
<input type="submit" class="ui green button" value="Continue" id="login_button">
</div>
<div id="manual_login_captive" style="display: none">
<p>If this does not happen automatically, click "<strong>Done</strong>" and open Safari</p>
</div>
</form>
</div>
</div>
<script language="JavaScript">
document.redirect.submit();
</script>
</body>
</html>
HTML;
header("Content-Disposition: attachment; filename=\"login.html\"");
header("Content-Type: application/force-download");
echo $content;
}