本文整理汇总了PHP中find_rule_by_number函数的典型用法代码示例。如果您正苦于以下问题:PHP find_rule_by_number函数的具体用法?PHP find_rule_by_number怎么用?PHP find_rule_by_number使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了find_rule_by_number函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
$dstIP = htmlspecialchars($filterent['dstip']);
}
if ($filterent['act'] == "block") {
$iconfn = "times";
} else {
if ($filterent['act'] == "reject") {
$iconfn = "hand-stop-o";
} else {
if ($filterent['act'] == "match") {
$iconfn = "filter";
} else {
$iconfn = "check";
}
}
}
$rule = find_rule_by_number($filterent['rulenum'], $filterent['tracker'], $filterent['act']);
// Putting <wbr> tags after each ':' allows the string to word-wrap at that point
$srcIP = str_replace(':', ':<wbr>', $srcIP);
$dstIP = str_replace(':', ':<wbr>', $dstIP);
?>
<tr>
<td><a href="#" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php
echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}";
?>
', outputrule);"
role="button" data-toggle="popover" data-trigger="hover"
data-title="Rule that triggered this action"
data-content="<?php
echo htmlspecialchars($rule);
?>
"> <i
示例2: getGETPOSTsettingvalue
}
function getGETPOSTsettingvalue($settingname, $default)
{
$settingvalue = $default;
if (isset($_GET[$settingname])) {
$settingvalue = $_GET[$settingname];
}
if (isset($_POST[$settingname])) {
$settingvalue = $_POST[$settingname];
}
return $settingvalue;
}
$rulenum = getGETPOSTsettingvalue('getrulenum', null);
if ($rulenum) {
list($rulenum, $type) = explode(',', $rulenum);
$rule = find_rule_by_number($rulenum, $type);
echo gettext("The rule that triggered this action is") . ":\n\n{$rule}";
exit;
}
$filterfieldsarray = array();
$filtersubmit = getGETPOSTsettingvalue('filtersubmit', null);
if ($filtersubmit) {
$interfacefilter = getGETPOSTsettingvalue('interface', null);
$filtertext = getGETPOSTsettingvalue('filtertext', "");
$filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
$actpass = getGETPOSTsettingvalue('actpass', null);
$actblock = getGETPOSTsettingvalue('actblock', null);
$filterfieldsarray['act'] = str_replace(" ", " ", trim($actpass . " " . $actblock));
$filterfieldsarray['act'] = $filterfieldsarray['act'] != "" ? $filterfieldsarray['act'] : 'All';
$filterfieldsarray['time'] = getGETPOSTsettingvalue('filterlogentries_time', null);
$filterfieldsarray['interface'] = getGETPOSTsettingvalue('filterlogentries_interfaces', null);
示例3: TORT
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require "guiconfig.inc";
/* In an effort to reduce duplicate code, many shared functions have been moved here. */
require_once "includes/log.inc.php";
if ($_GET['getrulenum'] or $_POST['getrulenum']) {
if ($_GET['getrulenum']) {
$rulenum = escapeshellarg($_GET['getrulenum']);
}
if ($_POST['getrulenum']) {
$rulenum = escapeshellarg($_POST['getrulenum']);
}
$rule = find_rule_by_number($rulenum);
echo "The rule that triggered this action is:\n\n{$rule}";
exit;
}
$filter_logfile = "{$g['varlog_path']}/filter.log";
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
$nentries = 50;
}
if ($_POST['clear']) {
exec("killall syslogd");
exec("/usr/sbin/clog -i -s 512144 /var/log/filter.log");
system_syslogd_start();
}
$pgtitle = "Durum: Sistem Kayıtları: Firewall";
include "head.inc";