Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 736 → Rev 737

/web/status.php
3,7 → 3,7
# status.php for Alcasar captive portal
# by steweb57
#
$organisme = "";
$organisme = "etrs-ssic";
$remote_ip = ($_SERVER['REMOTE_ADDR']);
$connection_history = "";
$nb_connection_history = 3;
54,7 → 54,9
$l_error = "error"; //à traduire
$l_welcome = "Welcome"; //à traduire
$l_conn_history = "Your last $nb_connection_history connections"; //à traduire
$l_connected = "logged"; //à traduire
$l_connected = "logged"; //à traduire
$l_a_connection = "Active connection detected on LAN"; //à traduire
$l_a_connection_time = "time(s)"; //à traduire
}
else if($Language == 'de'){
$l_login1 = "Erfolgreiche Authentifizierung";
79,6 → 81,8
$l_welcome = "Welcome"; //à traduire
$l_conn_history = "Your last $nb_connection_history connections"; //à traduire
$l_connected = "logged"; //à traduire
$l_a_connection = "Active connection detected on LAN"; //à traduire
$l_a_connection_time = "time(s)"; //à traduire
}
else if($Language == 'nl'){
$l_login1 = "Succesvolle authenticatie";
103,6 → 107,8
$l_welcome = "Welcome"; //à traduire
$l_conn_history = "Your last $nb_connection_history connections"; //à traduire
$l_connected = "logged"; //à traduire
$l_a_connection = "Active connection detected on LAN"; //à traduire
$l_a_connection_time = "time(s)"; //à traduire
}
else if($Language == 'fr'){
$l_login1 = "Authentification réussie";
126,7 → 132,9
$l_error = "erreur";
$l_welcome = "Bienvenue";
$l_conn_history = "Vos $nb_connection_history dernières connexions";
$l_connected = "connecté";
$l_connected = "session active";
$l_a_connection = "Vous êtes déjà connecté sur le réseau";
$l_a_connection_time = "fois";
}
else {
$l_login1 = "Successful authentication.";
151,6 → 159,8
$l_welcome = "Welcome";
$l_conn_history = "Your last $nb_connection_history connections";
$l_connected = "logged";
$l_a_connection = "Active connection detected on LAN";
$l_a_connection_time = "time(s)";
}
 
// si on a pas d'accès à la bdd, la page s'affiche quand même correctement
170,12 → 180,34
while(($row = @da_sql_fetch_array($res,$config))){
$connected = "";
$start_conn = date_create($row[acctstarttime]);
if ($row[acctstoptime] == "") $connected = " ($l_connected)";
$connection_history.="<li>".date_format($start_conn, 'd M Y - H:i:s')." - (".secondsToDuration($row[acctsessiontime]).") $connected</li>";
$connection_history.="<li>".date_format($start_conn, 'd M Y - H:i:s')." - (";
if ($row[acctstoptime] == "") {
$connected = $l_connected;
}else{
$connected = secondsToDuration($row[acctsessiontime]);
}
$connection_history.= "$connected)</li>";
// $connection_history.="<li>".date_format($start_conn, 'd M Y - H:i:s')." - (".secondsToDuration($row[acctsessiontime]).") $connected</li>";
}
$connection_history.="</ul>";
}
}
$sql_2 = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' AND AcctStopTime IS NULL ORDER BY AcctStartTime DESC";
$link_2 = @da_sql_pconnect($config); // on affiche pas les erreurs
if ($link_2){
$res_2 = @da_sql_query($link_2,$config,$sql_2); // on affiche pas les erreurs
$a_connection = "";
if ($res_2){
while(($row_2 = @da_sql_fetch_array($res_2,$config))){
$a_connected = 1;
if ($row_2[acctstoptime] == "") $a_connected = $a_connected + 1;
}
if ($a_connected > 1){
$a_connection = $l_a_connection." ".$a_connected." ".$l_a_connection_time;
}
}
}
}
}
?>
206,17 → 238,40
<div id="statusPage" class="c1">
<table border="0" id="statusTable">
<tr>
<td rowspan="2" valign="top"><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td>
<p class="text_auth_welcom"><?php echo $l_login1; ?></p>
<p class="text_auth"><?php echo $l_welcome; ?><br><span id="userName"></span></p>
<hr>
<?php echo $l_login2; ?>
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" rowspan="4">
<img height="150" src="./images/logo-alcasar.png" alt="logo">
</td>
<td class="text_auth_welcom">
<?php echo $l_login1; ?>
</td>
</tr>
<tr>
<td class="text_auth">
<?php echo $l_welcome; ?>
<br><span id="userName"></span>
</td>
</tr>
<tr>
<td class="alert">
<?php echo $a_connection; ?>
</td>
</tr>
<tr>
<td class="text_warn">
<?php echo $l_login2; ?>
</td>
</tr>
<tr>
<td colspan="2" align="center" class="link_logout">
<a href="#" onclick="return logoutWithConfirmation('<?php echo $l_logout_question;?>');" class="lien_deco"><?php echo $l_logout; ?></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center"><br><a href="#" onclick="return logoutWithConfirmation('<?php echo $l_logout_question;?>');" class="lien_deco"><?php echo $l_logout; ?></a><br><br></td>
</tr>
<!--tr id="connectRow">
<td id="statusMessageLabel" class="chilliLabel"><strong><?php echo $l_state_label; ?></strong></td>
<td id="statusMessage" class="chilliValue">Connected</td>