diff --git a/includes/functions.php b/includes/functions.php index 3b44b1e4..f42dd122 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -664,6 +664,13 @@ function formatDateAgo($datetime, $full = false) return $string ? implode(', ', $string) . ' ago' : 'just now'; } +function initializeApp() +{ + $_SESSION["theme_url"] = getThemeOpt(); + $_SESSION["toggleState"] = getSidebarState(); + $_SESSION["bridgedEnabled"] = getBridgedState(); +} + function getThemeOpt() { if (!isset($_COOKIE['theme'])) { diff --git a/includes/navbar.php b/includes/navbar.php new file mode 100755 index 00000000..511bf515 --- /dev/null +++ b/includes/navbar.php @@ -0,0 +1,23 @@ + diff --git a/includes/page_actions.php b/includes/page_actions.php new file mode 100755 index 00000000..f97bc5d1 --- /dev/null +++ b/includes/page_actions.php @@ -0,0 +1,57 @@ + diff --git a/includes/sidebar.php b/includes/sidebar.php new file mode 100755 index 00000000..299f4bb5 --- /dev/null +++ b/includes/sidebar.php @@ -0,0 +1,103 @@ +
diff --git a/index.php b/index.php index a10faa67..7af26192 100755 --- a/index.php +++ b/index.php @@ -47,14 +47,9 @@ require_once 'includes/openvpn.php'; require_once 'includes/wireguard.php'; require_once 'includes/torproxy.php'; -$output = $return = 0; -$page = $_SERVER['PATH_INFO']; - -$theme_url = getThemeOpt(); -$toggleState = getSidebarState(); -$bridgedEnabled = getBridgedState(); - -?> +initializeApp(); +?> + @@ -85,8 +80,7 @@ $bridgedEnabled = getBridgedState(); - - + " title="main" rel="stylesheet"> @@ -108,101 +102,8 @@ $bridgedEnabled = getBridgedState();