Jump to content

maybe .htaccess?


DeathStar

Recommended Posts

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>";
}
}
?>

 

Link to comment
https://forums.phpfreaks.com/topic/39467-maybe-htaccess/
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190509
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190538
Share on other sites

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);
}

Link to comment
https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190548
Share on other sites

nope not that :P

 

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..

Link to comment
https://forums.phpfreaks.com/topic/39467-maybe-htaccess/#findComment-190807
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.