Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2611 → Rev 2612

/web/index.php
45,7 → 45,7
 
$organisme = $conf["ORGANISM"];
$hostname = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
$ssl_enable = $conf["HTTPS_LOGIN"];
$ssl_enable = ($conf['HTTPS_LOGIN'] === 'on');
$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
63,7 → 63,7
 
// Retrieve the user info behind the remote ip
$output = [];
exec('sudo /usr/sbin/chilli_query list | grep -Ew '.escapeshellarg($remote_ip), $output);
exec('sudo /usr/sbin/chilli_query list ip '.escapeshellarg($remote_ip), $output);
if (!empty($output)) {
$userRaw = explode(' ', $output[0]);
$user = (object) [
73,7 → 73,6
];
} else {
// CoovaChilli does not know the user
// TODO: useless?
$user = (object) [
'mac' => '',
'connected' => false,
525,19 → 524,16
</div>
 
<?php if ($direct_access): ?>
<?php if (!$network_pb): ?>
<div class="box_menu" id="box_conn" onmouseover="setBoxInfoContent('text_conn');">
<span><?= $l_logout ?></span>
<img src="<?= $img_rep.$img_internet ?>">
</div>
<?php endif; ?>
<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? 'onmouseover="setBoxInfoContent(\'text_conn\');"' : 'title=\'Not available\'' ?>>
<span><?= $l_logout ?></span>
<img src="<?= $img_rep.$img_internet ?>">
</div>
 
<?php if ($ssl_enable == "on"): ?>
<div class="box_menu" id="box_certif" onmouseover="setBoxInfoContent('text_certif');">
<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
<img src="<?= $img_rep.$img_certificate ?>">
</div>
<?php endif; ?>
<div class="box_menu<?= ($ssl_enable) ? '' : ' box-menu-disabled' ?>" id="box_certif" <?= ($ssl_enable) ? 'onmouseover="setBoxInfoContent(\'text_certif\');"' : 'title=\'Not available\'' ?>>
<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
<img src="<?= $img_rep.$img_certificate ?>">
</div>
 
<div class="box_menu" id="box_mdp" onmouseover="setBoxInfoContent('text_mdp');">
<img src="<?= $img_rep.$img_pwd ?>">
<span><?= $l_password_change ?></span>