diff --git a/includes/about.php b/includes/about.php index d675619a..cb5d10b5 100755 --- a/includes/about.php +++ b/includes/about.php @@ -7,5 +7,5 @@ */ function DisplayAbout() { - echo renderTemplate("about"); + echo renderTemplate("about"); } diff --git a/includes/configure_client.php b/includes/configure_client.php index dbb384e2..48526439 100755 --- a/includes/configure_client.php +++ b/includes/configure_client.php @@ -46,7 +46,7 @@ function DisplayWPAConfig() fwrite($wpa_file, "network={".PHP_EOL); fwrite($wpa_file, "\tssid=\"".$ssid."\"".PHP_EOL); fwrite($wpa_file, "\tkey_mgmt=NONE".PHP_EOL); - fwrite($wpa_file, "\tscan_ssid=1".PHP_EOL); + fwrite($wpa_file, "\tscan_ssid=1".PHP_EOL); if (array_key_exists('priority', $network)) { fwrite($wpa_file, "\tpriority=".$network['priority'].PHP_EOL); } @@ -96,5 +96,4 @@ function DisplayWPAConfig() connectedWifiStations($networks); echo renderTemplate("configure_client", compact("status")); - } diff --git a/includes/csrf.php b/includes/csrf.php index 1977dca4..79c68a72 100644 --- a/includes/csrf.php +++ b/includes/csrf.php @@ -4,5 +4,5 @@ include_once('functions.php'); include_once('session.php'); if (csrfValidateRequest() && !CSRFValidate()) { - handleInvalidCSRFToken(); + handleInvalidCSRFToken(); } diff --git a/includes/dashboard.php b/includes/dashboard.php index 6a751c0d..82c93cc2 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -33,12 +33,12 @@ function DisplayDashboard() $ipv4Addrs = _('No IPv4 Address Found'); } else { foreach ($matchesIpv4AddrAndSubnet as $inet) { - $address = $inet[1]; - $suffix = (int) $inet[2]; - $netmask = long2ip(-1 << (32 - $suffix)); + $address = $inet[1]; + $suffix = (int) $inet[2]; + $netmask = long2ip(-1 << (32 - $suffix)); - $ipv4Addrs .= " $address"; - $ipv4Netmasks .= " $netmask"; + $ipv4Addrs .= " $address"; + $ipv4Netmasks .= " $netmask"; } $ipv4Addrs = trim($ipv4Addrs); $ipv4Netmasks = trim($ipv4Netmasks); @@ -173,12 +173,21 @@ function DisplayDashboard() echo renderTemplate("dashboard", compact( "status", - "ipv4Addrs", "ipv4Netmasks", - "ipv6Addrs", "macAddr", - "strRxPackets", "strRxBytes", - "strTxPackets", "strTxBytes", - "connectedSSID", "connectedBSSID", - "bitrate", "signalLevel", "txPower", "frequency", "strLinkQuality", + "ipv4Addrs", + "ipv4Netmasks", + "ipv6Addrs", + "macAddr", + "strRxPackets", + "strRxBytes", + "strTxPackets", + "strTxBytes", + "connectedSSID", + "connectedBSSID", + "bitrate", + "signalLevel", + "txPower", + "frequency", + "strLinkQuality", "wlan0up" )); } @@ -213,4 +222,3 @@ function getHumanReadableDatasize($numbytes, $precision = 2) return $humanDatasize; } - diff --git a/includes/dhcp.php b/includes/dhcp.php index 7536cca0..085239c4 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -138,10 +138,17 @@ function DisplayDHCPConfig() echo renderTemplate("dhcp", compact( "status", "serviceStatus", - "RangeStart", "RangeEnd", + "RangeStart", + "RangeEnd", "arrRangeLeaseTime", - "mselected", "hselected", "dselected", "infiniteselected", - "dnsmasq_state", "conf", "dhcpHost", - "interfaces", "leases" + "mselected", + "hselected", + "dselected", + "infiniteselected", + "dnsmasq_state", + "conf", + "dhcpHost", + "interfaces", + "leases" )); } diff --git a/includes/functions.php b/includes/functions.php index 75a6c3cd..ab1b324e 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -116,8 +116,8 @@ function CSRFValidate() */ function csrfValidateRequest() { - $request_method = strtolower($_SERVER['REQUEST_METHOD']); - return in_array($request_method, [ "post", "put", "patch", "delete" ]); + $request_method = strtolower($_SERVER['REQUEST_METHOD']); + return in_array($request_method, [ "post", "put", "patch", "delete" ]); } /** @@ -194,7 +194,9 @@ function ParseConfig($arrConfig) $config = array(); foreach ($arrConfig as $line) { $line = trim($line); - if ($line == "" || $line[0] == "#") { continue; } + if ($line == "" || $line[0] == "#") { + continue; + } list($option, $value) = array_map("trim", explode("=", $line, 2)); @@ -384,14 +386,14 @@ function DisplayOpenVPNConfig() } else { echo '' , PHP_EOL; } -?> + ?>
- + ?>