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


PHP interfaces_ptpid_next函数代码示例

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


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

示例1: base64_decode

            // End force pppoe reset at specific time
            // End if type == pppoe
        } else {
            if ($a_ppps[$pppid]['type'] == "pptp" || $a_ppps[$pppid]['type'] == "l2tp") {
                $pconfig['pptp_username'] = $a_ppps[$pppid]['username'];
                $pconfig['pptp_password'] = base64_decode($a_ppps[$pppid]['password']);
                $pconfig['pptp_localip'] = explode(",", $a_ppps[$pppid]['localip']);
                $pconfig['pptp_subnet'] = explode(",", $a_ppps[$pppid]['subnet']);
                $pconfig['pptp_remote'] = explode(",", $a_ppps[$pppid]['gateway']);
                $pconfig['pptp_dialondemand'] = isset($a_ppps[$pppid]['ondemand']);
                $pconfig['pptp_idletimeout'] = $a_ppps[$pppid]['timeout'];
            }
        }
    }
} else {
    $pconfig['ptpid'] = interfaces_ptpid_next();
    $pppid = count($a_ppps);
}
$pconfig['dhcphostname'] = $wancfg['dhcphostname'];
$pconfig['alias-address'] = $wancfg['alias-address'];
$pconfig['alias-subnet'] = $wancfg['alias-subnet'];
$pconfig['dhcprejectfrom'] = $wancfg['dhcprejectfrom'];
$pconfig['adv_dhcp_pt_timeout'] = $wancfg['adv_dhcp_pt_timeout'];
$pconfig['adv_dhcp_pt_retry'] = $wancfg['adv_dhcp_pt_retry'];
$pconfig['adv_dhcp_pt_select_timeout'] = $wancfg['adv_dhcp_pt_select_timeout'];
$pconfig['adv_dhcp_pt_reboot'] = $wancfg['adv_dhcp_pt_reboot'];
$pconfig['adv_dhcp_pt_backoff_cutoff'] = $wancfg['adv_dhcp_pt_backoff_cutoff'];
$pconfig['adv_dhcp_pt_initial_interval'] = $wancfg['adv_dhcp_pt_initial_interval'];
$pconfig['adv_dhcp_pt_values'] = $wancfg['adv_dhcp_pt_values'];
$pconfig['adv_dhcp_send_options'] = $wancfg['adv_dhcp_send_options'];
$pconfig['adv_dhcp_request_options'] = $wancfg['adv_dhcp_request_options'];
开发者ID:simudream,项目名称:pfsense,代码行数:31,代码来源:interfaces.php

示例2: get_parent_interface

                 $port_data[$field_label][] = $_POST[$field_label . $iface];
                 $pconfig[$field_label][$iface] = $_POST[$field_label . $iface];
                 $parent_array = get_parent_interface($iface);
                 $parent = $parent_array[0];
                 $friendly = convert_real_interface_to_friendly_interface_name($parent);
                 if ($field_label == "mtu" && isset($config['interfaces'][$friendly]['mtu']) && $_POST[$field_label . $iface] > $config['interfaces'][$friendly]['mtu'] - 8) {
                     $input_errors[] = sprintf(gettext("The MTU (%d) is too big for %s (maximum allowed with current settings: %d)."), $_POST[$field_label . $iface], $iface, $config['interfaces'][$friendly]['mtu'] - 8);
                 }
             }
         }
     }
 }
 if (!$input_errors) {
     $ppp = array();
     if (!isset($id)) {
         $ppp['ptpid'] = interfaces_ptpid_next();
     } else {
         $ppp['ptpid'] = $a_ppps[$id]['ptpid'];
     }
     $ppp['type'] = $_POST['type'];
     $ppp['if'] = $ppp['type'] . $ppp['ptpid'];
     $ppp['ports'] = implode(',', $_POST['interfaces']);
     $ppp['username'] = $_POST['username'];
     if ($_POST['passwordfld'] != DMYPWD) {
         $ppp['password'] = base64_encode($_POST['passwordfld']);
     } else {
         $ppp['password'] = $a_ppps[$id]['password'];
     }
     $ppp['ondemand'] = $_POST['ondemand'] ? true : false;
     if (!empty($_POST['idletimeout'])) {
         $ppp['idletimeout'] = $_POST['idletimeout'];
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:31,代码来源:interfaces_ppps_edit.php


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