$tblstart$tccell1>The specified user doesn't exist.$tblend$footer";
printtimedif($startingtime);
die();
}
$maxposts=mysql_fetch_array(mysql_query("SELECT posts FROM users ORDER BY posts DESC LIMIT 1"));
$maxposts=$maxposts[posts];
$users1=mysql_query("SELECT id,posts,regdate FROM users");
while($u=mysql_fetch_array($users1)){
$u[level]=calclvl(calcexp($u[posts],(ctime()-$u[regdate])/86400));
if ($u[posts]<0 or $u[regdate]>ctime()) $u[level]=1;
$users[$u[id]]=$u;
}
$ratescore=0;
$ratetotal=0;
$ratings=mysql_query("SELECT userfrom,rating FROM userratings WHERE userrated=$id");
while($rating=@mysql_fetch_array($ratings)){
$ratescore+=$rating[rating]*$users[$rating[userfrom]][level];
$ratetotal+=$users[$rating[userfrom]][level];
}
$ratetotal*=10;
$numvotes=mysql_num_rows($ratings);
if($ratetotal) $ratingstatus=(floor($ratescore*1000/$ratetotal)/100)." ($ratescore/$ratetotal, $numvotes votes)";
else $ratingstatus="None";
if($loguserid and $logpwenc and $loguserid!=$id) $ratelink=" | Rate user";
$userrank=getrank($user[useranks],$user[title],$user[posts],$user[powerlevel]);
$threadsposted=mysql_result(mysql_query("SELECT count(id) AS cnt FROM threads WHERE user=$id"),0,"cnt");
$i=0;
$lastpostdate="None";
if($user[posts]) $lastpostdate=date("m-d-y h:i A",$user[lastposttime]+$tzoff);
// $postsfound=mysql_result(mysql_query("SELECT count(id) AS cnt FROM posts WHERE user=$id"),0,"cnt");
$post=@mysql_fetch_array(mysql_query("SELECT id, thread FROM posts WHERE user=$id AND date=$user[lastposttime]"));
if($threads=mysql_query("SELECT title,forum FROM threads WHERE id=$post[1]")){
$thread=mysql_fetch_array($threads);
$forum=mysql_fetch_array(mysql_query("SELECT id,title,minpower FROM forums WHERE id=$thread[forum]"));
$thread[0]=str_replace("<","<",$thread[0]);
if($forum[minpower]>$loguser[powerlevel] and $forum[minpower]) $lastpostlink=", in a restricted forum";
else $lastpostlink=", in $thread[0] ($forum[title])";
}
if($loguser){
$sendpmsg=" | Send private message";
if($isadmin){
if($user[lastip]) $lastip="
with IP: $user[lastip]";
$sneek="
$tccell1s colspan=2>View private messages | View votes | Edit user";
}
}
$aim=str_replace(" ","+",$user[aim]);
$schname=mysql_fetch_array(mysql_query("SELECT name FROM schemes WHERE id=$user[scheme]"));
$schname=$schname[name];
$numdays=(ctime()-$user[regdate])/86400;
$user[signature]=doreplace($user[signature],$user[posts],$numdays,$user[name]);
// $user[signature]=doreplace2($user[signature],$user[posts],$numdays,$user[name]);
$user[postheader]=doreplace($user[postheader],$user[posts],$numdays,$user[name]);
// $user[postheader]=doreplace2($user[postheader],$user[posts],$numdays,$user[name]);
if($user[picture]) $picture="";
$icqicon="";
if(!$user[icq]){
$user[icq]="";
$icqicon="";
}
$tccellha="$fonthead";
$namecolor=getnamecolor($user[sex],$user[powerlevel]);
$tzoffset=$user[timezone];
$tzoffrel=$tzoffset-$loguser[timezone];
$tzdate=date("m-d-y h:i A",ctime()+$tzoffset*3600);
if($user[birthday]){
$birthday=date("l, F j, Y",$user[birthday]);
$age="(".floor((ctime()-$user[birthday])/86400/365.2425)." years old)";
}
$exp=calcexp($user[posts],(ctime()-$user[regdate])/86400);
$lvl=calclvl($exp);
$expleft=calcexpleft($exp);
$expstatus="Level: $lvl EXP: $exp (for next level: $expleft)";
if($user[posts]) $expstatus.=" Gain: ".calcexpgainpost($user[posts],(ctime()-$user[regdate])/86400)." EXP per post, ".calcexpgaintime($user[posts],(ctime()-$user[regdate])/86400)." seconds to gain 1 EXP when idle";
$postavg=sprintf("%01.2f",$user[posts]/(ctime()-$user[regdate])*86400);
$totalwidth=116;
$barwidth=@floor(($user[posts]/$maxposts)*$totalwidth);
if($barwidth<0) $barwidth=0;
if($barwidth) $baron="";
if($barwidth<$totalwidth) $baroff="";
$bar="$baron$baroff ";
if(!$topposts) $topposts=5000;
if($user[posts]) $projdate=ctime()+(ctime()-$user[regdate])*($topposts-$user[posts])/($user[posts]);
if(!$user[posts] or $user[posts]>=$topposts or $projdate>2000000000 or $projdate ";
$homepagename=$user[homepageurl];
if($user[homepagename]) $homepagename="$user[homepagename] - $user[homepageurl]";
if($user[postbg]) $postbg="";
loadtlayout();
$user[headtext]=$user[postheader];
$user[signtext]=$user[signature];
$user[text] = "[quote=fhqwhgads]A sample quote, with a link, for testing your layout.[/quote](sample text)";
// so that layouts show up regardless of setting (for obvious reasons)
$loguser[viewsig] = 1;
// shop/rpg such
$shops=mysql_query('SELECT * FROM itemcateg ORDER BY corder');
$eq=mysql_fetch_array(mysql_query("SELECT * FROM users_rpg WHERE uid=$id"));
$eqitems=mysql_query("SELECT * FROM items WHERE id=$eq[eq1] OR id=$eq[eq2] OR id=$eq[eq3] OR id=$eq[eq4] OR id=$eq[eq5] OR id=$eq[eq6]");
while($item=mysql_fetch_array($eqitems)) $items[$item[id]]=$item;
while($shop=mysql_fetch_array($shops))
$shoplist.="
$tccell1s width=70>$shop[name]
$tccell2s>".$items[$eq['eq'.$shop[id]]][name]." ";
print "
$header
$fonttag Profile for $minipic$user[name]
$tblstart
$tccellh colspan=2>General information
$tccell1l width=150>Total posts $tccell2l>$user[posts] ($postavg per day) $projdate $bar
$tccell1l width=150>Total threads $tccell2l>$threadsposted
$tccell1l width=150>EXP $tccell2l>$expstatus
$tccell1l width=150>User rating $tccell2l>$ratingstatus
$tccell1l width=150>Registered on $tccell2l>".@date($dateformat,$user[regdate]+$tzoff)." (".floor((ctime()-$user[regdate])/86400)." days ago)
$tccell1l width=150>Last post $tccell2l>$lastpostdate$lastpostlink
$tccell1l width=150>Last activity $tccell2l>".date($dateformat,$user[lastactivity]+$tzoff)."$lastip
$tblend
$tblstart
$tccellh colspan=2>Contact information
$tccell1l width=150>Email address $tccell2l>$user[email]
$tccell1l width=150>Homepage $tccell2l>$homepagename
$tccell1l width=150>ICQ number $tccell2l>$user[icq] $icqicon
$tccell1l width=150>AIM screen name $tccell2l>$user[aim]
$tblend
$tblstart
$tccellh colspan=2>User settings
$tccell1l width=150>Timezone offset $tccell2l>$tzoffset hours from the server, $tzoffrel hours from you (current time: $tzdate)
$tccell1l width=150>Other $tccell2l>(Xkeeper needs to add more things here)
$tblend
|
$tblstart
$tccellh>RPG status
$tccell1l>
$tblend
$tblstart
$tccellh colspan=2>Equipped Items
$shoplist
$tblend
| |
$tblstart
$tccellh colspan=2>Personal information
$tccell1l width=150>Real name $tccell2l>$user[realname]
$tccell1l width=150>Location $tccell2l>$user[location]
$tccell1l width=150>Birthday $tccell2l>$birthday $age
$tccell1l width=150>User bio $tccell2l>$user[bio]
$tblend
$tblstart
$tccellh colspan=2>Sample post
". threadpost($user, 1) ."
$tblend
$tblstart
$tccellhs colspan=2>Options
$tccell2s colspan=2>
Show posts |
List posts by this user |
View threads by this user
$sendpmsg$ratelink
$tccell2s colspan=2>
Posts by time of day |
Posts by thread |
Posts by forum$sneek
$tblend$footer
";
printtimedif($startingtime);
?> |