50,6 → 50,13 |
$service_wifi4eu_code = $conf['WIFI4EU_CODE']; |
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js'; |
|
// Redirection if HTTPS needed and not used |
if (($conf['HTTPS_LOGIN'] === 'on') && (!$useHTTPS)) { |
header('HTTP/1.1 301 Moved Permanently'); |
header('Location: https://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/status.php'); |
exit(); |
} |
|
// Wait for chilli (update its tables) |
sleep(1); // TODO: wait after login only? |
// Retrieve user info in tab $user[] |
68,8 → 75,7 |
return $time[0].' h '.$time[1].' m '.$time[2].' s'; |
} |
|
# Choice of language |
// TODO: reste quelques traductions à faire |
// Choice of language |
$Language = 'en'; |
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); |
323,13 → 329,6 |
$user_needKeepOpen = (preg_match("/^$remote_ip:PERM/m", file_get_contents($filename)) === 0); |
} |
|
//////////////////////////////////////////////////////////////////////////////////////// |
/////////////////////// TEST VARIABLES /////////////////////// |
////////////////////////////////////////////////////////////// |
//$nb_open_session = 2; // >2 |
//$user_needKeepOpen = true; // true/false |
//////////////////////////////////////////////////////////////////////////////////////// |
|
// Cleaning the cache |
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT'); |
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |