mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Merging upstream to repo
This commit is contained in:
@@ -13,6 +13,10 @@ function DisplayAuthConfig($username, $password){
|
||||
} else if ($new_username == '') {
|
||||
$status->addMessage('Username must not be empty', 'danger');
|
||||
} else {
|
||||
if (!file_exists(RASPI_ADMIN_DETAILS)) {
|
||||
$tmpauth = fopen(RASPI_ADMIN_DETAILS, 'w');
|
||||
fclose($tmpauth);
|
||||
}
|
||||
if ($auth_file = fopen(RASPI_ADMIN_DETAILS, 'w')) {
|
||||
fwrite($auth_file, $new_username.PHP_EOL);
|
||||
fwrite($auth_file, password_hash($_POST['newpass'], PASSWORD_BCRYPT).PHP_EOL);
|
||||
|
@@ -136,7 +136,7 @@ function DisplayHostAPDConfig(){
|
||||
<div class="form-group col-md-4">
|
||||
<label for="code">Country Code</label>
|
||||
<input type="hidden" id="selected_country" value="<?php echo $arrConfig['country_code'] ?>">
|
||||
<select class="form-control" id="countries" name="country_code" style="background-color: #c0ffc0;">
|
||||
<select class="form-control" id="countries" name="country_code">
|
||||
<option value="AF">Afghanistan</option>
|
||||
<option value="AX">Åland Islands</option>
|
||||
<option value="AL">Albania</option>
|
||||
|
63
includes/themes.php
Normal file
63
includes/themes.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
function DisplayThemeConfig(){
|
||||
|
||||
$cselected = '';
|
||||
$hselected = '';
|
||||
$tselected = '';
|
||||
|
||||
switch( $_COOKIE['theme'] ) {
|
||||
case "custom.css":
|
||||
$cselected = "selected";
|
||||
break;
|
||||
case "hackernews.css":
|
||||
$hselected = "selected";
|
||||
break;
|
||||
case "terminal.css":
|
||||
$tselected = "selected";
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><i class="fa fa-wrench fa-fw"></i> Change Theme</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h4>Theme settings</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="code">Select a theme</label>
|
||||
<select class="form-control" id="theme-select">Select a Theme
|
||||
<option value="default" class="theme-link" <?php echo $cselected; ?>>RaspAP (default)</option>
|
||||
<option value="hackernews" class="theme-link"<?php echo $hselected; ?>>HackerNews</option>
|
||||
<option value="terminal" class="theme-link" <?php echo $tselected; ?>>Terminal</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.panel-body -->
|
||||
</div><!-- /.panel-default -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
<form action="?page=system_info" method="POST">
|
||||
<input type="button" class="btn btn-outline btn-primary" value="Refresh" onclick="document.location.reload(true)" />
|
||||
</form>
|
||||
|
||||
</div><!-- /.panel-body -->
|
||||
</div><!-- /.panel-primary -->
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user