本文整理汇总了PHP中is_interface_wireless函数的典型用法代码示例。如果您正苦于以下问题:PHP is_interface_wireless函数的具体用法?PHP is_interface_wireless怎么用?PHP is_interface_wireless使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_interface_wireless函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_info_box
<?php
include "fbegin.inc";
?>
<form action="status_wireless.php" method="post">
<?php
if ($savemsg) {
print_info_box($savemsg);
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
foreach ($ciflist as $interface => $ifdescr) {
if (is_interface_wireless(get_real_interface($interface))) {
$enabled = false;
if ($if == $interface) {
$enabled = true;
}
$tab_array[] = array(gettext("Status") . " ({$ifdescr})", $enabled, "status_wireless.php?if={$interface}");
}
}
$rwlif = get_real_interface($if);
if ($_POST['rescanwifi'] != "") {
mwexec_bg("/sbin/ifconfig {$rwlif} scan 2>&1");
$savemsg = gettext("Rescan has been initiated in the background. Refresh this page in 10 seconds to see the results.");
}
if ($savemsg) {
print_info_box($savemsg);
}
示例2: get_wireless_channel_info
function get_wireless_channel_info($interface)
{
$wireless_channels = array();
$cloned_interface = get_real_interface($interface);
if ($cloned_interface && is_interface_wireless($cloned_interface)) {
$chan_list = "/sbin/ifconfig {$cloned_interface} list txpower";
$stack_list = "/usr/bin/awk -F\"Channel \" '{ gsub(/\\*/, \" \"); print \$2 \"\\\n\" \$3 }'";
$format_list = "/usr/bin/awk '{print \$1 \",\" \$3 \" \" \$4 \",\" \$5 \",\" \$7}'";
$interface_channels = "";
exec("{$chan_list} | {$stack_list} | sort -u | {$format_list} 2>&1", $interface_channels);
foreach ($interface_channels as $channel_line) {
$channel_line = explode(",", $channel_line);
if (!isset($wireless_channels[$channel_line[0]])) {
$wireless_channels[$channel_line[0]] = $channel_line;
}
}
}
return $wireless_channels;
}
示例3: get_configured_interface_with_descr
$ifdescrs = get_configured_interface_with_descr();
?>
<table class="table table-striped table-hover">
<?php
foreach ($ifdescrs as $ifdescr => $ifname) {
$ifinfo = get_interface_info($ifdescr);
if ($ifinfo['pppoelink'] || $ifinfo['pptplink'] || $ifinfo['l2tplink']) {
/* PPP link (non-cell) - looks like a modem */
$typeicon = 'hdd-o';
} else {
if ($ifinfo['ppplink']) {
/* PPP Link (usually cellular) */
$typeicon = 'signal';
} else {
if (is_interface_wireless($ifdescr)) {
/* Wi-Fi interface (hostap/client/etc) */
$typeicon = 'wifi';
} else {
/* Wired/other interface. */
$typeicon = 'sitemap';
}
}
}
$known_status = true;
// Choose an icon by interface status
if ($ifinfo['status'] == "up" || $ifinfo['status'] == "associated") {
$icon = 'arrow-up';
} elseif ($ifinfo['status'] == "no carrier") {
$icon = 'times-circle';
} elseif ($ifinfo['status'] == "down") {
示例4: get_configured_interface_with_descr
POSSIBILITY OF SUCH DAMAGE.
*/
$nocsrf = true;
require_once "guiconfig.inc";
require_once "pfsense-utils.inc";
require_once "functions.inc";
require_once "widgets/include/interfaces.inc";
$i = 0;
$ifdescrs = get_configured_interface_with_descr();
?>
<table class="table table-striped">
<?php
foreach ($ifdescrs as $ifdescr => $ifname) {
$ifinfo = get_interface_info($ifdescr);
$iswireless = is_interface_wireless($ifdescr);
?>
<tr>
<td class="vncellt" >
<?php
if ($ifinfo['ppplink']) {
?>
<span alt="3g" class="glyphicon glyphicon-phone text-success"></span> <?php
} elseif ($iswireless) {
if ($ifinfo['status'] == "associated") {
?>
<span alt="wlan" class="glyphicon glyphicon-signal text-success"></span>
<?php
} else {
?>
<span alt="wlan_d" class="glyphicon glyphicon-signal text-danger"></span>