本文整理汇总了PHP中get_configured_ip_aliases_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_configured_ip_aliases_list函数的具体用法?PHP get_configured_ip_aliases_list怎么用?PHP get_configured_ip_aliases_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_configured_ip_aliases_list函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gettext
</tr>
<tr id="serverbridge_interface">
<td width="22%" ><a id="help_for_serverbridge_interface" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?php
echo gettext("Bridge Interface");
?>
</td>
<td>
<select name="serverbridge_interface" class="form-control">
<?php
$serverbridge_interface['none'] = "none";
$serverbridge_interface = array_merge($serverbridge_interface, get_configured_interface_with_descr());
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
$serverbridge_interface[$cif . '|' . $carpip] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif) {
$serverbridge_interface[$aliasif . '|' . $aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
}
foreach ($serverbridge_interface as $iface => $ifacename) {
$selected = "";
if ($iface == $pconfig['serverbridge_interface']) {
$selected = "selected=\"selected\"";
}
?>
<option value="<?php
echo $iface;
?>
" <?php
echo $selected;
?>
示例2: build_interface_list
function build_interface_list()
{
global $pconfig;
$iflist = array('options' => array(), 'selected' => array());
$interfaces = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
$interfaces[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif) {
$interfaces[$aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
}
$size = count($interfaces) < 10 ? count($interfaces) : 10;
foreach ($interfaces as $iface => $ifacename) {
if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface)) {
continue;
}
$iflist['options'][$iface] = $ifacename;
if (in_array($iface, $pconfig['interface'])) {
array_push($iflist['selected'], $iface);
}
}
return $iflist;
}
示例3: build_bridge_list
function build_bridge_list()
{
$list = array();
$serverbridge_interface['none'] = "none";
$serverbridge_interface = array_merge($serverbridge_interface, get_configured_interface_with_descr());
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
$serverbridge_interface[$cif . '|' . $carpip] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif) {
$serverbridge_interface[$aliasif . '|' . $aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
}
foreach ($serverbridge_interface as $iface => $ifacename) {
$list[$iface] = htmlspecialchars($ifacename);
}
return $list;
}
示例4: build_if_list
function build_if_list()
{
$list = array();
$interfaces = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
$interfaces[$cif . '|' . $carpip] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif) {
$interfaces[$aliasif . '|' . $aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
}
$grouplist = return_gateway_groups_array();
foreach ($grouplist as $name => $group) {
if ($group['ipprotocol'] != inet) {
continue;
}
if ($group[0]['vip'] != "") {
$vipif = $group[0]['vip'];
} else {
$vipif = $group[0]['int'];
}
$interfaces[$name] = "GW Group {$name}";
}
$interfaces['lo0'] = "Localhost";
$interfaces['any'] = "any";
foreach ($interfaces as $iface => $ifacename) {
$list[$iface] = $ifacename;
}
return $list;
}
示例5: build_interface_list
function build_interface_list()
{
$interfaces = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
$interfaces[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
}
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif) {
$interfaces[$aliasip] = $aliasip . " (" . get_vip_descr($aliasip) . ")";
}
$grouplist = return_gateway_groups_array();
foreach ($grouplist as $name => $group) {
if ($group[0]['vip'] != "") {
$vipif = $group[0]['vip'];
} else {
$vipif = $group[0]['int'];
}
$interfaces[$name] = "GW Group {$name}";
}
return $interfaces;
}