/web/acc/manager/htdocs/group_new.php |
---|
3,12 → 3,7 |
//Gestion de la langue |
if (is_file("../lib/langues.php")) |
include("../lib/langues.php"); |
require('/etc/freeradius-web/config.php'); |
if ($show == 1){ |
header("Location: group_admin.php?login=$login"); |
exit; |
} |
if ($config[general_lib_type] != 'sql'){ |
echo <<<EOM |
64,7 → 59,7 |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2> |
<tr><td valign="middle" align="left"> |
<center> |
<table border=0 width=550 cellpadding=1 cellspacing=1> |
<table border=0 width=750 cellpadding=1 cellspacing=1> |
<tr valign=top> |
<td width=340></td> |
<td bgcolor="black" width=200> |
94,6 → 89,7 |
include("../lib/$config[general_lib_type]/group_info.php"); |
} |
} |
if ($create == 0){ |
?> |
<form name="newgroup" method=post> |
<input type=hidden name=create value="0"> |
128,7 → 124,7 |
<td class="etiquette" colspan=$colspan> |
$l_group_members |
</td><td> |
<textarea name=members cols="15" wrap="PHYSICAL" rows=5></textarea> |
<textarea name=members cols="50" wrap="PHYSICAL" rows=5></textarea> |
</td> |
</tr> |
207,6 → 203,11 |
$help_link="help/wispr_redirection_url_help.html"; |
$desc=$l_wispr_redirection; |
break; |
case 'Filter-Id' : |
$advanced=1; |
$help_link="help/filtering_help.html"; |
$desc=$l_filtering; |
break; |
default: |
$advanced=1; |
break; |
236,6 → 237,9 |
case 'Expiration' : |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:="; |
break; |
case 'Filter-Id' : |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:="; |
break; |
case 'Session-Timeout' : |
case 'ChilliSpot-Max-Input-Octets' : |
case 'ChilliSpot-Max-Output-Octets' : |
268,6 → 272,7 |
break; |
} |
} |
/* |
Ajout du choix d'unité (pour les durées limites de session, journée et de mois) |
et d'un calendrier pour la date d'expiration |
297,20 → 302,26 |
/*Ajout du calendrier pour choisir la date*/ |
echo"<input id=\"popup_container\" type=text name=\"$name\" value=\"$val\" size=35>"; |
break; |
case 'Filter-Id' : |
echo "<select name='Filter-Id'>"; |
echo "<option>$l_filtering_none</option>"; |
echo "<option value=\"00000001\">$l_filtering_havp</option>"; |
echo "<option value=\"00000011\">$l_filtering_havp_bl</option>"; |
echo "<option value=\"00000101\">$l_filtering_havp_wl</option>"; |
echo "</select>"; |
break; |
default : |
if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=35>"; |
break; |
} |
}else{ |
/*Pas de gestion de remplissage lors de la visualisation*/ |
if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=35>"; |
} |
/*fin Ajout*/ |
} |
echo "</table><BR>"; |
} |
if ($create == 1) |
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">"; |
else |
echo "<br/><center><a href=\"group_admin.php?login=$login\">$l_show_profile</a></center>"; |
else |
echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newgroup');\">"; |
?> |
<br><br> |
/web/acc/manager/htdocs/help/filtering_help.html |
---|
0,0 → 1,33 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<HTML><!-- written by Rexy --> |
<HEAD> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<title>Help Page</title> |
<link rel="stylesheet" href="/css/style.css" type="text/css"> |
</HEAD> |
<body> |
<center> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th>Filtrage - Filtering</th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
</TABLE> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="left"> |
Cet attribut définit le niveau de filtrage d'un usager :<br/> |
- Aucun : aucun filtrage<br/> |
- Antivirus : antivirus activé<br/> |
- Antivirus + Blacklist : antivirus activé + filtrage par la blacklist<br/> |
- Antivirus + Whitelist : antivirus activé + filtrage par la whitelist |
<HR> |
This attribute defines the filtering level for a user :<br/> |
- None : no filtering<br/> |
- Antivirus : antivirus activated<br/> |
- Antivirus + Blacklist : antivirus activated + blacklist filtering<br/> |
- Antivirus + Whitelist : antivirus activated + whitelist filtering |
</td></tr> |
</table> |
<br> |
<a href="javascript:window.close();"><b>Close / Fermer</b></a> |
</center> |
</body> |
</html> |
/web/acc/manager/htdocs/user_edit.php |
---|
105,10 → 105,20 |
include("../lib/sql/group_change.php"); |
include("../lib/defaults.php"); |
} |
# Disconnecting user for re-authentication |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $login \" | awk '{print $1}'"); |
exec("sudo /usr/sbin/chilli_query logout $mac"); |
} |
else{ |
if (is_file("../lib/$config[general_lib_type]/group_info.php")) |
include("../lib/$config[general_lib_type]/group_info.php"); |
# Disconnecting all users from the selected group for re-authentication |
if (isset($group_members)){ |
foreach ($group_members as $g_member => $member){ |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $member \" | awk '{print $1}'"); |
exec("sudo /usr/sbin/chilli_query logout $mac"); |
} |
} |
} |
} |
else if ($badusers == 1){ |
257,6 → 267,11 |
$help_link="help/wispr_redirection_url_help.html"; |
$desc=$l_wispr_redirection; |
break; |
case 'Filter-Id' : |
$advanced=1; |
$help_link="help/filtering_help.html"; |
$desc=$l_filtering; |
break; |
default: |
$advanced=1; |
break; |
311,6 → 326,23 |
case 'WISPr-Redirection-URL' : |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>"; |
break; |
case 'Filter-Id' : |
switch($val) |
{ |
case "00000001": |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option>$l_filtering_none</option><option value=\"00000001\" selected=\"selected\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>"; |
break; |
case "00000011": |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option>$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\" selected=\"selected\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>"; |
break; |
case "00000101": |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option>$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\" selected=\"selected\">$l_filtering_havp_wl</option></select></td>"; |
break; |
default : |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option selected=\"selected\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>"; |
break; |
} |
break; |
default : |
print <<<EOM |
<td> |
/web/acc/manager/htdocs/user_new.php |
---|
5,10 → 5,6 |
include("../lib/langues.php"); |
require('/etc/freeradius-web/config.php'); |
if ($show == 1){ |
header("Location: user_admin.php?login=$login"); |
exit; |
} |
if($show == 2) |
{ |
header("Location: user_new2.php"); |
37,26 → 33,6 |
window.onload = function () { |
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container')); |
}; |
/*Fin calendrier*/ |
function createTickets(arg){ |
var nbtickets = prompt("Saisissez le nombre d'utilisateurs à créer", ""); |
// On test la pression sur le boutton "annuler" |
if (nbtickets===null){ |
alert('nbtickets===null'); |
return false; |
} |
// On test la valeur saisie n'est pas un nombre |
if (isNaN(nbtickets)===true){ |
return false; |
} |
// Conversion en entier de nbtickets |
nbtickets = parseInt(nbtickets) |
// Configuration et envoie du formulaire |
arg.nbtickets.value = nbtickets |
arg.action = "ticket_voucher.php"; |
arg.submit(); |
return true; |
} |
</script> |
</head> |
<body> |
105,7 → 81,7 |
include("../lib/$config[general_lib_type]/user_info.php"); |
if ($user_exists != "no"){ |
echo <<<EOM |
<b><i>$login</i> $l_user_exist</b> |
<b><i>$login</i> $l_user_exists</b> |
EOM; |
} |
else{ |
164,6 → 140,7 |
<input type=hidden name=langue_imp value='fr'> |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top> |
<?php |
if($create==0){ |
echo <<<EOM |
<tr> |
<td class="etiquette" colspan=$colspan> |
260,6 → 237,11 |
$help_link="help/expiration_help.html"; |
$desc=$l_expiration; |
break; |
case 'Filter-Id' : |
$advanced=1; |
$help_link="help/filtering_help.html"; |
$desc=$l_filtering; |
break; |
default: |
$advanced=1; |
break; |
281,6 → 263,9 |
case 'Expiration' : |
echo "<input type=\"hidden\" name=$oper_name value=\":=\">"; |
break; |
case 'Filter-Id' : |
echo "<input type=\"hidden\" name=$oper_name value=\":=\">"; |
break; |
case 'Session-Timeout' : |
case 'ChilliSpot-Max-Input-Octets' : |
case 'ChilliSpot-Max-Output-Octets' : |
360,18 → 345,20 |
/*Ajout du calendrier pour choisir la date*/ |
echo"<input id=\"popup_container\" type=text name=\"$name\" value=\"$val\" size=20>"; |
break; |
case 'Filter-Id' : |
echo "<select name='Filter-Id'>"; |
echo "<option>$l_filtering_none</option>"; |
echo "<option value=\"00000001\">$l_filtering_havp</option>"; |
echo "<option value=\"00000011\">$l_filtering_havp_bl</option>"; |
echo "<option value=\"00000101\">$l_filtering_havp_wl</option>"; |
echo "</select>"; |
break; |
default : |
if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=20>"; |
break; |
} |
}else{ |
/*Pas de gestion de remplissage lors de la visualisation*/ |
if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=20>"; |
/*fin Ajout*/ |
} |
} |
if ($create==0){ |
print <<<EOM |
<tr> |
<td class="etiquette" colspan=$colspan> |
389,12 → 376,12 |
<option value=\"it\" >Italiano</option> |
<option value=\"pt\" >Portugês</option> |
</select></td></tr>"; |
} |
echo "</table><BR>"; |
} |
echo "</table>"; |
if($create == 1) |
{ |
echo "<a href=\"ticket.pdf\">Ticket</a><br>"; |
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">"; |
echo "<a href=\"ticket.pdf\">Ticket</a><br/><br/>"; |
echo "<center><a href=\"user_admin.php?login=$login\">$l_show_profile</a></center>"; |
} |
else |
{ |
402,7 → 389,7 |
echo "<input type='hidden' name='nbtickets' value=''>"; |
echo "<input type=submit class=button value=\"$l_advanced_menu\" style=\"float: right;\" OnClick=\"this.form.show.value=2\">"; |
echo "<br>$l_or :<br>"; |
echo "<input type=button class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form);\">"; |
echo "<input type=button class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form, '$l_createTicketsMSG');\">"; |
echo $l_create_multiple_comment; |
} |
?> |
/web/acc/manager/htdocs/user_new2.php |
---|
4,10 → 4,6 |
if (is_file("../lib/langues.php")) |
include("../lib/langues.php"); |
require('/etc/freeradius-web/config.php'); |
if ($show == 1){ |
header("Location: user_admin.php?login=$login"); |
exit; |
} |
if($show == 2) |
{ |
header("Location: user_new.php"); |
147,6 → 143,7 |
<input type=hidden name=langue_imp value='fr'> |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top> |
<?php |
if($create==0){ |
echo <<<EOM |
<tr> |
<td class="etiquette" colspan=$colspan> |
278,6 → 275,11 |
$help_link="help/wispr_redirection_url_help.html"; |
$desc=$l_wispr_redirection; |
break; |
case 'Filter-Id' : |
$advanced=1; |
$help_link="help/filtering_help.html"; |
$desc=$l_filtering; |
break; |
default: |
$advanced=1; |
break; |
299,6 → 301,9 |
case 'Expiration' : |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:="; |
break; |
case 'Filter-Id' : |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:="; |
break; |
case 'Session-Timeout' : |
case 'ChilliSpot-Max-Input-Octets' : |
case 'ChilliSpot-Max-Output-Octets' : |
370,18 → 375,20 |
/*Ajout du calendrier pour choisir la date*/ |
echo"<input id=\"popup_container\" type=text name=\"$name\" value=\"$val\" size=20>"; |
break; |
case 'Filter-Id' : |
echo "<select name='Filter-Id'>"; |
echo "<option>$l_filtering_none</option>"; |
echo "<option value=\"00000001\">$l_filtering_havp</option>"; |
echo "<option value=\"00000011\">$l_filtering_havp_bl</option>"; |
echo "<option value=\"00000101\">$l_filtering_havp_wl</option>"; |
echo "</select>"; |
break; |
default : |
if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=20>"; |
break; |
} |
}else{ |
/*Pas de gestion de remplissage lors de la visualisation*/ |
if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=20>"; |
/*fin Ajout*/ |
} |
} |
if (create==0){ |
print <<<EOM |
<tr> |
<td class="etiquette" colspan=$colspan> |
404,7 → 411,7 |
if($create == 1) |
{ |
echo "<a href=\"ticket.pdf\">Ticket</a><br>"; |
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">"; |
echo "<center><a href=\"user_admin.php?login=$login\">$l_show_profile</a></center>"; |
} |
else |
{ |
/web/acc/manager/lib/langues.php |
---|
109,6 → 109,12 |
$l_spoofing = "Adresse(s) MAC usurpée(s) (Watchdog)"; |
$l_virus = "Virus bloqué(s) (HAVP)"; |
$l_fail2ban = "Adresse(s) IP bloquée(s) (Fail2Ban)"; |
$l_filtering = "Filtrage"; |
$l_filtering_none = "Aucun"; |
$l_filtering_havp = "Antivirus"; |
$l_filtering_havp_bl = "Antivirus + Blacklist"; |
$l_filtering_havp_wl = "Antivirus + Whitelist"; |
$l_user_exists = "existe déjà !"; |
break; |
default : |
//English |
211,6 → 217,12 |
$l_spoofing = "MAC address spoofed (Watchdog)"; |
$l_virus = "Virus blocked (HAVP)"; |
$l_fail2ban = "IP address blocked (Fail2Ban)"; |
$l_filtering = "Filtering"; |
$l_filtering_none = "None"; |
$l_filtering_havp = "Antivirus"; |
$l_filtering_havp_bl = "Antivirus + Blacklist"; |
$l_filtering_havp_wl = "Antivirus + Whitelist"; |
$l_user_exists = "already exists !"; |
break; |
} |
?> |
/web/acc/manager/lib/sql/create_group.php |
---|
48,6 → 48,8 |
foreach($show_attrs as $key => $attr){ |
if ($attrmap["$key"] == 'none') |
continue; |
if ($key == "Filter-Id" && $$attrmap["$key"] == "None") |
continue; |
if ($attrmap["$key"] == ''){ |
$attrmap["$key"] = $key; |
$attr_type["$key"] = 'replyItem'; |
/web/acc/manager/lib/sql/create_user.php |
---|
79,6 → 79,8 |
foreach($show_attrs as $key => $attr){ |
if ($attrmap["$key"] == 'none') |
continue; |
if ($key == "Filter-Id" && $$attrmap["$key"] == "None") |
continue; |
if ($attrmap["$key"] == ''){ |
$attrmap["$key"] = $key; |
$attr_type["$key"] = 'replyItem'; |