-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
64 lines (63 loc) · 2.51 KB
/
index.php
File metadata and controls
64 lines (63 loc) · 2.51 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
<?php
//This file belongs to the Bookfind project.
//
//Bookfind is distributed under the terms of the MIT software license.
//
//Copyright (C) 2025 Chromared
?>
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Accueil</title>
<?php include 'includes/header.php'; ?>
</head>
<body>
<?php include 'includes/navbar.php'; ?>
<div class="container text-center mt-5">
<img src="assets/iconesite.png" class="img-fluid w-25 display-4" />
<h1 class="mt-3">Bienvenue sur BookFind !</h1>
</div>
<div class="container mt-3">
<form method="GET" action="books.php">
<div class="input-group mb-3">
<input type="text" name="s" class="form-control" value="<?php if(isset($_GET['s']) AND !empty($_GET['s'])){echo htmlspecialchars($_GET['s']);} ?>" placeholder="Rechercher un livre" />
<button class="btn btn-outline-secondary" type="submit" id="button-addon2">
<i class="bi bi-search"></i>
Rechercher
</button>
</div>
</form>
</div>
<?php if(isset($_GET['signup']) and isset($_SESSION['auth'])){ ?>
<div class="modal fade" id="successModal" tabindex="-1" aria-labelledby="successModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="successModalLabel">Inscription réussie</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Fermer"></button>
</div>
<div class="modal-body">
Votre compte a été créé avec succès. Pour vous connecter, vous aurez besoin de votre nom d'utilisateur qui est le suivant : <strong><?= htmlspecialchars($_SESSION['username']); ?></strong>.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-bs-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
var successModal = document.getElementById('successModal');
var myModal = new bootstrap.Modal(successModal, {
backdrop: 'static',
keyboard: false
});
myModal.show();
});
</script>
<?php } ?>
</body>
</html>