1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Create dashboard functions

This commit is contained in:
billz 2020-06-30 23:35:46 +01:00
parent 2916bd1998
commit 29be22a8d3

View File

@ -428,3 +428,27 @@ function getThemeOpt()
return 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
}
function getColorOpt()
{
if (!isset($_COOKIE['color'])) {
$color = "#d8224c";
} else {
$color = $_COOKIE['color'];
}
return $color;
}
function getSidebarState()
{
if ($_COOKIE['sidebarToggled'] == 'true' ) {
return"toggled";
}
}
// Returns bridged AP mode status
function getBridgedState()
{
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
// defaults to false
return $arrHostapdConf['BridgedEnable'];
}