diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-06-27 21:17:38 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-06-27 21:17:38 +0000 |
commit | 1f2761383b5c8a01bfaf908bc21b6a2c36490452 (patch) | |
tree | 4703dd4e22b37e2cf870d1cbb680aa8c454a74e2 /usr/local/www | |
parent | 7dc22ace8a9b9259131d2f93a410519aab2f4373 (diff) | |
download | pfsense-1f2761383b5c8a01bfaf908bc21b6a2c36490452.zip pfsense-1f2761383b5c8a01bfaf908bc21b6a2c36490452.tar.gz |
Correctly delete multiple lines at once. And leave the X on the side for the scrolling wusses.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/firewall_shaper.php | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php index 19ae4a6..d247da0 100755 --- a/usr/local/www/firewall_shaper.php +++ b/usr/local/www/firewall_shaper.php @@ -91,15 +91,21 @@ if ($_POST) { } } -if ($_GET['act'] == "del") { - if ($a_shaper[$_GET['id']]) { - unset($a_shaper[$_GET['id']]); - write_config(); - touch($d_shaperconfdirty_path); - header("Location: firewall_shaper.php"); - exit; - } -} else if ($_GET['act'] == "down") { +if (isset($_POST['del_x'])) { + /* delete selected rules */ + if (is_array($_POST['rule']) && count($_POST['rule'])) { + foreach ($_POST['rule'] as $rulei) { + unset($a_shaper[$rulei]); + } + write_config(); + touch($d_natconfdirty_path); + header("Location: firewall_shaper.php"); + exit; + } +} + + +if ($_GET['act'] == "down") { if ($a_shaper[$_GET['id']] && $a_shaper[$_GET['id']+1]) { $tmp = $a_shaper[$_GET['id']+1]; $a_shaper[$_GET['id']+1] = $a_shaper[$_GET['id']]; |