-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassement.php
More file actions
87 lines (84 loc) · 2.39 KB
/
classement.php
File metadata and controls
87 lines (84 loc) · 2.39 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
<?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=qyizbowl;charset=utf8', 'root', '0000');
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" type="text/css" href="styleall.css">
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<title>QuizBowl</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="formulairjs.js"></script>
<script src="//twemoji.maxcdn.com/2/twemoji.min.js?2.4"></script>
<body>
<?php include('header.php'); ?>
<div id="limit">
<div id="li2">
<?php include('messages.php'); ?>
<?php include('start_chess.php'); ?>
<div class="flexs"></div>
<section id="suchen">
<?php
$i=1;
$req = $bdd->query('SELECT pseudo, avatarimageurl FROM members ORDER BY nm DESC limit 500');
while($resultat = $req->fetch()) {
?>
<li><a href="profile.php?pseudo=<?php echo $resultat['pseudo']; ?>">
<div class="cfkk" style="display: flex;">
<div class='randomavatar' style='width: 80%; height: 60px; display: flex;'>
<div id="randomimage">
<span id="avataricon" style="background-image: url(profilesimages/mini/<?php echo $resultat['avatarimageurl'];?>);"></span>
</div>
<span style="line-height: 60px; margin-left: 10px;"><?php echo $resultat['pseudo']; ?></span>
</div>
<div class="classement"><div <?php if($i<=10){?> style="color: gold;" <?php }?> > <?php echo $i; ?></div></div>
</div>
</a></li>
<?php
$i++;
}
?>
</section>
<div class="flexs"></div>
</div>
<footer>
<span><span>©</span>2018 QuizBowl</span>
</footer>
</div>
<script type="text/javascript">
function moreClass(n) {
$.post(
"a.php",
{
moreclass : document.getElementById('suchen').children.length;
},
function(data){
$("#suchen").append(data);
},
'text'
);
}
var k = 0;
$(document).scroll(function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
k++;
moreClass(k);
}
});
</script>
</body>
</html>