Added the email for the owner and changed the admin123 for the login page
This commit is contained in:
@@ -30,6 +30,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} elseif ($action === 'upload_favicon' && is_owner()) {
|
||||
$res = upload_site_favicon($_FILES['favicon_file'] ?? null);
|
||||
if ($res['success']) $msg_success = $res['message']; else $msg_error = $res['message'];
|
||||
} elseif ($action === 'update_admin_email' && is_owner()) {
|
||||
$new_email = trim($_POST['admin_email'] ?? '');
|
||||
if (!empty($new_email) && filter_var($new_email, FILTER_VALIDATE_EMAIL)) {
|
||||
update_site_setting('admin_email', $new_email);
|
||||
$msg_success = "Email dell'amministratore di sistema aggiornata con successo!";
|
||||
} else {
|
||||
$msg_error = "Inserisci un indirizzo email valido per l'amministratore di sistema.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +56,7 @@ foreach ($all_blocknotes as $bn) {
|
||||
|
||||
$site_title = get_site_setting('site_title', 'sld-blocknotes');
|
||||
$site_favicon = get_site_setting('site_favicon', 'assets/img/favicon.png');
|
||||
$admin_email = get_site_setting('admin_email', '[email protected]');
|
||||
?>
|
||||
|
||||
<main class="main-content">
|
||||
@@ -96,6 +105,18 @@ $site_favicon = get_site_setting('site_favicon', 'assets/img/favicon.png');
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- Modifica Email Amministratore -->
|
||||
<form action="index.php?page=admin_users" method="POST">
|
||||
<input type="hidden" name="action" value="update_admin_email">
|
||||
<div class="form-group">
|
||||
<label for="admin_email"><?= __('label_admin_email') ?></label>
|
||||
<input type="email" name="admin_email" id="admin_email" class="form-control" value="<?= htmlspecialchars($admin_email) ?>" required placeholder="<?= htmlspecialchars(__('placeholder_admin_email')) ?>">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="margin-top: 0.5rem;">
|
||||
<?= __('btn_save_admin_email') ?>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- Caricamento Favicon -->
|
||||
<form action="index.php?page=admin_users" method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="action" value="upload_favicon">
|
||||
|
||||
Reference in New Issue
Block a user