mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
Changed routing system to use the more common path approach instead of query strings.
This commit is contained in:
parent
557cd260e6
commit
6966bc7f3a
18 changed files with 117 additions and 50 deletions
|
@ -145,8 +145,11 @@ function setCSRFTokenHeader(event, xhr, settings) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function contentLoaded() {
|
function contentLoaded() {
|
||||||
pageCurrent = window.location.href.split("?")[1].split("=")[1];
|
//pageCurrent = window.location.href.split("?")[1].split("=")[1];
|
||||||
pageCurrent = pageCurrent.replace("#","");
|
//pageCurrent = pageCurrent.replace("#","");
|
||||||
|
|
||||||
|
pageCurrent = window.location.href.split("/").pop();
|
||||||
|
|
||||||
switch(pageCurrent) {
|
switch(pageCurrent) {
|
||||||
case "network_conf":
|
case "network_conf":
|
||||||
getAllInterfaces();
|
getAllInterfaces();
|
||||||
|
|
9
config/50-raspap-router.conf
Normal file
9
config/50-raspap-router.conf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
server.modules += (
|
||||||
|
"mod_rewrite",
|
||||||
|
)
|
||||||
|
|
||||||
|
$HTTP["url"] =~ "^/(?!(dist|app|ajax)).*" {
|
||||||
|
url.rewrite-once = (
|
||||||
|
"^/[^\?]*(\?.*)?" => "/index.php$1"
|
||||||
|
)
|
||||||
|
}
|
61
index.php
61
index.php
|
@ -48,7 +48,8 @@ require_once 'includes/openvpn.php';
|
||||||
require_once 'includes/torproxy.php';
|
require_once 'includes/torproxy.php';
|
||||||
|
|
||||||
$output = $return = 0;
|
$output = $return = 0;
|
||||||
$page = $_GET['page'];
|
//$page = $_GET['page'];
|
||||||
|
$page = $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
$theme_url = getThemeOpt();
|
$theme_url = getThemeOpt();
|
||||||
$toggleState = getSidebarState();
|
$toggleState = getSidebarState();
|
||||||
|
@ -107,7 +108,7 @@ $bridgedEnabled = getBridgedState();
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo (isset($toggleState)) ? $toggleState : null ; ?>" id="accordionSidebar">
|
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo (isset($toggleState)) ? $toggleState : null ; ?>" id="accordionSidebar">
|
||||||
<!-- Sidebar - Brand -->
|
<!-- Sidebar - Brand -->
|
||||||
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php?page=wlan0_info">
|
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="wlan0_info">
|
||||||
<div class="sidebar-brand-text ml-1"><?php echo RASPI_BRAND_TEXT; ?></div>
|
<div class="sidebar-brand-text ml-1"><?php echo RASPI_BRAND_TEXT; ?></div>
|
||||||
</a>
|
</a>
|
||||||
<!-- Divider -->
|
<!-- Divider -->
|
||||||
|
@ -130,65 +131,65 @@ $bridgedEnabled = getBridgedState();
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=wlan0_info"><i class="fas fa-tachometer-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("Dashboard"); ?></span></a>
|
<a class="nav-link" href="wlan0_info"><i class="fas fa-tachometer-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("Dashboard"); ?></span></a>
|
||||||
</li>
|
</li>
|
||||||
<?php if (RASPI_HOTSPOT_ENABLED) : ?>
|
<?php if (RASPI_HOTSPOT_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=hostapd_conf"><i class="far fa-dot-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("Hotspot"); ?></a>
|
<a class="nav-link" href="hostapd_conf"><i class="far fa-dot-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("Hotspot"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_DHCP_ENABLED && !$bridgedEnabled) : ?>
|
<?php if (RASPI_DHCP_ENABLED && !$bridgedEnabled) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=dhcpd_conf"><i class="fas fa-exchange-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("DHCP Server"); ?></a>
|
<a class="nav-link" href="dhcpd_conf"><i class="fas fa-exchange-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("DHCP Server"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_ADBLOCK_ENABLED && !$bridgedEnabled) : ?>
|
<?php if (RASPI_ADBLOCK_ENABLED && !$bridgedEnabled) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=adblock_conf"><i class="far fa-hand-paper fa-fw mr-2"></i><span class="nav-label"><?php echo _("Ad Blocking"); ?></a>
|
<a class="nav-link" href="adblock_conf"><i class="far fa-hand-paper fa-fw mr-2"></i><span class="nav-label"><?php echo _("Ad Blocking"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_NETWORK_ENABLED) : ?>
|
<?php if (RASPI_NETWORK_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=network_conf"><i class="fas fa-network-wired fa-fw mr-2"></i><span class="nav-label"><?php echo _("Networking"); ?></a>
|
<a class="nav-link" href="network_conf"><i class="fas fa-network-wired fa-fw mr-2"></i><span class="nav-label"><?php echo _("Networking"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_WIFICLIENT_ENABLED && !$bridgedEnabled) : ?>
|
<?php if (RASPI_WIFICLIENT_ENABLED && !$bridgedEnabled) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=wpa_conf"><i class="fas fa-wifi fa-fw mr-2"></i><span class="nav-label"><?php echo _("WiFi client"); ?></span></a>
|
<a class="nav-link" href="wpa_conf"><i class="fas fa-wifi fa-fw mr-2"></i><span class="nav-label"><?php echo _("WiFi client"); ?></span></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_OPENVPN_ENABLED) : ?>
|
<?php if (RASPI_OPENVPN_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=openvpn_conf"><i class="fas fa-key fa-fw mr-2"></i><span class="nav-label"><?php echo _("OpenVPN"); ?></a>
|
<a class="nav-link" href="openvpn_conf"><i class="fas fa-key fa-fw mr-2"></i><span class="nav-label"><?php echo _("OpenVPN"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_TORPROXY_ENABLED) : ?>
|
<?php if (RASPI_TORPROXY_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=torproxy_conf"><i class="fas fa-eye-slash fa-fw mr-2"></i><span class="nav-label"><?php echo _("TOR proxy"); ?></a>
|
<a class="nav-link" href="torproxy_conf"><i class="fas fa-eye-slash fa-fw mr-2"></i><span class="nav-label"><?php echo _("TOR proxy"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_CONFAUTH_ENABLED) : ?>
|
<?php if (RASPI_CONFAUTH_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=auth_conf"><i class="fas fa-user-lock fa-fw mr-2"></i><span class="nav-label"><?php echo _("Authentication"); ?></a>
|
<a class="nav-link" href="auth_conf"><i class="fas fa-user-lock fa-fw mr-2"></i><span class="nav-label"><?php echo _("Authentication"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_CHANGETHEME_ENABLED) : ?>
|
<?php if (RASPI_CHANGETHEME_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=theme_conf"><i class="fas fa-paint-brush fa-fw mr-2"></i><span class="nav-label"><?php echo _("Change Theme"); ?></a>
|
<a class="nav-link" href="theme_conf"><i class="fas fa-paint-brush fa-fw mr-2"></i><span class="nav-label"><?php echo _("Change Theme"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_VNSTAT_ENABLED) : ?>
|
<?php if (RASPI_VNSTAT_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=data_use"><i class="fas fa-chart-bar fa-fw mr-2"></i><span class="nav-label"><?php echo _("Data usage"); ?></a>
|
<a class="nav-link" href="data_use"><i class="fas fa-chart-bar fa-fw mr-2"></i><span class="nav-label"><?php echo _("Data usage"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (RASPI_SYSTEM_ENABLED) : ?>
|
<?php if (RASPI_SYSTEM_ENABLED) : ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=system_info"><i class="fas fa-cube fa-fw mr-2"></i><span class="nav-label"><?php echo _("System"); ?></a>
|
<a class="nav-link" href="system_info"><i class="fas fa-cube fa-fw mr-2"></i><span class="nav-label"><?php echo _("System"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="index.php?page=about"><i class="fas fa-info-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("About RaspAP"); ?></a>
|
<a class="nav-link" href="about"><i class="fas fa-info-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("About RaspAP"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<!-- Divider -->
|
<!-- Divider -->
|
||||||
<hr class="sidebar-divider d-none d-md-block">
|
<hr class="sidebar-divider d-none d-md-block">
|
||||||
|
@ -218,7 +219,7 @@ $bridgedEnabled = getBridgedState();
|
||||||
<div class="topbar-divider d-none d-sm-block"></div>
|
<div class="topbar-divider d-none d-sm-block"></div>
|
||||||
<!-- Nav Item - User -->
|
<!-- Nav Item - User -->
|
||||||
<li class="nav-item dropdown no-arrow">
|
<li class="nav-item dropdown no-arrow">
|
||||||
<a class="nav-link" href="index.php?page=auth_conf">
|
<a class="nav-link" href="auth_conf">
|
||||||
<span class="mr-2 d-none d-lg-inline small"><?php echo htmlspecialchars($config['admin_user'], ENT_QUOTES); ?></span>
|
<span class="mr-2 d-none d-lg-inline small"><?php echo htmlspecialchars($config['admin_user'], ENT_QUOTES); ?></span>
|
||||||
<i class="fas fa-user-circle fa-3x"></i>
|
<i class="fas fa-user-circle fa-3x"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -232,46 +233,46 @@ $bridgedEnabled = getBridgedState();
|
||||||
$extraFooterScripts = array();
|
$extraFooterScripts = array();
|
||||||
// handle page actions
|
// handle page actions
|
||||||
switch ($page) {
|
switch ($page) {
|
||||||
case "wlan0_info":
|
case "/wlan0_info":
|
||||||
DisplayDashboard($extraFooterScripts);
|
DisplayDashboard($extraFooterScripts);
|
||||||
break;
|
break;
|
||||||
case "dhcpd_conf":
|
case "/dhcpd_conf":
|
||||||
DisplayDHCPConfig();
|
DisplayDHCPConfig();
|
||||||
break;
|
break;
|
||||||
case "wpa_conf":
|
case "/wpa_conf":
|
||||||
DisplayWPAConfig();
|
DisplayWPAConfig();
|
||||||
break;
|
break;
|
||||||
case "network_conf":
|
case "/network_conf":
|
||||||
DisplayNetworkingConfig();
|
DisplayNetworkingConfig();
|
||||||
break;
|
break;
|
||||||
case "hostapd_conf":
|
case "/hostapd_conf":
|
||||||
DisplayHostAPDConfig();
|
DisplayHostAPDConfig();
|
||||||
break;
|
break;
|
||||||
case "adblock_conf":
|
case "/adblock_conf":
|
||||||
DisplayAdBlockConfig();
|
DisplayAdBlockConfig();
|
||||||
break;
|
break;
|
||||||
case "openvpn_conf":
|
case "/openvpn_conf":
|
||||||
DisplayOpenVPNConfig();
|
DisplayOpenVPNConfig();
|
||||||
break;
|
break;
|
||||||
case "torproxy_conf":
|
case "/torproxy_conf":
|
||||||
DisplayTorProxyConfig();
|
DisplayTorProxyConfig();
|
||||||
break;
|
break;
|
||||||
case "auth_conf":
|
case "/auth_conf":
|
||||||
DisplayAuthConfig($config['admin_user'], $config['admin_pass']);
|
DisplayAuthConfig($config['admin_user'], $config['admin_pass']);
|
||||||
break;
|
break;
|
||||||
case "save_hostapd_conf":
|
case "/save_hostapd_conf":
|
||||||
SaveTORAndVPNConfig();
|
SaveTORAndVPNConfig();
|
||||||
break;
|
break;
|
||||||
case "theme_conf":
|
case "/theme_conf":
|
||||||
DisplayThemeConfig($extraFooterScripts);
|
DisplayThemeConfig($extraFooterScripts);
|
||||||
break;
|
break;
|
||||||
case "data_use":
|
case "/data_use":
|
||||||
DisplayDataUsage($extraFooterScripts);
|
DisplayDataUsage($extraFooterScripts);
|
||||||
break;
|
break;
|
||||||
case "system_info":
|
case "/system_info":
|
||||||
DisplaySystem();
|
DisplaySystem();
|
||||||
break;
|
break;
|
||||||
case "about":
|
case "/about":
|
||||||
DisplayAbout();
|
DisplayAbout();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -169,7 +169,15 @@ function _create_raspap_directories() {
|
||||||
# Create a directory to store networking configs
|
# Create a directory to store networking configs
|
||||||
echo "Creating $raspap_dir/networking"
|
echo "Creating $raspap_dir/networking"
|
||||||
sudo mkdir -p "$raspap_dir/networking"
|
sudo mkdir -p "$raspap_dir/networking"
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
# Copy existing dhcpcd.conf to use as base config
|
||||||
|
echo "Adding /etc/dhcpcd.conf as base configuration"
|
||||||
|
cat /etc/dhcpcd.conf | sudo tee -a "$raspap_dir/networking/defaults" > /dev/null
|
||||||
|
echo "Changing file ownership of $raspap_dir"
|
||||||
|
sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || _install_status 1 "Unable to change file ownership for '$raspap_dir'"
|
||||||
|
>>>>>>> 26d0dbfe... Changed routing system to use the more common path approach instead of query strings.
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate hostapd logging and service control scripts
|
# Generate hostapd logging and service control scripts
|
||||||
|
@ -202,6 +210,20 @@ function _create_lighttpd_scripts() {
|
||||||
_install_status 0
|
_install_status 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Copy extra config files required to configure lighthttpd
|
||||||
|
function _install_lighttpd_configs() {
|
||||||
|
_install_log "Copying lighttpd extra config files"
|
||||||
|
|
||||||
|
# Copy config files
|
||||||
|
echo "Copying 50-raspap-router.conf to /etc/lighttpd/conf-available"
|
||||||
|
sudo cp "$webroot_dir/config/50-raspap-router.conf" "/etc/lighttpd/conf-available" || _install_status 1 "Unable to copy lighttpd config file."
|
||||||
|
# link into conf-enabled
|
||||||
|
echo "Creating link to /etc/lighttpd/conf-enabled"|| _install_status 1 "Unable to copy lighthttpd config file."
|
||||||
|
sudo ln -s "/etc/lighttpd/conf-available/50-raspap-router.conf" "/etc/lighttpd/conf-enabled/50-raspap-router.conf" || _install_status 1 "Unable to symlink lighttpd config file."
|
||||||
|
sudo systemctl restart lighttpd.service || _install_status 1 "Unable to restart lighttpd"
|
||||||
|
_install_status 0
|
||||||
|
}
|
||||||
|
|
||||||
# Prompt to install ad blocking
|
# Prompt to install ad blocking
|
||||||
function _prompt_install_adblock() {
|
function _prompt_install_adblock() {
|
||||||
_install_log "Configure ad blocking (Beta)"
|
_install_log "Configure ad blocking (Beta)"
|
||||||
|
@ -578,3 +600,28 @@ function _install_complete() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
function _install_raspap() {
|
||||||
|
_display_welcome
|
||||||
|
_config_installation
|
||||||
|
_update_system_packages
|
||||||
|
_install_dependencies
|
||||||
|
_enable_php_lighttpd
|
||||||
|
_create_raspap_directories
|
||||||
|
_optimize_php
|
||||||
|
_check_for_old_configs
|
||||||
|
_download_latest_files
|
||||||
|
_change_file_ownership
|
||||||
|
_create_hostapd_scripts
|
||||||
|
_create_lighttpd_scripts
|
||||||
|
_install_lighttpd_configs
|
||||||
|
_move_config_file
|
||||||
|
_default_configuration
|
||||||
|
_configure_networking
|
||||||
|
_prompt_install_adblock
|
||||||
|
_prompt_install_openvpn
|
||||||
|
_patch_system_files
|
||||||
|
_install_complete
|
||||||
|
}
|
||||||
|
>>>>>>> 26d0dbfe... Changed routing system to use the more common path approach instead of query strings.
|
||||||
|
|
|
@ -219,6 +219,12 @@ function _remove_sudoers() {
|
||||||
echo "Done."
|
echo "Done."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _remove_lighttpd_config() {
|
||||||
|
echo "Removing ${raspap_sudoers}"
|
||||||
|
sudo rm "/etc/lighttpd/conf-available/50-raspap-router.conf" "/etc/lighttpd/conf-enabled/50-raspap-router.conf" || _install_error "Unable to remove lighttpd config"
|
||||||
|
echo "Done."
|
||||||
|
}
|
||||||
|
|
||||||
function _uninstall_complete() {
|
function _uninstall_complete() {
|
||||||
_install_log "Uninstall completed"
|
_install_log "Uninstall completed"
|
||||||
echo "It is recommended that you reboot your system as a final step."
|
echo "It is recommended that you reboot your system as a final step."
|
||||||
|
@ -230,6 +236,7 @@ function _remove_raspap() {
|
||||||
_remove_raspap_service
|
_remove_raspap_service
|
||||||
_restore_networking
|
_restore_networking
|
||||||
_remove_raspap_directories
|
_remove_raspap_directories
|
||||||
|
_remove_lighttpd_config
|
||||||
_remove_installed_packages
|
_remove_installed_packages
|
||||||
_remove_sudoers
|
_remove_sudoers
|
||||||
_uninstall_complete
|
_uninstall_complete
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</div><!-- /.card-header -->
|
</div><!-- /.card-header -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $status->showMessages(); ?>
|
<?php $status->showMessages(); ?>
|
||||||
<form role="form" action="?page=adblock_conf" enctype="multipart/form-data" method="POST">
|
<form role="form" action="adblock_conf" enctype="multipart/form-data" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $status->showMessages(); ?>
|
<?php $status->showMessages(); ?>
|
||||||
<h4><?php echo _("Authentication settings") ;?></h4>
|
<h4><?php echo _("Authentication settings") ;?></h4>
|
||||||
<form role="form" action="?page=auth_conf" method="POST">
|
<form role="form" action="auth_conf" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|
|
@ -34,7 +34,7 @@ $ifaceStatus = strtolower($matchesState[1]) ? "up" : "down";
|
||||||
<button type="button" class="btn btn-info btn-block float-right js-reload-wifi-stations"><?php echo _("Rescan"); ?></button>
|
<button type="button" class="btn btn-info btn-block float-right js-reload-wifi-stations"><?php echo _("Rescan"); ?></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form method="POST" action="?page=wpa_conf" name="wpa_conf_form" class="row">
|
<form method="POST" action="wpa_conf" name="wpa_conf_form" class="row">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<input type="hidden" name="client_settings" ?>
|
<input type="hidden" name="client_settings" ?>
|
||||||
<div class="row js-wifi-stations w-100 loading-spinner"></div>
|
<div class="row js-wifi-stations w-100 loading-spinner"></div>
|
||||||
|
|
|
@ -6,10 +6,10 @@ $client_interface = $_SESSION['wifi_client_interface'];
|
||||||
$ap_iface = $_SESSION['ap_interface'];
|
$ap_iface = $_SESSION['ap_interface'];
|
||||||
$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"';
|
$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"';
|
||||||
if ($arrHostapdConf['BridgedEnable'] == 1) {
|
if ($arrHostapdConf['BridgedEnable'] == 1) {
|
||||||
$moreLink = "index.php?page=hostapd_conf";
|
$moreLink = "hostapd_conf";
|
||||||
exec('iw dev '.$ap_iface.' station dump | grep -oE '.$MACPattern, $clients);
|
exec('iw dev '.$ap_iface.' station dump | grep -oE '.$MACPattern, $clients);
|
||||||
} else {
|
} else {
|
||||||
$moreLink = "index.php?page=dhcpd_conf";
|
$moreLink = "dhcpd_conf";
|
||||||
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(iw dev '.$ap_iface.' station dump | grep -oE '.$MACPattern.' | paste -sd "|")', $clients);
|
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(iw dev '.$ap_iface.' station dump | grep -oE '.$MACPattern.' | paste -sd "|")', $clients);
|
||||||
}
|
}
|
||||||
$ifaceStatus = $wlan0up ? "up" : "down";
|
$ifaceStatus = $wlan0up ? "up" : "down";
|
||||||
|
@ -122,7 +122,7 @@ $ifaceStatus = $wlan0up ? "up" : "down";
|
||||||
|
|
||||||
<div class="col-lg-12 mt-3">
|
<div class="col-lg-12 mt-3">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<form action="?page=wlan0_info" method="POST">
|
<form action="wlan0_info" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
||||||
<?php if (!$wlan0up) : ?>
|
<?php if (!$wlan0up) : ?>
|
||||||
|
@ -131,7 +131,7 @@ $ifaceStatus = $wlan0up ? "up" : "down";
|
||||||
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop").' '.$client_interface ?>" name="ifdown_wlan0" />
|
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop").' '.$client_interface ?>" name="ifdown_wlan0" />
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
<a href="<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $status->showMessages(); ?>
|
<?php $status->showMessages(); ?>
|
||||||
<form method="POST" action="?page=dhcpd_conf" class="js-dhcp-settings-form">
|
<form method="POST" action="dhcpd_conf" class="js-dhcp-settings-form">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
|
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $status->showMessages(); ?>
|
<?php $status->showMessages(); ?>
|
||||||
<form role="form" action="?page=hostapd_conf" method="POST">
|
<form role="form" action="hostapd_conf" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
|
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</div><!-- /.card-header -->
|
</div><!-- /.card-header -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $status->showMessages(); ?>
|
<?php $status->showMessages(); ?>
|
||||||
<form role="form" action="?page=openvpn_conf" enctype="multipart/form-data" method="POST">
|
<form role="form" action="openvpn_conf" enctype="multipart/form-data" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</div><!-- /.card-header -->
|
</div><!-- /.card-header -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php $status->showMessages(); ?>
|
<?php $status->showMessages(); ?>
|
||||||
<form role="form" action="?page=system_info" method="POST">
|
<form role="form" action="system_info" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
<li role="presentation" class="nav-item"><a class="nav-link active" id="basictab" href="#basic" aria-controls="basic" role="tab" data-toggle="tab"><?php echo _("Basic"); ?></a></li>
|
<li role="presentation" class="nav-item"><a class="nav-link active" id="basictab" href="#basic" aria-controls="basic" role="tab" data-toggle="tab"><?php echo _("Basic"); ?></a></li>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div role="tabpanel" class="tab-pane" id="advanced">
|
<div role="tabpanel" class="tab-pane" id="advanced">
|
||||||
<h4 class="mt-3"><?php echo _("Advanced settings") ;?></h4>
|
<h4 class="mt-3"><?php echo _("Advanced settings") ;?></h4>
|
||||||
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
||||||
<form action="?page=system_info" method="POST">
|
<form action="system_info" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|
|
@ -33,9 +33,9 @@ include('includes/sysstats.php');
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="?page=system_info" method="POST">
|
<form action="system_info" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
<a href="<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
||||||
|
|
||||||
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
||||||
<input type="submit" class="btn btn-warning" name="system_reboot" value="<?php echo _("Reboot"); ?>" />
|
<input type="submit" class="btn btn-warning" name="system_reboot" value="<?php echo _("Reboot"); ?>" />
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" class="btn btn-outline btn-primary" name="SaveLanguage" value="<?php echo _("Save settings"); ?>" />
|
<input type="submit" class="btn btn-outline btn-primary" name="SaveLanguage" value="<?php echo _("Save settings"); ?>" />
|
||||||
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
<a href="<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
<input class="form-control color-input" value="#d8224c" aria-label="color" />
|
<input class="form-control color-input" value="#d8224c" aria-label="color" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form action="?page=system_info" method="POST">
|
<form action="system_info" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh"); ?></a>
|
<a href="<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh"); ?></a>
|
||||||
</form>
|
</form>
|
||||||
</div><!-- /.card-body -->
|
</div><!-- /.card-body -->
|
||||||
<div class="card-footer"></div>
|
<div class="card-footer"></div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
<div class="tab-pane active" id="basic">
|
<div class="tab-pane active" id="basic">
|
||||||
<h4>Basic settings</h4>
|
<h4>Basic settings</h4>
|
||||||
<form role="form" action="?page=save_hostapd_conf" method="POST">
|
<form role="form" action="save_hostapd_conf" method="POST">
|
||||||
<?php echo CSRFTokenFieldTag() ?>
|
<?php echo CSRFTokenFieldTag() ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|
Loading…
Reference in a new issue