Add include wifi_functions getWifiInterface()

This commit is contained in:
billz 2020-06-07 17:17:16 +01:00
parent a1940ae8f2
commit a6a92235f9
4 changed files with 10 additions and 15 deletions

View file

@ -2,7 +2,6 @@
require_once 'includes/status_messages.php';
require_once 'includes/wifi_functions.php';
require_once 'includes/hostapd.php';
/**
*
@ -13,6 +12,7 @@ function DisplayWPAConfig()
$status = new StatusMessages();
$networks = [];
getWifiInterface();
knownWifiStations($networks);
if (isset($_POST['connect'])) {

View file

@ -1,14 +1,14 @@
<?php
require_once 'config.php';
require_once 'hostapd.php';
require_once 'includes/config.php';
require_once 'includes/wifi_functions.php';
/**
* Show dashboard page.
*/
function DisplayDashboard(&$extraFooterScripts)
{
getWifiInterface();
$status = new StatusMessages();
// Need this check interface name for proper shell execution.
if (!preg_match('/^([a-zA-Z0-9]+)$/', $_SESSION['client_iface'])) {

View file

@ -2,16 +2,9 @@
require_once 'includes/status_messages.php';
require_once 'app/lib/system.php';
require_once 'config.php';
require_once 'includes/wifi_functions.php';
if (empty($_SESSION['client_iface'])) {
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
if (isset($arrHostapdConf['WifiInterface'])) {
$_SESSION['client_iface'] = $arrHostapdConf['WifiInterface'];
} else { // fallback to default
$_SESSSION['client_iface'] = RASPI_WIFI_CLIENT_INTERFACE;
}
}
getWifiInterface();
/**
*

View file

@ -1,8 +1,10 @@
<?php
require_once 'includes/status_messages.php';
require_once 'includes/hostapd.php';
require_once 'config.php';
require_once 'includes/config.php';
require_once 'includes/wifi_functions.php';
getWifiInterface();
/**
* Manage OpenVPN configuration