Merging upstream to repo

This commit is contained in:
Lawrence
2017-10-23 00:27:33 +08:00
10 changed files with 394 additions and 37 deletions

View File

@@ -19,11 +19,13 @@
*/
define('RASPI_CONFIG', '/etc/raspap');
if(file_exists(RASPI_CONFIG.'/raspap.auth')) {
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
} else {
define('RASPI_ADMIN_DETAILS','');
}
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
//if(file_exists(RASPI_CONFIG.'/raspap.auth')) {
// define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
//} else {
// define('RASPI_ADMIN_DETAILS','');
//}
// Constants for configuration file paths.
// These are typical for default RPi installs. Modify if needed.
@@ -51,6 +53,7 @@ include_once( 'includes/hostapd.php' );
include_once( 'includes/system.php' );
include_once( 'includes/configure_client.php' );
include_once( 'includes/networking.php' );
include_once( 'includes/themes.php' );
$output = $return = 0;
$page = $_GET['page'];
@@ -64,6 +67,13 @@ if (empty($_SESSION['csrf_token'])) {
}
}
$csrf_token = $_SESSION['csrf_token'];
if(!isset($_COOKIE['theme'])) {
$theme = "custom.css";
} else {
$theme = $_COOKIE['theme'];
}
$theme_url = 'dist/css/' . $theme;
?>
<!DOCTYPE html>
@@ -96,7 +106,7 @@ $csrf_token = $_SESSION['csrf_token'];
<link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- Custom CSS -->
<link href="dist/css/custom.css" rel="stylesheet">
<link href="<?php echo $theme_url; ?>" title="main" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="../img/favicon.png">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
@@ -154,6 +164,9 @@ $csrf_token = $_SESSION['csrf_token'];
<li>
<a href="index.php?page=auth_conf"><i class="fa fa-lock fa-fw"></i> Configure Auth</a>
</li>
<li>
<a href="index.php?page=theme_conf"><i class="fa fa-wrench fa-fw"></i> Change Theme</a>
</li>
<li>
<a href="index.php?page=system_info"><i class="fa fa-cube fa-fw"></i> System</a>
</li>
@@ -203,6 +216,9 @@ $csrf_token = $_SESSION['csrf_token'];
case "save_hostapd_conf":
SaveTORAndVPNConfig();
break;
case "theme_conf":
DisplayThemeConfig();
break;
case "system_info":
DisplaySystem();
break;