diff options
author | robiscool <robrob2626@yahoo.com> | 2011-08-09 10:04:28 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2011-08-09 10:04:28 -0700 |
commit | 7757b8de6deea0db6a75cb60cd41745aecacba36 (patch) | |
tree | c97a25087508f9224e1f2e673ba7ddf273e89be8 /config/orionids-dev/snort_interfaces_rules.php | |
parent | 1fae858397c86fc20ea0678e756f1310cc054e35 (diff) | |
download | pfsense-packages-7757b8de6deea0db6a75cb60cd41745aecacba36.tar.gz pfsense-packages-7757b8de6deea0db6a75cb60cd41745aecacba36.tar.bz2 pfsense-packages-7757b8de6deea0db6a75cb60cd41745aecacba36.zip |
orionids-dev, finally finished sig ips db gui, start snortsam.conf work
Diffstat (limited to 'config/orionids-dev/snort_interfaces_rules.php')
-rw-r--r-- | config/orionids-dev/snort_interfaces_rules.php | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/config/orionids-dev/snort_interfaces_rules.php b/config/orionids-dev/snort_interfaces_rules.php index 0f4c8b5d..12f9cec0 100644 --- a/config/orionids-dev/snort_interfaces_rules.php +++ b/config/orionids-dev/snort_interfaces_rules.php @@ -139,10 +139,10 @@ $a_rules = snortSql_fetchAllSettings('snortDBrules', 'Snortrules', 'All', ''); <table width="100%" border="0px" cellpadding="0px" cellspacing="0px"> <!-- START MAIN AREA --> - <table width="94%"> + <table width="100%"> <tr > <!-- db to lookup --> - <td width="32%" class="listhdrr">File Name</td> - <td width="68%" class="listhdr">Description</td> + <td width="25%" class="listhdrr">File Name</td> + <td width="60%" class="listhdr">Description</td> </tr> </table> @@ -154,49 +154,78 @@ $a_rules = snortSql_fetchAllSettings('snortDBrules', 'Snortrules', 'All', ''); <tr id="maintable_default" data-options='{"pagetable":"Snortrules", "pagedb":"snortDBrules", "DoPOST":"true"}' > - <td class="listlr" width="32%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=default'">Default</td> - <td class="listbg" width="68%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=default'"> + <td class="listlr" width="30%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=default'">Default</td> + <td class="listbg" width="63%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=default'"> <font color="#FFFFFF">Default rule database </font> </td> <td valign="middle" nowrap class="list"> - <table border="0" cellspacing="0" cellpadding="1"> + <table border="0" cellspacing="0" cellpadding="2"> + <?php + /* + * TODO: Must add snort process id to the rest disable block + * Example: only disable reset when snort is running and database is selected + */ + if (in_array('default', $listUsedRules)) { + $resetObjectDf = '<img src="/themes/' . $g['theme'] . '/images/icons/icon_reinstall_d.gif" width="17" height="17" border="0" title="reset database" >'; + }else{ + $resetObjectDf = '<img id="icon_r_default" class="icon_click icon_r" src="/themes/' . $g['theme'] . '/images/icons/icon_reinstall.gif" width="17" height="17" border="0" title="reset database" >'; + } + + ?> <tr> <td valign="middle"> <a href="snort_interfaces_rules_edit.php?rdbuuid=default"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif"width="17" height="17" border="0" title="edit database"></a> </td> <td> + <?=$resetObjectDf; ?> + </td> + <td> <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" border="0" title="delete database" > - </td> + </td> + </td> </tr> </table> </td> </tr> - <?php foreach ($a_rules as $list): ?> <?php + /* + * TODO: Must add snort process id to the rest disable block + * Example: only disable reset when snort is running and database is selected + */ if (in_array($list['uuid'], $listUsedRules)) { $deleteObject = '<img src="/themes/' . $g['theme'] . '/images/icons/icon_x_d.gif" width="17" height="17" border="0" title="delete database" >'; }else{ $deleteObject = '<img id="icon_x_' . $list['uuid'] . '" class="icon_click icon_x" src="/themes/' . $g['theme'] . '/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete database" >'; } + + if (in_array($list['uuid'], $listUsedRules)) { + $resetObject = '<img src="/themes/' . $g['theme'] . '/images/icons/icon_reinstall_d.gif" width="17" height="17" border="0" title="reset database" >'; + }else{ + $resetObject = '<img id="icon_r_' . $list['uuid'] . '" class="icon_click icon_r" src="/themes/' . $g['theme'] . '/images/icons/icon_reinstall.gif" width="17" height="17" border="0" title="reset database" >'; + } + ?> <tr id="maintable_<?=$list['uuid']?>" data-options='{"pagetable":"Snortrules", "pagedb":"snortDBrules", "DoPOST":"true"}' > - <td class="listlr" width="32%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=<?=$list['uuid'];?>'"><?=$list['ruledbname'];?></td> - <td class="listbg" width="68%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=<?=$list['uuid'];?>'"> + <td class="listlr" width="30%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=<?=$list['uuid'];?>'"><?=$list['ruledbname'];?></td> + <td class="listbg" width="63%" ondblclick="document.location='snort_interfaces_rules_edit.php?rdbuuid=<?=$list['uuid'];?>'"> <font color="#FFFFFF"> <?=htmlspecialchars($list['description']);?> </font> </td> <td valign="middle" nowrap class="list"> - <table border="0" cellspacing="0" cellpadding="1"> + <table border="0" cellspacing="0" cellpadding="2"> <tr> <td valign="middle"> <a href="snort_interfaces_rules_edit.php?rdbuuid=<?=$list['uuid'];?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif"width="17" height="17" border="0" title="edit database"></a> </td> <td> + <?=$resetObject; ?> + </td> + <td> <?=$deleteObject; ?> </td> </tr> |