DeathStar Posted February 21, 2007 Share Posted February 21, 2007 Hi I am confused. because I have a game and only one part of it is showing?!? But I can see the whole game, just not other people? It works with include's the header.php, mainmenu.php and the other files. And suddenly inly the top part(header) is displaying?? Look for your self. www.GangsterTerritory.com login: test password: test here is the header part: <?php class headers { function startheaders() { global $ir; echo <<<EOF <html> <head> <title>GangstersTerritory :: BETA Final</title> <style> body { font-family:helvetica, arial, geneva, sans-serif;font-size:12;color: #66ff00; scrollbar-base-color: #000000; scrollbar-arrow-color: #66ff00; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: #66ff00;text-decoration: none; } table,tr,td { font-family:font-family: Arial;font-size: 12; background-color: #3f3f3f3f; } img { border:none; } textarea { font-family:font-family:Arial; font-size:14px;color:red; } </style> <style> a:link { color: #66ff00; font-family: "Arial"; } a:hover { color: white; font-family: Arial; text-decoration: , underline } </style> <link rel="icon" href="gt.ico" type="image/x-icon"> <link rel="shortcut icon" href="gt.ico" type="image/x-icon"> </head> <body> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $c,$userid; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; mysql_query("UPDATE users SET laston=unix_timestamp(),lastip='$ip' WHERE userid=$userid",$c); if($dosessh && $_SESSION['attacking']) { print "You lost all your EXP for running from the fight."; mysql_query("UPDATE users SET exp=0 WHERE userid=$userid",$c); $_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; //marraige script if ($ir['married']>0) { $marr=mysql_query("SELECT * FROM users WHERE userid={$ir['married']}",$c); $ma=mysql_fetch_array($marr); if ($ma['willmax']>$ir['maxwill']) { mysql_query("UPDATE users SET maxwill={$ma['willmax']} WHERE userid=$userid",$c); } if ($ir['willmax']<$ir['maxwill'] && $ir['maxwill']>$ma['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } } if ($ir['maxwill']<$ir['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } if ($ir['married']==0 && $ir['maxwill']>$ir['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } $fia=(int) rand(1000,9999); $fib=(int) rand(1000000,9999999); if($fia == $fib) { //finding items $iq=mysql_query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1",$c); $r=mysql_fetch_array($iq); $item=$r['itmid']; $userid=$ir['userid']; mysql_query("INSERT INTO inventory VALUES ('', $item, $userid, 1)",$c); event_add($userid,"You found a {$r['itmname']} While Walking Around the city.",$c); } $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="<img src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' title='Donator: {$ir['donatordays']} Days Left' />"; } if($ir['gang']) { $qg=mysql_query("SELECT * FROM gangs WHERE gangID={$ir['gang']}",$c); $rr=mysql_fetch_array($qg); $gn=$rr['gangPREF']." "; } else { $gn=""; } print "<body bgcolor='#3d3d3d'> <center><table> <td><b>Name:</b> $gn{$u} [{$ir['userid']}] $d</center> <br/> <b>Money:</b> {$fm}</center> <br/> <b>Level:</b> {$ir['level']}</center> <br/> <b>Jewels:</b> {$ir['crystals']}</center> <br/> <b>Steps:</b> {$ir['turns']}</center> <br/> [<a href='logout.php'>Logout</a>]</td> <td><img src='gts.jpg' alt='Loading...' /> </td><td> <b>Energy:</b> {$enperc}%<br /> <img src=bargreen.gif width=$enperc height=10><img src=barred.gif width=$enopp height=10><br /> <b>Will:</b> {$wiperc}%<br /> <img src=/barblue.gif width=$wiperc height=10><img src=barred.gif width=$wiopp height=10><br /> <b>Nerve:</b> {$ir['brave']}/{$ir['maxbrave']}<br /> <img src=barblack.gif width=$brperc height=10><img src=barred.gif width=$bropp height=10><br /> <b>EXP:</b> {$experc}%<br /> <img src=baryellow.gif width=$experc height=10><img src=barred.gif width=$exopp height=10><br /> <b>Health:</b> {$hpperc}%<br /> <img src=barwhite.gif width=$hpperc height=10><img src=barred.gif width=$hpopp height=10></td></tr></table></center></div> <center><h2><font color=red><a href='vote.php'>Vote for GT</a><br><a href='donator.php'><b>Donate to GangstersTerritory and get lots of benifits!!</b></h2></center><br/> "; print "<table width=100%><tr><td width=20% valign='top'> "; if($ir['fedjail']) { $q=mysql_query("SELECT * FROM fedjail WHERE fed_userid=$userid",$c); $r=mysql_fetch_array($q); die("<b><font color=red size=+1>You have been put in the Federal Jail for {$r['fed_days']} day(s).<br /> 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, there is no way around this.</font></b></body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; print "</td><td valign='top'> "; } function endpage() { print "</td></tr></table></body> </html>"; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/ Share on other sites More sharing options...
DeathStar Posted February 21, 2007 Author Share Posted February 21, 2007 so no one knows whats wrong? i did have an problem with images not displaying.. deleted the part to block images in .htacces now im starting to wonder if i shouldn't have , maybe i deleted something? Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190447 Share on other sites More sharing options...
ted_chou12 Posted February 21, 2007 Share Posted February 21, 2007 whats the page url you want us to have a look at? Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190452 Share on other sites More sharing options...
DeathStar Posted February 21, 2007 Author Share Posted February 21, 2007 www.GangsterTerritory.com is where the problem is. the page layout is like this: ______________________ |________HEADER_______| | | | | | | |Me | Main | |nu | | | | | |___|__________________| its like only the header is dispalying.. but if you view header.php it will be blank? but I can see the whole page though, just not the users? Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190509 Share on other sites More sharing options...
ted_chou12 Posted February 21, 2007 Share Posted February 21, 2007 Ive been to the header.php page, and it does appear to be blank, and i beleive your header is an image rather than a page: Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190520 Share on other sites More sharing options...
skali Posted February 21, 2007 Share Posted February 21, 2007 try setting ini_set('error_reporting', E_ALL); Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190525 Share on other sites More sharing options...
DeathStar Posted February 21, 2007 Author Share Posted February 21, 2007 well i added that and got: Notice: Undefined index: attacking in /hsphere/local/home/gangster/gangsterterritory.com/header.php on line 41 Notice: Undefined index: willmax in /hsphere/local/home/gangster/gangsterterritory.com/header.php on line 73 Notice: Undefined index: willmax in /hsphere/local/home/gangster/gangsterterritory.com/header.php on line 77 Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190538 Share on other sites More sharing options...
DeathStar Posted February 21, 2007 Author Share Posted February 21, 2007 This could not maybe be caused by a mysql version? here is the code of those lines(all sql): line 41: if($dosessh && $_SESSION['attacking']) { print "You lost all your EXP for running from the fight."; mysql_query("UPDATE users SET exp=0 WHERE userid=$userid",$c); $_SESSION['attacking']=0; } --------------------------------------------- line 73: if ($ir['maxwill']<$ir['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } -------------------------------------------- line 77: if ($ir['married']==0 && $ir['maxwill']>$ir['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190548 Share on other sites More sharing options...
skali Posted February 21, 2007 Share Posted February 21, 2007 Its not MySQL error it states that your session and does not have attacking index set and $ir array does not have willmax index set. You are not setting these variables properly. You have to set these variables before using them. Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190692 Share on other sites More sharing options...
DeathStar Posted February 21, 2007 Author Share Posted February 21, 2007 nope not that the mysql_query is in the other file ... I found out that IE does that told a member to use ff and it worked.. So i'm the only one that used ff :| Anyone know how to convert it so that IE also works with it or the other way around.. Quote Link to comment https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190807 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.