Subversion Repositories ALCASAR

Rev

Rev 2006 | Rev 2184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2006 Rev 2134
Line 1... Line 1...
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE html "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<HTML><!-- written by Rexy -->
2
<HTML><!-- written by Rexy -->
3
<HEAD>
3
<HEAD>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
<TITLE>Network Filter</TITLE>
5
<TITLE>Network Filter</TITLE>
6
<link rel="stylesheet" href="/css/style.css" type="text/css">
6
<link rel="stylesheet" href="/css/style.css" type="text/css">
7
</HEAD>
7
</HEAD>
8
<body>
8
<body>
9
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
-
 
10
<?
9
<?
11
# Choice of language
10
# Choice of language
12
$Language = 'en';
11
$Language = 'en';
13
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
12
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
14
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
13
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
15
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
14
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
16
if($Language == 'fr'){
15
if($Language == 'fr'){
17
  $l_remove="Retirer de la liste";
16
  $l_remove="Retirer de la liste";
18
  $l_title_proto = "Filtrage de protocoles r&eacute;seau";
17
  $l_title_proto = "Filtrage prersonnalisée de protocoles réseau";
19
  $l_protocolsfilter="Vous pouvez personnaliser le profile de filtrage protocole 'personnalisable' ici. Vous pouvez ensuite l'attribuer à des utilisateurs via l'éditeur ou la création d'utilisateur.";
18
  $l_comment="Définissez ici la liste personalisée de protocoles réseau filtrés. Vous pouvez ensuite l'attribuer à des utilisateurs lors de leur création ou modification.";
20
  $l_comment_on="&Agrave; l'exclusion du WEB (port 80), les protocoles r&eacute;seaux sont interdits.<BR>Choisissez ci-dessous les protocoles que vous autorisez";
-
 
21
  $l_comment_off="(tous les protocoles réseau sont autoris&eacute;s)";
-
 
22
  $l_protocols="Protocoles autoris&eacute;s";
19
  $l_protocols="Protocoles autorisés";
23
  $l_error_open_file="Erreur d'ouverture du fichier";
20
  $l_error_open_file="Erreur d'ouverture du fichier";
24
  $l_port="Numéro de port";
21
  $l_port="Numéro de port";
25
  $l_proto="Nom du protocole";
22
  $l_proto="Nom du protocole";
26
  $l_enabled="Autoris&eacute;";
23
  $l_enabled="Autorisé";
27
  $l_add_to_list="Ajouter &agrave; la liste";
24
  $l_add_to_list="Ajouter à la liste";
28
  $l_save="Enregistrer les modifications";
25
  $l_save="Enregistrer les modifications";
29
}
26
}
30
else {
27
else {
31
  $l_remove="Remove from list";
28
  $l_remove="Remove from list";
32
  $l_title_proto = "Network protocols filter";
29
  $l_title_proto = "Custom network protocols filter";
33
  $l_protocolsfilter="You can change your \"custom\" protocol filtering here. You can set it to a user from ACC (create user / edit user)";
30
  $l_comment="You can custom the network protocol filtering here. You can assign it to a user (create/edit a user)";
34
  $l_comment_on="(choose the authorized network protocols)";
-
 
35
  $l_comment_on="Except for the WEB (port 80), all protocols are blocked.<BR>Choose in the list below, the protocols you want authorize";
-
 
36
  $l_comment_off="(all the network protocols are allowed for authenticated users)";
-
 
37
  $l_protocols="Authorize protocols";
31
  $l_protocols="Authorize protocols";
38
  $l_error_open_file="Error opening the file";
32
  $l_error_open_file="Error opening the file";
39
  $l_port="Port number";
33
  $l_port="Port number";
40
  $l_proto="protocol name";
34
  $l_proto="protocol name";
41
  $l_enabled="Authorized";
35
  $l_enabled="Authorized";
Line 144... Line 138...
144
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
138
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
145
<tr><th><?echo "$l_title_proto";?></th></tr>
139
<tr><th><?echo "$l_title_proto";?></th></tr>
146
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
140
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
147
</table>
141
</table>
148
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
142
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
-
 
143
<tr><td colspan="2" valign="middle" align="left">
-
 
144
<? echo "<CENTER>$l_comment</CENTER>";?>
149
<tr>
145
<tr><td valign="middle" align="center">
150
 
-
 
-
 
146
<form action='protocols_filter.php' method='POST'>
-
 
147
<table cellspacing=2 cellpadding=3 border=1>
151
<?
148
<?
-
 
149
echo "<tr><th>$l_port<th>$l_proto<th>$l_enabled<th>$l_remove</tr>";
-
 
150
// Read and compute the protocols list
-
 
151
$tab=file(SERVICES_LIST);
-
 
152
if ($tab) # the file isn't empty
152
 
153
	{
-
 
154
	foreach ($tab as $line)
-
 
155
		{
-
 
156
		if (trim($line) != '') # the line isn't empty
-
 
157
			{
-
 
158
			$proto=explode(" ", $line);
-
 
159
			$name_svc=trim($proto[0],"#");
-
 
160
			echo "<tr><td>$proto[1]<td>$name_svc";
153
echo "<td colspan=\"2\" valign=\"middle\" align=\"left\">";
161
			echo "<td><input type='checkbox' name='chk-$name_svc'";
154
echo "<CENTER><H3>$l_protocolsfilter_on</H3>$l_comment_on</CENTER>";
162
			// if the line is commented -> protocol is not allowed
-
 
163
			if (preg_match('/^#/',$line, $r)) {
-
 
164
				echo ">";}
-
 
165
			else {
-
 
166
				echo "checked>";}
-
 
167
			echo "<td>";
155
require ('protocols_filter2.php');
168
			if ($name_svc != "icmp") {
-
 
169
				echo "<input type='checkbox' name='del-$name_svc'>";}
-
 
170
			else {
-
 
171
				echo "&nbsp;";}		
-
 
172
			echo "</tr>";
-
 
173
			}
-
 
174
		}
156
 
175
	}
157
?>
176
?>
-
 
177
</table>
-
 
178
<input type='hidden' name='choix' value='change_port'>
-
 
179
<input type='submit' value='<?echo"$l_save";?>'>
-
 
180
</form></td><td valign='middle' align='center'>
-
 
181
<form action='protocols_filter.php' method='POST'>
-
 
182
<table cellspacing=2 cellpadding=3 border=1>
-
 
183
<tr><th><?echo"$l_port<th>$l_proto"?></tr>
-
 
184
<tr><td><input type='text' name='add_port' size='5'></td>
-
 
185
<td><input type='text' name='add_proto' size='10'></td>
-
 
186
<td><input type='hidden' name='choix' value='new_port'>
-
 
187
<input type='submit' value='<?echo"$l_add_to_list";?>'></td>
-
 
188
</tr></table>
-
 
189
</form>
-
 
190
</td></tr>
-
 
191
</TABLE>
-
 
192
</BODY>
-
 
193
</HTML>
158
 
194