Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 906 → Rev 907

/web/acc/manager/htdocs/user_edit.php
138,17 → 138,13
echo <<<EOM
<tr>
<td align=right colspan=$colspan bgcolor="#d0ddb0">
Nouveau mot de passe<br>
$l_new_password<br>
EOM;
if ($user_password_exists == 'yes')
echo "<font size=-2>Le mot de passe <font color=\"green\"><b>existe</b></font></font>\n";
else
echo "<font size=-2>Le mot de passe <font color=\"red\"><b> n'existe pas</b></font></font>\n";
echo <<<EOM
</td>
<td>
<input type=password name=passwd value="" size=40>
<br /><input type="button" value="g&eacute;n&eacute;rer" onclick="password(8)">
<br /><input type="button" value="$l_passwd_gen" onclick="password(8)">
<input type="text" value="" name="pwdgene" size=20 readonly>
</td>
</tr>
/web/acc/manager/htdocs/user_admin.php
1,4 → 1,8
<?php
//gestion de la langue
$origine='user_new';
if (is_file("../lib/langues.php"))
include("../lib/langues.php");
require('/etc/freeradius-web/config.php');
?>
<html>
12,7 → 16,7
include("../lib/$config[general_lib_type]/user_info.php");
if ($user_exists == 'no'){
echo <<<EOM
<title>Page d'information d'utilisateur</title>
<title>User information page</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
34,7 → 38,7
include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
else{
echo <<<EOM
<title>Page d'information d'utilisateur</title>
<title>User information page</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="style.css">
</head>
55,6 → 59,8
$daily_limit = ($daily_limit) ? $daily_limit : $config[counter_default_daily];
$session_limit = ($item_vals['Session-Timeout'][0] != '') ? $item_vals['Session-Timeout'][0] : $default_vals['Session-Timeout'][0];
$session_limit = ($session_limit) ? $session_limit : 'none';
$total_limit = ($item_vals['Max-All-Session'][0] != '') ? $item_vals['Max-All-Session'][0] : $default_vals['Max-All-Session'][0];
$total_limit = ($total_limit) ? $total_limit : 'none';
$remaining = 'unlimited time';
$log_color = 'green';
 
290,15 → 296,16
$weekly_limit = (is_numeric($weekly_limit)) ? time2str($weekly_limit) : $weekly_limit;
$daily_limit = (is_numeric($daily_limit)) ? time2str($daily_limit) : $daily_limit;
$session_limit = (is_numeric($session_limit)) ? time2str($session_limit) : $session_limit;
$total_limit = (is_numeric($total_limit)) ? time2str($total_limit) : $total_limit;
$remaining = (is_numeric($remaining)) ? time2str($remaining) : $remaining;
 
if ($item_vals['Dialup-Access'][0] == 'FALSE' || (!isset($item_vals['Dialup-Access'][0]) && $attrmap['Dialup-Access'] != '' && $attrmap['Dialup-Access'] != 'none'))
$msg =<<<EON
<font color=red><b> Le compte de l'utilisateur est verrouill&eacute; </b></font>
<font color=red><b> $l_locked_user </b></font>
EON;
else
$msg =<<<EON
L'utilisateur peut s'identifier pendant <font color="$log_color"> <b>$remaining $extra_msg</font>
$l_user_remain_login<font color="$log_color"> <b>$remaining $extra_msg</b></font>
EON;
$lock_msg = $item_vals['Dialup-Lock-Msg'][0];
if ($lock_msg != '')
315,7 → 322,7
$expiration = strtotime($expiration);
if ($expiration != -1 && $expiration < time())
$descr = <<<EOM
<font color=red><b>Le compte de l'utilisateur a expir&eacute</b></font>
<font color=red><b>$l_user_expired</b></font>
EOM;
}
 
/web/acc/manager/htdocs/password.php
0,0 → 1,22
<form name="master" action="user_admin.php#pass" method="post">
<input type=hidden name=login value=<?php echo $login ?>>
<input type=hidden name=action value=checkpass>
<br>
<table border=0 width=640 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Check Password</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr><td align=center bgcolor="#d0ddb0">Password</td><td><input type="password" name="passwd" value="">&nbsp;<input type="submit" class=button value="check"></td></tr>
</table>
</table>
</table>
/web/acc/manager/htdocs/group_new.php
86,7 → 86,7
if ($create == 1){
if ($group_exists != "no"){
echo <<<EOM
<b>Le groupe <i>$login</i> existe d&eacute;j&agrave;.</b>
<b><i>$login</i> $l_already_exist</b>
EOM;
}
else{
105,11 → 105,11
echo <<<EOM
<tr>
<td class="etiquette" colspan=$colspan>
Groupe(s) d&eacute;j&agrave; cr&eacute;&eacute;(s)
$l_created_groups
</td><td>
EOM;
if (!isset($existing_groups))
echo "<b>Aucun groupe d&eacute;j&agrave; cr&eacute;&eacute;</b>\n";
echo "<b>$l_group_empty</b>\n";
else{
echo "<select name=\"existing_groups\">\n";
foreach ($existing_groups as $group => $count)
121,7 → 121,7
</tr>
<tr>
<td class="etiquette" colspan=$colspan>
Nom du groupe
$l_group_name
</td><td>
<input type=text name="login" value="$login" size=35>
</td>
128,7 → 128,7
</tr>
<tr>
<td class="etiquette" colspan=$colspan>
Membres du groupe : s&eacute;par&eacute;s par un espace ou un 'retour chariot'.
$l_group_members
</td><td>
<textarea name=members cols="15" wrap="PHYSICAL" rows=5></textarea>
</td>
141,74 → 141,109
continue;
$oper_name = $name . '_op';
$val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
/*
Gestion d'un mode simple ou d'un mode avancé
Définition du mode avancé les attributs concernant la gestion des octets, de la bande passante
*/
switch ($key)
{
// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
case 'Simultaneous-Use' :
$advanced=1;
$help_link="help/simultaneous_use_help.html";
$desc=$l_simultaneous_use;
break;
case 'Max-All-Session' :
$advanced=1;
$help_link="help/max_all_session_help.html";
$desc=$l_max_all_session;
break;
case 'Session-Timeout' :
$advanced=1;
$help_link="help/session_timeout_help.html";
$desc=$l_session_timeout;
break;
case 'Max-Daily-Session' :
$advanced=1;
$help_link="help/session_timeout_help.html";
$desc=$l_daily_timeout;
break;
case 'Max-Monthly-Session' :
$advanced=1;
$help_link="help/session_timeout_help.html";
$desc=$l_monthly_timeout;
break;
case 'Login-Time' :
$advanced=1;
$help_link="help/login_time_help.html";
$desc=$l_login_time;
break;
case 'Expiration' :
$advanced=1;
$help_link="help/expiration_help.html";
$desc=$l_expiration;
break;
case 'ChilliSpot-Max-Input-Octets' :
$advanced=1;
$help_link="help/chillispot_max_input_octets_help.html";
$desc=$l_max_input_octets;
break;
case 'ChilliSpot-Max-Output-Octets' :
$advanced=1;
$help_link="help/chillispot_max_output_octets_help.html";
$desc=$l_max_output_octets;
break;
case 'ChilliSpot-Max-Total-Octets' :
$advanced=1;
$help_link="help/chillispot_max_total_octets_help.html";
$desc=$l_max_total_octets;
break;
case 'ChilliSpot-Bandwidth-Max-Up' :
$advanced=1;
$help_link="help/chillispot_bandwidth_max_up_help.html";
$desc=$l_max_bandwidth_up;
break;
case 'ChilliSpot-Bandwidth-Max-Down' :
$advanced=1;
$help_link="help/chillispot_bandwidth_max_down_help.html";
$desc=$l_max_bandwidth_down;
break;
case 'WISPr-Redirection-URL' :
$advanced=1; //<-- Valeur à mettre à '0' pour limiter les fonctionnalités
$advanced=1;
$help_link="help/wispr_redirection_url_help.html";
$desc=$l_wispr_redirection;
break;
default:
$advanced=1;
break;
}
if ($advanced){
print <<<EOM
// if ($advanced){
// print <<<EOM
// <tr>
// <td class="etiquette">
// $desc
// </td>
//EOM;
// }
if ($show_ops && $advanced){
print <<<EOM
<tr>
<td class="etiquette">
$desc
</td>
<td class="etiquette">
<a href="$help_link" target=help onclick=window.open("$help_link","help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="$l_click_for_help"><font color="blue">$desc</font></a>
</td>
EOM;
}
if ($show_ops && $advanced){
switch ($key)
{
switch ($key){
case 'Simultaneous-Use' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Login-Time' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Expiration' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-All-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Session-Timeout' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'Max-Daily-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Weekly-Session' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Max-Monthly-Session' :
case 'Login-Time' :
case 'Expiration' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
break;
case 'Session-Timeout' :
case 'ChilliSpot-Max-Input-Octets' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'ChilliSpot-Max-Output-Octets' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'ChilliSpot-Max-Total-Octets' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'ChilliSpot-Bandwidth-Max-Up' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'ChilliSpot-Bandwidth-Max-Down' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
case 'WISPr-Redirection-URL' :
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
break;
215,21 → 250,21
default :
print <<<EOM
<td>
<select name=$oper_name>
<option $selected[$op_eq] value="=">=
<option $selected[$op_set] value=":=">:=
<option $selected[$op_add] value="+=">+=
<option $selected[$op_eq2] value="==">==
<option $selected[$op_ne] value="!=">!=
<option $selected[$op_gt] value=">">&gt;
<option $selected[$op_ge] value=">=">&gt;=
<option $selected[$op_lt] value="<">&lt;
<option $selected[$op_le] value="<=">&lt;=
<option $selected[$op_regeq] value="=~">=~
<option $selected[$op_regne] value="!~">!~
<option $selected[$op_exst] value="=*">=*
<option $selected[$op_nexst] value="!*">!*
</select>
<select name=$oper_name>
<option $selected[$op_eq] value="=">=
<option $selected[$op_set] value=":=">:=
<option $selected[$op_add] value="+=">+=
<option $selected[$op_eq2] value="==">==
<option $selected[$op_ne] value="!=">!=
<option $selected[$op_gt] value=">">&gt;
<option $selected[$op_ge] value=">=">&gt;=
<option $selected[$op_lt] value="<">&lt;
<option $selected[$op_le] value="<=">&lt;=
<option $selected[$op_regeq] value="=~">=~
<option $selected[$op_regne] value="!~">!~
<option $selected[$op_exst] value="=*">=*
<option $selected[$op_nexst] value="!*">!*
</select>
</td>
EOM;
break;
250,6 → 285,7
case 'Session-Timeout' :
case 'Max-Daily-Session' :
case 'Max-Monthly-Session' :
case 'Max-All-Session' :
/*valeur d'origine de durée limite */
echo"<input id =\"$name\" type=text name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=28>";
/* Choix d'unité*/
275,9 → 311,9
}
echo "</table><BR>";
if ($create == 1)
echo "<input type=submit class=button value=\"Afficher le groupe\" OnClick=\"this.form.show.value=1\">";
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";
else
echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"return formControl('newgroup');\">";
echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newgroup');\">";
?>
<br><br>
</form>