diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/snort-dev/snort_gui.inc | 5 | ||||
-rw-r--r-- | config/snort-dev/snort_rules.php | 16 |
2 files changed, 8 insertions, 13 deletions
diff --git a/config/snort-dev/snort_gui.inc b/config/snort-dev/snort_gui.inc index d8743b43..1746ab54 100644 --- a/config/snort-dev/snort_gui.inc +++ b/config/snort-dev/snort_gui.inc @@ -40,11 +40,6 @@ function print_info_box_np2($msg) { echo " </td>\n"; echo " <td width='70%'><font color='white'><b>{$msg}</b></font>\n"; echo " </td>"; - if(stristr($msg, "apply") == true) { - echo " <td>"; - echo " <input name=\"apply\" type=\"submit\" class=\"formbtn\" id=\"apply\" value=\"Apply changes\">\n"; - echo " </td>"; - } echo " </tr></table>\n"; echo " </div>\n"; echo " </td>\n"; diff --git a/config/snort-dev/snort_rules.php b/config/snort-dev/snort_rules.php index 2a9d4f2f..bc2f481d 100644 --- a/config/snort-dev/snort_rules.php +++ b/config/snort-dev/snort_rules.php @@ -29,6 +29,7 @@ */ require("guiconfig.inc"); require("config.inc"); +require("/usr/local/pkg/snort/snort_gui.inc"); if (!is_array($config['installedpackages']['snortglobal']['rule'])) { $config['installedpackages']['snortglobal']['rule'] = array(); @@ -384,17 +385,16 @@ else if ($_GET['act'] == "toggle") } -//if ($GET['saved'] == 'yes') -//{ - $message = "The Snort rule configuration has been changed.<br>You must apply the changes in order for them to take effect."; - echo "please work"; +if ($_GET['saved'] == 'yes') +{ + $message = "The Snort rule configuration has been changed.<br>You must restart this snort interface in order for the changes to take effect."; + // stop_service("snort"); // sleep(2); // start_service("snort"); // $savemsg = ""; // $stopMsg = false; - -//} +} $currentruleset = basename($file); @@ -409,7 +409,7 @@ include("head.inc"); <?php echo "<form action=\"snort_rules.php?id={$id}\" method=\"post\" name=\"iform\" id=\"iform\">"; ?> -<?php // print_info_box($message);?> +<?php if ($_GET['saved'] == 'yes') {print_info_box_np2($message);}?> </form> <script type="text/javascript" language="javascript" src="row_toggle.js"> <script src="/javascript/sorttable.js" type="text/javascript"> @@ -582,7 +582,7 @@ function popup(url) echo $textss; ?> <a href="?id=<?=$id;?>&openruleset=<?=$file;?>&act=toggle&ids=<?=$counter;?>"><img src="../themes/<?= $g['theme']; ?>/images/icons/<?=$iconb;?>" width="11" height="11" border="0" title="click to toggle enabled/disabled status"></a> - <input name="enable" type="checkbox" value="yes" <?= $ischecked; ?> onClick="enable_change(false)"> + <input name="enable" type="checkbox" value="yes" <?= $ischecked; ?> onClick="enable_change(false) "> <?php echo $textse; echo "</td>"; |