Subversion Repositories ALCASAR

Rev

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

Rev 1849 Rev 1867
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 1849 2016-04-28 12:01:01Z raphael.pion $
2
# $Id: index.php 1867 2016-05-04 12:22:08Z raphael.pion $
3
#
3
#
4
# index.php for ALCASAR captive portal
4
# index.php for ALCASAR captive portal
5
# by REXY
5
# by REXY
6
# UI & css style by stephane ERARD
6
# UI & css style by stephane ERARD
7
# The contents of this file may be used under the terms of the GNU
7
# The contents of this file may be used under the terms of the GNU
Line 102... Line 102...
102
}
102
}
103
else
103
else
104
{
104
{
105
	# cas où l'utilisateur non-loggué décide de joindre une page HTTP/S => redirection http://URL
105
	# cas où l'utilisateur non-loggué décide de joindre une page HTTP/S => redirection http://URL
106
	# 							   																					 ALCASAR => redirection index.php
106
	# 							   																					 ALCASAR => redirection index.php
107
	# on place l'IP de l'utilisateur dans un ipset user_not_connected pour ne pas boucler
107
	# on place l'IP de l'utilisateur dans un ipset not_auth_yet pour ne pas boucler
108
	exec("sudo /usr/sbin/ipset add user_not_connected_yet $remote_ip");
108
	exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip");
109
	if(!$direct_access)
109
	if(!$direct_access)
110
	{
110
	{
111
		header("Cache-Control: no-cache, must-revalidate");
111
		header("Cache-Control: no-cache, must-revalidate");
112
		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
112
		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
113
		header("Content-Type: application/xml; charset=utf-8");
113
		header("Content-Type: application/xml; charset=utf-8");