endo Posted June 28, 2008 Share Posted June 28, 2008 right i keep getting this error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/endo/public_html/header.php on line 157 [b]Level:[/b] {$ir['level']} if($ir['upgrade'] ==1) ///////this is line 157 { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } i have been staring at this for ages ive tried numerous things but cant figure it out anyone out there have a solution. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted June 28, 2008 Share Posted June 28, 2008 Re: help quick if anyone can End the current print... [b]Level:[/b] {$ir['level']} "; // Here! if($ir['upgrade'] ==1) { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } Quote Link to comment Share on other sites More sharing options...
endo Posted June 28, 2008 Author Share Posted June 28, 2008 Re: help quick if anyone can still same error zeon even with it now like you said [b]Level:[/b] {$ir['level']} "; if($ir['upgrade'] ==1) { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted June 28, 2008 Share Posted June 28, 2008 Re: help quick if anyone can Post your header... Quote Link to comment Share on other sites More sharing options...
endo Posted June 28, 2008 Author Share Posted June 28, 2008 Re: help quick if anyone can here ya go zeon <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DDDDDD; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #DDDDDD; scrollbar-arrow-color: #DDDDDD; scrollbar-DarkShadow-Color: #DDDDDD; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#DDDDDD; vertical-align:top; text-align:center; } .table { background-color:#DDDDDD; } .table3 { background-color:#DDDDDD; } .table td { background-color:#DDDDDD; height:22px; } .table3 td { background-color:#DDDDDD; } td .alt { background-color:#DDDDDD; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ($ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $gn=""; global $staffpage; $bgcolor = 'DDDDDD'; print <<<OUT [img=title2.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] $gn{$u} [{$ir['userid']}] $d [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} "; if($ir['upgrade'] ==1) { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } [b]Crystals:[/b] {$ir['crystals']} [b]Honors:[/b]{$ir['honor']} [[url='logout.php']Emergency Logout[/url]] <hr /> [b]Energy:[/b] {$enperc}% <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Start */ /*+++++++++++++++++++++++++++++++++++++*/ //check if incomingData is not empty and of the expected length function checkIncomingData($idata, $minsize, $maxsize) { if ( strlen($idata)<$minsize or strlen($idata)>$maxsize ) { return false; } else { return true; } } //make sure that nothing bad can be entered by the user (-->sql injection attack) function cleanIncomingData($idata) { $cleaned = trim($idata); $cleaned = mysql_real_escape_string($cleaned); return $cleaned; } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Ended */ /*+++++++++++++++++++++++++++++++++++++*/ ?> Quote Link to comment Share on other sites More sharing options...
The Ace Posted June 28, 2008 Share Posted June 28, 2008 Re: help quick if anyone can Haven't you got to then open another print after the last }? <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DDDDDD; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #DDDDDD; scrollbar-arrow-color: #DDDDDD; scrollbar-DarkShadow-Color: #DDDDDD; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#DDDDDD; vertical-align:top; text-align:center; } .table { background-color:#DDDDDD; } .table3 { background-color:#DDDDDD; } .table td { background-color:#DDDDDD; height:22px; } .table3 td { background-color:#DDDDDD; } td .alt { background-color:#DDDDDD; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ($ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $gn=""; global $staffpage; $bgcolor = 'DDDDDD'; print <<<OUT [img=title2.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] $gn{$u} [{$ir['userid']}] $d [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} "; if($ir['upgrade'] ==1) { print"<a href=upgrade.php>[b][upgrade][/b]</a> "; } print "[b]Crystals:[/b] {$ir['crystals']} [b]Honors:[/b]{$ir['honor']} [[url='logout.php']Emergency Logout[/url]] <hr /> [b]Energy:[/b] {$enperc}% <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Start */ /*+++++++++++++++++++++++++++++++++++++*/ //check if incomingData is not empty and of the expected length function checkIncomingData($idata, $minsize, $maxsize) { if ( strlen($idata)<$minsize or strlen($idata)>$maxsize ) { return false; } else { return true; } } //make sure that nothing bad can be entered by the user (-->sql injection attack) function cleanIncomingData($idata) { $cleaned = trim($idata); $cleaned = mysql_real_escape_string($cleaned); return $cleaned; } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Ended */ /*+++++++++++++++++++++++++++++++++++++*/ ?> MAKE SURE YOU HAVE A BACKUP!! Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted June 28, 2008 Share Posted June 28, 2008 Re: help quick if anyone can You need to close the... print <<<OUT and start with a fresh print. Quote Link to comment Share on other sites More sharing options...
endo Posted June 28, 2008 Author Share Posted June 28, 2008 Re: help quick if anyone can sorry zeon im feeling a little bit dim at asking this but what? Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted June 28, 2008 Share Posted June 28, 2008 Re: help quick if anyone can <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DDDDDD; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #DDDDDD; scrollbar-arrow-color: #DDDDDD; scrollbar-DarkShadow-Color: #DDDDDD; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#DDDDDD; vertical-align:top; text-align:center; } .table { background-color:#DDDDDD; } .table3 { background-color:#DDDDDD; } .table td { background-color:#DDDDDD; height:22px; } .table3 td { background-color:#DDDDDD; } td .alt { background-color:#DDDDDD; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ($ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $gn=""; global $staffpage; $bgcolor = 'DDDDDD'; print <<<OUT [img=title2.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] $gn{$u} [{$ir['userid']}] $d [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} OUT; // close if($ir[upgrade] == "1") { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } echo " [b]Crystals:[/b] {$ir['crystals']} [b]Honors:[/b]{$ir['honor']} [[url='logout.php']Emergency Logout[/url]] <hr /> [b]Energy:[/b] {$enperc}% <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Start */ /*+++++++++++++++++++++++++++++++++++++*/ //check if incomingData is not empty and of the expected length function checkIncomingData($idata, $minsize, $maxsize) { if ( strlen($idata)<$minsize or strlen($idata)>$maxsize ) { return false; } else { return true; } } //make sure that nothing bad can be entered by the user (-->sql injection attack) function cleanIncomingData($idata) { $cleaned = trim($idata); $cleaned = mysql_real_escape_string($cleaned); return $cleaned; } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Ended */ /*+++++++++++++++++++++++++++++++++++++*/ ?> Updated. Quote Link to comment Share on other sites More sharing options...
endo Posted June 28, 2008 Author Share Posted June 28, 2008 Re: help quick if anyone can thnx zeon still a small problem but ill sort that Quote Link to comment Share on other sites More sharing options...
MechAlien Posted June 30, 2008 Share Posted June 30, 2008 Re: help quick if anyone can or put a space for before the one.... == 1 << like that instead of ==1 its just better Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted June 30, 2008 Share Posted June 30, 2008 Re: help quick if anyone can or put a space for before the one.... == 1 << like that instead of ==1 its just better And this from the guy who will "code" anything -- you missed a really stupid mistake -- look at the code again: [b]Level:[/b] {$ir['level']} if($ir['upgrade'] ==1) ///////this is line 157 { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } It's obvious where the error is and it has nothing to do with spaces before, during or after the conditional statement. The error message clearly states: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING Which tells you what? Perhaps an escaped string has not been correctly enclosed...? The error is in fact in the line above. It appears to be missing the string terminator, and given the error in question I would suspect that the simple addition of a '; at the end of line 156 would solve the issue. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted June 30, 2008 Share Posted June 30, 2008 Re: help quick if anyone can He uses a heredoc which that needs to be closed to use the statement. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted June 30, 2008 Share Posted June 30, 2008 Re: help quick if anyone can Thank you Zeon - Not being able to see prior lines the '; was based on a guess - had to be one of the 3 basic string formats though ;) 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.