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:
|
<?php
$filename="profile.php";
require("./global.php");
if($wbbuserdata['canviewprofile']==0) access_error();
require("./acp/lib/class_parse.php");
$userid=intval($_GET['userid']);
if(!$userid) eval("error(\"".$tpl->get("error_falselink")."\");");
$user_info = $db->query_first("SELECT
u.*,
uf.*,
r.rankimages, r.ranktitle,
a.avatarextension, a.width, a.height
FROM bb".$n."_users u
LEFT JOIN bb".$n."_userfields uf USING (userid)
LEFT JOIN bb".$n."_avatars a ON (a.avatarid=u.avatarid)
LEFT JOIN bb".$n."_ranks r ON (r.rankid=u.rankid)
WHERE u.userid='$userid'");
if(!$user_info['userid']) eval("error(\"".$tpl->get("error_falselink")."\");");
$regdate = formatdate($dateformat,$user_info['regdate']);
$posts['userid'] = $user_info['userid'];
$posts['username'] = $user_info['username'];
if(($user_info['invisible']==0 || $wbbuserdata['canuseacp']==1) && $user_info['lastactivity']>=time()-$useronlinetimeout*60) eval ("\$user_online = \"".$tpl->get("thread_user_online")."\";");
else eval ("\$user_online = \"".$tpl->get("thread_user_offline")."\";");
$regdays = (time() - $user_info[regdate]) / 86400;
if ($regdays < 1) $postperday = "$user_info[userposts]";
else $postperday = sprintf("%.2f",($user_info['userposts'] / $regdays));
if($user_info['usertext']) $user_text=parse::textwrap($user_info['usertext'],40);
if($user_info['gender']) {
if($user_info['gender']==1) eval ("\$gender = \"".$tpl->get("profile_male")."\";");
else eval ("\$gender = \"".$tpl->get("profile_female")."\";");
}
else eval ("\$gender = \"".$tpl->get("profile_nodeclaration")."\";");
if($user_info['title']) $user_info['ranktitle']=$user_info['title'];
$rankimages=formatRI($user_info['rankimages']);
if($user_info['avatarid'] && $showavatar==1 && $wbbuserdata['showavatars']==1) {
$avatarname="images/avatars/avatar-$user_info[avatarid].$user_info[avatarextension]";
$avatarwidth=$user_info['width'];
$avatarheight=$user_info['height'];
eval ("\$useravatar = \"".$tpl->get("avatar_image")."\";");
}
if($user_info['showemail']==1) $useremail = makehreftag("mailto:$user_info[email]",$user_info['email']);
else eval ("\$useremail = \"".$tpl->get("profile_nodeclaration")."\";");
if($user_info['homepage']) $userhomepage = makehreftag($user_info['homepage'],$user_info['homepage'],"_blank");
else eval ("\$userhomepage = \"".$tpl->get("profile_nodeclaration")."\";");
if(!$user_info['icq']) eval ("\$user_info[icq] = \"".$tpl->get("profile_nodeclaration")."\";");
if(!$user_info['aim']) eval ("\$user_info[aim] = \"".$tpl->get("profile_nodeclaration")."\";");
if(!$user_info['yim']) eval ("\$user_info[yim] = \"".$tpl->get("profile_nodeclaration")."\";");
if(!$user_info['msn']) eval ("\$user_info[msn] = \"".$tpl->get("profile_nodeclaration")."\";");
if($user_info['birthday'] && $user_info['birthday']!="0000-00-00") {
$birthday_array = explode("-",$user_info['birthday']);
if($birthday_array[0]=="0000") $birthday = $birthday_array[2].".".$birthday_array[1].".";
else $birthday = $birthday_array[2].".".$birthday_array[1].".".$birthday_array[0];
}
else eval ("\$birthday = \"".$tpl->get("profile_nodeclaration")."\";");
->query("SELECT profilefieldid, title FROM
if($user_info['showemail']==0 && $user_info['usercanemail']==1) eval ("$btn_email = "".$tpl->get("thread_formmail")."\";");
if($user_info['userposts']!=0) eval ("\$btn_search = \"".$tpl->get("thread_search")."\";");
if($user_info['receivepm']==1 && $wbbuserdata['canusepms']==1) eval ("\$btn_pm = \"".$tpl->get("thread_pm")."\";");
eval("\$tpl->output(\"".$tpl->get("profile")."\");");
?>
|