452 |
richard |
1 |
<?php
|
958 |
franck |
2 |
# $Id: index.php 1867 2016-05-04 12:22:08Z raphael.pion $
|
1249 |
richard |
3 |
#
|
1287 |
richard |
4 |
# index.php for ALCASAR captive portal
|
1249 |
richard |
5 |
# by REXY
|
|
|
6 |
# UI & css style by stephane ERARD
|
|
|
7 |
# The contents of this file may be used under the terms of the GNU
|
|
|
8 |
# General Public License Version 2, provided that the above copyright
|
|
|
9 |
# notice and this permission notice is included in all copies or
|
|
|
10 |
# substantial portions of the software.
|
|
|
11 |
/****************************************************************
|
|
|
12 |
* GLOBAL FILE PATHS *
|
|
|
13 |
*****************************************************************/
|
|
|
14 |
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
|
|
|
15 |
|
|
|
16 |
/****************************************************************
|
|
|
17 |
* FILE reading test *
|
|
|
18 |
*****************************************************************/
|
|
|
19 |
$conf_files=array(CONF_FILE);
|
|
|
20 |
foreach ($conf_files as $file){
|
|
|
21 |
if (!file_exists($file)){
|
|
|
22 |
exit("File ".$file." unknown");
|
|
|
23 |
}
|
|
|
24 |
if (!is_readable($file)){
|
|
|
25 |
exit("You don't have read rights on the file ".$file);
|
|
|
26 |
}
|
|
|
27 |
}
|
|
|
28 |
/****************************************************************
|
|
|
29 |
* Read CONF_FILE *
|
|
|
30 |
*****************************************************************/
|
|
|
31 |
$ouvre=fopen(CONF_FILE,"r");
|
|
|
32 |
if ($ouvre){
|
|
|
33 |
while (!feof ($ouvre))
|
|
|
34 |
{
|
|
|
35 |
$tampon = fgets($ouvre, 4096);
|
|
|
36 |
if (strpos($tampon,"=")!==false){
|
|
|
37 |
$tmp = explode("=",$tampon);
|
|
|
38 |
$conf[$tmp[0]] = $tmp[1];
|
|
|
39 |
}
|
|
|
40 |
}
|
|
|
41 |
}else{
|
|
|
42 |
exit("Error opening the file ".CONF_FILE);
|
|
|
43 |
}
|
|
|
44 |
fclose($ouvre);
|
1345 |
richard |
45 |
$organisme = trim($conf["ORGANISM"]);
|
|
|
46 |
$domainname = trim($conf["DOMAIN"]);
|
|
|
47 |
$hostname = "alcasar.".$domainname;
|
784 |
richard |
48 |
$network_pb = False;
|
1249 |
richard |
49 |
$cert_add = "http://$hostname/certs";
|
360 |
richard |
50 |
$direct_access = False;
|
832 |
richard |
51 |
$diagnostic = "can't contact the default router";
|
1452 |
richard |
52 |
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
|
363 |
richard |
53 |
$tab = array();$user = array();
|
566 |
stephane |
54 |
$connection_history = "";
|
|
|
55 |
$nb_connection_history = 3;
|
|
|
56 |
|
1818 |
raphael.pi |
57 |
# Obtenir l'état de connexion de l'utilisateur. 1 si connecté sinon 0.
|
|
|
58 |
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
|
|
|
59 |
$user = explode (" ", $tab[0]);
|
1820 |
raphael.pi |
60 |
|
522 |
richard |
61 |
# on discrimine les accès directs sur Alcasar par rapport aux redirections (blacklist ou pannes rso)
|
1345 |
richard |
62 |
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || preg_match ("/^alcasar$/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname$/", $_SERVER['HTTP_HOST']) || preg_match ("/^$organisme$/", $_SERVER['HTTP_HOST']))
|
522 |
richard |
63 |
{
|
|
|
64 |
$direct_access=True;
|
|
|
65 |
}
|
566 |
stephane |
66 |
#### Affichage des 3 dernières connexions de $user[5]
|
|
|
67 |
function secondsToDuration($seconds = null){
|
|
|
68 |
if ($seconds == null) return "";
|
509 |
richard |
69 |
|
566 |
stephane |
70 |
$temp = $seconds % 3600;
|
|
|
71 |
$time[0] = ( $seconds - $temp ) / 3600 ; // hours
|
732 |
richard |
72 |
$time[2] = $temp % 60 ; // seconds
|
566 |
stephane |
73 |
$time[1] = ( $temp - $time[2] ) / 60; // minutes
|
|
|
74 |
|
732 |
richard |
75 |
return $time[0]." h ".$time[1]." m ".$time[2]." s";
|
566 |
stephane |
76 |
}
|
509 |
richard |
77 |
|
566 |
stephane |
78 |
$l_connected = "connected"; // a traduire (choix de la langue ci-dessous mais nécessitant de $connection_history)
|
|
|
79 |
// si on a pas d'accès à la bdd, la page s'affiche quand même correctement
|
783 |
richard |
80 |
if ((isset ($user[4])) && ($user[4] != "0")){
|
566 |
stephane |
81 |
if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
|
|
|
82 |
include_once("/etc/freeradius-web/config.php");
|
|
|
83 |
include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
|
|
|
84 |
|
|
|
85 |
$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
|
|
|
86 |
$link = @da_sql_pconnect($config); // on affiche pas les erreurs
|
|
|
87 |
|
|
|
88 |
if ($link){
|
|
|
89 |
$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
|
|
|
90 |
|
|
|
91 |
if ($res){
|
|
|
92 |
$connection_history.= "<ul>";
|
|
|
93 |
while(($row = @da_sql_fetch_array($res,$config))){
|
|
|
94 |
$connected = "";
|
1521 |
richard |
95 |
if ($row['acctstoptime'] == "") $connected = " ($l_connected)";
|
1678 |
richard |
96 |
$connection_history.="<li title='$row[username] $row[acctstarttime] $row[acctstoptime] (".secondsToDuration($row['acctsessiontime']).")'>$row[acctstarttime] (".secondsToDuration($row['acctsessiontime']).") $connected</li>";
|
566 |
stephane |
97 |
}
|
|
|
98 |
$connection_history.="</ul>";
|
|
|
99 |
}
|
|
|
100 |
}
|
|
|
101 |
}
|
|
|
102 |
}
|
1818 |
raphael.pi |
103 |
else
|
|
|
104 |
{
|
1822 |
raphael.pi |
105 |
# cas où l'utilisateur non-loggué décide de joindre une page HTTP/S => redirection http://URL
|
|
|
106 |
# ALCASAR => redirection index.php
|
1867 |
raphael.pi |
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 not_auth_yet $remote_ip");
|
1818 |
raphael.pi |
109 |
if(!$direct_access)
|
|
|
110 |
{
|
1849 |
raphael.pi |
111 |
header("Cache-Control: no-cache, must-revalidate");
|
|
|
112 |
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
|
|
113 |
header("Content-Type: application/xml; charset=utf-8");
|
1822 |
raphael.pi |
114 |
header("Location: http://".$_SERVER['HTTP_HOST']);
|
1820 |
raphael.pi |
115 |
exit;
|
1818 |
raphael.pi |
116 |
}
|
1820 |
raphael.pi |
117 |
|
1818 |
raphael.pi |
118 |
}
|
509 |
richard |
119 |
####
|
|
|
120 |
|
360 |
richard |
121 |
# Choice of language
|
|
|
122 |
$Language = 'en';
|
|
|
123 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
|
|
124 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
|
|
125 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
|
|
126 |
if($Language == 'fr'){
|
|
|
127 |
$l_access_denied = "ACCÈS REFUSÉ";
|
399 |
franck |
128 |
$l_access_welcome = "Bienvenue sur ALCASAR";
|
360 |
richard |
129 |
$l_access_unavailable = "ACCÈS INDISPONIBLE";
|
|
|
130 |
$l_required_domain = "Site WEB demandé";
|
1504 |
richard |
131 |
$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez posséder un compte d'administration ou de gestion pour y accéder.";
|
360 |
richard |
132 |
$l_explain_access_deny = "Vous tentez d'accéder à une ressource dont le contenu est réputé contenir des informations inappropriées.";
|
|
|
133 |
$l_explain_net_pb = "Votre portail détecte que l'accès à Internet est indisponible.";
|
|
|
134 |
$l_contact_access_deny = "Contactez le responsable de la sécurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
|
509 |
richard |
135 |
$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
|
399 |
franck |
136 |
$l_welcome = "Page principale de votre portail captif";
|
1452 |
richard |
137 |
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Enregistrement par SMS</a>";
|
1830 |
raphael.pi |
138 |
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Installer le certificat racine</a>";
|
|
|
139 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Installation du certificat de l'autorité racine d'ALCASAR</a>";
|
536 |
franck |
140 |
$l_certif_explain = "Permet l'échange de données sécurisées entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistré sur votre station de consultation, il est possible que des alertes de sécurités soient émises par votre navigateur.<br><br>";
|
688 |
richard |
141 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
|
1124 |
crox53 |
142 |
$l_category = "catégorie :";
|
832 |
richard |
143 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
509 |
richard |
144 |
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système.";
|
1822 |
raphael.pi |
145 |
$l_logout = "<a href=\"http://www.google.com\">Ouvrir une session Internet</a>";
|
|
|
146 |
|
1820 |
raphael.pi |
147 |
|
|
|
148 |
}
|
369 |
richard |
149 |
else {
|
832 |
richard |
150 |
if ($user[5] != $user[0]) // authentication exception or not
|
|
|
151 |
{
|
|
|
152 |
$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"http://$hostname:3990/logoff\" title=\"Deconnecter l'utilisateur $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
|
|
|
153 |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Se déconnecter d'internet</a>";
|
|
|
154 |
}
|
|
|
155 |
else
|
|
|
156 |
{
|
|
|
157 |
$l_logout_explain = "Votre système ($user[5]) est en exception d'authentication.<br><br>$nb_connection_history last connections :$connection_history";
|
|
|
158 |
$l_logout = "Information des connexions";
|
|
|
159 |
}
|
|
|
160 |
}
|
566 |
stephane |
161 |
$l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</a>";
|
536 |
franck |
162 |
$l_password_change_explain = "Vous redirige sur la page de changement du mot de passe de votre compte d'accès à internet.<br><br>Vous devez avoir un compte internet valide.";
|
1452 |
richard |
163 |
$l_sms_explain = "Vous redirige vers une la page explicative de l'auto enregistrement par SMS.<br><br><strong>Identifiant:</strong> votre numéro de téléphone<br><strong>Mot de passe:</strong> votre message";
|
360 |
richard |
164 |
$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
|
1452 |
richard |
165 |
$l_service_sms = "Service SMS actif";
|
|
|
166 |
$l_service_sms_n = "Service SMS non actif";
|
|
|
167 |
$l_acc_sms = "Auto enregistrement par SMS";
|
360 |
richard |
168 |
}
|
912 |
richard |
169 |
else if($Language == 'pt'){
|
|
|
170 |
$l_access_denied = "Acesso negado";
|
|
|
171 |
$l_access_welcome = "Bem-vindo ao Alcasar";
|
|
|
172 |
$l_access_unavailable = "ACESSO INDISPONÍVEL";
|
|
|
173 |
$l_required_domain = "Site WEB Obrigatório";
|
955 |
richard |
174 |
$l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
|
912 |
richard |
175 |
$l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
|
955 |
richard |
176 |
$l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
|
912 |
richard |
177 |
$l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
|
|
|
178 |
$l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
|
955 |
richard |
179 |
$l_welcome = "Página do portal";
|
1452 |
richard |
180 |
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
|
1830 |
raphael.pi |
181 |
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
|
|
|
182 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
|
912 |
richard |
183 |
$l_certif_explain = "O certificado Permiti a troca de dados seguro entre seu computador e o portal Alcasar.<BR>Se este certificado não estiver incorporado no seu computador, alguns alertas de segurança deverá aparecer no navegador.<br><br>";
|
955 |
richard |
184 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
|
1124 |
crox53 |
185 |
$l_category = "categoria :";
|
912 |
richard |
186 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
955 |
richard |
187 |
$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
|
1822 |
raphael.pi |
188 |
$l_logout = "<a href=\"http://www.google.com\">Abrir uma conexão de Internet</a>";
|
|
|
189 |
|
1820 |
raphael.pi |
190 |
|
|
|
191 |
}
|
912 |
richard |
192 |
else {
|
|
|
193 |
if ($user[5] != $user[0]) // authentication exception or not
|
|
|
194 |
{
|
955 |
richard |
195 |
$l_logout_explain = "Se desejar, feche a conexão do usuário atual conectado.<br> Usuário conectado : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
|
922 |
richard |
196 |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>";
|
912 |
richard |
197 |
}
|
|
|
198 |
else
|
|
|
199 |
{
|
955 |
richard |
200 |
$l_logout_explain = "O sistema ($user[5]) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
|
922 |
richard |
201 |
$l_logout = "Informações de conexões";
|
912 |
richard |
202 |
}
|
|
|
203 |
}
|
922 |
richard |
204 |
$l_password_change = "<a href=\"https://$hostname/pass\">Mudar sua senha</a>";
|
955 |
richard |
205 |
$l_password_change_explain = "Você será redirecionado à página de alteração de senha.<br><br> e deverá ter uma conta de usuário valido para efetuar a troca e acessar à Internet.";
|
1452 |
richard |
206 |
$l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
|
922 |
richard |
207 |
$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
|
1452 |
richard |
208 |
$l_service_sms = "SMS service enable";
|
|
|
209 |
$l_service_sms_n = "SMS service disable";
|
|
|
210 |
$l_acc_sms = "Auto registration by SMS";
|
912 |
richard |
211 |
}
|
360 |
richard |
212 |
else {
|
|
|
213 |
$l_access_denied = "ACCESS DENIED";
|
369 |
richard |
214 |
$l_access_welcome = "Welcome on ALCASAR";
|
360 |
richard |
215 |
$l_access_unavailable = "ACCESS UNAVAILABLE";
|
|
|
216 |
$l_required_domain = "Required WEB site";
|
369 |
richard |
217 |
$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
|
801 |
richard |
218 |
$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
|
360 |
richard |
219 |
$l_explain_net_pb = "Your portal has just detected that the Internet access is down";
|
|
|
220 |
$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
|
|
|
221 |
$l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
|
369 |
richard |
222 |
$l_welcome = "Your captive portal main page";
|
1452 |
richard |
223 |
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
|
1830 |
raphael.pi |
224 |
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
|
|
|
225 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
|
688 |
richard |
226 |
$l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
|
|
|
227 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
|
1124 |
crox53 |
228 |
$l_category = "category :";
|
783 |
richard |
229 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
369 |
richard |
230 |
$l_logout_explain = "No Internet consultation session is actualy open on your system";
|
1822 |
raphael.pi |
231 |
$l_logout = "<a href=\"http://www.google.com\">Open an Internet session</a>";
|
|
|
232 |
|
1820 |
raphael.pi |
233 |
|
|
|
234 |
}
|
369 |
richard |
235 |
else {
|
832 |
richard |
236 |
if ($user[5] != $user[0]) // authentication exception or not
|
|
|
237 |
{
|
922 |
richard |
238 |
$l_logout_explain = "Close the session of the user currently connected.<br> User logged-on : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
|
783 |
richard |
239 |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
|
832 |
richard |
240 |
}
|
|
|
241 |
else
|
|
|
242 |
{
|
922 |
richard |
243 |
$l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history";
|
832 |
richard |
244 |
$l_logout = "Connections information";
|
|
|
245 |
}
|
783 |
richard |
246 |
}
|
566 |
stephane |
247 |
$l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
|
799 |
richard |
248 |
$l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
|
1452 |
richard |
249 |
$l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
|
360 |
richard |
250 |
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
|
1452 |
richard |
251 |
$l_service_sms = "SMS service enable";
|
|
|
252 |
$l_service_sms_n = "SMS service disable";
|
|
|
253 |
$l_acc_sms = "Auto registration by SMS";
|
360 |
richard |
254 |
}
|
369 |
richard |
255 |
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
|
360 |
richard |
256 |
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
|
509 |
richard |
257 |
|
|
|
258 |
# Attribution des icones / images
|
|
|
259 |
$img_rep = "images/";
|
|
|
260 |
$img_organisme = "organisme.png";
|
|
|
261 |
$img_access = "globe_acces_70.png";
|
|
|
262 |
$img_connect = "globe_70.png";
|
|
|
263 |
$img_warning = "globe_warning_70.png";
|
|
|
264 |
$img_pwd = "cle_ombre.png";
|
|
|
265 |
$img_certificate = "certificat.png";
|
|
|
266 |
$img_acc = "logo-alcasar_70.png";
|
1452 |
richard |
267 |
$img_sms = "sms.png";
|
509 |
richard |
268 |
$img_false = "interdit.png";
|
1452 |
richard |
269 |
$img_adm = "adm.png";
|
509 |
richard |
270 |
$img_internet = $img_connect;
|
|
|
271 |
|
783 |
richard |
272 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
509 |
richard |
273 |
if (! $network_pb) {
|
|
|
274 |
$img_internet = $img_access;
|
|
|
275 |
}
|
|
|
276 |
else {
|
|
|
277 |
$img_internet = $img_warning;
|
|
|
278 |
}
|
|
|
279 |
}
|
|
|
280 |
else {
|
|
|
281 |
$img_internet = $img_connect;
|
|
|
282 |
}
|
|
|
283 |
|
452 |
richard |
284 |
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
360 |
richard |
285 |
?>
|
566 |
stephane |
286 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
287 |
<html>
|
|
|
288 |
<head>
|
|
|
289 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
290 |
<title>ALCASAR - <?php echo $l_title; ?></title>
|
|
|
291 |
<meta http-equiv="Cache-control" content="no-cache">
|
|
|
292 |
<meta http-equiv="Pragma" content="no-cache">
|
|
|
293 |
<link rel="stylesheet" type="text/css" href="css/style_intercept.css">
|
|
|
294 |
<script type="text/javascript">
|
509 |
richard |
295 |
function valoriserDiv5(param){
|
|
|
296 |
document.getElementById("box_info").innerHTML = param.innerHTML;
|
|
|
297 |
}
|
|
|
298 |
</script>
|
360 |
richard |
299 |
</head>
|
566 |
stephane |
300 |
<body onload="valoriserDiv5(text_conn);">
|
509 |
richard |
301 |
<?php
|
360 |
richard |
302 |
if ($direct_access){
|
|
|
303 |
echo "
|
566 |
stephane |
304 |
<div id=\"cadre_titre\" class=\"titre_controle\">
|
|
|
305 |
<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
|
509 |
richard |
306 |
if ($network_pb) {
|
566 |
stephane |
307 |
echo " <span>$l_explain_net_pb</span>";
|
509 |
richard |
308 |
}
|
360 |
richard |
309 |
}
|
509 |
richard |
310 |
else {
|
|
|
311 |
echo"
|
566 |
stephane |
312 |
<div id=\"cadre_titre\" class=\"titre_refus\">
|
|
|
313 |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
|
363 |
richard |
314 |
}
|
360 |
richard |
315 |
?>
|
566 |
stephane |
316 |
<div id="boite_logo">
|
|
|
317 |
<img src="images/organisme.png">
|
|
|
318 |
</div>
|
|
|
319 |
</div>
|
|
|
320 |
<div id="contenu_acces">
|
|
|
321 |
<div id="box_url">
|
1124 |
crox53 |
322 |
<?php
|
1452 |
richard |
323 |
//search here in the blacklist categories (if ((! $direct_access) && (! $network_pb)){}
|
1124 |
crox53 |
324 |
?>
|
566 |
stephane |
325 |
</div>
|
1452 |
richard |
326 |
<?php
|
|
|
327 |
# CHECK IF the SMS service is enable
|
1506 |
franck |
328 |
$service_SMS_status="false";
|
|
|
329 |
if ($service_SMS_status == "true") {
|
1452 |
richard |
330 |
$sms_div='
|
|
|
331 |
<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
|
|
|
332 |
<span>'.$l_sms_access.'</span>
|
|
|
333 |
<img src="'.$img_rep.''.$img_sms.'">
|
|
|
334 |
</div>
|
|
|
335 |
';
|
|
|
336 |
|
|
|
337 |
$sms_div_over='
|
|
|
338 |
<div class="div-cache" id="text_acc">
|
|
|
339 |
<h2>'.$l_sms_access.'</h2>
|
|
|
340 |
<p>'.$l_sms_explain.'</p>
|
|
|
341 |
<p><font color="green"><center>'.$l_service_sms.'</center></font></p>
|
|
|
342 |
<img src="'.$img_rep.''.$img_sms.'">
|
|
|
343 |
</div>
|
|
|
344 |
';
|
|
|
345 |
}
|
1508 |
richard |
346 |
else {
|
|
|
347 |
$sms_div='';
|
|
|
348 |
$sms_div_over='';
|
|
|
349 |
}
|
1452 |
richard |
350 |
?>
|
509 |
richard |
351 |
<?php
|
|
|
352 |
if ($direct_access){
|
566 |
stephane |
353 |
echo " <div id=\"box_bienvenue\">
|
360 |
richard |
354 |
$l_welcome
|
566 |
stephane |
355 |
</div>
|
|
|
356 |
<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
|
|
|
357 |
<span>$l_logout</span>
|
|
|
358 |
<img src=\"$img_rep$img_internet\">
|
|
|
359 |
</div>
|
|
|
360 |
<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
|
|
|
361 |
<span>$l_install_certif</span>
|
|
|
362 |
<img src=\"$img_rep$img_certificate\">
|
|
|
363 |
</div>
|
|
|
364 |
<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
|
|
|
365 |
<img src=\"$img_rep$img_pwd\">
|
|
|
366 |
<span>$l_password_change</span>
|
|
|
367 |
</div>
|
1452 |
richard |
368 |
$sms_div
|
566 |
stephane |
369 |
<div class=\"div-cache\" id=\"text_conn\">
|
|
|
370 |
<h2>$l_logout</h2>
|
|
|
371 |
<p>$l_logout_explain</p>
|
|
|
372 |
<img src=\"$img_rep$img_internet\">
|
|
|
373 |
</div>
|
|
|
374 |
<div class=\"div-cache\" id=\"text_certif\">
|
|
|
375 |
<h2>$l_install_certif_more</h2>
|
|
|
376 |
<p>$l_certif_explain $l_certif_explain_help</p>
|
|
|
377 |
<img src=\"$img_rep$img_certificate\">
|
|
|
378 |
</div>
|
|
|
379 |
<div class=\"div-cache\" id=\"text_mdp\">
|
|
|
380 |
<h2>$l_password_change</h2>
|
|
|
381 |
<p>$l_password_change_explain</p>
|
|
|
382 |
<img src=\"$img_rep$img_pwd\">
|
|
|
383 |
</div>
|
1452 |
richard |
384 |
$sms_div_over
|
566 |
stephane |
385 |
<div id=\"box_info\">
|
|
|
386 |
</div>";
|
509 |
richard |
387 |
}
|
|
|
388 |
else {
|
|
|
389 |
echo "
|
566 |
stephane |
390 |
<div id=\"box_refuse\">
|
509 |
richard |
391 |
<img src=\"$img_rep$img_false\">
|
566 |
stephane |
392 |
<p>$l_explain</p>
|
|
|
393 |
</div>
|
|
|
394 |
<div id=\"liens_redir\">
|
|
|
395 |
<p>$l_back_page</p>
|
|
|
396 |
</div>";
|
509 |
richard |
397 |
}
|
|
|
398 |
if (($network_pb)&&(! $direct_access)) {
|
566 |
stephane |
399 |
echo " <span>Diagnostic : $diagnostic</span>";
|
509 |
richard |
400 |
}
|
363 |
richard |
401 |
?>
|
566 |
stephane |
402 |
</div>
|
1452 |
richard |
403 |
<div id="corner">
|
|
|
404 |
<div id="adm" class="corn">
|
1729 |
richard |
405 |
<a href="https://<?php echo $hostname; ?>/acc/"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
|
1452 |
richard |
406 |
</div>
|
|
|
407 |
</div>
|
566 |
stephane |
408 |
</body>
|
1822 |
raphael.pi |
409 |
</html>
|