Subversion Repositories ALCASAR

Rev

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

Rev 611 Rev 628
Line 1... Line 1...
1
<?php
1
<?php
2
$private_ip = "192.168.182.1";
-
 
3
$hostname = "alcasar";
2
$hostname = "alcasar";
4
$network_pb = False;
3
$network_pb = False;
5
$cert_add = "http://alcasar/certs";
4
$cert_add = "http://alcasar/certs";
6
$direct_access = False;
5
$direct_access = False;
7
$diagnostic = "eth0 link down";
6
$diagnostic = "eth0 link down";
Line 9... Line 8...
9
$tab = array();$user = array();
8
$tab = array();$user = array();
10
$connection_history =  "";
9
$connection_history =  "";
11
$nb_connection_history = 3;
10
$nb_connection_history = 3;
12
 
11
 
13
# on discrimine les accès directs sur Alcasar par rapport aux redirections (blacklist ou pannes rso)
12
# on discrimine les accès directs sur Alcasar par rapport aux redirections (blacklist ou pannes rso)
14
if (($_SERVER['HTTP_HOST'] == $private_ip) || preg_match ("/^alcasar/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname/", $_SERVER['HTTP_POST']))
13
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || preg_match ("/^alcasar/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname/", $_SERVER['HTTP_POST']))
15
	{
14
	{
16
	$direct_access=True;
15
	$direct_access=True;
17
	exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
16
	exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
18
	$user = explode (" ", $tab[0]);
17
	$user = explode (" ", $tab[0]);
19
	}
18
	}