| Line 1... |
Line 1... |
| 1 |
<?php
|
1 |
<?php
|
| 2 |
# $Id: intercept.php 3001 2022-03-20 23:06:20Z rexy $
|
2 |
# $Id: intercept.php 3026 2022-06-30 21:53:54Z rexy $
|
| 3 |
#
|
3 |
#
|
| 4 |
# intercept.php for ALCASAR captive portal
|
4 |
# intercept.php for ALCASAR captive portal
|
| 5 |
# Copyright (C) 2003, 2004 Mondru AB.
|
5 |
# By Mondru AB.
|
| 6 |
# Modify by REXY & steweb57
|
6 |
# Modify by Rexy & steweb57
|
| 7 |
# UI & css style by stephane ERARD
|
7 |
# UI & css style by Stéphane ERARD & Alexandre VEZIN
|
| 8 |
# Help for language translation by B. AUBARD (thanks)
|
8 |
# Help for language translation by B. AUBARD (thanks)
|
| 9 |
|
9 |
|
| 10 |
# The contents of this file may be used under the terms of the GNU
|
10 |
# The contents of this file may be used under the terms of the GNU
|
| 11 |
# General Public License Version 2, provided that the above copyright
|
11 |
# General Public License Version 2, provided that the above copyright
|
| 12 |
# notice and this permission notice is included in all copies or
|
12 |
# notice and this permission notice is included in all copies or
|
| Line 61... |
Line 61... |
| 61 |
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
|
61 |
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
|
| 62 |
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
|
62 |
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
|
| 63 |
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js';
|
63 |
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js';
|
| 64 |
|
64 |
|
| 65 |
// Shared secret used to encrypt password with coova.
|
65 |
// Shared secret used to encrypt password with coova.
|
| 66 |
$uamsecret = "F3t9VEY6jOwHm7xE";
|
66 |
$uamsecret = "";
|
| 67 |
|
67 |
|
| 68 |
// URL loaded after success authenticates (let blank for browser defaults)
|
68 |
// URL loaded after success authenticates (let blank for browser defaults)
|
| 69 |
$adminurl = "";
|
69 |
$adminurl = "";
|
| 70 |
|
70 |
|
| 71 |
// Our own path
|
71 |
// Our own path
|
| Line 560... |
Line 560... |
| 560 |
}
|
560 |
}
|
| 561 |
}
|
561 |
}
|
| 562 |
</script>
|
562 |
</script>
|
| 563 |
</head>
|
563 |
</head>
|
| 564 |
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
|
564 |
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
|
| 565 |
<div class="col-xs-12">
|
565 |
<div class="col-12">
|
| 566 |
<?php if ($result === 2 || $result === 3 || $result === 5): // failed or logoff or notyet ?>
|
566 |
<?php if ($result === 2 || $result === 3 || $result === 5): // failed or logoff or notyet ?>
|
| 567 |
<div class ="row">
|
567 |
<div class ="row">
|
| 568 |
<div class="col-xs-12 col-sm-10 col-sm-offset-1">
|
568 |
<div class="col-12 col-md-10 offset-sm-1">
|
| 569 |
<div class="row banner">
|
569 |
<div class="row banner">
|
| 570 |
<div class="col-xs-8 col-xs-offset-2 col-sm-12 col-sm-offset-0">
|
570 |
<div class="col-8 offset-xs-2 col-md-12 offset-sm-0">
|
| 571 |
<?php if ($service_wifi4eu_status): ?>
|
571 |
<?php if ($service_wifi4eu_status): ?>
|
| 572 |
<img id="wifi4eubanner">
|
572 |
<img id="wifi4eubanner">
|
| 573 |
<?php else: ?>
|
573 |
<?php else: ?>
|
| 574 |
<h1 class="organisme"><?= $organisme ?></h1>
|
574 |
<h1 class="organisme"><?= $organisme ?></h1>
|
| 575 |
<?php endif; ?>
|
575 |
<?php endif; ?>
|
| 576 |
</div>
|
576 |
</div>
|
| 577 |
</div>
|
577 |
</div>
|
| 578 |
<div class="row">
|
578 |
<div class="row">
|
| 579 |
<form name="form1" class="form-horizontal col-xs-12 col-sm-12 col-md-10 col-md-offset-1 background-form" method="post" action="<?= $loginpath ?>">
|
579 |
<form name="form1" class="form-horizontal col-12 col-sm-12 col-md-10 offset-md-1 background-form" method="post" action="<?= $loginpath ?>">
|
| 580 |
<div class="row">
|
580 |
<div class="row">
|
| 581 |
<div class="col-xs-12 col-sm-12 col-md-6 col-md-offset-3">
|
581 |
<div class="col-12 col-sm-12 col-md-6 offset-md-3">
|
| 582 |
<h2 class="titre-controle-acces"><?= $l_loggedcont ?></h2>
|
582 |
<h2 class="titre-controle-acces"><?= $l_loggedcont ?></h2>
|
| 583 |
</div>
|
583 |
</div>
|
| 584 |
<div class="hidden-xs hidden-sm col-md-3">
|
584 |
<div class="d-none d-md-block col-md-3">
|
| 585 |
<?php
|
585 |
<?php
|
| 586 |
// Read the "Domain allowed" file
|
586 |
// Read the "Domain allowed" file
|
| 587 |
$tab = file(DOMAIN_ALLOWED_LIST);
|
587 |
$tab = file(DOMAIN_ALLOWED_LIST);
|
| 588 |
if ($tab) { // the file isn't empty
|
588 |
if ($tab) { // the file isn't empty
|
| 589 |
echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
|
589 |
echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
|
| Line 616... |
Line 616... |
| 616 |
?>
|
616 |
?>
|
| 617 |
|
617 |
|
| 618 |
</div>
|
618 |
</div>
|
| 619 |
|
619 |
|
| 620 |
<div class="row inputs">
|
620 |
<div class="row inputs">
|
| 621 |
<div class="hidden-xs col-sm-2">
|
621 |
<div class="d-none d-md-block col-md-2">
|
| 622 |
<img id="logo-organ" class="img-responsive" src="/images/organisme.png">
|
622 |
<img id="logo-organ" class="img-fluid" src="/images/organisme.png">
|
| 623 |
</div>
|
623 |
</div>
|
| 624 |
<div class="col-xs-12 col-sm-8">
|
624 |
<div class="col-12 col-md-8">
|
| 625 |
<input type="hidden" name="challenge" value="<?= $challenge ?>">
|
625 |
<input type="hidden" name="challenge" value="<?= $challenge ?>">
|
| 626 |
<input type="hidden" name="userurl" value="<?= $userurl ?>">
|
626 |
<input type="hidden" name="userurl" value="<?= $userurl ?>">
|
| 627 |
<div class="form-group row">
|
627 |
<div class="form-group row">
|
| 628 |
<div class="col-xs-2 col-sm-2 control-label">
|
628 |
<div class="col-2 col-md-2 control-label">
|
| 629 |
<p class="boite-info-text"><?= $l_user ?></p>
|
629 |
<p class="boite-info-text"><?= $l_user ?></p>
|
| 630 |
</div>
|
630 |
</div>
|
| 631 |
<div class="col-xs-8 col-sm-8" id="input_username">
|
631 |
<div class="col-8 col-md-8" id="input_username">
|
| 632 |
<input type="text" class="form-control boite-info-text" name="username" autocomplete="off" placeholder="<?= $l_user ?>">
|
632 |
<input type="text" class="form-control boite-info-text" name="username" autocomplete="off" placeholder="<?= $l_user ?>">
|
| 633 |
</div>
|
633 |
</div>
|
| 634 |
</div>
|
634 |
</div>
|
| 635 |
<div class="form-group row">
|
635 |
<div class="form-group row">
|
| 636 |
<div class="col-xs-2 col-sm-2 control-label">
|
636 |
<div class="col-2 col-md-2 control-label">
|
| 637 |
<p class="boite-info-text"><?= $l_password ?></p>
|
637 |
<p class="boite-info-text"><?= $l_password ?></p>
|
| 638 |
</div>
|
638 |
</div>
|
| 639 |
<div class="col-xs-8 col-sm-8" id="input_password">
|
639 |
<div class="col-8 col-md-8" id="input_password">
|
| 640 |
<input type="password" class="form-control boite-info-text" name="password" autocomplete="off" placeholder="<?= $l_password ?>">
|
640 |
<input type="password" class="form-control boite-info-text" name="password" autocomplete="off" placeholder="<?= $l_password ?>">
|
| 641 |
</div>
|
641 |
</div>
|
| 642 |
</div>
|
642 |
</div>
|
| 643 |
</div>
|
643 |
</div>
|
| 644 |
<div class="hidden-xs col-sm-2">
|
644 |
<div class="d-none d-md-block col-md-2">
|
| 645 |
|
645 |
|
| 646 |
</div>
|
646 |
</div>
|
| 647 |
</div>
|
647 |
</div>
|
| 648 |
<div class="row row_button">
|
648 |
<div class="row row_button">
|
| 649 |
<div class="col-xs-12 text-center">
|
649 |
<div class="col-12 text-center">
|
| 650 |
<input value="<?= $l_boutonO ?>" class="btn btn-primary button" type="submit" name="button">
|
650 |
<input value="<?= $l_boutonO ?>" class="btn btn-primary button" type="submit" name="button">
|
| 651 |
</div>
|
651 |
</div>
|
| 652 |
</div>
|
652 |
</div>
|
| 653 |
<?php if ($service_SMS_status): ?>
|
653 |
<?php if ($service_SMS_status): ?>
|
| 654 |
<div class= "row sms_registration">
|
654 |
<div class= "row sms_registration">
|
| Line 663... |
Line 663... |
| 663 |
</form>
|
663 |
</form>
|
| 664 |
</div>
|
664 |
</div>
|
| 665 |
</div>
|
665 |
</div>
|
| 666 |
</div>
|
666 |
</div>
|
| 667 |
<div class="row boite-info-spacing">
|
667 |
<div class="row boite-info-spacing">
|
| 668 |
<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 boite-info-spacing">
|
668 |
<div class="col-12 col-md-10 offset-sm-1 col-lg-8 offset-md-2 boite-info-spacing">
|
| 669 |
<table id="boite-info" cellSpacing="0" cellPadding="0">
|
669 |
<table id="boite-info" cellSpacing="0" cellPadding="0">
|
| 670 |
<tr class="boite-info-titre">
|
670 |
<tr class="boite-info-titre">
|
| 671 |
<td align="center"><font color="red"><b><?= $l_loggedin_stringl1 ?></b></font></td>
|
671 |
<td align="center"><font color="red"><b><?= $l_loggedin_stringl1 ?></b></font></td>
|
| 672 |
</tr>
|
672 |
</tr>
|
| 673 |
<tr class="boite-info-text">
|
673 |
<tr class="boite-info-text">
|
| Line 681... |
Line 681... |
| 681 |
</ul>
|
681 |
</ul>
|
| 682 |
</td>
|
682 |
</td>
|
| 683 |
</tr>
|
683 |
</tr>
|
| 684 |
</table>
|
684 |
</table>
|
| 685 |
</div>
|
685 |
</div>
|
| 686 |
<div class="hidden-xs hidden-sm col-md-2">
|
686 |
<div class="d-none d-sm-none d-md-block col-md-2">
|
| 687 |
<img id="logo-alcasar" class="img-responsive" src="/images/logo-alcasar.png">
|
687 |
<img id="logo-alcasar" class="img-fluid" src="/images/logo-alcasar.png">
|
| 688 |
</div>
|
688 |
</div>
|
| 689 |
</div>
|
689 |
</div>
|
| 690 |
<div class="row">
|
690 |
<div class="row">
|
| 691 |
<div class="col-xs-6 col-sm-12 hidden-md hidden-lg">
|
691 |
<div class="col-6 col-md-12 d-md-none d-sm-none d-lg-none">
|
| 692 |
<img id="logo-alcasar" class="img-responsive img-xs-bottom" src="/images/logo-alcasar.png">
|
692 |
<img id="logo-alcasar" class="img-fluid img-xs-bottom" src="/images/logo-alcasar.png">
|
| 693 |
</div>
|
693 |
</div>
|
| 694 |
|
694 |
|
| 695 |
<div class="col-xs-6 hidden-sm hidden-md hidden-lg">
|
695 |
<div class="col-6 d-sm-none d-md-none d-lg-none">
|
| 696 |
<img id="logo-organ" class="img-responsive img-xs-bottom" src="/images/organisme.png">
|
696 |
<img id="logo-organ" class="img-fluid img-xs-bottom" src="/images/organisme.png">
|
| 697 |
|
697 |
|
| 698 |
</div>
|
698 |
</div>
|
| 699 |
</div>
|
699 |
</div>
|
| 700 |
<div class="row" style="text-align: center">
|
700 |
<div class="row" style="text-align: center">
|
| 701 |
<div class="col-xs-8 col-xs-offset-2 col-sm-6 col-sm-offset-3 hidden-md hidden-lg">
|
701 |
<div class="col-8 offset-xs-2 col-md-6 offset-sm-3 d-md-none d-sm-none d-lg-none">
|
| 702 |
<?php
|
702 |
<?php
|
| 703 |
// Read the "Domain allowed" file
|
703 |
// Read the "Domain allowed" file
|
| 704 |
$tab = file(DOMAIN_ALLOWED_LIST);
|
704 |
$tab = file(DOMAIN_ALLOWED_LIST);
|
| 705 |
if ($tab) { // the file isn't empty
|
705 |
if ($tab) { // the file isn't empty
|
| 706 |
echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
|
706 |
echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
|