Project

General

Profile

Download (4.62 KB) Statistics
| Branch: | Tag: | Revision:

univnautes / usr / local / www / firewall_shaper_wizards.php @ a1b66bec

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
	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
	pfSense_BUILDER_BINARIES:	/usr/bin/killall
32
	pfSense_MODULE:	shaper
33
*/
34

    
35
##|+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
require("guiconfig.inc");
43
require_once("functions.inc");
44
require_once("filter.inc");
45
require_once("shaper.inc");
46
require_once("util.inc");
47

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

    
53
if ($_POST['apply']) {
54
	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
	unlink_if_exists("/var/db/rrd/*queuedrops.rrd");
67
	unlink_if_exists("/var/db/rrd/*queues.rrd");
68
	enable_rrd_graphing();
69

    
70
	clear_subsystem_dirty('shaper');
71
}
72

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

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

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

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

    
89
<?php include("fbegin.inc");  ?>
90
<?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
<?php if (is_subsystem_dirty('shaper')): ?><p>
96
<?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
<?php endif; ?>
98
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="traffic shaper wizard">
99
	<tr><td>
100
<?php
101
	$tab_array = array();
102
	$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
	display_top_tabs($tab_array);
108
?>
109
	</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
	</tr>
140
</table>
141
</form>
142
<?php include("fend.inc"); ?>
143
</body>
144
</html>
(79-79/256)