Jump to content
MakeWebGames

Header errors


S.Cosmin

Recommended Posts

I get this error in my header

http://i55.tinypic.com/20fzxg1.jpg

This is my header.php

<?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']} - Massive Multiplayer Online Role Playing Game </title>
<meta name="keywords" content="RPG, Online Games, Online Mafia Game" />
<meta name="description" content=" {$set['game_name']} - Online Mafia Game " />
<meta name="author" content="Mafia Game Scripts " />
<meta name="copyright" content="Copyright {$_SERVER['HTTP_HOST']} " />
<link rel="SHORTCUT ICON" href="favicon.ico" />
<script src="js/jquery-1.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/wcg.css" type="text/css" />

<script type="text/javascript" src="js/header.js"></script>
<!--<script type="text/javascript">
$(document).ready(function(){
$.get("userstatajax.php",function(res){
if(res)
{
var resarray = res.split('||||||');
$('.profile_mid').html(resarray[0]);
$('#points_money').html(resarray[1]);
}
});
});
</script>-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{$set['game_name']}</title>
</head>
<body>


<!-- // Flas Header Part Stars -->  
<div class="flashpartig">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="950" height="235" title="TheGangsters.ro">
<param name="movie" value="images/flash/header.swf" />
<param name="quality" value="high" />
<param name="wmode" value="Transparent" />
<embed src="images/flash/header.swf" quality="high"  wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="950" height="235"></embed>
</object>
</div>
<!-- //Flash Header Part End --> 


<!-- Container Part Starts -->
<div id="centercontainer">
<div id="centermaincontainer">
<!-- Container Part Ends --> 


<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 = $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;

$bgcolor = 'FFFFFF';

print <<<OUT
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).<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 from {$set['game_name']}, there is no way around this.</font></b></body></html>");
}
}
function menu_left() {
define('jdsf45tji', true, true);
	include 'menu_left.php';
global $ir,$c;
print '</td><td width="2" class="linegrad"> </td><td width="80%" valign="top"><center>';
if ( $ir['hospital'] ) {
 echo "<b>NB:</b> You are currently in hospital for {$ir['hospital']} minutes.<br />";
}
if($ir['jail'])
{
 echo "<b>NB:</b> You are currently in jail for {$ir['jail']} minutes.<br />";
}
}
function smenuarea() {
define('jdsf45tji', true, true);
	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;
}
}
?>

 

How can i fix that guys?

Link to comment
Share on other sites

Its just wamp being silly. You used a var that isnt set. More specifically, the $_SESSION['attacking'] var, which is just used as a check in the header file. So just ignore the error, or add an @ before the $_SESSION['attacking'] var.

That solution with @ work's good, but is that a problem for my security?

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