• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP handle_pppoe_reset函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: intval

         $wancfg['ipaddrv6'] = "track6";
         $wancfg['track6-interface'] = $_POST['track6-interface'];
         if ($_POST['track6-prefix-id--hex'] === "") {
             $wancfg['track6-prefix-id'] = 0;
         } else {
             if (is_numeric("0x" . $_POST['track6-prefix-id--hex'])) {
                 $wancfg['track6-prefix-id'] = intval($_POST['track6-prefix-id--hex'], 16);
             } else {
                 $wancfg['track6-prefix-id'] = 0;
             }
         }
         break;
     case "none":
         break;
 }
 handle_pppoe_reset($_POST);
 if ($_POST['blockpriv'] == "yes") {
     $wancfg['blockpriv'] = true;
 } else {
     unset($wancfg['blockpriv']);
 }
 if ($_POST['blockbogons'] == "yes") {
     $wancfg['blockbogons'] = true;
 } else {
     unset($wancfg['blockbogons']);
 }
 $wancfg['spoofmac'] = $_POST['spoofmac'];
 if (empty($_POST['mtu'])) {
     unset($wancfg['mtu']);
 } else {
     $wancfg['mtu'] = $_POST['mtu'];
开发者ID:simudream,项目名称:pfsense,代码行数:31,代码来源:interfaces.php


示例2: kill_dhclient_process

 }
 // save interface details
 $a_interfaces[$if] = $new_config;
 if (!empty($old_config['ipaddr']) && $old_config['ipaddr'] == 'dhcp' && $new_config['ipaddr'] != 'dhcp') {
     // change from dhcp to something else, kill dhclient
     kill_dhclient_process($old_config['if']);
 }
 if (!empty($old_config['ipaddrv6']) && $old_config['ipaddrv6'] == 'dhcp6' && $new_config['ipaddrv6'] != 'dhcp6') {
     // change from dhcp to something else, kill dhcp6c
     $pid = find_dhcp6c_process($old_config['if']);
     if ($pid) {
         exec('/bin/kill ' . $pid);
     }
 }
 // yak... room for improvement here....
 handle_pppoe_reset($pconfig);
 // save to config
 write_config();
 // log changes for apply action
 // (it would be better to diff the physical situation with the new config for changes)
 if (file_exists('/tmp/.interfaces.apply')) {
     $toapplylist = unserialize(file_get_contents('/tmp/.interfaces.apply'));
 } else {
     $toapplylist = array();
 }
 $old_config['realif'] = get_real_interface($if);
 $toapplylist[$if]['ifcfg'] = $old_config;
 $toapplylist[$if]['ppps'] = $old_ppps;
 file_put_contents('/tmp/.interfaces.apply', serialize($toapplylist));
 mark_subsystem_dirty('interfaces');
 /* regenerate cron settings/crontab file */
开发者ID:paudam,项目名称:opnsense-core,代码行数:31,代码来源:interfaces.php


示例3: foreach

        return false;
    }
    foreach ($iflist as $if) {
        if ($config['interfaces'][$if]['if'] == $config['ppps']['ppp'][$num]['if']) {
            return true;
        }
    }
    return false;
}
if ($_GET['act'] == "del") {
    /* check if still in use */
    if (ppp_inuse($_GET['id'])) {
        $input_errors[] = gettext("This point-to-point link cannot be deleted because it is still being used as an interface.");
    } elseif (is_array($config['ppps']['ppp']) && is_array($config['ppps']['ppp'][$_GET['id']])) {
        unset($config['ppps']['ppp'][$_GET['id']]['pppoe-reset-type']);
        handle_pppoe_reset($config['ppps']['ppp'][$_GET['id']]);
        unset($config['ppps']['ppp'][$_GET['id']]);
        write_config();
        header("Location: interfaces_ppps.php");
        exit;
    }
}
if (!is_array($config['ppps']['ppp'])) {
    $config['ppps']['ppp'] = array();
}
$a_ppps = $config['ppps']['ppp'];
$pgtitle = array(gettext("Interfaces"), gettext("PPPs"));
$shortcut_section = "interfaces";
include "head.inc";
$tab_array = array();
$tab_array[] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
开发者ID:hexaclock,项目名称:pfsense,代码行数:31,代码来源:interfaces_ppps.php


示例4: array

}
if (!isset($config['ppps']['ppp']) || !is_array($config['ppps']['ppp'])) {
    $a_ppps = array();
} else {
    $a_ppps =& $config['ppps']['ppp'];
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if (!empty($a_ppps[$_POST['id']])) {
        $id = $_POST['id'];
    }
    if (!empty($_POST['action']) && $_POST['action'] == "del" && isset($id)) {
        if (ppp_inuse($a_ppps[$id]['if'])) {
            $input_errors[] = gettext("This point-to-point link cannot be deleted because it is still being used as an interface.");
        } else {
            unset($a_ppps[$id]['pppoe-reset-type']);
            handle_pppoe_reset($a_ppps[$id]);
            unset($a_ppps[$id]);
            write_config();
            header("Location: interfaces_ppps.php");
            exit;
        }
    }
}
include "head.inc";
legacy_html_escape_form_data($a_ppps);
$main_buttons = array(array('href' => 'interfaces_ppps_edit.php', 'label' => gettext('Add')));
?>
<body>
  <script type="text/javascript">
  $( document ).ready(function() {
    // link delete buttons
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:interfaces_ppps.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP handle_uploaded_document函数代码示例发布时间:2022-05-15
下一篇:
PHP handle_other_cat函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap