Subversion Repositories ALCASAR

Rev

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

Rev 2134 Rev 2184
Line 66... Line 66...
66
 
66
 
67
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
67
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
68
switch ($choix)
68
switch ($choix)
69
{
69
{
70
case 'new_port' :
70
case 'new_port' :
71
	if ((trim($_POST['add_port']) != "80") and ($_POST['add_port'] != "") and ($_POST['add_proto'] != "") and (is_numeric($_POST['add_port'])))
71
	if (($_POST['add_port'] != "") and ($_POST['add_proto'] != "") and (is_numeric($_POST['add_port'])))
72
		{
72
		{
73
		$_POST['add_proto'] = str_replace (CHR(32),"-",$_POST['add_proto']);
73
		$_POST['add_proto'] = str_replace (CHR(32),"-",$_POST['add_proto']);
74
		$tab=file(SERVICES_LIST);
74
		$tab=file(SERVICES_LIST);
75
		$insert = true;
75
		$insert = true;
76
		if ($tab) // file isn't empty
76
		if ($tab) // file isn't empty
Line 129... Line 129...
129
				fwrite($pointeur,$line);
129
				fwrite($pointeur,$line);
130
				}
130
				}
131
			}
131
			}
132
		fclose($pointeur);
132
		fclose($pointeur);
133
		}
133
		}
134
	exec ("sudo /usr/local/bin/alcasar-iptables.sh -on");
134
	exec ("sudo /usr/local/bin/alcasar-iptables.sh");
135
	break;
135
	break;
136
	}
136
	}
137
?>
137
?>
138
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
138
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
139
<tr><th><?echo "$l_title_proto";?></th></tr>
139
<tr><th><?echo "$l_title_proto";?></th></tr>