本文整理汇总了PHP中have_ruleint_access函数的典型用法代码示例。如果您正苦于以下问题:PHP have_ruleint_access函数的具体用法?PHP have_ruleint_access怎么用?PHP have_ruleint_access使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了have_ruleint_access函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gettext
}
}
if ($config['l2tp']['mode'] == "server") {
if (have_ruleint_access("l2tp")) {
$iflist['l2tp'] = gettext("L2TP VPN");
}
}
if (is_array($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoes) {
if ($pppoes['mode'] == 'server' && have_ruleint_access("pppoe")) {
$iflist['pppoe'] = gettext("PPPoE Server");
}
}
}
/* add ipsec interfaces */
if (ipsec_enabled() && have_ruleint_access("enc0")) {
$iflist["enc0"] = gettext("IPsec");
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$iflist["openvpn"] = gettext("OpenVPN");
}
if (!$if || !isset($iflist[$if])) {
if ("any" == $if) {
$if = "FloatingRules";
} else {
if ("FloatingRules" != $if) {
if (isset($iflist['wan'])) {
$if = "wan";
} else {
$if = "FloatingRules";
示例2: gettext
echo "selected=\"selected\"";
}
?>
><?php
echo gettext("L2TP clients");
?>
</option>
<?php
}
?>
<?php
foreach ($ifdisp as $if => $ifdesc) {
?>
<?php
if (have_ruleint_access($if)) {
?>
<option value="<?php
echo $if;
?>
" <?php
if ($pconfig['dst'] == $if) {
echo "selected=\"selected\"";
}
?>
><?php
echo htmlspecialchars($ifdesc);
?>
<?php
echo gettext("net");
?>
示例3:
$interfaces['l2tp'] = "L2TP VPN";
}
}
if ($config['pptpd']['mode'] == "server") {
if (have_ruleint_access("pptp")) {
$interfaces['pptp'] = "PPTP VPN";
}
}
if ($config['pppoe']['mode'] == "server") {
if (have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
}
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) {
if (have_ruleint_access("enc0")) {
$interfaces["enc0"] = "IPsec";
}
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
}
foreach ($interfaces as $iface => $ifacename) {
?>
<option value="<?php
echo $iface;
?>
" <?php
if ($iface == $pconfig['interface']) {
echo "selected=\"selected\"";
示例4: elseif
$ruleType = 'network';
} elseif (is_ipaddrv6($pconfig[$type]) && $pconfig[$type . 'mask'] == 128 || is_ipaddrv4($pconfig[$type]) && $pconfig[$type . 'mask'] == 32 || is_alias($pconfig[$type])) {
$ruleType = 'single';
}
$ruleValues = array('any' => 'any', 'single' => 'Single host or alias', 'network' => 'Network');
if (isset($a_filter[$id]['floating']) || $if == "FloatingRules") {
$ruleValues['(self)'] = 'This Firewall (self)';
}
if (have_ruleint_access("pppoe")) {
$ruleValues['pppoe'] = 'PPPoE clients';
}
if (have_ruleint_access("l2tp")) {
$ruleValues['l2tp'] = 'L2TP clients';
}
foreach ($ifdisp as $ifent => $ifdesc) {
if (!have_ruleint_access($ifent)) {
continue;
}
$ruleValues[$ifent] = $ifdesc . ' net';
$ruleValues[$ifent . 'ip'] = $ifdesc . ' address';
}
$group->add(new Form_Select($type . 'type', $name . ' Type', $type == 'src' ? $pconfig['src'] : $pconfig['dst'], $ruleValues));
$group->add(new Form_IpAddress($type, $name . ' Address', $pconfig[$type]))->addMask($type . 'mask', $pconfig[$type . 'mask'])->setPattern('[0-9, a-z, A-Z and .');
$section->add($group);
if ($type == 'src') {
$section->addInput(new Form_Button('btnsrcadv', 'Show advanced'))->removeClass('btn-primary');
}
$portValues = ['' => '(other)', 'any' => 'any'];
foreach ($wkports as $port => $portName) {
$portValues[$port] = $portName . ' (' . $port . ')';
}
示例5: build_if_list
function build_if_list()
{
global $ifdisp;
foreach ($ifdisp as $if => $ifdesc) {
if (have_ruleint_access($if)) {
$interfaces[$if] = $ifdesc;
}
}
if ($config['l2tp']['mode'] == "server") {
if (have_ruleint_access("l2tp")) {
$interfaces['l2tp'] = "L2TP VPN";
}
}
if ($config['pppoe']['mode'] == "server") {
if (have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
}
}
/* add ipsec interfaces */
if (ipsec_enabled() && have_ruleint_access("enc0")) {
$interfaces["enc0"] = "IPsec";
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
}
return $interfaces;
}
示例6: build_if_list
function build_if_list()
{
global $config;
$iflist = array();
// add group interfaces
if (is_array($config['ifgroups']['ifgroupentry'])) {
foreach ($config['ifgroups']['ifgroupentry'] as $ifgen) {
if (have_ruleint_access($ifgen['ifname'])) {
$iflist[$ifgen['ifname']] = $ifgen['ifname'];
}
}
}
foreach (get_configured_interface_with_descr() as $ifent => $ifdesc) {
if (have_ruleint_access($ifent)) {
$iflist[$ifent] = $ifdesc;
}
}
if ($config['l2tp']['mode'] == "server" && have_ruleint_access("l2tp")) {
$iflist['l2tp'] = gettext('L2TP VPN');
}
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$iflist['pppoe'] = gettext("PPPoE Server");
}
// add ipsec interfaces
if (ipsec_enabled() && have_ruleint_access("enc0")) {
$iflist["enc0"] = gettext("IPsec");
}
// add openvpn/tun interfaces
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$iflist["openvpn"] = gettext("OpenVPN");
}
return $iflist;
}
示例7: build_if_list
function build_if_list()
{
$iflist = get_configured_interface_with_descr(false, true);
//$iflist = get_interface_list();
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc) {
$interfaces[$if] = $ifdesc;
}
if ($config['l2tp']['mode'] == "server") {
$interfaces['l2tp'] = "L2TP VPN";
}
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
$interfaces["enc0"] = "IPsec";
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
}
return $interfaces;
}
示例8: foreach
}
if (isset($config['pptpd']['mode']) && $config['pptpd']['mode'] == "server") {
if (have_ruleint_access("pptp")) {
$iflist['pptp'] = "PPTP VPN";
}
}
if (isset($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoes) {
if ($pppoes['mode'] == 'server' && have_ruleint_access('pppoe')) {
$iflist['pppoe'] = "PPPoE Server";
}
}
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
if (have_ruleint_access('enc0')) {
$iflist['enc0'] = 'IPsec';
}
}
/* add openvpn/tun interfaces */
if (isset($config['openvpn']['openvpn-server']) || isset($config['openvpn']['openvpn-client'])) {
$iflist['openvpn'] = 'OpenVPN';
}
if (!$if || !isset($iflist[$if])) {
if ("any" == $if) {
$if = "FloatingRules";
} else {
if ("FloatingRules" != $if) {
if (isset($iflist['wan'])) {
$if = "wan";
} else {
示例9: build_dsttype_list
function build_dsttype_list()
{
global $pconfig, $config, $ifdisp;
$sel = is_specialnet($pconfig['dst']);
$list = array('any' => 'Any', 'single' => 'Single host or alias', 'network' => 'Network', '(self)' => 'This Firewall (self)');
if (have_ruleint_access("pppoe")) {
$list['pppoe'] = 'PPPoE clients';
}
if (have_ruleint_access("l2tp")) {
$list['l2tp'] = 'L2TP clients';
}
foreach ($ifdisp as $if => $ifdesc) {
if (have_ruleint_access($if)) {
$list[$if] = $ifdesc;
$list[$if . 'ip'] = $ifdesc . ' address';
}
}
if (is_array($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $sn) {
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network") {
if (isset($sn['noexpand'])) {
continue;
}
$start = ip2long32(gen_subnet($sn['subnet'], $sn['subnet_bits']));
$end = ip2long32(gen_subnet_max($sn['subnet'], $sn['subnet_bits']));
$len = $end - $start;
for ($i = 0; $i <= $len; $i++) {
$snip = long2ip32($start + $i);
$list[$snip] = $snip . ' (' . $sn['descr'] . ')';
}
$list[$sn['subnet']] = $sn['subnet'] . ' (' . $sn['descr'] . ')';
} else {
$list[$sn['subnet']] = $sn['subnet'] . ' (' . $sn['descr'] . ')';
}
}
}
return $list;
}
示例10: get_configured_interface_with_descr
>*Any interface</option>
<?php
$iflist = get_configured_interface_with_descr(false, true);
//$iflist = get_interface_list();
// Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc) {
$interfaces[$if] = $ifdesc;
}
if ($config['l2tp']['mode'] == "server") {
$interfaces['l2tp'] = "L2TP VPN";
}
if ($config['pptpd']['mode'] == "server") {
$interfaces['pptp'] = "PPTP VPN";
}
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE VPN";
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
$interfaces["enc0"] = "IPsec";
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
}
foreach ($interfaces as $iface => $ifacename) {
?>
<option value="<?php
echo $iface;
?>
示例11: foreach
foreach ($config['ifgroups']['ifgroupentry'] as $ifgen) {
$iflist_tabs[$ifgen['ifname']] = $ifgen['ifname'];
}
}
foreach (get_configured_interface_with_descr() as $ifent => $ifdesc) {
$iflist_tabs[$ifent] = $ifdesc;
}
if (isset($config['l2tp']['mode']) && $config['l2tp']['mode'] == "server") {
$iflist_tabs['l2tp'] = "L2TP VPN";
}
if (isset($config['pptpd']['mode']) && $config['pptpd']['mode'] == "server") {
$iflist_tabs['pptp'] = "PPTP VPN";
}
if (isset($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoes) {
if ($pppoes['mode'] == 'server' && have_ruleint_access('pppoe')) {
$iflist_tabs['pppoe'] = "PPPoE Server";
}
}
}
/* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
$iflist_tabs['enc0'] = 'IPsec';
}
/* add openvpn/tun interfaces */
if (isset($config['openvpn']['openvpn-server']) || isset($config['openvpn']['openvpn-client'])) {
$iflist_tabs['openvpn'] = 'OpenVPN';
}
$tab_array = array();
foreach ($iflist_tabs as $ifent => $ifname) {
$active = false;