452 |
richard |
1 |
<?php
|
958 |
franck |
2 |
# $Id: index.php 1504 2014-11-27 22:59:10Z richard $
|
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"]);
|
1492 |
franck |
47 |
$service_SMS_status = trim($conf["SMS_REGISTRATION"]);
|
1345 |
richard |
48 |
$hostname = "alcasar.".$domainname;
|
784 |
richard |
49 |
$network_pb = False;
|
1249 |
richard |
50 |
$cert_add = "http://$hostname/certs";
|
360 |
richard |
51 |
$direct_access = False;
|
832 |
richard |
52 |
$diagnostic = "can't contact the default router";
|
1452 |
richard |
53 |
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
|
363 |
richard |
54 |
$tab = array();$user = array();
|
566 |
stephane |
55 |
$connection_history = "";
|
|
|
56 |
$nb_connection_history = 3;
|
|
|
57 |
|
522 |
richard |
58 |
# on discrimine les accès directs sur Alcasar par rapport aux redirections (blacklist ou pannes rso)
|
1345 |
richard |
59 |
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 |
60 |
{
|
|
|
61 |
$direct_access=True;
|
|
|
62 |
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
|
|
|
63 |
$user = explode (" ", $tab[0]);
|
|
|
64 |
}
|
566 |
stephane |
65 |
#### Affichage des 3 dernières connexions de $user[5]
|
|
|
66 |
function secondsToDuration($seconds = null){
|
|
|
67 |
if ($seconds == null) return "";
|
509 |
richard |
68 |
|
566 |
stephane |
69 |
$temp = $seconds % 3600;
|
|
|
70 |
$time[0] = ( $seconds - $temp ) / 3600 ; // hours
|
732 |
richard |
71 |
$time[2] = $temp % 60 ; // seconds
|
566 |
stephane |
72 |
$time[1] = ( $temp - $time[2] ) / 60; // minutes
|
|
|
73 |
|
732 |
richard |
74 |
return $time[0]." h ".$time[1]." m ".$time[2]." s";
|
566 |
stephane |
75 |
}
|
509 |
richard |
76 |
|
566 |
stephane |
77 |
$l_connected = "connected"; // a traduire (choix de la langue ci-dessous mais nécessitant de $connection_history)
|
|
|
78 |
// si on a pas d'accès à la bdd, la page s'affiche quand même correctement
|
783 |
richard |
79 |
if ((isset ($user[4])) && ($user[4] != "0")){
|
566 |
stephane |
80 |
if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
|
|
|
81 |
include_once("/etc/freeradius-web/config.php");
|
|
|
82 |
include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
|
|
|
83 |
|
|
|
84 |
$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
|
|
|
85 |
$link = @da_sql_pconnect($config); // on affiche pas les erreurs
|
|
|
86 |
|
|
|
87 |
if ($link){
|
|
|
88 |
$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
|
|
|
89 |
|
|
|
90 |
if ($res){
|
|
|
91 |
$connection_history.= "<ul>";
|
|
|
92 |
while(($row = @da_sql_fetch_array($res,$config))){
|
|
|
93 |
$connected = "";
|
1503 |
franck |
94 |
if ($row['acctstoptime'] == "") $connected = " ($l_connected)";
|
|
|
95 |
$connection_history.="<li title='$row['username'] $row['acctstarttime'] $row['acctstoptime'] (".secondsToDuration($row['acctsessiontime']).")'>$row['acctstarttime'] (".secondsToDuration($row['acctsessiontime']).") $connected</li>";
|
566 |
stephane |
96 |
}
|
|
|
97 |
$connection_history.="</ul>";
|
|
|
98 |
}
|
|
|
99 |
}
|
|
|
100 |
}
|
|
|
101 |
}
|
509 |
richard |
102 |
####
|
|
|
103 |
|
360 |
richard |
104 |
# Choice of language
|
|
|
105 |
$Language = 'en';
|
|
|
106 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
|
|
107 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
|
|
108 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
|
|
109 |
if($Language == 'fr'){
|
|
|
110 |
$l_access_denied = "ACCÈS REFUSÉ";
|
399 |
franck |
111 |
$l_access_welcome = "Bienvenue sur ALCASAR";
|
360 |
richard |
112 |
$l_access_unavailable = "ACCÈS INDISPONIBLE";
|
|
|
113 |
$l_required_domain = "Site WEB demandé";
|
1504 |
richard |
114 |
$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 |
115 |
$l_explain_access_deny = "Vous tentez d'accéder à une ressource dont le contenu est réputé contenir des informations inappropriées.";
|
|
|
116 |
$l_explain_net_pb = "Votre portail détecte que l'accès à Internet est indisponible.";
|
|
|
117 |
$l_contact_access_deny = "Contactez le responsable de la sécurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
|
509 |
richard |
118 |
$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
|
399 |
franck |
119 |
$l_welcome = "Page principale de votre portail captif";
|
1452 |
richard |
120 |
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Enregistrement par SMS</a>";
|
566 |
stephane |
121 |
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installer le certificat racine</a>";
|
|
|
122 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installation du certificat de l'autorité racine d'ALCASAR</a>";
|
536 |
franck |
123 |
$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 |
124 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
|
1124 |
crox53 |
125 |
$l_category = "catégorie :";
|
832 |
richard |
126 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
509 |
richard |
127 |
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système.";
|
1452 |
richard |
128 |
$l_logout = "<a href=\"http://www.qwant.com\">Ouvrir une session Internet</a>";}
|
369 |
richard |
129 |
else {
|
832 |
richard |
130 |
if ($user[5] != $user[0]) // authentication exception or not
|
|
|
131 |
{
|
|
|
132 |
$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";
|
|
|
133 |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Se déconnecter d'internet</a>";
|
|
|
134 |
}
|
|
|
135 |
else
|
|
|
136 |
{
|
|
|
137 |
$l_logout_explain = "Votre système ($user[5]) est en exception d'authentication.<br><br>$nb_connection_history last connections :$connection_history";
|
|
|
138 |
$l_logout = "Information des connexions";
|
|
|
139 |
}
|
|
|
140 |
}
|
566 |
stephane |
141 |
$l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</a>";
|
536 |
franck |
142 |
$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 |
143 |
$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 |
144 |
$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
|
1452 |
richard |
145 |
$l_service_sms = "Service SMS actif";
|
|
|
146 |
$l_service_sms_n = "Service SMS non actif";
|
|
|
147 |
$l_acc_sms = "Auto enregistrement par SMS";
|
360 |
richard |
148 |
}
|
912 |
richard |
149 |
else if($Language == 'pt'){
|
|
|
150 |
$l_access_denied = "Acesso negado";
|
|
|
151 |
$l_access_welcome = "Bem-vindo ao Alcasar";
|
|
|
152 |
$l_access_unavailable = "ACESSO INDISPONÍVEL";
|
|
|
153 |
$l_required_domain = "Site WEB Obrigatório";
|
955 |
richard |
154 |
$l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
|
912 |
richard |
155 |
$l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
|
955 |
richard |
156 |
$l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
|
912 |
richard |
157 |
$l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
|
|
|
158 |
$l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
|
955 |
richard |
159 |
$l_welcome = "Página do portal";
|
1452 |
richard |
160 |
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
|
912 |
richard |
161 |
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Instalar Certificado Alcasar AC</a>";
|
|
|
162 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Instalar Certificado Alcasar AC</a>";
|
|
|
163 |
$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 |
164 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
|
1124 |
crox53 |
165 |
$l_category = "categoria :";
|
912 |
richard |
166 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
955 |
richard |
167 |
$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
|
1452 |
richard |
168 |
$l_logout = "<a href=\"http://www.qwant.com\">Abrir uma conexão de Internet</a>";}
|
912 |
richard |
169 |
else {
|
|
|
170 |
if ($user[5] != $user[0]) // authentication exception or not
|
|
|
171 |
{
|
955 |
richard |
172 |
$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 |
173 |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>";
|
912 |
richard |
174 |
}
|
|
|
175 |
else
|
|
|
176 |
{
|
955 |
richard |
177 |
$l_logout_explain = "O sistema ($user[5]) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
|
922 |
richard |
178 |
$l_logout = "Informações de conexões";
|
912 |
richard |
179 |
}
|
|
|
180 |
}
|
922 |
richard |
181 |
$l_password_change = "<a href=\"https://$hostname/pass\">Mudar sua senha</a>";
|
955 |
richard |
182 |
$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 |
183 |
$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 |
184 |
$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
|
1452 |
richard |
185 |
$l_service_sms = "SMS service enable";
|
|
|
186 |
$l_service_sms_n = "SMS service disable";
|
|
|
187 |
$l_acc_sms = "Auto registration by SMS";
|
912 |
richard |
188 |
}
|
360 |
richard |
189 |
else {
|
|
|
190 |
$l_access_denied = "ACCESS DENIED";
|
369 |
richard |
191 |
$l_access_welcome = "Welcome on ALCASAR";
|
360 |
richard |
192 |
$l_access_unavailable = "ACCESS UNAVAILABLE";
|
|
|
193 |
$l_required_domain = "Required WEB site";
|
369 |
richard |
194 |
$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
|
801 |
richard |
195 |
$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
|
360 |
richard |
196 |
$l_explain_net_pb = "Your portal has just detected that the Internet access is down";
|
|
|
197 |
$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
|
|
|
198 |
$l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
|
369 |
richard |
199 |
$l_welcome = "Your captive portal main page";
|
1452 |
richard |
200 |
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
|
611 |
franck |
201 |
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Install ALCASAR AC Certificate</a>";
|
566 |
stephane |
202 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Install ALCASAR AC Certificate</a>";
|
688 |
richard |
203 |
$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>";
|
|
|
204 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
|
1124 |
crox53 |
205 |
$l_category = "category :";
|
783 |
richard |
206 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
369 |
richard |
207 |
$l_logout_explain = "No Internet consultation session is actualy open on your system";
|
1452 |
richard |
208 |
$l_logout = "<a href=\"http://www.qwant.com\">Open an Internet session</a>";}
|
369 |
richard |
209 |
else {
|
832 |
richard |
210 |
if ($user[5] != $user[0]) // authentication exception or not
|
|
|
211 |
{
|
922 |
richard |
212 |
$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 |
213 |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
|
832 |
richard |
214 |
}
|
|
|
215 |
else
|
|
|
216 |
{
|
922 |
richard |
217 |
$l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history";
|
832 |
richard |
218 |
$l_logout = "Connections information";
|
|
|
219 |
}
|
783 |
richard |
220 |
}
|
566 |
stephane |
221 |
$l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
|
799 |
richard |
222 |
$l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
|
1452 |
richard |
223 |
$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 |
224 |
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
|
1452 |
richard |
225 |
$l_service_sms = "SMS service enable";
|
|
|
226 |
$l_service_sms_n = "SMS service disable";
|
|
|
227 |
$l_acc_sms = "Auto registration by SMS";
|
360 |
richard |
228 |
}
|
369 |
richard |
229 |
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
|
360 |
richard |
230 |
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
|
509 |
richard |
231 |
|
|
|
232 |
# Attribution des icones / images
|
|
|
233 |
$img_rep = "images/";
|
|
|
234 |
$img_organisme = "organisme.png";
|
|
|
235 |
$img_access = "globe_acces_70.png";
|
|
|
236 |
$img_connect = "globe_70.png";
|
|
|
237 |
$img_warning = "globe_warning_70.png";
|
|
|
238 |
$img_pwd = "cle_ombre.png";
|
|
|
239 |
$img_certificate = "certificat.png";
|
|
|
240 |
$img_acc = "logo-alcasar_70.png";
|
1452 |
richard |
241 |
$img_sms = "sms.png";
|
509 |
richard |
242 |
$img_false = "interdit.png";
|
1452 |
richard |
243 |
$img_adm = "adm.png";
|
509 |
richard |
244 |
$img_internet = $img_connect;
|
|
|
245 |
|
783 |
richard |
246 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
509 |
richard |
247 |
if (! $network_pb) {
|
|
|
248 |
$img_internet = $img_access;
|
|
|
249 |
}
|
|
|
250 |
else {
|
|
|
251 |
$img_internet = $img_warning;
|
|
|
252 |
}
|
|
|
253 |
}
|
|
|
254 |
else {
|
|
|
255 |
$img_internet = $img_connect;
|
|
|
256 |
}
|
|
|
257 |
|
452 |
richard |
258 |
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
360 |
richard |
259 |
?>
|
566 |
stephane |
260 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
261 |
<html>
|
|
|
262 |
<head>
|
|
|
263 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
264 |
<title>ALCASAR - <?php echo $l_title; ?></title>
|
|
|
265 |
<meta http-equiv="Cache-control" content="no-cache">
|
|
|
266 |
<meta http-equiv="Pragma" content="no-cache">
|
|
|
267 |
<link rel="stylesheet" type="text/css" href="css/style_intercept.css">
|
|
|
268 |
<script type="text/javascript">
|
509 |
richard |
269 |
function valoriserDiv5(param){
|
|
|
270 |
document.getElementById("box_info").innerHTML = param.innerHTML;
|
|
|
271 |
}
|
|
|
272 |
</script>
|
360 |
richard |
273 |
</head>
|
566 |
stephane |
274 |
<body onload="valoriserDiv5(text_conn);">
|
509 |
richard |
275 |
<?php
|
360 |
richard |
276 |
if ($direct_access){
|
|
|
277 |
echo "
|
566 |
stephane |
278 |
<div id=\"cadre_titre\" class=\"titre_controle\">
|
|
|
279 |
<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
|
509 |
richard |
280 |
if ($network_pb) {
|
566 |
stephane |
281 |
echo " <span>$l_explain_net_pb</span>";
|
509 |
richard |
282 |
}
|
360 |
richard |
283 |
}
|
509 |
richard |
284 |
else {
|
|
|
285 |
echo"
|
566 |
stephane |
286 |
<div id=\"cadre_titre\" class=\"titre_refus\">
|
|
|
287 |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
|
363 |
richard |
288 |
}
|
360 |
richard |
289 |
?>
|
566 |
stephane |
290 |
<div id="boite_logo">
|
|
|
291 |
<img src="images/organisme.png">
|
|
|
292 |
</div>
|
|
|
293 |
</div>
|
|
|
294 |
<div id="contenu_acces">
|
|
|
295 |
<div id="box_url">
|
1124 |
crox53 |
296 |
<?php
|
1452 |
richard |
297 |
//search here in the blacklist categories (if ((! $direct_access) && (! $network_pb)){}
|
1124 |
crox53 |
298 |
?>
|
566 |
stephane |
299 |
</div>
|
1452 |
richard |
300 |
<?php
|
|
|
301 |
# CHECK IF the SMS service is enable
|
1492 |
franck |
302 |
//$service_SMS_status="off";
|
1501 |
franck |
303 |
if (($service_SMS_status == "on") || ($service_SMS_status == "On")){
|
1452 |
richard |
304 |
$sms_div='
|
|
|
305 |
<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
|
|
|
306 |
<span>'.$l_sms_access.'</span>
|
|
|
307 |
<img src="'.$img_rep.''.$img_sms.'">
|
|
|
308 |
</div>
|
|
|
309 |
';
|
|
|
310 |
|
|
|
311 |
$sms_div_over='
|
|
|
312 |
<div class="div-cache" id="text_acc">
|
|
|
313 |
<h2>'.$l_sms_access.'</h2>
|
|
|
314 |
<p>'.$l_sms_explain.'</p>
|
|
|
315 |
<p><font color="green"><center>'.$l_service_sms.'</center></font></p>
|
|
|
316 |
<img src="'.$img_rep.''.$img_sms.'">
|
|
|
317 |
</div>
|
|
|
318 |
';
|
|
|
319 |
|
|
|
320 |
$sms_div='
|
|
|
321 |
<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
|
|
|
322 |
<span>'.$l_sms_access.'</span>
|
|
|
323 |
<img src="'.$img_rep.''.$img_sms.'">
|
|
|
324 |
</div>
|
|
|
325 |
';
|
|
|
326 |
|
|
|
327 |
$sms_div_over='
|
|
|
328 |
<div class="div-cache" id="text_acc">
|
|
|
329 |
<h2>'.$l_sms_access.'</h2>
|
|
|
330 |
<p>'.$l_sms_explain.'</p>
|
|
|
331 |
<p><font color="red"><center>'.$l_service_sms_n.'</center></font></p>
|
|
|
332 |
<img src="'.$img_rep.''.$img_sms.'">
|
|
|
333 |
</div>
|
|
|
334 |
';
|
|
|
335 |
}
|
|
|
336 |
?>
|
509 |
richard |
337 |
<?php
|
|
|
338 |
if ($direct_access){
|
566 |
stephane |
339 |
echo " <div id=\"box_bienvenue\">
|
360 |
richard |
340 |
$l_welcome
|
566 |
stephane |
341 |
</div>
|
|
|
342 |
<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
|
|
|
343 |
<span>$l_logout</span>
|
|
|
344 |
<img src=\"$img_rep$img_internet\">
|
|
|
345 |
</div>
|
|
|
346 |
<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
|
|
|
347 |
<span>$l_install_certif</span>
|
|
|
348 |
<img src=\"$img_rep$img_certificate\">
|
|
|
349 |
</div>
|
|
|
350 |
<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
|
|
|
351 |
<img src=\"$img_rep$img_pwd\">
|
|
|
352 |
<span>$l_password_change</span>
|
|
|
353 |
</div>
|
1452 |
richard |
354 |
$sms_div
|
566 |
stephane |
355 |
<div class=\"div-cache\" id=\"text_conn\">
|
|
|
356 |
<h2>$l_logout</h2>
|
|
|
357 |
<p>$l_logout_explain</p>
|
|
|
358 |
<img src=\"$img_rep$img_internet\">
|
|
|
359 |
</div>
|
|
|
360 |
<div class=\"div-cache\" id=\"text_certif\">
|
|
|
361 |
<h2>$l_install_certif_more</h2>
|
|
|
362 |
<p>$l_certif_explain $l_certif_explain_help</p>
|
|
|
363 |
<img src=\"$img_rep$img_certificate\">
|
|
|
364 |
</div>
|
|
|
365 |
<div class=\"div-cache\" id=\"text_mdp\">
|
|
|
366 |
<h2>$l_password_change</h2>
|
|
|
367 |
<p>$l_password_change_explain</p>
|
|
|
368 |
<img src=\"$img_rep$img_pwd\">
|
|
|
369 |
</div>
|
1452 |
richard |
370 |
$sms_div_over
|
566 |
stephane |
371 |
<div id=\"box_info\">
|
|
|
372 |
</div>";
|
509 |
richard |
373 |
}
|
|
|
374 |
else {
|
|
|
375 |
echo "
|
566 |
stephane |
376 |
<div id=\"box_refuse\">
|
509 |
richard |
377 |
<img src=\"$img_rep$img_false\">
|
566 |
stephane |
378 |
<p>$l_explain</p>
|
|
|
379 |
</div>
|
|
|
380 |
<div id=\"liens_redir\">
|
|
|
381 |
<p>$l_back_page</p>
|
|
|
382 |
</div>";
|
509 |
richard |
383 |
}
|
|
|
384 |
if (($network_pb)&&(! $direct_access)) {
|
566 |
stephane |
385 |
echo " <span>Diagnostic : $diagnostic</span>";
|
509 |
richard |
386 |
}
|
363 |
richard |
387 |
?>
|
566 |
stephane |
388 |
</div>
|
1452 |
richard |
389 |
<div id="corner">
|
|
|
390 |
<div id="adm" class="corn">
|
|
|
391 |
<a href="https://<?php echo $hostname; ?>/acc"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
|
|
|
392 |
</div>
|
|
|
393 |
</div>
|
566 |
stephane |
394 |
</body>
|
360 |
richard |
395 |
</html>
|