1
|
<?php
|
2
|
/* $Id$ */
|
3
|
/*
|
4
|
firewall_virtual_ip.php
|
5
|
part of pfSense (http://www.pfsense.com/)
|
6
|
Copyright (C) 2004-2005 Scott Ullrich <geekgod@pfsense.com>.
|
7
|
All rights reserved.
|
8
|
|
9
|
Redistribution and use in source and binary forms, with or without
|
10
|
modification, are permitted provided that the following conditions are met:
|
11
|
|
12
|
1. Redistributions of source code must retain the above copyright notice,
|
13
|
this list of conditions and the following disclaimer.
|
14
|
|
15
|
2. Redistributions in binary form must reproduce the above copyright
|
16
|
notice, this list of conditions and the following disclaimer in the
|
17
|
documentation and/or other materials provided with the distribution.
|
18
|
|
19
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
21
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
22
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
23
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
24
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
26
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
27
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28
|
POSSIBILITY OF SUCH DAMAGE.
|
29
|
*/
|
30
|
|
31
|
$pgtitle = array("Firewall","System","Tunables");
|
32
|
|
33
|
require("guiconfig.inc");
|
34
|
|
35
|
if (!is_array($config['sysctl']['item'])) {
|
36
|
$config['sysctl']['item'] = array();
|
37
|
}
|
38
|
$a_tunable = &$config['sysctl']['item'];
|
39
|
|
40
|
if ($_POST) {
|
41
|
$pconfig = $_POST;
|
42
|
|
43
|
if ($_POST['apply']) {
|
44
|
$retval = 0;
|
45
|
$savemsg = get_std_save_message($retval);
|
46
|
unlink_if_exists($d_sysctldirty_path);
|
47
|
}
|
48
|
}
|
49
|
|
50
|
if ($_GET['act'] == "del") {
|
51
|
if ($a_tunable[$_GET['id']]) {
|
52
|
/* if this is an AJAX caller then handle via JSON */
|
53
|
if(isAjax() && is_array($input_errors)) {
|
54
|
input_errors2Ajax($input_errors);
|
55
|
exit;
|
56
|
}
|
57
|
|
58
|
if (!$input_errors) {
|
59
|
unset($a_tunable[$_GET['id']]);
|
60
|
write_config();
|
61
|
touch($d_sysctldirty_path);
|
62
|
pfSenseHeader("firewall_system_tunables.php");
|
63
|
exit;
|
64
|
}
|
65
|
}
|
66
|
}
|
67
|
|
68
|
include("head.inc");
|
69
|
|
70
|
?>
|
71
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?= $jsevents["body"]["onload"] ?>">
|
72
|
<?php include("fbegin.inc"); ?>
|
73
|
<form action="firewall_virtual_ip.php" method="post">
|
74
|
<div id="inputerrors"></div>
|
75
|
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
76
|
<?php if ($savemsg) print_info_box($savemsg); ?>
|
77
|
<?php if (file_exists($d_sysctldirty_path)): ?><p>
|
78
|
<?php print_info_box_np("The firewall tunables have changed. You must apply the configuration to take affect.");?><br />
|
79
|
<?php endif; ?>
|
80
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
81
|
<tr>
|
82
|
<td>
|
83
|
<div id="mainarea">
|
84
|
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
|
85
|
<tr>
|
86
|
<td width="20%" class="listhdrr">Tunable Name</td>
|
87
|
<td width="60%" class="listhdrr">Description</td>
|
88
|
<td width="20%" class="listhdrr">Value</td>
|
89
|
</tr>
|
90
|
<?php $i = 0; foreach ($config['sysctl']['item'] as $tunable): ?>
|
91
|
<tr>
|
92
|
<td class="listlr" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';">
|
93
|
<?php echo $tunable['tunable']; ?>
|
94
|
</td>
|
95
|
<td class="listlr" align="left" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';">
|
96
|
<?php echo $tunable['desc']; ?>
|
97
|
</td>
|
98
|
<td class="listlr" align="left" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';">
|
99
|
<?php echo $tunable['value']; ?>
|
100
|
</td>
|
101
|
<td class="list" nowrap>
|
102
|
<table border="0" cellspacing="0" cellpadding="1">
|
103
|
<tr>
|
104
|
<td valign="middle"><a href="firewall_system_tunables_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="" /></a></td>
|
105
|
<td valign="middle"><a href="firewall_system_tunables.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="" /></a></td>
|
106
|
</tr>
|
107
|
</table>
|
108
|
</td>
|
109
|
<?php $i++; endforeach; ?>
|
110
|
<tr>
|
111
|
<td class="list" colspan="3"></td>
|
112
|
<td class="list">
|
113
|
<table border="0" cellspacing="0" cellpadding="1">
|
114
|
<tr>
|
115
|
<td valign="middle"><a href="firewall_system_tunables_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="" /></a></td>
|
116
|
</tr>
|
117
|
</table>
|
118
|
</td>
|
119
|
</tr>
|
120
|
</table>
|
121
|
</div>
|
122
|
</table>
|
123
|
</form>
|
124
|
<?php include("fend.inc"); ?>
|
125
|
</body>
|
126
|
</html>
|