Subversion Repositories ALCASAR

Rev

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

Rev 1978 Rev 1986
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 1978 2016-07-06 09:41:58Z raphael.pion $
2
# $Id: index.php 1986 2016-07-12 16:42:55Z 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 115... Line 115...
115
	# ALCASAR => redirection index.php
115
	# ALCASAR => redirection index.php
116
	# on place l'IP de l'utilisateur dans un ipset not_auth_yet pour ne pas boucler sur index.php et atteindre la page souhaité qui sera traité par coova-chilli
116
	# on place l'IP de l'utilisateur dans un ipset not_auth_yet pour ne pas boucler sur index.php et atteindre la page souhaité qui sera traité par coova-chilli
117
	if(!$direct_access && $ipset_not_auth_yet[0] == '0')
117
	if(!$direct_access && $ipset_not_auth_yet[0] == '0')
118
	{
118
	{
119
		exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip");
119
		exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip");
-
 
120
		#On force l'utilisateur a refaire une requete DNS sur la même URL intercepté. (comme un CTRL+F5)
-
 
121
                echo "<script>window.location.reload(true)</script>";
-
 
122
                echo "<script>window.location.href='http://$_SERVER[HTTP_HOST]'</script>";
120
		header("Location: http://$_SERVER[HTTP_HOST]");
123
		header("Location: http://$_SERVER[HTTP_HOST]");
121
		exit;	
124
		exit;	
122
	}
125
	}
123
	
126
	
124
}
127
}