Subversion Repositories ALCASAR

Rev

Rev 1578 | Rev 1966 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1578 Rev 1886
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<HTML><!-- written by Rexy - 3abtux -->
2
<HTML><!-- written by Rexy - 3abtux -->
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>Exceptions</TITLE>
5
<TITLE>Exceptions</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
<?
9
<?
10
/********************
10
/********************
11
*  TEST CONF FILES  *
11
*  TEST CONF FILES  *
12
*********************/
12
*********************/
13
define ("DOMAIN_ALLOWED_LIST", "/usr/local/etc/alcasar-uamdomain");
13
define ("DOMAIN_ALLOWED_LIST", "/usr/local/etc/alcasar-uamdomain");
14
define ("IP_ALLOWED_LIST", "/usr/local/etc/alcasar-uamallowed");
14
define ("IP_ALLOWED_LIST", "/usr/local/etc/alcasar-uamallowed");
15
$conf_files=array(DOMAIN_ALLOWED_LIST,IP_ALLOWED_LIST);
15
$conf_files=array(DOMAIN_ALLOWED_LIST,IP_ALLOWED_LIST);
16
foreach ($conf_files as $file){
16
foreach ($conf_files as $file){
17
if (!file_exists($file)){
17
if (!file_exists($file)){
18
	exit("Requested file ".$file." isn't present");}
18
	exit("Requested file ".$file." isn't present");}
19
if (!is_readable($file)){
19
if (!is_readable($file)){
20
	exit("Can't read the file ".$file);}
20
	exit("Can't read the file ".$file);}
21
}
21
}
22
$domain_allowed_list="/usr/local/etc/alcasar-uamdomain";
22
$domain_allowed_list="/usr/local/etc/alcasar-uamdomain";
23
$url_allowed_list="/usr/local/etc/alcasar-uamallowed";
23
$url_allowed_list="/usr/local/etc/alcasar-uamallowed";
24
# Choice of language
24
# Choice of language
25
$Language = 'en';
25
$Language = 'en';
26
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
26
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
27
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
27
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
28
	$Language = strtolower(substr(chop($Langue[0]),0,2)); }
28
	$Language = strtolower(substr(chop($Langue[0]),0,2)); }
29
if($Language == 'fr'){
29
if($Language == 'fr'){
-
 
30
	$l_load="Chargement...";
30
	$l_error_open_file	= "Erreur d'ouverture du fichier";
31
	$l_error_open_file	= "Erreur d'ouverture du fichier";
31
	$l_trusted_domain	= "Noms de domaine Internet de confiance";
32
	$l_trusted_domain	= "Noms de domaine Internet de confiance";
32
	$l_domain		= "Noms de domaine";
33
	$l_domain		= "Noms de domaine";
33
	$l_comment_explain	= "Lien affiché dans la page d'interception";
34
	$l_comment_explain	= "Lien affiché dans la page d'interception";
34
	$l_comment_explain2	= "Laissez vide si non affiché";
35
	$l_comment_explain2	= "Laissez vide si non affiché";
35
	$l_remove		= "Retirer de la liste";
36
	$l_remove		= "Retirer de la liste";
36
	$l_trusted_ip		= "adresses IP de confiance";
37
	$l_trusted_ip		= "adresses IP de confiance";
37
	$l_trusted_equipments	= "Equipements de consultation de confiance";
38
	$l_trusted_equipments	= "Equipements de consultation de confiance";
38
	$l_comment		= "Commentaires";
39
	$l_comment		= "Commentaires";
39
	$l_trusted_domain_explain = "Gérez ici les noms de domaine Internet pouvant &ecirc;tre joints sans authentification";
40
	$l_trusted_domain_explain = "Gérez ici les noms de domaine Internet pouvant &ecirc;tre joints sans authentification";
40
	$l_trusted_equipments_explain	= "Pour qu'un équipement du réseau de consultation puisse accéder à Internet sans être interceptés : créer un utilisateur dont le nom de login est l'@MAC de l'équipement et le mot de passe est 'password'" ;
41
	$l_trusted_equipments_explain	= "Pour qu'un équipement du réseau de consultation puisse accéder à Internet sans être interceptés : créer un utilisateur dont le nom de login est l'@MAC de l'équipement et le mot de passe est 'password'" ;
41
	$l_trusted_ip_explain	= "Gérez ici les adresses IP de systèmes ou de réseaux pouvant être joints sans authentification";
42
	$l_trusted_ip_explain	= "Gérez ici les adresses IP de systèmes ou de réseaux pouvant être joints sans authentification";
42
	$l_submit		= "Enregistrer";
43
	$l_submit		= "Enregistrer";
43
	$l_add_to_list		= "Ajouter à la liste";
44
	$l_add_to_list		= "Ajouter à la liste";
44
	$l_apply		= "Appliquer les changements";
45
	$l_apply		= "Appliquer les changements";
45
}
46
}
46
else {
47
else {
-
 
48
 	$l_load="Loading...";
47
	$l_error_open_file	= "File open error";
49
	$l_error_open_file	= "File open error";
48
	$l_trusted_domain	= "Trusted Internet domain names";
50
	$l_trusted_domain	= "Trusted Internet domain names";
49
	$l_domain		= "Domain names";
51
	$l_domain		= "Domain names";
50
	$l_comment_explain	= "Link displayed in intercept page";
52
	$l_comment_explain	= "Link displayed in intercept page";
51
	$l_comment_explain2	= "Let empty to not display link";
53
	$l_comment_explain2	= "Let empty to not display link";
52
	$l_remove		= "Remove from list";
54
	$l_remove		= "Remove from list";
53
	$l_trusted_ip		= "Trusted IP addresses";
55
	$l_trusted_ip		= "Trusted IP addresses";
54
	$l_trusted_equipments	= "Trusted consultation equipements";
56
	$l_trusted_equipments	= "Trusted consultation equipements";
55
	$l_comment		= "Comments";
57
	$l_comment		= "Comments";
56
	$l_trusted_domain_explain = "Manage Internet domain names that can be joined without authentication";
58
	$l_trusted_domain_explain = "Manage Internet domain names that can be joined without authentication";
57
	$l_trusted_equipments_explain	= "To allow a consultation equipment to connect to Internet without interception, create a user whose name is the MAC address of the device and the password is 'password'";
59
	$l_trusted_equipments_explain	= "To allow a consultation equipment to connect to Internet without interception, create a user whose name is the MAC address of the device and the password is 'password'";
58
	$l_trusted_ip_explain	= "Manage systems addresses or networks IP addresses that can be joined without authentication";
60
	$l_trusted_ip_explain	= "Manage systems addresses or networks IP addresses that can be joined without authentication";
59
	$l_submit		= "Submit";
61
	$l_submit		= "Submit";
60
	$l_add_to_list		= "Add to list";
62
	$l_add_to_list		= "Add to list";
61
	$l_apply		= "Apply changes";
63
	$l_apply		= "Apply changes";
62
}
64
}
63
if (isset($_POST['choix'])){ 
65
if (isset($_POST['choix'])){ 
64
	switch ($_POST['choix'])
66
	switch ($_POST['choix'])
65
	{
67
	{
66
	case 'new_uamdomain' :
68
	case 'new_uamdomain' :
67
	if (trim($_POST['add_uamdomain']) != "") 
69
	if (trim($_POST['add_uamdomain']) != "") 
68
		{
70
		{
69
		$tab=file(DOMAIN_ALLOWED_LIST);
71
		$tab=file(DOMAIN_ALLOWED_LIST);
70
		$insert = true;
72
		$insert = true;
71
		if ($tab) // file isn't empty
73
		if ($tab) // file isn't empty
72
			{
74
			{
73
			foreach ($tab as $line) // test if domain address doesn't already exist
75
			foreach ($tab as $line) // test if domain address doesn't already exist
74
				{
76
				{
75
				$domain=explode("\"", $line);
77
				$domain=explode("\"", $line);
76
				if (strcmp(trim($_POST['add_uamdomain']),$domain[1]) == 0)
78
				if (strcmp(trim($_POST['add_uamdomain']),$domain[1]) == 0)
77
			       		{
79
			       		{
78
					$insert = false;
80
					$insert = false;
79
					break;
81
					break;
80
					}
82
					}
81
				}
83
				}
82
			}
84
			}
83
		if ($insert == true) 
85
		if ($insert == true) 
84
			{
86
			{
85
			$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
87
			$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
86
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
88
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
87
			fwrite ($pointeur, $line);
89
			fwrite ($pointeur, $line);
88
			fclose ($pointeur);
90
			fclose ($pointeur);
89
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
91
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
90
			exec ("sudo /usr/bin/systemctl restart chilli");
92
			exec ("sudo /usr/bin/systemctl restart chilli");
91
			}
93
			}
92
		}
94
		}
93
	break;
95
	break;
94
	case 'change_uamdomain' :
96
	case 'change_uamdomain' :
95
	$tab=file(DOMAIN_ALLOWED_LIST);
97
	$tab=file(DOMAIN_ALLOWED_LIST);
96
	if ($tab)
98
	if ($tab)
97
		{
99
		{
98
		$pointeur=fopen(DOMAIN_ALLOWED_LIST,"w+");
100
		$pointeur=fopen(DOMAIN_ALLOWED_LIST,"w+");
99
		foreach ($tab as $ligne)
101
		foreach ($tab as $ligne)
100
			{
102
			{
101
			$uamdomain1=explode("\"", $ligne);
103
			$uamdomain1=explode("\"", $ligne);
102
			$remove_line = false;
104
			$remove_line = false;
103
			foreach ($_POST as $key => $value)
105
			foreach ($_POST as $key => $value)
104
				{
106
				{
105
				$key = str_replace ("_",".",$key); // dot are replace by '_' in post request
107
				$key = str_replace ("_",".",$key); // dot are replace by '_' in post request
106
				if (strstr($key,'del-'))
108
				if (strstr($key,'del-'))
107
					{
109
					{
108
					$uamdomain2 = str_replace('del-','',$key);
110
					$uamdomain2 = str_replace('del-','',$key);
109
					if (strcmp($uamdomain1[1],$uamdomain2) == 0)
111
					if (strcmp($uamdomain1[1],$uamdomain2) == 0)
110
				       		{
112
				       		{
111
						$remove_line = True;
113
						$remove_line = True;
112
						break;
114
						break;
113
						}
115
						}
114
					}
116
					}
115
				}
117
				}
116
			if (! $remove_line)
118
			if (! $remove_line)
117
				{
119
				{
118
				fwrite($pointeur,$ligne);
120
				fwrite($pointeur,$ligne);
119
				}
121
				}
120
			}
122
			}
121
		fclose($pointeur);
123
		fclose($pointeur);
122
		}
124
		}
123
	exec ("sudo /usr/bin/systemctl restart chilli");
125
	exec ("sudo /usr/bin/systemctl restart chilli");
124
	break;
126
	break;
125
	case 'new_ip' :
127
	case 'new_ip' :
126
	if (trim($_POST['add_ip']) != "") 
128
	if (trim($_POST['add_ip']) != "") 
127
		{
129
		{
128
		$tab=file(IP_ALLOWED_LIST);
130
		$tab=file(IP_ALLOWED_LIST);
129
		$insert = true;
131
		$insert = true;
130
		if ($tab) // file isn't empty
132
		if ($tab) // file isn't empty
131
			{
133
			{
132
			foreach ($tab as $line) // test if domain address doesn't already exist
134
			foreach ($tab as $line) // test if domain address doesn't already exist
133
				{
135
				{
134
				$ip=explode("\"", $line);
136
				$ip=explode("\"", $line);
135
				if (strcmp(trim($_POST['add_ip']),$ip[1]) == 0)
137
				if (strcmp(trim($_POST['add_ip']),$ip[1]) == 0)
136
			       		{
138
			       		{
137
					$insert = false;
139
					$insert = false;
138
					break;
140
					break;
139
					}
141
					}
140
				}
142
				}
141
			}
143
			}
142
		if ($insert == true) 
144
		if ($insert == true) 
143
			{
145
			{
144
			$line ="\nuamallowed=\"" . trim($_POST['add_ip']) ."\" #" . trim($_POST['add_ip_comment']);
146
			$line ="\nuamallowed=\"" . trim($_POST['add_ip']) ."\" #" . trim($_POST['add_ip_comment']);
145
			$pointeur=fopen(IP_ALLOWED_LIST,"a");
147
			$pointeur=fopen(IP_ALLOWED_LIST,"a");
146
			fwrite ($pointeur, $line);
148
			fwrite ($pointeur, $line);
147
			fclose ($pointeur);
149
			fclose ($pointeur);
148
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
150
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
149
			exec ("sudo /usr/bin/systemctl restart chilli");
151
			exec ("sudo /usr/bin/systemctl restart chilli");
150
			}
152
			}
151
		}
153
		}
152
	break;
154
	break;
153
	case 'change_ip' :
155
	case 'change_ip' :
154
	$tab=file(IP_ALLOWED_LIST);
156
	$tab=file(IP_ALLOWED_LIST);
155
	if ($tab)
157
	if ($tab)
156
		{
158
		{
157
		$pointeur=fopen(IP_ALLOWED_LIST,"w+");
159
		$pointeur=fopen(IP_ALLOWED_LIST,"w+");
158
		foreach ($tab as $ligne)
160
		foreach ($tab as $ligne)
159
			{
161
			{
160
			$ip1=explode("\"", $ligne);
162
			$ip1=explode("\"", $ligne);
161
			$remove_line = false;
163
			$remove_line = false;
162
			foreach ($_POST as $key => $value)
164
			foreach ($_POST as $key => $value)
163
				{
165
				{
164
				$key = str_replace ("_",".",$key); // dot are replace by '_' in post request
166
				$key = str_replace ("_",".",$key); // dot are replace by '_' in post request
165
				if (strstr($key,'del-'))
167
				if (strstr($key,'del-'))
166
					{
168
					{
167
					$ip2 = str_replace('del-','',$key);
169
					$ip2 = str_replace('del-','',$key);
168
					if (strcmp($ip1[1],$ip2) == 0)
170
					if (strcmp($ip1[1],$ip2) == 0)
169
				       		{
171
				       		{
170
						$remove_line = True;
172
						$remove_line = True;
171
						break;
173
						break;
172
						}
174
						}
173
					}
175
					}
174
				}
176
				}
175
			if (! $remove_line)
177
			if (! $remove_line)
176
				{
178
				{
177
				fwrite($pointeur,$ligne);
179
				fwrite($pointeur,$ligne);
178
				}
180
				}
179
			}
181
			}
180
		fclose($pointeur);
182
		fclose($pointeur);
181
		}
183
		}
182
	exec ("sudo /usr/bin/systemctl restart chilli");
184
	exec ("sudo /usr/bin/systemctl restart chilli");
183
	break;
185
	break;
184
	}
186
	}
185
}
187
}
186
?>
188
?>
187
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
189
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
188
<tr><th><?echo "$l_trusted_domain";?></th></tr>
190
<tr><th><?echo "$l_trusted_domain";?></th></tr>
189
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
191
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
190
</table>
192
</table>
191
<table width="100%" border=1 cellspacing=0 cellpadding=1>
193
<table width="100%" border=1 cellspacing=0 cellpadding=1>
192
<tr><td colspan=2 align="center">
194
<tr><td colspan=2 align="center">
193
<?
195
<?
194
echo "$l_trusted_domain_explain</td></tr>";
196
echo "$l_trusted_domain_explain</td></tr>";
195
echo "<tr><td align='center' valign='middle'>";
197
echo "<tr><td align='center' valign='middle'>";
196
echo "<table cellspacing=2 cellpadding=2 border=1>";
198
echo "<table cellspacing=2 cellpadding=2 border=1>";
197
echo "<FORM action='$_SERVER[PHP_SELF]' method='POST'>";
199
echo "<FORM action='$_SERVER[PHP_SELF]' method='POST'>";
198
echo "<tr align='center' bgcolor='#d0ddb0'><td>$l_domain<td>$l_comment_explain<td>$l_remove</tr>";
200
echo "<tr align='center' bgcolor='#d0ddb0'><td>$l_domain<td>$l_comment_explain<td>$l_remove</tr>";
199
// Read the "Domain alowed" file
201
// Read the "Domain alowed" file
200
$tab=file(DOMAIN_ALLOWED_LIST);
202
$tab=file(DOMAIN_ALLOWED_LIST);
201
if ($tab)  # the file isn't empty
203
if ($tab)  # the file isn't empty
202
	{
204
	{
203
	foreach ($tab as $line)
205
	foreach ($tab as $line)
204
		{
206
		{
205
		if (trim($line) != '') # the line isn't empty
207
		if (trim($line) != '') # the line isn't empty
206
			{
208
			{
207
			$domain_allowed=explode("#", $line);
209
			$domain_allowed=explode("#", $line);
208
			$uamdomain=trim($domain_allowed[0],"#");
210
			$uamdomain=trim($domain_allowed[0],"#");
209
			$domain=explode("\"", $uamdomain);
211
			$domain=explode("\"", $uamdomain);
210
			echo "<tr><td>$domain[1]";
212
			echo "<tr><td>$domain[1]";
211
			echo "<td>";
213
			echo "<td>";
212
			if (isset ($domain_allowed[1])) {
214
			if (isset ($domain_allowed[1])) {
213
				echo trim($domain_allowed[1]);}
215
				echo trim($domain_allowed[1]);}
214
			else echo "&nbsp";
216
			else echo "&nbsp";
215
			echo "<td>";
217
			echo "<td>";
216
			echo "<input type='checkbox' name='del-$domain[1]'>";
218
			echo "<input type='checkbox' name='del-$domain[1]'>";
217
			echo "</tr>";
219
			echo "</tr>";
218
			}
220
			}
219
		}
221
		}
220
	}
222
	}
221
echo "</table>";
223
echo "</table>";
222
if ($tab)
224
if ($tab)
223
	{
225
	{
224
	echo "<input type='hidden' name='choix' value='change_uamdomain'>";
226
	echo "<input type='hidden' name='choix' value='change_uamdomain'>";
225
	echo "<input type='submit' value='$l_apply'>";
227
	echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';\" value='$l_apply'>";
226
	}
228
	}
227
?>
229
?>
228
</form>
230
</form>
229
</td><td valign='middle' align='center'>
231
</td><td valign='middle' align='center'>
230
<form action='<?echo"$_SERVER[PHP_SELF]"?>' method='POST'>
232
<form action='<?echo"$_SERVER[PHP_SELF]"?>' method='POST'>
231
<table cellspacing=2 cellpadding=3 border=1>
233
<table cellspacing=2 cellpadding=3 border=1>
232
<tr align='center'><td bgcolor='#d0ddb0'><?echo "$l_domain<td bgcolor='#d0ddb0'>$l_comment_explain";?>
234
<tr align='center'><td bgcolor='#d0ddb0'><?echo "$l_domain<td bgcolor='#d0ddb0'>$l_comment_explain";?>
233
<td></tr>
235
<td></tr>
234
<tr><td>exemple1 : www.mydomain.com <br>exemple2 : .yourdomain.net
236
<tr><td>exemple1 : www.mydomain.com <br>exemple2 : .yourdomain.net
235
<td>exemple1 : mydomain<br><?echo "$l_comment_explain2";?><td></tr>
237
<td>exemple1 : mydomain<br><?echo "$l_comment_explain2";?><td></tr>
236
<tr><td><input type='text' name='add_uamdomain' size='20'>
238
<tr><td><input type='text' name='add_uamdomain' size='20'>
237
<td><input type='text' name='add_domain_comment' size='15'>
239
<td><input type='text' name='add_domain_comment' size='15'>
238
<input type='hidden' name='choix' value='new_uamdomain'>
240
<input type='hidden' name='choix' value='new_uamdomain'>
239
<td><input type='submit' value='<?echo "$l_add_to_list";?>'>
241
<td><input type='submit' onClick="this.disabled=true; this.value='<?echo $l_load;?>';" value='<?echo "$l_add_to_list";?>'>
240
</tr></table>
242
</tr></table>
241
</form>
243
</form>
242
</tr>
244
</tr>
243
</table>
245
</table>
244
<table width="100%" border="0" cellspacing="0" cellpadding="0">
246
<table width="100%" border="0" cellspacing="0" cellpadding="0">
245
	<tr><th><?php echo "$l_trusted_ip" ;?></th></tr>
247
	<tr><th><?php echo "$l_trusted_ip" ;?></th></tr>
246
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
248
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
247
</table>
249
</table>
248
<table width="100%" border=1 cellspacing=0 cellpadding=1>
250
<table width="100%" border=1 cellspacing=0 cellpadding=1>
249
<tr><td colspan=2 align="center">
251
<tr><td colspan=2 align="center">
250
<?
252
<?
251
echo "$l_trusted_ip_explain</td></tr>";
253
echo "$l_trusted_ip_explain</td></tr>";
252
echo "<tr><td align='center' valign='middle'>";
254
echo "<tr><td align='center' valign='middle'>";
253
echo "<table cellspacing=2 cellpadding=2 border=1>";
255
echo "<table cellspacing=2 cellpadding=2 border=1>";
254
echo "<FORM action='$_SERVER[PHP_SELF]' method='POST'>";
256
echo "<FORM action='$_SERVER[PHP_SELF]' method='POST'>";
255
echo "<tr align='center' bgcolor='#d0ddb0'><td>$l_trusted_ip<td>$l_comment<td>$l_remove</tr>";
257
echo "<tr align='center' bgcolor='#d0ddb0'><td>$l_trusted_ip<td>$l_comment<td>$l_remove</tr>";
256
// Read the "ip alowed" file
258
// Read the "ip alowed" file
257
$tab=file(IP_ALLOWED_LIST);
259
$tab=file(IP_ALLOWED_LIST);
258
if ($tab)  # the file isn't empty
260
if ($tab)  # the file isn't empty
259
	{
261
	{
260
	foreach ($tab as $line)
262
	foreach ($tab as $line)
261
		{
263
		{
262
		if (trim($line) != '') # the line isn't empty
264
		if (trim($line) != '') # the line isn't empty
263
			{
265
			{
264
			$ip_allowed=explode("#", $line);
266
			$ip_allowed=explode("#", $line);
265
			$ip_a=trim($ip_allowed[0],"#");
267
			$ip_a=trim($ip_allowed[0],"#");
266
			$ip=explode("\"", $ip_a);
268
			$ip=explode("\"", $ip_a);
267
			echo "<tr><td>$ip[1]";
269
			echo "<tr><td>$ip[1]";
268
			echo "<td>";
270
			echo "<td>";
269
			if (isset($ip_allowed[1]))
271
			if (isset($ip_allowed[1]))
270
				echo trim($ip_allowed[1]);
272
				echo trim($ip_allowed[1]);
271
			else echo "&nbsp;";
273
			else echo "&nbsp;";
272
			echo "<td><input type='checkbox' name='del-$ip[1]'>";
274
			echo "<td><input type='checkbox' name='del-$ip[1]'>";
273
			echo "</tr>";
275
			echo "</tr>";
274
			}
276
			}
275
		}
277
		}
276
	}
278
	}
277
echo "</table>";
279
echo "</table>";
278
if ($tab)
280
if ($tab)
279
	{
281
	{
280
	echo "<input type='hidden' name='choix' value='change_ip'>";
282
	echo "<input type='hidden' name='choix' value='change_ip'>";
281
	echo "<input type='submit' value='$l_apply'>";
283
	echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';\" value='$l_apply'>";
282
	}
284
	}
283
?>
285
?>
284
</form>
286
</form>
285
</td><td valign='middle' align='center'>
287
</td><td valign='middle' align='center'>
286
<form action='<?echo "$_SERVER[PHP_SELF]"?>' method='POST'>
288
<form action='<?echo "$_SERVER[PHP_SELF]"?>' method='POST'>
287
<table cellspacing=2 cellpadding=3 border=1>
289
<table cellspacing=2 cellpadding=3 border=1>
288
<tr align='center'><td bgcolor='#d0ddb0'><?echo "$l_trusted_ip<td bgcolor='#d0ddb0'>$l_comment";?>
290
<tr align='center'><td bgcolor='#d0ddb0'><?echo "$l_trusted_ip<td bgcolor='#d0ddb0'>$l_comment";?>
289
<td></tr>
291
<td></tr>
290
<tr><td>exemple1 : 170.25.23.10 <br>exemple2 : 15.20.20.0/16</td>
292
<tr><td>exemple1 : 170.25.23.10 <br>exemple2 : 15.20.20.0/16</td>
291
<td>my_web_server <br>my_dmz<td></tr>
293
<td>my_web_server <br>my_dmz<td></tr>
292
<tr><td><input type='text' name='add_ip' size='20'></td>
294
<tr><td><input type='text' name='add_ip' size='20'></td>
293
<td><input type='text' name='add_ip_comment' size='15'></td>
295
<td><input type='text' name='add_ip_comment' size='15'></td>
294
<input type='hidden' name='choix' value='new_ip'>
296
<input type='hidden' name='choix' value='new_ip'>
295
<td><input type='submit' value='<?echo "$l_add_to_list";?>'></td>
297
<td><input type='submit' onClick="this.disabled=true; this.value='<?echo $l_load;?>';" value='<?echo "$l_add_to_list";?>'></td>
296
</tr></table>
298
</tr></table>
297
</td></tr>
299
</td></tr>
298
</table>
300
</table>
299
</form>
301
</form>
300
<table width="100%" border="0" cellspacing="0" cellpadding="0">
302
<table width="100%" border="0" cellspacing="0" cellpadding="0">
301
	<tr><th><?php echo "$l_trusted_equipments";?></th></tr>
303
	<tr><th><?php echo "$l_trusted_equipments";?></th></tr>
302
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
304
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
303
</table>
305
</table>
304
<table width="100%" border=1 cellspacing=0 cellpadding=1>
306
<table width="100%" border=1 cellspacing=0 cellpadding=1>
305
<tr><td colspan=2 align="center">
307
<tr><td colspan=2 align="center">
306
<?echo "$l_trusted_equipments_explain";?>
308
<?echo "$l_trusted_equipments_explain";?>
307
</td></tr>
309
</td></tr>
308
</table>
310
</table>
309
</BODY>
311
</BODY>
310
</HTML>
312
</HTML>
311
 
313