Create dashboard functions

This commit is contained in:
billz 2020-06-30 23:35:46 +01:00
parent 2916bd1998
commit 29be22a8d3
1 changed files with 24 additions and 0 deletions

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'];
}