aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_interfaces_whitelist_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-08-02 15:59:36 +0000
committerErmal <eri@pfsense.org>2011-08-02 16:00:57 +0000
commit165f7370b89857b4db89eb2d873fa120791bd8cf (patch)
tree863f612d48b3725bab8160f70db625b1c1dc244b /config/snort/snort_interfaces_whitelist_edit.php
parenta17dd016725b63dad1cd1032ed8afa3c15540fff (diff)
downloadpfsense-packages-165f7370b89857b4db89eb2d873fa120791bd8cf.tar.gz
pfsense-packages-165f7370b89857b4db89eb2d873fa120791bd8cf.tar.bz2
pfsense-packages-165f7370b89857b4db89eb2d873fa120791bd8cf.zip
Polishing of the snort pacakge, part 2:
* Get rid of snort_head.inc * No more apply settings button since it does not make sense * Other cleanups in many parts of the code Tested only on 2.0
Diffstat (limited to 'config/snort/snort_interfaces_whitelist_edit.php')
-rw-r--r--config/snort/snort_interfaces_whitelist_edit.php48
1 files changed, 7 insertions, 41 deletions
diff --git a/config/snort/snort_interfaces_whitelist_edit.php b/config/snort/snort_interfaces_whitelist_edit.php
index 951ed0b5..c484df9e 100644
--- a/config/snort/snort_interfaces_whitelist_edit.php
+++ b/config/snort/snort_interfaces_whitelist_edit.php
@@ -101,25 +101,6 @@ if (isset($id) && $a_whitelist[$id]) {
$addresssubnettest = false;
}
-/* this will exec when alert says apply */
-if ($_POST['apply']) {
-
- if (file_exists("$d_snort_whitelist_dirty_path")) {
- conf_mount_rw();
-
- /* create whitelist and homenet file then sync files */
- sync_snort_package_empty();
- sync_snort_package();
-
- unlink("$d_snort_whitelist_dirty_path");
-
- write_config();
- conf_mount_ro();
-
- }
-
-}
-
if ($_POST['submit']) {
conf_mount_rw();
@@ -218,14 +199,15 @@ if ($_POST['submit']) {
$w_list['detail'] = $final_address_details;
if (isset($id) && $a_whitelist[$id])
- $a_whitelist[$id] = $w_list;
+ $a_whitelist[$id] = $w_list;
else
- $a_whitelist[] = $w_list;
-
- touch($d_snort_whitelist_dirty_path);
+ $a_whitelist[] = $w_list;
write_config();
+ /* create whitelist and homenet file then sync files */
+ sync_snort_package_empty();
+
header("Location: /snort/snort_interfaces_whitelist_edit.php?id=$id");
exit;
}
@@ -240,32 +222,16 @@ if ($_POST['submit']) {
}
$pgtitle = "Services: Snort: Whitelist: Edit $whitelist_uuid";
-include("/usr/local/pkg/snort/snort_head.inc");
+include_once("head.inc");
?>
-<body
- link="#0000CC" vlink="#0000CC" alink="#0000CC"
- onload="<?= $jsevents["body"]["onload"] ?>">
-
-<script>
- jQuery(document).ready(function(){
-
- //Examples of how to assign the ColorBox event to elements
- jQuery(".example8").colorbox({width:"820px", height:"700px", iframe:true, overlayClose:false});
-
- });
- </script>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC" >
<?php
include("fbegin.inc");
echo $snort_general_css;
?>
-
-<!-- hack to fix the hardcoed fbegin link in header -->
-<div id="header-left2"><a href="../index.php" id="status-link2"><img
- src="./images/transparent.gif" border="0"></img></a></div>
-
<div class="body2"><script type="text/javascript"
src="/snort/javascript/row_helper.js"></script> <input type='hidden'
name='address_type' value='textbox' /> <script type="text/javascript">