Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1966 → Rev 2006

/web/acc/manager/htdocs/group_new.php
1,5 → 1,15
<?php
 
//update Filter-Id for protocol filtering
if (isset($_POST['Filter-Proto']) && isset($_POST['Filter-Id']))
{
$upId = (int)$_POST['Filter-Proto'];
$downId = (int)$_POST['Filter-Id'];
$upId = $upId+$downId;
$upId = str_pad($upId, 8, '0', STR_PAD_LEFT);
$_POST['Filter-Id'] = $upId;
}
 
if (!isset ($create)) $create=0;
if (!isset ($login)) $login='';
if (!isset ($selected)) $selected=array();
350,6 → 360,24
}
/*fin Ajout*/
}
 
/*protocole filter*/
print <<<EOM
<tr>
<td class="etiquette" colspan=$colspan>
$l_proto
</td>
<td width=20>
EOM;
/*Choix de la langue du ticket d'impression*/
echo" <select name='Filter-Proto'>
<option value=\"00000000\" selected>$l_proto_0</option>
<option value=\"10000000\" >$l_proto_1</option>
<option value=\"01000000\" >$l_proto_2</option>
<option value=\"00100000\" >$l_proto_3</option>
</select></td></tr>";
 
echo "</table><BR>";
}
if ($create == 1)
/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>
/web/acc/manager/htdocs/user_new.php
1,5 → 1,15
<?php
 
//update Filter-Id for protocol filtering
if (isset($_POST['Filter-Proto']) && isset($_POST['Filter-Id']))
{
$upId = (int)$_POST['Filter-Proto'];
$downId = (int)$_POST['Filter-Id'];
$upId = $upId+$downId;
$upId = str_pad($upId, 8, '0', STR_PAD_LEFT);
$_POST['Filter-Id'] = $upId;
}
 
if (!isset ($create)) $create=0;
if (!isset ($show)) $show=0;
// ticket d'impression (thank's to Geoffroy MUSITELLI)
380,9 → 390,27
}
}
}
/*protocole filter*/
print <<<EOM
<tr>
<td class="etiquette" colspan=$colspan>
<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>
<td width=20>
EOM;
/*Choix de la langue du ticket d'impression*/
echo" <select name='Filter-Proto'>
<option value=\"00000000\" selected>$l_proto_0</option>
<option value=\"10000000\" >$l_proto_1</option>
<option value=\"01000000\" >$l_proto_2</option>
<option value=\"00100000\" >$l_proto_3</option>
</select></td></tr>";
print <<<EOM
<tr>
<td class="etiquette" colspan=$colspan>
$l_lang_ticket
</td>
<td width=20>
/web/acc/manager/htdocs/user_new2.php
15,6 → 15,16
if(!isset($selected)) $selected = array();
if(!isset($selected['='])) $selected['='] = '';
 
//update Filter-Id for protocol filtering
if (isset($_POST['Filter-Proto']) && isset($_POST['Filter-Id']))
{
$upId = (int)$_POST['Filter-Proto'];
$downId = (int)$_POST['Filter-Id'];
$upId = $upId+$downId;
$upId = str_pad($upId, 8, '0', STR_PAD_LEFT);
$_POST['Filter-Id'] = $upId;
}
 
require('/etc/freeradius-web/config.php');
if($show == 2)
{
408,9 → 418,26
}
}
}
/*protocole filter*/
print <<<EOM
<tr>
<td class="etiquette" colspan=$colspan>
$l_proto
</td>
<td width=20>
EOM;
/*Choix de la langue du ticket d'impression*/
echo" <select name='Filter-Proto'>
<option value=\"00000000\" selected>$l_proto_0</option>
<option value=\"10000000\" >$l_proto_1</option>
<option value=\"01000000\" >$l_proto_2</option>
<option value=\"00100000\" >$l_proto_3</option>
</select></td></tr>";
print <<<EOM
<tr>
<td class="etiquette" colspan=$colspan>
$l_lang_ticket
</td>
<td width=20>
/web/acc/manager/lib/langues.php
117,6 → 117,11
$l_user_exists = "existe déjà !";
$l_group_desc = "<h2>Attributs Groupe</h2>";
$l_user_desc = "<h2>Attributs Utilisateur</h2>";
$l_proto="Profile de protocole de filtrage";
$l_proto_0="Aucun";
$l_proto_1="Navigation Web";
$l_proto_2="Navigation Web, Messagerie et Serveur distant";
$l_proto_3="Personnalisable";
break;
default :
//English
227,6 → 232,11
$l_user_exists = "already exists !";
$l_group_desc = "<h2>Group Attributes</h2>";
$l_user_desc = "<h2>User Attributes</h2>";
$l_proto="Protocol filtering";
$l_proto_0="None";
$l_proto_1="Web browsing";
$l_proto_2="Web browsing, Mail et server administration";
$l_proto_3="Custom";
break;
}
?>