Jump to content
MakeWebGames

Header problem


Kaien

Recommended Posts

I'm making a game and heres the problem. My header is this.

When I log in, the index and any other pages are on the right instead of where they should be.Please help

[fieldset]<?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: #222222;

font-family: tahoma;

font-size: 11px;

color: #CCFFFF;

}

a {

color: #FFFFFF;

text-decoration: none;

}

#container {

width: 800px;

margin: auto;

border: 2px solid #000000;

background-color: #999999;

clear: both;

overflow: hidden;

margin-bottom: 10px;

}

#banner {

background-image: url(images/banner.png);

width: 800px;

height: 299px;

}

#menu {

width: 800px;

height: 17px;

background-color: #333333;

border-bottom: 2px solid #000000;

border-top: 2px solid #000000;

margin-bottom: 10px;

padding-top: 3px;

text-align: center;

}

#side {

width: 200px;

margin-left: 15px;

margin-bottom: 15px;

float: left;

}

#box {

width: 200px;

border: 2px solid #000000;

background-color: #666666;

margin-bottom: 5px;

}

#boxhead {

width: 197px;

height: 15px;

background-color: #333333;

border-bottom: 2px solid #000000;

padding-left: 3px;

}

#content {

width: 540px;

border: 2px solid #000000;

background-color: #666666;

float: left;

margin-left: 20px;

margin-bottom: 10px;

}

.SubHeader {

height: 15px;

background-color: #333333;

border-bottom: 2px solid #000000;

padding-left: 3px;

}

#copyright {

width: 800px;

margin: auto;

border: 2px solid #000000;

background-color: #999999;

clear: both;

overflow: hidden;

text-align: center;

padding-top: 3px;

padding-bottom: 3px;

}

-->

</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="donator.gif"; }

$gn="";

global $staffpage;

$bgcolor = 'FFFFFF';

print <<<OUT

title.jpg

 

<div id="box">

<table class = "SubHeader" width="200"><tr>

<td align = "center">Character Notifications</td></tr></table>

<table width = "" border = "0" cellpadding = "" cellspacing = "" class = "">

<tr align="left"><td>PM-Messages:</td><td>No unread messages</td></tr>

<tr align="left"><td>Battle Arena:</td><td>You are not in battle</td></tr>

<tr align="left"><td>Agni Kai:</td><td>No challenges</td></tr>

<tr align="left"><td>Attacked:</td><td>No attacks</td></tr>

<tr align="left"><td>Events:</td><td>You have no events</td></tr>

<tr align="left"><td>Your Status:</td><td>You are awake</td></tr>

<tr align="left"><td>Hospital:</td><td>Perfectly Healthy</td></tr>

<tr align="left"><td>Level Up:</td><td>Claim Level</td></tr>

 

</table>

</div>

<div id="box">

<table class = "SubHeader" width="200"><tr>

<td align = "center">Character Status</td></tr></table>

<table width = "" border = "0" cellpadding = "" cellspacing = "" class = "">

<tr>

<td>Health: </td><td>/

life_bar.jpg</td>

</tr>

<tr>

<td>Chi: </td><td>/

cha_bar.jpg</td>

</tr>

<tr>

<td>Stamina: </td><td>/

sta_bar.jpg</td>

</tr>

<tr>

<td></td>

</tr>

<tr>

<td>Regen Rate: </td><td></td>

</tr>

<tr>

<td></td>

</tr>

<tr>

<td>Location: </td><td>.,OutSkirts</td>

</tr>

</table>

</div>

 

OUT;

if($ir['fedjail'])

{

$q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid");

$r=$db->fetch_row($q);

die("<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></body></html>");

}

if(file_exists('ipbans/'.$IP))

{

die("<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font></body></html>");

}

}

function menuarea()

{

include "mainmenu.php";

global $ir,$c;

$bgcolor = 'FFFFFF';

print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top">

<center>';

if($ir['hospital'])

{

print "NB: You are currently in hospital for {$ir['hospital']} minutes.

";

}

if($ir['jail'])

{

print "NB: You are currently in jail for {$ir['jail']} minutes.

";

}

print "Donate to {$set['game_name']} now for game benefits!

";

}

function smenuarea()

{

include "smenu.php";

global $ir,$c;

$bgcolor = 'FFFFFF';

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;

}

}

?>[/fieldset]

Link to comment
Share on other sites

with just scouring your code all i can see is that this may be the issue

#container {

width: 800px;

margin: auto;

border: 2px solid #000000;

background-color: #999999;

clear: both;

overflow: hidden;

margin-bottom: 10px;

}

#menu {

width: 800px;

height: 17px;

background-color: #333333;

border-bottom: 2px solid #000000;

border-top: 2px solid #000000;

margin-bottom: 10px;

padding-top: 3px;

text-align: center;

}

#side {

width: 200px;

margin-left: 15px;

margin-bottom: 15px;

float: left;

}

dont quote me though im not great with CSS but id start there

Link to comment
Share on other sites

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