Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2821 → Rev 2822

/web/autoregistrationinfo.php
1,5 → 1,8
<?php
# $Id$
#
# SMS Autoregistration
# By Rexy
 
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
 
22,7 → 25,6
header('Location: /');
exit();
}
 
$organisme = $conf['ORGANISM'];
$current_num = $conf['SMS_NUM'];
 
87,6 → 89,8
 
// Get SMS from database
require('/etc/freeradius-web/config.php');
$img_rep = '/images/';
$img_sms = 'sms.png';
 
$con = mysqli_connect($config['sql_server'], $config['sql_username'], $config['sql_password'], 'gammu');
 
111,14 → 115,13
<html><!-- written by Rexy -->
<head>
<meta charset="utf-8">
<title>Auto enregistrement</title>
<link rel="stylesheet" type="text/css" href="/css/error.css">
<!-- DataTables CSS -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ALCASAR - <?= $l_title ?></title>
<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/css/index.css">
<link rel="stylesheet" type="text/css" href="/css/jquery.dataTables.css">
<!-- jQuery -->
<script charset="utf8" src="/js/jquery.min.js"></script>
<!-- DataTables -->
<script charset="utf8" src="/js/jquery.dataTables.js"></script>
<script src="/js/jquery.min.js"></script>
<script src="/js/jquery.dataTables.js"></script>
<script>
function timedRefresh(timeoutPeriod) {
var interval = setInterval(refreshPage, timeoutPeriod);
150,67 → 153,71
</script>
</head>
<body onload="timedRefresh(10000);">
<center>
<div id="logon">
<h1><?= $organisme ?></h1>
<h2><?= $l_title ?></h2>
 
<div>
<table id="boite-info">
<tr>
<td rowspan="6" width="30%"><img id="logo-organ" src="/images/organisme.png"></td>
</tr>
<tr>
<td><?= $l_tuto_1 ?></td>
</tr>
<tr>
<td><?= $l_tuto_2 ?></td>
</tr>
<tr>
<td align="center"><h3><?= $current_num ?></h3></td>
</tr>
<tr>
<td><?= $l_tuto_3 ?></td>
</tr>
<tr>
<td><?= $l_tuto_4 ?></td>
</tr>
<!--
<tr>
<td colspan="2"><?= $l_tuto_5 ?></td>
</tr>
-->
</table>
<div class="col-xs-12 col-md-10 col-md-offset-1">
<!-- HeaderBox -->
<div class="row banner">
<!-- Logo box -->
<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
<img class="img-responsive img-organisme" src="images/organisme.png">
</div>
<!-- Title -->
<div id="cadre_titre" class="titre_banner col-xs-12 col-sm-8">
<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
</div>
<!-- Logo box -->
<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
<img class="img-responsive img-organisme" src="images/logo-alcasar_70.png">
</div>
</div>
 
<div>
<label><input type="checkbox" checked="checked" name="autoRefreshCheckboxes"><?= $l_autorefresh ?></label>
<table id="table_id" class="display">
<thead>
<tr>
<th><b><?= $l_num_num ?></b></th>
<th><b><?= $l_num_raison ?></b></th>
<th><b><?= $l_num_expiration ?></b></th>
</tr>
</thead>
<tbody>
<?php foreach ($smsBanPerms as $smsBanPerm): ?>
<!-- Main content box -->
<div class="row">
<div id="contenu_acces" class="col-xs-12 col-lg-offset-1 col-lg-10">
<h3><?= $l_tuto_2 ?></h3>
<div class="menu-container container col_xs_12 col-sm-7">
<div class="box_menu_right box_menu">
<span><?= $current_num ?></span>
<div class="menu-image">
<img class="img-responsive" src="<?= $img_rep.$img_sms ?>">
</div>
</div>
</div>
<div class="info-box-container col-sm-5">
<div id="box_infos">
<p class="box_infos_explanations"><?= $l_tuto_3 ?>
</div>
</div>
</div>
</div>
<p>
<div class="row">
<div id="contenu_acces" class="col-xs-12 col-lg-offset-1 col-lg-10">
<h4><?= $l_tuto_4 ?></h4>
<h4><?= $l_tuto_5 ?></h4>
<label><input type="checkbox" checked="checked" name="autoRefreshCheckboxes"><?= $l_autorefresh ?></label>
<table id="table_id" class="display">
<thead>
<tr>
<td><?= $smsBanPerm->numberHidden ?></td>
 
<?php if ($smsBanPerm->perm == '0'): ?>
<th><b><?= $l_num_num ?></b></th>
<th><b><?= $l_num_raison ?></b></th>
<th><b><?= $l_num_expiration ?></b></th>
</tr>
</thead>
<tbody>
<?php foreach ($smsBanPerms as $smsBanPerm): ?>
<tr>
<td><?= $smsBanPerm->numberHidden ?></td>
<?php if ($smsBanPerm->perm == '0'): ?>
<td><?= $l_num_exist ?></td>
<?php elseif ($smsBanPerm->perm == '1'): ?>
<?php elseif ($smsBanPerm->perm == '1'): ?>
<td><?= $l_num_flood ?></td>
<?php endif ?>
 
<td><?= $smsBanPerm->expiration ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif ?>
<td><?= $smsBanPerm->expiration ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</center>
</body>
</html>
/web/index.php
46,6 → 46,7
$organisme = $conf["ORGANISM"];
$hostname = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
$ssl_enable = ($conf['HTTPS_LOGIN'] === 'on');
$protocol = ($ssl_enable) ? 'https//' : 'http://';
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
$network_pb = false; // "alcasar-watchdog.sh" changes this value if a network issue is detected
$diagnostic = "can't contact the default router"; // "alcasar-watchdog.sh" changes this value if a network issue is detected
166,7 → 167,7
$l_logout = "<a href=\"\">Information des connexions</a>";
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">Changer votre mot de passe</a>";
$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Changer votre mot de passe</a>";
$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
$l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire.";
if (isset($_GET['url'])) {
205,7 → 206,7
$l_logout = "<a href=\"\">Informações de conexões</a>";
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">Mudar sua senha</a>";
$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Mudar sua senha</a>";
$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
$l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial.";
if (isset($_GET['url'])) {
244,7 → 245,7
$l_logout = "<a href=\"\">连接信息</a>";
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">更改您的密码</a>";
$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">更改您的密码</a>";
$l_back_page = "<a href=\"javascript:history.back()\">上一页</a>";
$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。";
if (isset($_GET['url'])) {
293,7 → 294,7
}
}
$change_pass_text = "غير كلمتك السرية";
$l_password_change = "<a href=\"https://$hostname/password.php\">$change_pass_text</a>";
$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">$change_pass_text</a>";
$redirect_sms_text = "يوجهك على الصفحة التفسيرية للتسجيل الذاتي بطريقة";
$login_text = "تسجيل الدخول";
$your_phone_text = "رقم الهاتف الخاص بك";
339,7 → 340,7
$l_logout = "<a href=\"\">Informationen zur Verbindung</a>";
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">Passwort ändern</a>";
$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Passwort ändern</a>";
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
$l_explain_warn = "Der Administrator wird ein Archiv erstellen, welches Ihre Logdaten für den Fall einer gerichtlichen Untersuchung beinhaltet.";
if (isset($_GET['url'])) {
379,7 → 380,7
$l_logout = "<a href=\"\">Connections information</a>";
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">Change your password</a>";
$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Change your password</a>";
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
$l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation.";
if (isset($_GET['url'])) {
547,7 → 548,7
</div>
</div>
<div class="box_menu_right box_menu<?= ($ssl_enable) ? '' : ' box-menu-disabled' ?>" id="box_certif" <?= ($ssl_enable) ? '' : 'title=\'Not available\'' ?>>
<div class="box_menu_right box_menu" id="box_certif">
<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
<div class="menu-image">
<img class="img-responsive" src="<?= $img_rep.$img_certificate ?>">
/web/password.php
38,10 → 38,11
}
fclose($file_conf);
 
if ($conf['HTTPS_LOGIN'] === 'on') {
// Redirect to HTTPS
if ((!isset($_SERVER['HTTPS'])) || (empty($_SERVER['HTTPS'])) || ($_SERVER['HTTPS'] === 'off')) {
header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
exit();
exit(); }
}
 
require('/etc/freeradius-web/config.php');
205,15 → 206,12
</head>
<body>
<div class="col-xs-12 col-md-10 col-md-offset-1">
 
<!-- HeaderBox -->
<div class="row banner">
<!-- Logo box -->
<!-- <div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2"> -->
<div class="hidden-xs col-sm-3 col-md-2 col-lg-2">
<img class="img-responsive img-organisme" src="images/organisme.png">
</div>
 
<!-- Title -->
<div id="cadre_titre" class="titre_banner col-xs-12 col-sm-8">
<div class="row">