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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
<?php
require_once('includes/config.php');
//Titre de la page
$pagetitle = 'Liste des membres';
//Stats : bbclone
define("_BBC_PAGE_NAME", $pagetitle);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
include_once('includes/header.php');
?>
<body>
<div id="container">
<?php
include_once('includes/header-logo.php');
include_once('includes/nav.php');
?>
<div id="body">
<div id="content">
<?php include_once('includes/ariane.php'); ?>
<?php
//Message de création de compte...
if(isset($_GET['action']) && $_GET['action'] == 'activation'){
echo '<div class="alert-msg rnd8 success">Votre compte est en cours de création.<br />Vous allez recevoir, par e-mail, un lien afin de l\'activer.</div>';
}
if(isset($_GET['action']) && $_GET['action'] == 'noexistmember'){
echo '<div class="alert-msg rnd8 error">Erreur : ce membre n\'existe pas.</div>';
}
?>
<br />
<div style="text-align: center; border:1px ridge black;">
<h3>Rechercher un membre :</h3>
<form action="<?php echo SITEURL; ?>/recherche-membres.php" method="post" id="rechercher" name="rechercher">
<input type="text" alt="" name="requete" class="s" placeholder="Rechercher un membre ...">
<input type="submit" alt="" value="Rechercher" class="searchsubmit formbutton">
</form>
<br />
</div>
<br />
<div style="text-align: center;"><span style="font-size: 14pt; font-weight: bold;">Liste des membres :</span></div>
<br />
<table>
<tr>
<th style="width: 250px;"><a style="color: #fff; text-decoration: none;" href="membres.php?tri=username&ordre=desc">↑</a>Pseudo<a style="color: #fff; text-decoration: none;" href="membres.php?tri=username&ordre=asc">↓</a></th>
<th><a style="color: #fff; text-decoration: none;" href="membres.php?tri=memberDate&ordre=desc">↑</a>Inscription le<a style="color: #fff; text-decoration: none;" href="membres.php?tri=memberDate&ordre=asc">↓</a></th>
<th style="text-align: center;"><a style="color: #fff; text-decoration: none;" href="membres.php?tri=uploaded&ordre=desc">↑</a>Envoyé<a style="color: #fff; text-decoration: none;" href="membres.php?tri=uploaded&ordre=asc">↓</a></th>
<th style="text-align: center;"><a style="color: #fff; text-decoration: none;" href="membres.php?tri=downloaded&ordre=desc">↑</a>Téléchargé<a style="color: #fff; text-decoration: none;" href="membres.php?tri=downloaded&ordre=asc">↓</a></th>
<th style="text-align: center;">Ratio</th>
</tr>
<?php
try {
// On affiche 15 membres par page
$pages = new Paginator('15','p');
$stmt = $db->query('SELECT memberID FROM blog_members');
$pages->set_total($stmt->rowCount());
// On met en place le tri
if(isset($_GET['tri'])) {
$tri = html($_GET['tri']);
}
else {
$memberID_tri = 'memberID';
$tri = html($memberID_tri);
}
if(isset($_GET['ordre'])) {
$ordre = html($_GET['ordre']);
}
else {
$ordre_tri = 'DESC';
$ordre = html($ordre_tri);
}
// Protection du tri -------------------------
if (!empty($_GET['tri']) && !in_array($_GET['tri'], array('memberID','username', 'memberDate', 'uploaded', 'downloaded'))) {
header('Location: index.php');
exit();
}
if (!empty($_GET['ordre']) && !in_array($_GET['ordre'], array('asc','desc','ASC','DESC'))) {
header('Location: index.php');
exit();
}
// --------------------------------------------
$stmt = $db->query('SELECT * FROM blog_members,xbt_users WHERE blog_members.memberID=xbt_users.uid AND blog_members.username != "visiteur" AND blog_members.active = "yes" ORDER BY '.$tri.' '.$ordre.' '.$pages->get_limit());
while($row = $stmt->fetch()){
echo '<tr>';
if (!empty($row['avatar'])) {
echo '<td style="font-weight: bold; font-size: 14px;"><img src="'.SITEURL.'/images/avatars/'.html($row['avatar']).'" alt="'.html($row['username']).'" style="float: left; margin-right: 5px; width: 30px; height: 30px;" /><a href="admin/profil.php?membre='.html($row['username']).'">'.html($row['username']).'</a></td>';
}
else {
echo '<td style="font-weight: bold; font-size: 14px;"><img src="'.SITEURL.'/images/avatars/avatar.png" alt="'.html($row['username']).'" style="float: left; margin-right: 5px; width: 30px; height: 30px;" /><a href="admin/profil.php?membre='.html($row['username']).'">'.html($row['username']).'</a></td>';
}
sscanf($row['memberDate'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde);
echo '<td style="font-size: 12px;">'.$jour.'-'.$mois.'-'.$annee.' à '.$heure.':'.$minute.':'.$seconde.'</td>';
echo '<td style="text-align: center;">'.makesize($row['uploaded']).'</td>';
echo '<td style="text-align: center;">'.makesize($row['downloaded']).'</td>';
if (intval($row["downloaded"])>0) {
$ratio=number_format($row["uploaded"]/$row["downloaded"],2);
}
else {
$ratio='∞';
}
echo '<td style="text-align: center;">'.$ratio.'</td>';
echo '</tr>';
}
} catch(PDOException $e) {
echo $e->getMessage();
}
?>
</table>
<?php
echo $pages->page_links('?tri='.$tri.'&ordre='.$ordre.'&');
?>
</div>
<?php
include_once 'sidebar.php';
?>
<div class="clear"></div>
</div>
</div>
<div id="footer">
<?php
include_once 'includes/footer.php';
?>
</div>
</body>
</html>
|