本文整理汇总了PHP中is_pppoe_server_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP is_pppoe_server_enabled函数的具体用法?PHP is_pppoe_server_enabled怎么用?PHP is_pppoe_server_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_pppoe_server_enabled函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formInterfaces
/**
* build array with interface options for this form
*/
function formInterfaces()
{
global $config;
$interfaces = array();
foreach (get_configured_interface_with_descr(false, true) as $if => $ifdesc) {
$interfaces[$if] = $ifdesc;
}
if (isset($config['l2tp']['mode']) && $config['l2tp']['mode'] == "server") {
$interfaces['l2tp'] = "L2TP VPN";
}
if (isset($config['pptpd']['mode']) && $config['pptpd']['mode'] == "server") {
$interfaces['pptp'] = "PPTP VPN";
}
if (is_pppoe_server_enabled()) {
$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 (isset($config['openvpn']['openvpn-server']) || isset($config['openvpn']['openvpn-client'])) {
$interfaces['openvpn'] = 'OpenVPN';
}
return $interfaces;
}
示例2: foreach
foreach ($ifdescs as $ifent => $ifdesc) {
if (have_ruleint_access($ifent)) {
$interfaces[$ifent] = $ifdesc;
}
}
if ($config['l2tp']['mode'] == "server") {
if (have_ruleint_access("l2tp")) {
$interfaces['l2tp'] = "L2TP VPN";
}
}
if ($config['pptpd']['mode'] == "server") {
if (have_ruleint_access("pptp")) {
$interfaces['pptp'] = "PPTP 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'])) {
if (have_ruleint_access("enc0")) {
$interfaces["enc0"] = "IPsec";
}
}
/* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
}
if (is_array($pconfig['interface'])) {
$pconfig['interface'] = implode(",", $pconfig['interface']);
}
示例3: 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;
}
示例4: 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;
}
示例5: switch
if (isset($ifdescs[$interface])) {
$selected_descs[] = $ifdescs[$interface];
} else {
switch ($interface) {
case 'l2tp':
if ($config['l2tp']['mode'] == 'server') {
$selected_descs[] = 'L2TP VPN';
}
break;
case 'pptp':
if ($config['pptpd']['mode'] == 'server') {
$selected_descs[] = 'PPTP VPN';
}
break;
case 'pppoe':
if (is_pppoe_server_enabled()) {
$selected_descs[] = 'PPPoE Server';
}
break;
case 'enc0':
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
$selected_descs[] = 'IPsec';
}
break;
case 'openvpn':
if ($config['openvpn']['openvpn-server'] || $config['openvpn']['openvpn-client']) {
$selected_descs[] = 'OpenVPN';
}
break;
default:
$selected_descs[] = $interface;