bladewolf2010 Posted May 31, 2010 Share Posted May 31, 2010 Parse error: syntax error, unexpected T_ELSE in /home/***********/public_html/viewuser1.php on line 198 <?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); 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['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>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'><tr style='background:gray'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr> <tr><td>Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Gender: {$r['gender']} Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']}</td><td> Money: \${$r['money']} Crystals: {$r['crystals']} Property: {$r['hNAME']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} </td> <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 style='background:gray'><th>Physical Info</th><th>Links</th><th>$sh</th></tr> <tr><td>Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} Gang: "; if($r['gang']) { print "[url='gangs.php?action=view&ID={$r[']{$r['gangNAME']}[/url]"; } else { print "N/A"; } if($r['fedjail']) { print " [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 "</td><td>[[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]]"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { print " [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } } if($ir['donatordays'] > 0) { print " [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]]<td/></td>"; } print "</td></tr> "; print " <table width=100%><tr style='background:gray'><th>Profile Signature</th> <tr><td rowspan='1'>"; if($r['signature']) { print "{$r['signature']}"; } else { print "[b]This User has no Profile Signature[/b]"; } print "</td></tr></table>"; { $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 "<h3>Internet Info</h3><table width='100%' border='0' cellspacing='1' class='table'> <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr> <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr> <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr> <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>"; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } else { print ""; { print "</tr></table>"; } } function checkblank($in) { if($in) { return "N/A"; } return $in; } $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
Richard Posted May 31, 2010 Share Posted May 31, 2010 Want that parse error fixed maybe...? if you do why dont you atleast ask not just post up a code, Were not slaves.... Have some manners and someone will do it for you. ;) Quote Link to comment Share on other sites More sharing options...
Brad Posted May 31, 2010 Share Posted May 31, 2010 lol Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted May 31, 2010 Share Posted May 31, 2010 This is quite common with your posts where you are not actually reading the error reported. Look at the code. Ill give you a hint....look at line 180 Quote Link to comment Share on other sites More sharing options...
bladewolf2010 Posted May 31, 2010 Author Share Posted May 31, 2010 Can you fix it? Sorry for being ignorant. Quote Link to comment Share on other sites More sharing options...
kcmajor36 Posted May 31, 2010 Share Posted May 31, 2010 Fixed <?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); 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['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>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'><tr style='background:gray'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr> <tr><td>Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Gender: {$r['gender']} Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']}</td><td> Money: \${$r['money']} Crystals: {$r['crystals']} Property: {$r['hNAME']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} </td> <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 style='background:gray'><th>Physical Info</th><th>Links</th><th>$sh</th></tr> <tr><td>Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} Gang: "; if($r['gang']) { print "[url='gangs.php?action=view&ID={$r[']{$r['gangNAME']}[/url]"; } else { print "N/A"; } if($r['fedjail']) { print " [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 "</td><td>[[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]]"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { print " [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } } if($ir['donatordays'] > 0) { print " [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]]<td/></td>"; } print "</td></tr> "; print " <table width=100%><tr style='background:gray'><th>Profile Signature</th> <tr><td rowspan='1'>"; if($r['signature']) { print "{$r['signature']}"; } else { print "[b]This User has no Profile Signature[/b]"; } print "</td></tr></table>"; $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 "<h3>Internet Info</h3><table width='100%' border='0' cellspacing='1' class='table'> <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr> <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr> <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr> <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>"; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } else { print ""; { print "</tr></table>"; } } function checkblank($in) { if($in) { return "N/A"; } return $in; } $h->endpage(); ?> I think I fixed it! Quote Link to comment Share on other sites More sharing options...
bladewolf2010 Posted May 31, 2010 Author Share Posted May 31, 2010 Parse error: syntax error, unexpected T_ELSE in /home/***********/public_html/viewuser1.php on line 198 same error Quote Link to comment Share on other sites More sharing options...
Paddy Posted May 31, 2010 Share Posted May 31, 2010 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); 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['donatordays']) { $r['username'] = "{$r['username']}";$d=""; } if($r['laston'] >= time()-15*60) { $on="Online"; } else { $on="Offline"; } print " Profile for {$r['username']} General Info Financial Info Display Pic Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Gender: {$r['gender']} Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']} Money: \${$r['money']} Crystals: {$r['crystals']} Property: {$r['hNAME']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} "; if($r['display_pic']) { print ""; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print " Physical Info Links $sh Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} Gang: "; if($r['gang']) { print "{$r['gangNAME']}"; } else { print "N/A"; } if($r['fedjail']) { print " In federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}"; } if($r['hospital']) { print " In hospital for {$r['hospital']} minutes. {$r['hospreason']}"; } if($r['jail']) { print " In jail for {$r['jail']} minutes. {$r['jail_reason']}"; } print " [send Mail] [send Cash] "; if($set['sendcrys_on']) { print "[send Crystals] "; } if($set['sendbank_on']) { if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0) { print "[bank Xfer] "; } if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0) { print "[CyberBank Xfer] "; } } print " [Attack] [Add Contact]"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { print " [Jail] [MailBan]"; } } if($ir['donatordays'] > 0) { print " [Add Friends] [Add Enemies] "; } print " "; print " Profile Signature "; if($r['signature']) { print "{$r['signature']}"; } else { print "This User has no Profile Signature"; } print " "; $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 " Internet Info IP Hostname Last Hit $r[lastip] $r[lastiph] Last Login $r[lastip_login] $r[lastip_loginh] Signup $r[lastip_signup] $r[lastip_signuph] "; print " Staff Notes: {$r['staffnotes']} "; } else { print " "; { print " "; } } function checkblank($in) { if($in) { return "N/A"; } return $in; } $h->endpage(); ?> I think I fixed it! Parse error: syntax error, unexpected T_ELSE in /home/***********/public_html/viewuser1.php on line 198 same error Not sure i think line 180 needs a } or a { Quote Link to comment Share on other sites More sharing options...
bladewolf2010 Posted May 31, 2010 Author Share Posted May 31, 2010 Lol i'll try later :) Quote Link to comment Share on other sites More sharing options...
Uridium Posted June 1, 2010 Share Posted June 1, 2010 Remove the stray ELSE on line 250 if your looking at it from here or line 198 if its on a text editor.. Then add } after return $in; } so it reads return $in; } } $h->endpage(); And it should work.. The else statement isnt needed... Quote Link to comment Share on other sites More sharing options...
Djkanna Posted June 1, 2010 Share Posted June 1, 2010 Moved to Modification Support Quote Link to comment Share on other sites More sharing options...
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.