-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.php
More file actions
73 lines (69 loc) · 3.33 KB
/
settings.php
File metadata and controls
73 lines (69 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
//This file belongs to the Bookfind project.
//
//Bookfind is distributed under the terms of the MIT software license.
//
//Copyright (C) 2025 Chromared
?>
<?php if (isset($_GET['id']) and !empty($_GET['id'])) { ?>
<?php require 'actions/database.php';
require 'actions/functions/logFunction.php';
require 'actions/users/securityAction.php';
require 'actions/users/showOneUserProfilAction.php';
require 'actions/functions/selected.php';
require 'actions/users/updateThemeAction.php';
?>
<!DOCTYPE html>
<html lang="fr" data-bs-theme="<?php include 'actions/users/decodeThemeAction.php'; ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Paramètres</title>
<?php include 'includes/header.php'; ?>
</head>
<body>
<?php include 'includes/navbar.php'; ?>
<form method="post">
<div class="container mt-3">
<div class="d-flex justify-content-center mt-4">
<div class="card text-center mb-3" style="width: 50rem;">
<div class="card-body">
<h5 class="card-title">Thème <span class="badge text-bg-warning">Bêta</span></h5>
<?php if (isset($errorMsg1)) { ?>
<div class="alert alert-warning d-flex align-items-center justify-content-center" role="alert">
<i class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2"></i>
<div>
<?= $errorMsg1; ?>
</div>
</div>
<?php } ?>
<?php if (isset($_GET['msg1'])) { ?>
<div class="alert alert-success d-flex align-items-center justify-content-center" role="alert">
<i class="bi bi-check-circle-fill flex-shrink-0 me-2"></i>
<div>
Vos modifications ont bien été enregistré.
</div>
</div>
<?php } ?>
<div class="mb-3">
<select name="theme" class="form-select" required>
<option value="0" <?php selected($usersInfos['theme'], '0'); ?>>Clair</option>
<option value="1" <?php selected($usersInfos['theme'], '1'); ?>>Sombre</option>
<option value="auto" disabled>Automatique</option>
</select>
</div>
<div class="mb-3">
<input type="submit" name="validateTheme" class="btn btn-primary" value="Enregistrer" />
<input type="reset" class="btn btn-secondary" value="Réinitialiser" />
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
<?php } else {
session_start();
header('Location: settings.php?id=' . $_SESSION['id']);
} ?>