grimsybaby Posted January 15, 2009 Posted January 15, 2009 i redone my viewuser.php works fine apart from the player picture doesnt come up :s can anyone help? <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); $m=$db->query("SELECT * FROM users WHERE userid={$r['married']}"); $par=$db->fetch_row($m); if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else {$userl="Assistant"; } $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never"; $sup=date('F j, Y g:i:s a',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; $d=""; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['married'] != 0) { $partner= "[url='viewuser.php?u={$par[']<font color=green>{$par['username']}</font>[/url]"; } else { $partner= "<font color=red>N/A</font>"; } if($r['donatordays']) { $r['username'] = "<font color=red>{$r['username']}</font>";$d="[img=donator.gif]"; } if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<h3 align='center'>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'> <tr> <th colspan=2 rowspan=2 align='left' valign='middle'><div align='left'>General Info</div> Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Level: {$r['level']} Gender: {$r['gender']} Married: $partner Property: {$r['hNAME']} Health: {$r['hp']}/{$r['maxhp']} Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Gang: "; if($r['gang']) { print "{$r['gangNAME']}"; } else { print "N/A"; } if($r['fedjail']) { print " Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']} </th> <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr> <tr> <th width='70%' rowspan='2' align='left' valign='top'>[b]<font color=red>In federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}</font>"; } if($r['hospital']) { print " [b]<font color=red>In hospital for {$r['hospital']} minutes. {$r['hospreason']}</font>[/b]"; } if($r['jail']) { print " [b]<font color=red>In jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]"; } print "[/b] </th> <th colspan='2' align='center' valign='middle'><div align='center'>Links</div></th> </tr> <tr> <td width='9%'> [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } if($ir['donatordays'] > 0) { print " </td> <td><div align='left'>[[url='mailbox.php?action=compose&ID={$r[']Send Mail[/url]] [[url='sendcash.php?ID={$r[']Send Cash[/url]] "; if($set['sendcrys_on']) { print "[[url='sendcrys.php?ID={$r[']Send Crystals[/url]] "; } if($set['sendbank_on']) { if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0) { print "[[url='sendbank.php?ID={$r[']Bank Xfer[/url]] "; } if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0) { print "[[url='sendcyber.php?ID={$r[']CyberBank Xfer[/url]] "; } } print " [[url='attack.php?ID={$r[']Attack[/url]] [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]] [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]] "; } print "</div> </tr> <tr> <td colspan='3' align='center' valign='middle'><div align='center'>"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { $r['lastiph']=@gethostbyaddr($r['lastip']); $r['lastiph']=checkblank($r['lastiph']); $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']); $r['lastip_loginh']=checkblank($r['lastip_loginh']); $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']); $r['lastip_signuph']=checkblank($r['lastip_signuph']); print " </div> <h3 align='center'>Internet Info</h3> <div align='center'> <table width='100%' border='0' cellspacing='1' class='table'> <tr> <td align='center' valign='middle'><div align='center'></div></td> <td align='center' valign='middle' class='h'><div align='center'>IP</div></td> <td align='center' valign='middle' class='h'><div align='center'>Hostname</div></td> </tr> <tr> <td align='center' valign='middle' class='h'><div align='center'>Last Hit</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip]</div></td> <td align='center' valign='middle'><div align='center'>$r[lastiph]</div></td> </tr> <tr> <td align='center' valign='middle' class='h'><div align='center'>Last Login</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_login]</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_loginh]</div></td> </tr> <tr> <td align='center' valign='middle' class='h'><div align='center'>Signup</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_signup]</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_signuph]</div></td> </tr> </table> "; print" </div> <form action='staffnotes.php' method='post'> <div align='center'>Staff Notes: <textarea rows=7 cols=100 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input name='submit' type='submit' value='Change' /> </div> </form> <div align='center'>"; } else { print " "; } print " </div></td> </tr> </table>"; } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } if($r['profileSIG'] == "") { print " <table cellspacing=1 class='table' width='95%'> <tr style='background:gray'> <th>[b]<center>Profile Signature</center>[/b]</th> </tr> <tr> <td>[b]<center>This user has not got a profile signature!</center>[/b]</td> </tr> </table>"; } else { print " <table cellspacing=1 class='table' width='95%'> <tr style='background:gray'> <th>[b]<center>Profile Signature</center>[/b]</th> </tr> <tr> <td>{$r['profileSIG']}</td> </tr> </table>"; } $h->endpage(); ?> -Simon- Quote
BlueDevil23 Posted January 15, 2009 Posted January 15, 2009 Re: viewuser.php help Try closing the table data cell. Quote
grimsybaby Posted January 15, 2009 Author Posted January 15, 2009 Re: viewuser.php help Try closing the table data cell. which one do i need closeing i cant see it :s Quote
BlueDevil23 Posted January 15, 2009 Posted January 15, 2009 Re: viewuser.php help Try closing the table data cell. which one do i need closeing i cant see it :s The one containing the display pic. Quote
grimsybaby Posted January 15, 2009 Author Posted January 15, 2009 Re: viewuser.php help Try closing the table data cell. which one do i need closeing i cant see it :s The one containing the display pic. lol gatherd that much but they are closed, thats what i dont get XD <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr> Quote
BlueDevil23 Posted January 15, 2009 Posted January 15, 2009 Re: viewuser.php help Try closing the table data cell. which one do i need closeing i cant see it :s The one containing the display pic. lol gatherd that much but they are closed, thats what i dont get XD <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr> Umm... yeah about that lol. Sorry about that, it snuck past me :P Quote
grimsybaby Posted January 15, 2009 Author Posted January 15, 2009 Re: viewuser.php help Try closing the table data cell. which one do i need closeing i cant see it :s The one containing the display pic. lol gatherd that much but they are closed, thats what i dont get XD <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr> Umm... yeah about that lol. Sorry about that, it snuck past me :P hehe no problem see thats why im stumped XD i cant find an error but it just doesnt show up :( Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.