Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1451 → Rev 1452

/web/acc/manager/htdocs/autoregistration.php
320,7 → 320,7
<?php
 
#Test si gammu est lancé
$gammu_pid=exec("sudo /sbin/pidof gammu-smsd");
$gammu_pid=exec("sudo $script --pidof");
 
 
if ($status_key=="false")
/web/autoregistrationinfo.php
1,4 → 1,12
<?php
# CHECK IF the SMS service is enable
$service_SMS_status=false;
 
if(!$service_SMS_status){
header('Location: ./');
}
?>
<?php
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
 
$ouvre=fopen(CONF_FILE,"r");
50,6 → 58,7
$l_tab_pmenu = "Affiche la page _PAGE_ sur _PAGES_";
$l_tab_info = "Montrer _MENU_ résultats par page";
$l_tab_infoempty = "Aucun résultat";
$l_autorefresh = "Rafraichissement : 10 sec";
} elseif($Language == 'en'){
$l_title = "Autoregistration";
75,6 → 84,8
$l_tab_info = "Show _MENU_ entries";
$l_tab_infoempty = "No matching records found";
$l_autorefresh = "Rafraichissement : 10 sec";
} else {
 
$l_title = "Autoregistration";
99,6 → 110,8
$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
$l_tab_info = "Show _MENU_ entries";
$l_tab_infoempty = "No matching records found";
$l_autorefresh = "Refresh : 10 sec";
}
?>
<!DOCTYPE HTML>
115,11 → 128,21
<!-- DataTables -->
<script type="text/javascript" charset="utf8" src="../js/jquery.dataTables.js"></script>
<script type="text/javascript">
function timedRefresh(timeoutPeriod) {
var interval = setInterval(refreshPage, timeoutPeriod);
}
 
function refreshPage() {
if ($("input[name=autoRefreshCheckboxes]").is(":checked")) {
location.reload(true);
}
}
 
$(document).ready( function () {
$('#table_id').DataTable({
"language": {
"paginate": {
"sFirst": "<?php echo $l_tab_dirst; ?>",
"sFirst": "<?php echo $l_tab_first; ?>",
"sLast": "<?php echo $l_tab_last; ?>",
"sPrevious": "<?php echo $l_tab_prev; ?>",
"sNext": "<?php echo $l_tab_next; ?>"
134,7 → 157,7
} );
</script>
</head>
<body>
<body onload="JavaScript:timedRefresh(10000);">
 
<center>
 
158,8 → 181,8
<td align="center">
<h3>
<?php
$current_num = exec("sudo /usr/local/bin/alcasar-sms.sh --numero_alcasar");
echo "$current_num";
$current_num='XXXXXXXXXX';
echo "$current_num";
?>
</h3>
</td>
199,7 → 222,7
FROM `SMS_ban_perm`
ORDER BY date_add DESC;");
?>
 
<input type='checkbox' checked='checked' name='autoRefreshCheckboxes' ><?php echo $l_autorefresh; ?></input>
<table id="table_id" class="display">
<thead>
<tr>
/web/css/style_intercept.css
457,3 → 457,31
display: block;
float: left;
}
 
#corner {
position: fixed;
bottom: 0;
right: 0;
}
 
#adm {
display: block;
width: 100px;
height: 100px;
}
.corn IMG:hover {
position: absolute;
width: 100px;
height: 100px;
top: 0px;
left: 0px;
}
 
.corn IMG {
position: absolute;
width: 50px;
height: 50px;
top: 75px;
left: 75px;
}
/web/images/adm.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/web/images/sms.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/web/index.php
49,7 → 49,7
$cert_add = "http://$hostname/certs";
$direct_access = False;
$diagnostic = "can't contact the default router";
$remote_ip = ($_SERVER['REMOTE_ADDR']);
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
$tab = array();$user = array();
$connection_history = "";
$nb_connection_history = 3;
110,13 → 110,14
$l_access_welcome = "Bienvenue sur ALCASAR";
$l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
$l_required_domain = "Site WEB demand&eacute;";
$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez poss&eacute;der un compte d'administration ou de gestion pour y acc&eacute;der.";
//$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez poss&eacute;der un compte d'administration ou de gestion pour y acc&eacute;der.";
$l_explain_access_deny = "Vous tentez d'acc&eacute;der &agrave; une ressource dont le contenu est r&eacute;put&eacute; contenir des informations inappropri&eacute;es.";
$l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
$l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
$l_welcome = "Page principale de votre portail captif";
$l_acc_access = "<a href=\"https://$hostname/acc\">Acc&egrave;s au centre de gestion</a>";
//$l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Controle Center</a>";
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Enregistrement par SMS</a>";
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installer le certificat racine</a>";
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installation du certificat de l'autorit&eacute; racine d'ALCASAR</a>";
$l_certif_explain = "Permet l'&eacute;change de donn&eacute;es s&eacute;curis&eacute;es entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistr&eacute; sur votre station de consultation, il est possible que des alertes de s&eacute;curit&eacute;s soient &eacute;mises par votre navigateur.<br><br>";
124,7 → 125,7
$l_category = "catégorie :";
if ((isset ($user[4])) && ($user[4] == "0")) {
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me.";
$l_logout = "<a href=\"http://www.wikipedia.org\">Ouvrir une session Internet</a>";}
$l_logout = "<a href=\"http://www.qwant.com\">Ouvrir une session Internet</a>";}
else {
if ($user[5] != $user[0]) // authentication exception or not
{
139,7 → 140,11
}
$l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</a>";
$l_password_change_explain = "Vous redirige sur la page de changement du mot de passe de votre compte d'acc&egrave;s &agrave; internet.<br><br>Vous devez avoir un compte internet valide.";
$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";
$l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
$l_service_sms = "Service SMS actif";
$l_service_sms_n = "Service SMS non actif";
$l_acc_sms = "Auto enregistrement par SMS";
}
else if($Language == 'pt'){
$l_access_denied = "Acesso negado";
152,7 → 157,8
$l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
$l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
$l_welcome = "Página do portal";
$l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Controle Center</a>";
//$l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Controle Center</a>";
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Instalar Certificado Alcasar AC</a>";
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Instalar Certificado Alcasar AC</a>";
$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>";
160,7 → 166,7
$l_category = "categoria :";
if ((isset ($user[4])) && ($user[4] == "0")) {
$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
$l_logout = "<a href=\"http://www.wikipedia.org\">Abrir uma conexão de Internet</a>";}
$l_logout = "<a href=\"http://www.qwant.com\">Abrir uma conexão de Internet</a>";}
else {
if ($user[5] != $user[0]) // authentication exception or not
{
175,7 → 181,11
}
$l_password_change = "<a href=\"https://$hostname/pass\">Mudar sua senha</a>";
$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.";
$l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
$l_service_sms = "SMS service enable";
$l_service_sms_n = "SMS service disable";
$l_acc_sms = "Auto registration by SMS";
}
else {
$l_access_denied = "ACCESS DENIED";
188,7 → 198,8
$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
$l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
$l_welcome = "Your captive portal main page";
$l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Control Center</a>";
//$l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Control Center</a>";
$l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
$l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Install ALCASAR AC Certificate</a>";
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Install ALCASAR AC Certificate</a>";
$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>";
196,7 → 207,7
$l_category = "category :";
if ((isset ($user[4])) && ($user[4] == "0")) {
$l_logout_explain = "No Internet consultation session is actualy open on your system";
$l_logout = "<a href=\"http://www.wikipedia.org\">Open an Internet session</a>";}
$l_logout = "<a href=\"http://www.qwant.com\">Open an Internet session</a>";}
else {
if ($user[5] != $user[0]) // authentication exception or not
{
211,7 → 222,11
}
$l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
$l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
$l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
$l_service_sms = "SMS service enable";
$l_service_sms_n = "SMS service disable";
$l_acc_sms = "Auto registration by SMS";
}
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
225,7 → 240,9
$img_pwd = "cle_ombre.png";
$img_certificate = "certificat.png";
$img_acc = "logo-alcasar_70.png";
$img_sms = "sms.png";
$img_false = "interdit.png";
$img_adm = "adm.png";
$img_internet = $img_connect;
 
if ((isset ($user[4])) && ($user[4] == "0")) {
279,21 → 296,47
<div id="contenu_acces">
<div id="box_url">
<?php
//search in the blacklist categories
if ((! $direct_access) && (! $network_pb)){
$pattern = preg_replace('/www./','',$_SERVER['HTTP_HOST']);
$pattern = filter_var($pattern, FILTER_VALIDATE_URL) == false ? "" : $pattern;
exec("grep -Re ^$pattern$ /etc/dansguardian/lists/blacklists/*/domains|cut -d'/' -f6", $output);
unset ($line);
foreach ($output as $row) {
$line=$line.(trim($row)).", ";
}
echo "$l_required_domain : $_SERVER[HTTP_HOST]";
if ($line != "") { echo "<BR>".rtrim ("$l_category $line", ", ");}
}
//search here in the blacklist categories (if ((! $direct_access) && (! $network_pb)){}
?>
</div>
<?php
# CHECK IF the SMS service is enable
$service_SMS_status=false;
 
$sms_div='
<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
<span>'.$l_sms_access.'</span>
<img src="'.$img_rep.''.$img_sms.'">
</div>
';
 
$sms_div_over='
<div class="div-cache" id="text_acc">
<h2>'.$l_sms_access.'</h2>
<p>'.$l_sms_explain.'</p>
<p><font color="green"><center>'.$l_service_sms.'</center></font></p>
<img src="'.$img_rep.''.$img_sms.'">
</div>
';
 
if(!$service_SMS_status){
$sms_div='
<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
<span>'.$l_sms_access.'</span>
<img src="'.$img_rep.''.$img_sms.'">
</div>
';
 
$sms_div_over='
<div class="div-cache" id="text_acc">
<h2>'.$l_sms_access.'</h2>
<p>'.$l_sms_explain.'</p>
<p><font color="red"><center>'.$l_service_sms_n.'</center></font></p>
<img src="'.$img_rep.''.$img_sms.'">
</div>
';
}
?>
<?php
if ($direct_access){
echo " <div id=\"box_bienvenue\">
311,10 → 354,7
<img src=\"$img_rep$img_pwd\">
<span>$l_password_change</span>
</div>
<div class=\"box_menu\" id=\"box_acc\" onmouseover=\"valoriserDiv5(text_acc);\">
<span>$l_acc_access</span>
<img src=\"$img_rep$img_acc\">
</div>
$sms_div
<div class=\"div-cache\" id=\"text_conn\">
<h2>$l_logout</h2>
<p>$l_logout_explain</p>
330,11 → 370,7
<p>$l_password_change_explain</p>
<img src=\"$img_rep$img_pwd\">
</div>
<div class=\"div-cache\" id=\"text_acc\">
<h2>$l_acc_access</h2>
<p>$l_explain</p>
<img src=\"$img_rep$img_acc\">
</div>
$sms_div_over
<div id=\"box_info\">
</div>";
}
353,5 → 389,10
}
?>
</div>
<div id="corner">
<div id="adm" class="corn">
<a href="https://<?php echo $hostname; ?>/acc"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
</div>
</div>
</body>
</html>
/web/intercept.php
238,8 → 238,7
$l_reply_6 = "Votre durée de connexion autorisée a été atteinte";
$l_online_time = "Temps de connexion";
$l_remaining_time = "Temps restant";
$l_uam_domain = "Sites autorisés : ";
$l_autoregistration = "Auto enregistrement";}
$l_uam_domain = "Sites autorisés : ";}
else{
$l_ChilliError = "The authentication must be successful through the captive portal service.";
$l_login = "Successful authentication.<HR>Closing this window interrupts your session";
272,7 → 271,7
$l_online_time = "Online time";
$l_remaining_time = "Remaining time";
$l_uam_domain = "Authorized websites : ";
$l_autoregistration = "Auto registration";}
}
 
# If https not use, tell it's wrong
if (!(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS'] == 'on'))) {
460,14 → 459,6
echo "</td><td height=\"23\" align=\"left\"><INPUT value=\"$l_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></td>
";
 
 
$gammu_smsd=exec("pidof gammu-smsd");
if ($gammu_smsd != "")
{
echo "<td height=\"23\" align=\"left\"><a target=\"_blank\" href=\"autoregistrationinfo.php\">$l_autoregistration</a></td></tr>";
}
 
echo "</table>
</form>
<table id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"80%\">