Jump to content
MakeWebGames

Ingame Error


Ben Nash

Recommended Posts

I'm trying to intergrate mccodes 2.03 intot his xhtml/css layout but its all messed up...

 

<?php
class headers {
function startheaders() {
global $ir, $set;
?>
<html>
<head>
<style type="text/css">
body {
background-color:#7F0172;
font-family:Segoe Script;
}

#wrapper {
width:900px;
margin-right:auto;
margin-left:auto;
}

#head {
background-image:url("ingameimages/banner.png");
background-repeat:no-repeat;
width:900px;
height:130px;
}

#left {
float:left;
height:700px;
width:130px;
background-color:#f11ff4;
border-right:solid 5px #000;
}

#right{
float:right;
height:700px;
width:130px;
background-color:#f11ff4;
border-left:solid 5px #000;
}

#content {
height:700px;
width:900px;
background-color:#f11ff4;
}

#footer {
clear:both;
background-image:url("ingameimages/footer.png");
background-repeat:no-repeat;
width:900px;
height:130px;
}
</style>
</head>
<body>


<div id="wrapper">
<div id="head"></div>
<div id="left">
<?php
}
}
function userdata($ir,$lv,$fm,$cm,$dosessh=1)
{
global $db,$c,$userid, $set;
$IP = $db->escape($_SERVER['REMOTE_ADDR']);
$db->query("UPDATE `users` SET `laston` = ".$_SERVER['REQUEST_TIME'].",`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']))
{
echo "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 src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' title='Donator: {$ir['donatordays']} Days Left' />"; 
}
}

$gn=""; 
global $staffpage;
?>
<?php
echo"
<b>Name:</b> $gn{$u} [{$ir['userid']}] $d<br />
<b>Money:</b> {$fm}<br />
<b>Level:</b> {$ir['level']}<br />
<b>Crystals:</b> {$ir['crystals']}<br />";
?>

<?php

function menuarea() {
define('jdsf45tji', true, true);
	include 'mainmenu.php';
global $ir,$c;
}

function smenuarea() {
define('jdsf45tji', true, true);
	include 'smenu.php';
global $ir,$c;
}
?>
</div>
<div id="right">
<?php
echo"
<b>Energy:</b> {$enperc}%<br />
<img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10><br />
<b>Will:</b> {$wiperc}%<br />
<img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10><br />
<b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']}<br />
<img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10><br />
<b>EXP:</b> {$experc}%<br />
<img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10><br />
<b>Health:</b> {$hpperc}%<br />
<img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10><br />";
?>
</div>
<div id="content">

</div>
<div id="footer"></div>
</div>

</body>
</html>
<?php 
function endpage()
{
global $db; 
}
?>

 

This is what it looks like...

[ATTACH=CONFIG]244[/ATTACH]

Please fix this

SCREEN.thumb.jpg.2c13b14b9e4a647af73846dd95d4df6f.jpg

Edited by Ben Nash
Link to comment
Share on other sites

try

 

<?php
class headers {
function startheaders() {
global $ir, $set;
echo <<<EOF
<html>
<head>
<style type="text/css">
body {
background-color:#7F0172;
font-family:Segoe Script;
}

#wrapper {
width:900px;
margin-right:auto;
margin-left:auto;
}

#head {
background-image:url("ingameimages/banner.png");
background-repeat:no-repeat;
width:900px;
height:130px;
}

#left {
float:left;
height:700px;
width:130px;
background-color:#f11ff4;
border-right:solid 5px #000;
}

#right{
float:right;
height:700px;
width:130px;
background-color:#f11ff4;
border-left:solid 5px #000;
}

#content {
height:700px;
width:900px;
background-color:#f11ff4;
}

#footer {
clear:both;
background-image:url("ingameimages/footer.png");
background-repeat:no-repeat;
width:900px;
height:130px;
}
</style>
</head>
<body>


<div id="wrapper">
<div id="head"></div>
<div id="left">
EOF;
}
}
function userdata($ir,$lv,$fm,$cm,$dosessh=1)
{
global $db,$c,$userid, $set;
$IP = $db->escape($_SERVER['REMOTE_ADDR']);
$db->query("UPDATE `users` SET `laston` = ".$_SERVER['REQUEST_TIME'].",`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']))
{
echo "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 src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' title='Donator: {$ir['donatordays']} Days Left' />"; 
}
}

$gn=""; 
global $staffpage;

echo"
<b>Name:</b> $gn{$u} [{$ir['userid']}] $d<br />
<b>Money:</b> {$fm}<br />
<b>Level:</b> {$ir['level']}<br />
<b>Crystals:</b> {$ir['crystals']}<br />";


function menuarea() {
define('jdsf45tji', true, true);
	include 'mainmenu.php';
global $ir,$c;
}

function smenuarea() {
define('jdsf45tji', true, true);
	include 'smenu.php';
global $ir,$c;
}
echo"
</div>
<div id=\"right\">";
echo"
<b>Energy:</b> {$enperc}%<br />
<img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10><br />
<b>Will:</b> {$wiperc}%<br />
<img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10><br />
<b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']}<br />
<img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10><br />
<b>EXP:</b> {$experc}%<br />
<img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10><br />
<b>Health:</b> {$hpperc}%<br />
<img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10><br />";
echo"
</div>
<div id=\"content\">

</div>
<div id=\"footer\"></div>
</div>

</body>
</html>";
function endpage()
{
global $db; 
}
?>
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...