Subversion Repositories ALCASAR

Rev

Rev 2407 | Rev 2450 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2407 Rev 2409
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 2407 2017-09-13 08:41:59Z tom.houdayer $
2
# $Id: intercept.php 2409 2017-09-14 18:52:54Z tom.houdayer $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# Copyright (C) 2003, 2004 Mondru AB.
5
# Copyright (C) 2003, 2004 Mondru AB.
6
# Modify by REXY & steweb57
6
# Modify by REXY & steweb57
7
# UI & css style by stephane ERARD
7
# UI & css style by stephane ERARD
Line 65... Line 65...
65
 
65
 
66
// Check if the SMS service is enable
66
// Check if the SMS service is enable
67
$service_SMS_status = false;
67
$service_SMS_status = false;
68
 
68
 
69
// Our own path
69
// Our own path
70
$loginpath   = htmlspecialchars($_SERVER['PHP_SELF']);
70
$loginpath = htmlspecialchars($_SERVER['PHP_SELF']);
71
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
71
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
72
$alcasarpath = (($conf['HTTPS_LOGIN'] === 'on') ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
72
$alcasarpath = (($useHTTPS) ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
73
$statuspath  = $alcasarpath.'/status.php';
73
$statuspath = (($conf['HTTPS_CHILLI'] === 'on') ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/status.php';
74
 
74
 
75
// Choice of language
75
// Choice of language
76
$Language = 'en';
76
$Language = 'en';
77
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
77
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
78
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
78
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
Line 396... Line 396...
396
if (isset($_GET['userurl']))	$userurl	= htmlspecialchars($_GET['userurl']);
396
if (isset($_GET['userurl']))	$userurl	= htmlspecialchars($_GET['userurl']);
397
 
397
 
398
// TODO: clean unused query params
398
// TODO: clean unused query params
399
 
399
 
400
$uamip = $conf['HOSTNAME'].'.'.$conf['DOMAIN'];
400
$uamip = $conf['HOSTNAME'].'.'.$conf['DOMAIN'];
401
if ($useHTTPS) {
401
if (($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) {
402
	$uamproto = 'https';
402
	$uamproto = 'https';
403
	$uamport  = 3991;
403
	$uamport  = 3991;
404
} else {
404
} else {
405
	$uamproto = 'http';
405
	$uamproto = 'http';
406
	$uamport  = 3990;
406
	$uamport  = 3990;