Project

General

Profile

Download (4.62 KB) Statistics
| Branch: | Tag: | Revision:
1 c9f0b1c2 Ermal Luçi
<?php
2
/* $Id$ */
3
/*
4 a368a026 Ermal Lu?i
	firewall_shaper_wizards.php
5 c9f0b1c2 Ermal Luçi
	Copyright (C) 2004, 2005 Scott Ullrich
6 1d7ba683 ayvis
	Copyright (C) 2008 Ermal Luçi
7 c9f0b1c2 Ermal Luçi
	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 7ac5a4cb Scott Ullrich
/*
31
	pfSense_BUILDER_BINARIES:	/usr/bin/killall
32
	pfSense_MODULE:	shaper
33
*/
34 c9f0b1c2 Ermal Luçi
35 6b07c15a Matthew Grooms
##|+PRIV
36
##|*IDENT=page-firewall-trafficshaper-wizard
37
##|*NAME=Firewall: Traffic Shaper: Wizard page
38
##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Wizard' page.
39
##|*MATCH=firewall_shaper_wizards.php*
40
##|-PRIV
41
42 c9f0b1c2 Ermal Luçi
require("guiconfig.inc");
43 7a927e67 Scott Ullrich
require_once("functions.inc");
44
require_once("filter.inc");
45
require_once("shaper.inc");
46 71802285 Renato Botelho
require_once("util.inc");
47 c9f0b1c2 Ermal Luçi
48
if($_GET['reset'] <> "") {
49 71802285 Renato Botelho
	sigkillbyname('pfctl', SIGKILL);
50 c9f0b1c2 Ermal Luçi
	exit;
51
}
52
53 96b777d6 Ermal Luçi
if ($_POST['apply']) {
54 ba782be2 Renato Botelho
	write_config();
55
56
	$retval = 0;
57
	/* Setup pf rules since the user may have changed the optimization value */
58
	$retval = filter_configure();
59
	$savemsg = get_std_save_message($retval);
60
	if (stristr($retval, "error") <> true)
61
		$savemsg = get_std_save_message($retval);
62
	else
63
		$savemsg = $retval;
64
65
	/* reset rrd queues */
66 71802285 Renato Botelho
	unlink_if_exists("/var/db/rrd/*queuedrops.rrd");
67
	unlink_if_exists("/var/db/rrd/*queues.rrd");
68 ba782be2 Renato Botelho
	enable_rrd_graphing();
69
70
	clear_subsystem_dirty('shaper');
71 96b777d6 Ermal Luçi
}
72
73 9eae6681 Renato Botelho
$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"),gettext("Wizards"));
74 b32dd0a6 jim-p
$shortcut_section = "trafficshaper";
75 c9f0b1c2 Ermal Luçi
76 ba782be2 Renato Botelho
$wizards = array(
77
	gettext("Multiple Lan/Wan") => "traffic_shaper_wizard_multi_all.xml",
78
	gettext("Dedicated Links") => "traffic_shaper_wizard_dedicated.xml",
79
);
80 c9f0b1c2 Ermal Luçi
81 4271dfb8 Colin Fleming
$closehead = false;
82 c9f0b1c2 Ermal Luçi
include("head.inc");
83
?>
84 4271dfb8 Colin Fleming
<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
85
</head>
86 c9f0b1c2 Ermal Luçi
87
<body link="#0000CC" vlink="#0000CC" alink="#0000CC" >
88 4271dfb8 Colin Fleming
89
<?php include("fbegin.inc");  ?>
90 c9f0b1c2 Ermal Luçi
<?php if ($input_errors) print_input_errors($input_errors); ?>
91
92
<form action="firewall_shaper_wizards.php" method="post" id="iform" name="iform">
93
94
<?php if ($savemsg) print_info_box($savemsg); ?>
95 a368a026 Ermal Lu?i
<?php if (is_subsystem_dirty('shaper')): ?><p>
96 1d7ba683 ayvis
<?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>
97 c9f0b1c2 Ermal Luçi
<?php endif; ?>
98 4271dfb8 Colin Fleming
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="traffic shaper wizard">
99 ba782be2 Renato Botelho
	<tr><td>
100 c9f0b1c2 Ermal Luçi
<?php
101
	$tab_array = array();
102 c056f625 Vinicius Coque
	$tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
103
	$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
104
	$tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
105
	$tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
106
	$tab_array[4] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php");
107 c9f0b1c2 Ermal Luçi
	display_top_tabs($tab_array);
108
?>
109 ba782be2 Renato Botelho
	</td></tr>
110
	<tr>
111
		<td>
112
			<div id="mainarea">
113
				<table  width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
114
					<tr>
115
						<td class="listhdrr" width="25%" align="center" ><?=gettext("Wizard function");?></td>
116
						<td class="listhdrr" width="75%" align="center"><?=gettext("Wizard Link");?></td>
117
					</tr>
118
<?php
119
				foreach ($wizards as $key => $wizard):
120
?>
121
					<tr class="tabcont">
122
						<td class="listlr" style="background-color: #e0e0e0" width="25%" align="center">
123
<?php
124
							echo $key;
125
?>
126
						</td>
127
						<td class="listr" style="background-color: #e0e0e0" width="75%" align="center">
128
<?php
129
							echo "<a href=\"wizard.php?xml=" . $wizard ."\" >" .$wizard . "</a>";
130
?>
131
						</td>
132
					</tr>
133
<?php
134
				endforeach;
135
?>
136
				</table>
137
			</div>
138
		</td>
139 c9f0b1c2 Ermal Luçi
	</tr>
140
</table>
141
</form>
142 4271dfb8 Colin Fleming
<?php include("fend.inc"); ?>
143 c9f0b1c2 Ermal Luçi
</body>
144
</html>