当前位置: 首页>>代码示例>>PHP>>正文


PHP rule_popup函数代码示例

本文整理汇总了PHP中rule_popup函数的典型用法代码示例。如果您正苦于以下问题:PHP rule_popup函数的具体用法?PHP rule_popup怎么用?PHP rule_popup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了rule_popup函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: rules

    die;
}
if (isset($_GET["rules"])) {
    rules();
    exit;
}
if (isset($_GET["ruleid"])) {
    rule_js();
    exit;
}
if (isset($_GET["rule-tabs"])) {
    rule_tab();
    exit;
}
if (isset($_GET["rule-popup"])) {
    rule_popup();
    exit;
}
if (isset($_POST["rule-new"])) {
    rule_new_save();
    exit;
}
if (isset($_POST["rule-enable"])) {
    rule_enable();
    exit;
}
if (isset($_POST["rule-delete"])) {
    rule_delete();
    exit;
}
if (isset($_POST["rule-order"])) {
开发者ID:articatech,项目名称:artica,代码行数:31,代码来源:firehol.nic.rules.php

示例2: foreach

				</tr>
	<?php 
$nnats = $i = 0;
foreach ($a_nat as $natent) {
    //build Alias popup box
    $span_end = "</U></span>";
    $alias_popup = rule_popup($natent['source']['address'], pprint_port($natent['source']['port']), $natent['destination']['address'], pprint_port($natent['destination']['port']));
    $alias_src_span_begin = $alias_popup["src"];
    $alias_src_port_span_begin = $alias_popup["srcport"];
    $alias_dst_span_begin = $alias_popup["dst"];
    $alias_dst_port_span_begin = $alias_popup["dstport"];
    $alias_src_span_end = $alias_popup["src_end"];
    $alias_src_port_span_end = $alias_popup["srcport_end"];
    $alias_dst_span_end = $alias_popup["dst_end"];
    $alias_dst_port_span_end = $alias_popup["dstport_end"];
    $alias_popup = rule_popup("", "", $natent['target'], pprint_port($natent['local-port']));
    $alias_target_span_begin = $alias_popup["dst"];
    $alias_local_port_span_begin = $alias_popup["dstport"];
    $alias_target_span_end = $alias_popup["dst_end"];
    $alias_local_port_span_end = $alias_popup["dstport_end"];
    if (isset($natent['disabled'])) {
        $textss = "<span class=\"gray\">";
    } else {
        $textss = "<span>";
    }
    $textse = "</span>";
    /* if user does not have access to edit an interface skip on to the next record */
    if (!have_natpfruleint_access($natent['interface'])) {
        continue;
    }
    ?>
开发者ID:nmccurdy,项目名称:pfsense,代码行数:31,代码来源:firewall_nat.php

示例3: pfBlockerNG_get_table

function pfBlockerNG_get_table($mode = "")
{
    global $pfb;
    $counter = 0;
    $dcounter = 1;
    $response = '';
    $pfb_table = pfBlockerNG_get_counts();
    if (!empty($pfb_table)) {
        foreach ($pfb_table as $pfb_alias => $values) {
            // Add firewall rules count associated with alias
            $values['img'] = $values['img'] . "<span title='Alias Firewall Rule count' ><small>({$values['rule']})</small></span>";
            // If packet fence errors found, display error.
            if ($pfb['pfctl']) {
                $values['img'] = $pfb['err'];
            }
            // Alias table popup
            if ($values['count'] > 0 && $pfb['popup'] == "on") {
                $alias_popup = rule_popup($pfb_alias, '', '', '');
                $alias_span = $alias_popup['src'];
                $alias_span_end = $alias_popup['src_end'];
            } else {
                $alias_span = '';
                $alias_span_end = '';
            }
            // Packet column pivot to Alerts Tab
            if ($values['packets'] > 0) {
                $rules = rtrim($values['rules'], '|');
                if ($values['packets'] > $pfb['maxpivot']) {
                    $aentries = $pfb['maxpivot'];
                } else {
                    $aentries = $values['packets'];
                }
                $packets = "<a target='_new' href='/pfblockerng/pfblockerng_alerts.php?rule={$rules}&entries={$aentries}' ";
                $packets .= "style='text-decoration: underline;' title='Click to view these packets in Alerts tab' >{$values['packets']}</a>";
            } else {
                $packets = $values['packets'];
            }
            if ($mode == "js") {
                echo $response = $alias_span . $pfb_alias . $alias_span_end . "||" . $values['count'] . "||" . $packets . "||" . $values['update'] . "||" . $values['img'] . "\n";
            } else {
                $RowClass = $counter % 2 ? $pfb['RowEvenClass'] : $pfb['RowOddClass'];
                $counter++;
                echo " <tr {$RowClass}>\n\t\t\t\t\t<td class='listMRr ellipsis'>" . $alias_span . $pfb_alias . $alias_span_end . "</td>\n\t\t\t\t\t<td class='listMRr' align='center'>{$values['count']}</td>\n\t\t\t\t\t<td class='listMRr' sorttable_customkey='{$values['packets']}' align='center'>{$packets}</td>\n\t\t\t\t\t<td class='listMRr' align='center'>{$values['update']}</td>\n\t\t\t\t\t<td class='listMRr' align='center'>{$values['img']}</td>\n\t\t\t\t\t</tr>";
            }
        }
    }
}
开发者ID:randyqx,项目名称:pfsense-packages,代码行数:47,代码来源:pfblockerng.widget.php

示例4: rule_popup

        if (isset($filterent['disabled'])) {
            $iconfnlog .= " text-muted";
        }
        ?>
											<span class="glyphicon <?php 
        echo $iconfnlog;
        ?>
"></span>
							<?php 
    }
    ?>
										</td>
										<?php 
    //build Alias popup box
    $alias_src_span_begin = "";
    $alias_popup = rule_popup($filterent['source']['address'], pprint_port($filterent['source']['port']), $filterent['destination']['address'], pprint_port($filterent['destination']['port']));
    $alias_src_span_end = "";
    //$alias_popup["src_end"];
    if (count($alias_popup) > 0) {
        $aliases_popup['src']['addrlist'] = explode(" ", $alias_popup['src']['address']);
        $aliases_popup['src']['detlist'] = explode("||", $alias_popup['src']['detail']);
        $alias_src_span_begin = "<span title=\"\" type=\"button\" data-placement=\"bottom\" data-popover=\"true\" data-html=\"true\" data-content='";
        foreach ($aliases_popup['src']['addrlist'] as $addrkey => $address) {
            $alias_src_span_begin = $alias_src_span_begin . "<b>" . $address . "</b> <small>(" . $aliases_popup['src']['detlist'][$addrkey] . ")</small>&nbsp;<br>";
        }
        $alias_src_span_begin = $alias_src_span_begin . "' data-original-title='<a href=\"/firewall_aliases_edit.php?id=" . (string) $alias_popup['src']['aliasid'] . "\" target=\"_self\" >\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-primary\"><b>" . htmlspecialchars(pprint_address($filterent['source'])) . "(" . count($aliases_popup['src']['addrlist']) . ")" . "</span></b></a>'>";
        //<i class="glyphicon glyphicon-list">&nbsp;</i><b>Vergelijk Producten</b>&nbsp;<span class="badge">2</span>
        $alias_src_span_end = "</span>";
    }
    //build Schedule popup box
    $a_schedules =& $config['schedules']['schedule'];
开发者ID:Anasxrt,项目名称:core,代码行数:31,代码来源:firewall_rules.php

示例5: usersMenus

	include_once('ressources/class.system.nics.inc');
	
	$users=new usersMenus();
	if(!$users->AsSystemAdministrator){
		$tpl=new templates();
		$error=$tpl->javascript_parse_text("{ERROR_NO_PRIVS}");
		echo "alert('$error')";
		die();
	}
	
	if(isset($_GET["iptables"])){iptables_tabs();exit;}
	if(isset($_GET["iptables-table"])){iptables_table();exit;}
	if(isset($_GET["rules"])){rules();exit;}
	if(isset($_GET["ruleid"])){rule_js();exit;}
	if(isset($_GET["rule-tabs"])){rule_tab();exit;}
	if(isset($_GET["rule-popup"])){rule_popup();exit;}
	if(isset($_POST["isFW"])){isFW_save();exit;}
	if(isset($_POST["rule-save"])){rule_save();exit;}
	if(isset($_GET["groupname"])){groupname();exit;}
	if(isset($_POST["rule-order"])){rule_order();exit;}
	if(isset($_POST["rule-delete"])){rule_delete();exit;}
	if(isset($_POST["rule-enable"])){rule_enable();exit;}
	if(isset($_GET["rule-time"])){rule_time();exit;}
	if(isset($_POST["time-save"])){time_save();exit;}
	if(isset($_GET["generic"])){generic_tabs();exit;}
	if(isset($_POST["EnableArticaAsGateway"])){EnableArticaAsGateway_save();exit;}
	tabs();
	
function tabs(){
	if(GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)){return;}
	$page=CurrentPageName();
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:31,代码来源:system.firewall.php

示例6: foreach

<?php 
$i = 0;
foreach ($a_out as $natent) {
    $iconfn = "pass";
    $textss = $textse = "";
    if ($mode == "disabled" || $mode == "automatic" || isset($natent['disabled'])) {
        $textss = "<span class=\"gray\">";
        $textse = "</span>";
        $iconfn .= "_d";
    }
    //build Alias popup box
    $alias_src_span_begin = "";
    $alias_src_port_span_begin = "";
    $alias_dst_span_begin = "";
    $alias_dst_port_span_begin = "";
    $alias_popup = rule_popup($natent['source']['network'], pprint_port($natent['sourceport']), $natent['destination']['address'], pprint_port($natent['dstport']));
    $alias_src_span_begin = $alias_popup["src"];
    $alias_src_port_span_begin = $alias_popup["srcport"];
    $alias_dst_span_begin = $alias_popup["dst"];
    $alias_dst_port_span_begin = $alias_popup["dstport"];
    $alias_src_span_end = $alias_popup["src_end"];
    $alias_src_port_span_end = $alias_popup["srcport_end"];
    $alias_dst_span_end = $alias_popup["dst_end"];
    $alias_dst_port_span_end = $alias_popup["dstport_end"];
    ?>
				<tr valign="top" id="fr<?php 
    echo $i;
    ?>
">
					<td class="listt">
						<input type="checkbox" id="frc<?php 
开发者ID:mtisza,项目名称:pfsense,代码行数:31,代码来源:firewall_nat_out.php

示例7: pfBlockerNG_get_table

function pfBlockerNG_get_table($mode = '')
{
    global $pfb;
    $counter = 0;
    $dcounter = 1;
    $response = '';
    $pfb_table = pfBlockerNG_get_counts();
    if (!empty($pfb_table)) {
        foreach ($pfb_table as $pfb_alias => $values) {
            if (strpos($pfb_alias, 'DNSBL_') !== FALSE) {
                $alias_span = $alias_span_end = '';
                $packets = $values['packets'];
                $dnsbl = TRUE;
            } else {
                // Add firewall rules count associated with alias
                $values['img'] = $values['img'] . "<span title='Alias Firewall Rule count' ><small>({$values['rule']})</small></span>";
                // If packet fence errors found, display error.
                if ($pfb['pfctlerr']) {
                    $values['img'] = $pfb['err'];
                }
                // Alias table popup
                if ($values['count'] > 0 && $pfb['popup'] == 'on') {
                    $alias_popup = rule_popup($pfb_alias, '', '', '');
                    $alias_span = $alias_popup['src'];
                    $alias_span_end = $alias_popup['src_end'];
                } else {
                    $alias_span = $alias_span_end = '';
                }
                // Packet column pivot to Alerts Tab
                if ($values['packets'] > 0) {
                    $rules = rtrim($values['rules'], '|');
                    if ($values['packets'] > $pfb['maxpivot']) {
                        $aentries = $pfb['maxpivot'];
                    } else {
                        $aentries = $values['packets'];
                    }
                    $packets = "<a target=\"_blank\" href=\"/pfblockerng/pfblockerng_alerts.php?rule={$rules}&entries={$aentries}\" ";
                    $packets .= "title=\"Click to view these packets in Alerts tab\" >{$values['packets']}</a>";
                } else {
                    $packets = $values['packets'];
                }
            }
            if ($mode == 'js') {
                echo $response = "{$alias_span}{$pfb_alias}{$alias_span_end}||{$values['count']}||{$packets}||{$values['update']}||{$values['img']}\n";
            } else {
                // Print darker shading for DNSBL
                if ($dnsbl) {
                    $RowClass = $dcounter % 2 ? $pfb['RowEvenClass2'] : $pfb['RowOddClass'];
                    $dcounter++;
                } else {
                    $RowClass = $counter % 2 ? $pfb['RowEvenClass'] : $pfb['RowOddClass'];
                    $counter++;
                }
                echo " <tr {$RowClass}>\n\t\t\t\t\t<td class='listMRr ellipsis'>{$alias_span}{$pfb_alias}{$alias_span_end}</td>\n\t\t\t\t\t<td class='listMRr' align='center'>{$values['count']}</td>\n\t\t\t\t\t<td class='listMRr' sorttable_customkey='{$values['packets']}' align='center'>{$packets}</td>\n\t\t\t\t\t<td class='listMRr' align='center'>{$values['update']}</td>\n\t\t\t\t\t<td class='listMRr' align='center'>{$values['img']}</td>\n\t\t\t\t\t</tr>";
            }
        }
    }
}
开发者ID:KyleJohnstonNet,项目名称:pfsense-packages,代码行数:58,代码来源:pfblockerng.widget.php

示例8: usersMenus

	
	
	$user=new usersMenus();
	if($user->AsSquidAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	if(isset($_GET["parameters"])){parameters();exit;}
	if(isset($_GET["items"])){items_table();exit;}
	if(isset($_GET["items-search"])){items_search();exit;}
	if(isset($_POST["ENABLE"])){SaveParams();exit;}
	if(isset($_POST["main-rule-enable"])){rule_enable();exit;}
	if(isset($_POST["main-rule-delete"])){rule_delete();exit;}
	if(isset($_GET["main-rule-js"])){rule_js();exit;}
	if(isset($_GET["main-rule"])){rule_popup();exit;}
	if(isset($_POST["edit-www"])){rule_save();exit;}
	if(isset($_POST["apply-now"])){apply();exit;}
tabs();

function tabs(){
	$tpl=new templates();
	$page=CurrentPageName();
	
		$array["parameters"]="{parameters}";
		$array["items"]="{items}";
		$array["schedule"]="{schedule}";


	while (list ($num, $ligne) = each ($array) ){
		if($num=="schedule"){
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:29,代码来源:squid.cache.dynamic.rules.php


注:本文中的rule_popup函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。