Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2005 → Rev 2006

/web/acc/manager/htdocs/user_edit.php
2,6 → 2,17
//gestion de la langue
if (is_file("../lib/langues.php"))
include("../lib/langues.php");
 
//update Filter-Id for protocol filtering
if (isset($_POST['Filter-Proto']) && isset($_POST['Filter-Id0']))
{
$upId = (int)$_POST['Filter-Proto'];
$downId = (int)$_POST['Filter-Id0'];
$upId = $upId+$downId;
$upId = str_pad($upId, 8, '0', STR_PAD_LEFT);
$_POST['Filter-Id0'] = $upId;
}
 
require('/etc/freeradius-web/config.php');
require('../lib/attrshow.php');
require('../lib/defaults.php');
268,21 → 279,105
$grp_redir="<td bgcolor=\"#BEBEBE\">$val</td>";
break;
case 'Filter-Id' :
switch($val)
$grp_proto_select = array();
$grp_proto_select[0] = '';
$grp_proto_select[1] = '';
$grp_proto_select[2] = '';
$grp_proto_select[3] = '';
//WL
if($val[5] == '1')
{
case "00000001":
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp</td>";
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_wl</td>";
if($val[0] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
break;
case "00000011":
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_bl</td>";
}
if($val[1] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
break;
case "00000101":
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_wl</td>";
}
if($val[2] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
break;
default :
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_none</td>";
}
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
break;
break;
}
//BL
if($val[6] == '1')
{
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_bl</td>";
if($val[0] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
break;
}
if($val[1] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
break;
}
if($val[2] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
break;
}
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
break;
}
//HAVP
if($val[7] == '1')
{
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp</td>";
if($val[0] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
break;
}
if($val[1] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
break;
}
if($val[2] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
break;
}
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
break;
}
else
{
$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_none</td>";
if($val[0] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
break;
}
if($val[1] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
break;
}
if($val[2] == '1')
{
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
break;
}
$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
break;
}
break;
}
}
545,21 → 640,102
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_redir<td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
break;
case 'Filter-Id' :
switch($val)
$proto_select = array();
$proto_select[0] = '';
$proto_select[1] = '';
$proto_select[2] = '';
$proto_select[3] = '';
//WL
if($val[6] == '1')
{
case "00000001":
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$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>";
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$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>";
if($val[0] == '1')
{
$proto_select[1] = "selected";
break;
case "00000011":
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$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>";
}
if($val[1] == '1')
{
$proto_select[2] = "selected";
break;
case "00000101":
}
if($val[2] == '1')
{
$proto_select[3] = "selected";
break;
}
$proto_select[0] = "selected";
break;
}
//BL
if($val[5] == '1')
{
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$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>";
if($val[0] == '1')
{
$proto_select[1] = "selected";
break;
default :
}
if($val[1] == '1')
{
$proto_select[2] = "selected";
break;
}
if($val[2] == '1')
{
$proto_select[3] = "selected";
break;
}
$proto_select[0] = "selected";
break;
}
//HAVP
if($val[7] == '1')
{
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$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>";
if($val[0] == '1')
{
$proto_select[1] = "selected";
break;
}
if($val[1] == '1')
{
$proto_select[2] = "selected";
break;
}
if($val[2] == '1')
{
$proto_select[3] = "selected";
break;
}
$proto_select[0] = "selected";
break;
}
else //none
{
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\" 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>";
if($val[0] == '1')
{
$proto_select[1] = "selected";
break;
}
if($val[1] == '1')
{
$proto_select[2] = "selected";
break;
}
if($val[2] == '1')
{
$proto_select[3] = "selected";
break;
}
$proto_select[0] = "selected";
break;
}
break;
default :
print <<<EOM
590,6 → 766,31
EOM;
}
}
/*protocole filter*/
print <<<EOM
<tr>
<td class="etiquette" colspan=2>
<a href="help/protocols_help.html" target=help onclick=window.open("help/protocols_help.html","help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="$l_click_for_help"><font color="blue">$l_proto</font></a>
</td>
EOM;
if(isset($member_groups) && $user_type != 'group')
{
echo $grp_proto;
}
echo "<td width=20>";
echo"<select name='Filter-Proto'>
<option value=\"00000000\" $proto_select[0]>$l_proto_0</option>
<option value=\"10000000\" $proto_select[1]>$l_proto_1</option>
<option value=\"01000000\" $proto_select[2]>$l_proto_2</option>
<option value=\"00100000\" $proto_select[3]>$l_proto_3</option>
</select></td>
</tr>";
if ($user_type != 'group'){
echo <<<EOM
<tr>