-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofil.php
More file actions
121 lines (121 loc) · 4.34 KB
/
Copy pathprofil.php
File metadata and controls
121 lines (121 loc) · 4.34 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
include("header.php");
$user = null;
if (isset($_SESSION['etudiant'])) {
$user = $_SESSION['etudiant'];
$role = 'Étudiant';
} elseif (isset($_SESSION['admin'])) {
$user = $_SESSION['admin'];
$role = 'Administrateur';
} else {
header('Location: connexion.php');
exit();
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mon Profil</title>
<link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<style>
body.page-bg-gradient {
background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
min-height: 100vh;
}
.profil-card {
background: #fff;
border-radius: 20px;
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
padding: 2.5rem 2.5rem 2rem 2.5rem;
margin-top: 3rem;
max-width: 480px;
}
.profil-title {
color: #2575fc;
font-weight: bold;
}
.profil-avatar {
width: 90px;
height: 90px;
border-radius: 50%;
background: linear-gradient(135deg, #477c93, #315a67,#aad2e3);
display: flex;
align-items: center;
justify-content: center;
font-size: 2.8rem;
color: #fff;
margin: 0 auto 1.2rem auto;
box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.10);
}
.profil-label {
color: #203a43;
font-weight: 500;
}
.profil-value {
color: #315a67;
font-weight: 600;
}
.profil-role {
font-size: 1.1rem;
color: #fff;
background: #2575fc;
display: inline-block;
border-radius: 1rem;
padding: 0.2rem 1.1rem;
margin-bottom: 1.2rem;
}
</style>
</head>
<body class="page-bg-gradient">
<div class="container d-flex flex-column align-items-center justify-content-center" style="min-height: 80vh;">
<div class="profil-card">
<div class="profil-avatar mb-2">
<i class="bi bi-person-circle"></i>
</div>
<h2 class="profil-title text-center mb-2">Mon Profil</h2>
<div class="d-flex justify-content-center">
<div class="text-center profil-role mb-3">
<?= $role ?>
</div>
</div>
<div class="mb-3">
<span class="profil-label">Nom :</span>
<span class="profil-value ms-2"><?= htmlspecialchars($user['nom']) ?></span>
</div>
<div class="mb-3">
<span class="profil-label">Prénom :</span>
<span class="profil-value ms-2"><?= htmlspecialchars($user['prenom']) ?></span>
</div>
<div class="mb-3">
<span class="profil-label">Email :</span>
<span class="profil-value ms-2"><?= htmlspecialchars($user['email']) ?></span>
</div>
<?php if (isset($user['numero_etudiant'])): ?>
<div class="mb-3">
<span class="profil-label">Numéro étudiant :</span>
<span class="profil-value ms-2"><?= htmlspecialchars($user['numero_etudiant']) ?></span>
</div>
<?php endif; ?>
<div class="mb-3">
<span class="profil-label">Date d'inscription :</span>
<span class="profil-value ms-2"><?= isset($user['date_inscription']) ? htmlspecialchars($user['date_inscription']) : '-' ?></span>
</div>
<div class="d-flex flex-column gap-3 mt-4">
<a href="changerMotDePasse.php" class="btn btn-warning w-100">
<i class="bi bi-shield-lock-fill me-2"></i> Changer le mot de passe
</a>
<a href="deconnexion.php" class="btn btn-danger w-100">
<i class="bi bi-box-arrow-right me-2"></i> Se déconnecter
</a>
</div>
</div>
</div>
<?php include("footer.php"); ?>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
</body>
</html>