-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.php
52 lines (49 loc) · 1.16 KB
/
user.php
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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<style>
div.warned, div.sensible {
filter: blur(5px);
transition: .3s;
}
#profile_picture{
width: 5em;
height: 5em;
margin: 0 auto;
}
</style>
<?php
include 'header.php';
if(isset($_GET['id'])){
$id = $_GET['id'];
include 'components/user.php';
$sql = "SELECT ID FROM user WHERE ID = ?";
$rs = $db->prepare($sql);
$rs->execute([$id]);
$exist = $rs->fetch();
if(!$exist){
echo "Utilisateur inexistant";
} else {
$user = userFromID($id);
$user->display_page();
}
}
?>
<script>
loadPosts("user");
setTimeout(() => {
displayBlurBtn();
}, 1000);
window.addEventListener('scroll', function () {
if (window.innerHeight + window.scrollY >= document.body.offsetHeight) {
loadPosts("user");
}
displayBlurBtn();
});
</script>
</body>
</html>