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:
|
<?php
$filename="memberslist.php";
require("./global.php");
if($wbbuserdata['canviewmblist']==0) access_error();
if(isset($_GET['sortby'])) $sortby=$_GET['sortby'];
else $sortby="userposts";
if(isset($_GET['order'])) $order=$_GET['order'];
else $order="DESC";
switch($sortby) {
case "username": break;
case "regdate": break;
case "userposts": break;
default: $sortby = "userposts"; break;
}
switch($order) {
case "ASC": break;
case "DESC": break;
default: $order = "DESC"; break;
}
$sel_sortby[$sortby]=" selected";
$sel_order[$order]=" selected";
$letteroptions=""; $letterlinks="";
$alpha="#ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if(!isset($_GET['letter']) || ($_GET['letter'] && !strstr($alpha,$_GET['letter']))) $letter="";
else $letter=urldecode($_GET['letter']);
for($i=0; $i<strlen($alpha); $i++) {
$letteroptions .= makeoption($alpha[$i], $alpha[$i], $letter, 1);
$letterlinks .= "<a href="memberslist.php?order=$order&sortby=$sortby&letter=$alpha[$i]&sid=$session[hash]">$alpha[$i]</a> ";
}
$alphasonder="0";
if(!isset($_GET['letter']) || ($_GET['letter'] && !strstr($alpha,$_GET['letter']))) $letter="";
else $letter=urldecode($_GET['letter']);
for($i=0; $i<strlen($alphasonder); $i++) {
$lettersonder .= "<a href="memberslist.php?letter=%23&sortby=$sortby&order=DESC&x=9&y=8&page=1&sid=$session[hash]">$alphasonder</a> ";
}
if($letter=="#") $memberscount=$db->query_first("SELECT COUNT(*) FROM bb".$n."_users WHERE SUBSTRING(username,1,1) NOT IN ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') AND activation=1");
else $memberscount=$db->query_first("SELECT COUNT(*) FROM bb".$n."_users WHERE".ifelse($letter," username LIKE '$letter%' AND")." activation=1");
if(isset($_GET['page'])) {
$page=intval($_GET['page']);
if($page==0) $page=1;
}
else $page=1;
$pages = ceil($memberscount[0]/$membersperpage);
if($pages>1) $pagelink=makepagelink("memberslist.php?order=$order&sortby=$sortby&letter=".urlencode($letter)."&sid=$session[hash]",$page,$pages,$showpagelinks-1);
if($letter=="#") $result = $db->query("SELECT userid, username, email, homepage, regdate, userposts, showemail, usercanemail, receivepm, lastactivity, abwesend, avatarid FROM bb".$n."_users WHERE SUBSTRING(username,1,1) NOT IN ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') AND activation=1 ORDER BY $sortby $order LIMIT ".($membersperpage*($page-1)).",".$membersperpage);
else $result = $db->query("SELECT userid, username, email, homepage, regdate, userposts, showemail, usercanemail, receivepm, lastactivity, abwesend, avatarid FROM bb".$n."_users WHERE".ifelse($letter," username LIKE '$letter%' AND")." activation=1 ORDER BY $sortby $order LIMIT ".($membersperpage*($page-1)).",".$membersperpage);
$membersbit="";
while($members = $db->fetch_array($result)) {
$members['regdate'] = formatdate($dateformat,$members['regdate']);
// ## Abwesenheit-Hack
$abwesend = "";
if($members['abwesend']==1) eval ("\$abwesend = " ".$tpl->get("members_view_abwesend")."";");
// ## Ende
// Avatar Beginn
if($members['avatarid'] && $wbbuserdata['showavatars']==1) {
$useravatar="";
$useravatar = $db->query_first("SELECT * FROM bb".$n."_avatars WHERE avatarid='$members[avatarid]'");
$avatarname="images/avatars/avatar-".$members['avatarid'].".".$useravatar['avatarextension']."";
$avatarwidth=$useravatar['width'];
$avatarheight=$useravatar['height'];
eval ("\$useravatar = "".$tpl->get("avatar_image")."";");
} else {
$useravatar = "<img src="images/noavatar.gif" border="0">";
// $useravatar = "<smallfont>Kein Avatar gewählt!</font>";
}
// Avatar Ende
if($members['showemail']==1) eval ("\$members_email = " ".$tpl->get("memberslist_email")."";");
elseif($members['usercanemail']==1) eval ("\$members_email = " ".$tpl->get("memberslist_formmail")."";");
else $members_email=" ";
if($members['homepage']) eval ("\$members_homepage = " ".$tpl->get("memberslist_homepage")."";");
else $members_homepage=" ";
if($members['receivepm'] && $wbbuserdata[canusepms]==1) eval ("\$members_pm = " ".$tpl->get("memberslist_pm")."";");
else $members_pm=" ";
if($members['userposts']) eval ("\$members_search = " ".$tpl->get("memberslist_search")."";");
else $members_search=" ";
$q = $db->query_first("SELECT threadid, posttime FROM bb".$n."_posts WHERE userid LIKE '".$members['userid']."' ORDER BY posttime DESC LIMIT 1");
if($q) {
$q2 = $db->query_first("SELECT topic, visible FROM bb".$n."_threads WHERE threadid LIKE '".$q['threadid']."'");
$posttime = formatdate($dateformat,$q['posttime']);
if($q2['visible'] != 1) {
$lastpostbit = "Unbekannt (".$posttime.")";
} else {
$lastpostbit = '<a href="thread.php?threadid='.$q['threadid'].'&sid='.$session[hash].'">'.$q2['topic'].'</a> ('.$posttime.')';
}
} else {
$lastpostbit = "-";
}
$la_d = formatdate($dateformat,$members['lastactivity'],1);
$la_t = formatdate($timeformat,$members['lastactivity']);
###### Username-Style Hack ######
$uname = $members['username'];
$grp_id_query = $db->query_first("SELECT groupid FROM bb".$n."_users WHERE username LIKE '".$uname."'");
$grp_id = $grp_id_query['groupid'];
$group_style_query = $db->query_first("SELECT groupstyle FROM bb".$n."_groups WHERE groupid LIKE '".$grp_id."'");
$group_style = $group_style_query['groupstyle'];
$members2['username'] = stripslashes(sprintf($group_style, $members['username']));
###### Username-Style Hack End ######
##### USERCOLORHACK BY LilMim #####
$benutzername = $members['username'];
$colorquery = $db->query_first("SELECT usercolor FROM bb".$n."_users WHERE username LIKE '".$benutzername."'");
$usercolor = $colorquery['usercolor'];
##### USERCOLORHACK ENDE #####
eval ("\$membersbit .= " ".$tpl->get("memberslist_membersbit")."";");
}
$db->free_result($result);
eval("\$tpl->output("".$tpl->get("memberslist")."");");
?> |