Jump to content
MakeWebGames

Recommended Posts

Posted

Hi people

I just experienced a problem and I cant fix it I think it has to due with the header

The problem is that I can only view my game on firefox i cant view it on any other browser

Please help

Posted

This is my header

 

<?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-image:url(background.jpg);
margin-top: 0px;
margin-bottom: 0px;
font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: white;
  scrollbar-base-color: #005B70; 
  scrollbar-arrow-color: #F3960B;
  scrollbar-DarkShadow-Color: #000000;
}
a:visited,a:active,a:link { color: white;text-decoration: none; }
a:hover { color: grey;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:#000000;
vertical-align:top;
text-align:center;
}
.table {
background-color:#000000;
}
.table3 {
background-color:#000000;
}
.table td {
background-color:#000000;
height:22px;
}
.table3 td {
background-color:#CCCCCC;
}
td .alt {
background-color:#EEEEEE;
height:22px;
}
td .h {
background-image:url(headgrad.png);
background-repeat:repeat-x;
font-weight: bold;
background-color: #D6D6D6;
}
.table th {
background-image:url(headgrad.png);
background-repeat:repeat-x;
font-weight: bold;
background-color: #D6D6D6;
}

#menu {
width: 12em;
background: #000000;
}

#menu ul {
list-style: none;
margin: 0;
padding: 0;
}

#menu a, #menu h2 {
font: bold 12px/16px arial, helvetica, sans-serif;
display: block;
border-width: 1px;
border-style: solid;
border-color: #1f1f1f;
margin: 0;
padding: 3px 4px;
}

#menu h2 {
color: #000;
background: #fff;
text-transform: uppercase;
}

#menu a {
color: #fff;
background: #000000;
text-decoration: none;
}

#menu a:hover {
color: #a00;
background: #fff;
}

#menu ul ul ul {
position: absolute;
top: 0;
left: 0;
}

#menu li {position: relative;}

#menu ul ul ul {
position: absolute;
top: 0;
left: 100%;
width: 100%;
}

div#menu ul ul ul,
div#menu ul ul li:hover ul ul
{display: none;}

div#menu ul ul li:hover ul,
div#menu ul ul ul li:hover ul
{display: block;}

<!--[if IE]>
<style type="text/css" media="screen">
body {
behavior: url(csshover.htc);
font-size: 100%;
} 
#menu ul li {float: left; width: 100%;}
#menu ul li a {height: 1%;} 

#menu a, #menu h2 {
font: bold 1.0em/1.8em arial, helvetica, sans-serif;
} 

#easyTooltip{
padding:5px 10px;
border:1px solid #195fa4;
background:#195fa4 url(bg.gif) repeat-x;
color:#fff;
}
</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['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]"; }

$gn=""; 
global $staffpage;

$bgcolor = '000000';
if($ir['marriage']) {

  $do_1= mysql_query("SELECT * FROM users WHERE userid={$ir['marriage']}");
  $r = $db->fetch_row($do_1);

  if($r['maxwill'] > $ir['maxwill']) {

 	$db->query("UPDATE users SET shared = maxwill, maxwill = {$r['maxwill']} WHERE userid = $userid");
 	$db->query("UPDATE users SET shared = 'owner' WHERE userid = {$ir['marriage']}");

  } else if($ir['maxwill'] > $r['maxwill']) {

 	$db->query("UPDATE users SET shared = maxwill, maxwill = {$ir['maxwill']} WHERE userid = {$ir['marriage']}");
 	$db->query("UPDATE users SET shared = 'owner' WHERE userid = $userid");

  } else {

 	$db->query("UPDATE users SET shared = 'owner' WHERE userid = {$ir['marriage']}");
 	$db->query("UPDATE users SET shared = 'owner' WHERE userid = $userid");

  }
}
$Auction = mysql_query("SELECT `ID`,`SellerID`,`ItemID`,`CurrentBid`,`Time`,`TimeLeft` FROM `gAuction` WHERE (`Time` - ".time()." + `TimeLeft` < 1)")or die(mysql_error());

while($Auction2 = mysql_fetch_array($Auction))
{


$AuctionBids = mysql_query("SELECT `ID`,`aID`,`BidderID`,`CurrentBid2` FROM `gAuctionBids` WHERE (`aID` = ".$Auction2['ID'].")")or die(mysql_error());  

$atime = $Auction2['Time'] - time() + $Auction2['TimeLeft']; 

if($atime < 1 && !mysql_num_rows($AuctionBids))
{
event_add($Auction2['SellerID'],'Your auction finished without any bids.');
mysql_query("INSERT INTO `inventory` VALUES ('',".$Auction2['ItemID'].",".$Auction2['SellerID'].",1)") or die(mysql_error());
mysql_query("DELETE FROM `gAuction` WHERE (`ID` = ".$Auction2['ID'].")")or die(mysql_error());
}

elseif($atime < 1 && mysql_num_rows($AuctionBids))
{
$AuctionBids = mysql_fetch_array($AuctionBids);
event_add($Auction2['SellerID'],'Your auction has finished, the maximum bid was $'.number_format($Auction2['CurrentBid']).'');
event_add($AuctionBids['BidderID'], 'You\'ve won the auction!');
mysql_query("UPDATE `users` SET `money` = `money` + ".abs(intval($Auction2['CurrentBid']))." WHERE (`userid` = ".$Auction2['SellerID'].")")or die(mysql_error());
mysql_query("INSERT INTO `inventory` VALUES ('',".$Auction2['ItemID'].",".$AuctionBids['BidderID'].",1)")or die(mysql_error());
mysql_query("DELETE FROM `gAuction` WHERE (`ID` = ".$Auction2['ID'].")")or die(mysql_error());
mysql_query("DELETE FROM `gAuctionBids` WHERE (`aID` = ".$Auction2['ID'].")")or die(mysql_error());
}
}
print <<<OUT
[img=cworld.png]

<hr />



<table width="80%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" bgcolor="#$bgcolor" valign="top">

[b]Name:[/b] [url='viewuser.php?u={$ir[']$gn{$u}[/url] [{$ir['userid']}] $d

[b]Money:[/b] {$fm}

[b]Level:[/b] {$ir['level']}

[b]Crystals:[/b] {$ir['crystals']}

[[url='logout.php']Emergency Logout[/url]]
<hr />
[b]Energy:[/b] {$enperc}%

<img src=greenbar.gif width=$enperc height=10><img src=redbar.png width=$enopp height=10>

[b]Will:[/b] {$wiperc}%

<img src=greenbar.gif width=$wiperc height=10><img src=redbar.png width=$wiopp height=10>

[b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']}

<img src=greenbar.gif width=$brperc height=10><img src=redbar.png width=$bropp height=10>

[b]EXP:[/b] {$experc}%

<img src=greenbar.gif width=$experc height=10><img src=redbar.png width=$exopp height=10>

[b]Health:[/b] {$hpperc}%

<img src=greenbar.gif 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 = '000000';
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 = '000000';
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;
}
}
?>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...