Project

General

Profile

Download (4.67 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	firewall_shaper_wizards.php
5
	Copyright (C) 2004, 2005 Scott Ullrich
6
	Copyright (C) 2008 Ermal Luçi
7
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
8
	All rights reserved.
9

    
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12

    
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15

    
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19

    
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31
/*
32
	pfSense_BUILDER_BINARIES:	/usr/bin/killall
33
	pfSense_MODULE:	shaper
34
*/
35

    
36
##|+PRIV
37
##|*IDENT=page-firewall-trafficshaper-wizard
38
##|*NAME=Firewall: Traffic Shaper: Wizard page
39
##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Wizard' page.
40
##|*MATCH=firewall_shaper_wizards.php*
41
##|-PRIV
42

    
43
require("guiconfig.inc");
44
require_once("functions.inc");
45
require_once("filter.inc");
46
require_once("shaper.inc");
47
require_once("util.inc");
48

    
49
if($_GET['reset'] <> "") {
50
	sigkillbyname('pfctl', SIGKILL);
51
	exit;
52
}
53

    
54
if ($_POST['apply']) {
55
	write_config();
56

    
57
	$retval = 0;
58
	/* Setup pf rules since the user may have changed the optimization value */
59
	$retval = filter_configure();
60
	$savemsg = get_std_save_message($retval);
61
	if (stristr($retval, "error") <> true)
62
		$savemsg = get_std_save_message($retval);
63
	else
64
		$savemsg = $retval;
65

    
66
	/* reset rrd queues */
67
	unlink_if_exists("/var/db/rrd/*queuedrops.rrd");
68
	unlink_if_exists("/var/db/rrd/*queues.rrd");
69
	enable_rrd_graphing();
70

    
71
	clear_subsystem_dirty('shaper');
72
}
73

    
74
$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"),gettext("Wizards"));
75
$shortcut_section = "trafficshaper";
76

    
77
$wizards = array(
78
	gettext("Multiple Lan/Wan") => "traffic_shaper_wizard_multi_all.xml",
79
	gettext("Dedicated Links") => "traffic_shaper_wizard_dedicated.xml",
80
);
81

    
82
$closehead = false;
83
include("head.inc");
84
?>
85
<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
86
</head>
87

    
88
<body link="#0000CC" vlink="#0000CC" alink="#0000CC" >
89

    
90
<?php include("fbegin.inc");  ?>
91
<?php if ($input_errors) print_input_errors($input_errors); ?>
92

    
93
<form action="firewall_shaper_wizards.php" method="post" id="iform" name="iform">
94

    
95
<?php if ($savemsg) print_info_box($savemsg); ?>
96
<?php if (is_subsystem_dirty('shaper')): ?><p>
97
<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));?><br /></p>
98
<?php endif; ?>
99
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="traffic shaper wizard">
100
	<tr><td>
101
<?php
102
	$tab_array = array();
103
	$tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
104
	$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
105
	$tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
106
	$tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
107
	$tab_array[4] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php");
108
	display_top_tabs($tab_array);
109
?>
110
	</td></tr>
111
	<tr>
112
		<td>
113
			<div id="mainarea">
114
				<table  width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
115
					<tr>
116
						<td class="listhdrr" width="25%" align="center" ><?=gettext("Wizard function");?></td>
117
						<td class="listhdrr" width="75%" align="center"><?=gettext("Wizard Link");?></td>
118
					</tr>
119
<?php
120
				foreach ($wizards as $key => $wizard):
121
?>
122
					<tr class="tabcont">
123
						<td class="listlr" style="background-color: #e0e0e0" width="25%" align="center">
124
<?php
125
							echo $key;
126
?>
127
						</td>
128
						<td class="listr" style="background-color: #e0e0e0" width="75%" align="center">
129
<?php
130
							echo "<a href=\"wizard.php?xml=" . $wizard ."\" >" .$wizard . "</a>";
131
?>
132
						</td>
133
					</tr>
134
<?php
135
				endforeach;
136
?>
137
				</table>
138
			</div>
139
		</td>
140
	</tr>
141
</table>
142
</form>
143
<?php include("fend.inc"); ?>
144
</body>
145
</html>
(79-79/256)