Jump to content
MakeWebGames

Recommended Posts

Posted

Ok, so for my game, I decided that I wanted a three column in-game layout.

I created it successfully, (or at least i thought it was successful), however problems rose when I opened criminal.php and mailbox.php.

Here are a few screenshots to show you the problem:

screenieprob2.png

screenieprob1.png

and here is my header code: (there's probably a heap of security issues in this header.php):

<?php
class headers {
function startheaders() {
global $ir;
echo <<<EOF
<html>
<head>
<title>Bitten</title>
<style>
body {
font-family: Arial, Times New Roman;
background: #000;
color: #FFF;
font-size: 14px;
}
#headbk {
background: url('images/head1.png') repeat-x;
}
a:link, a:visited, a:active {
color: #c2c2c2;
}
a:hover {
color: orange;
}
td {
border: 2px ridge #C1C1C1;
}
</style>
</head>

EOF;

}
function userdata($ir,$lv,$fm,$dosessh=1)
{
global $c,$userid;
mysql_query("UPDATE users SET laston=unix_timestamp(),lastip='$ip' WHERE userid=$userid",$c);
if(!$ir['email'])
{
die ("<body>Your account may be broken. Please mail [email protected] stating your username and player ID.");
}
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;
}
echo "<body>
<table width=100%><tr id='headbk'><td><center><img src='images/Bitten.png'>
</center></td></tr></table>
";
print "<center><table><tr><td valign='top' width='20%'>
";
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 Bitten 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' width='60%'><div style='background: url(images/menuhead.png); width: 620px; height: 50px;'></div><div style='width: 550px;'>
";
}
function endpage()
{
global $c,$userid, $ir, $fm;
$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'];
echo "</div></td><td valign='top' width='20%'><div style='background: url(images/menuhead.png); width: 200px; height: 50px;'><img src='images/statsimg.png' height='50px' /></div><div style='width: 150px;'>
<b>Name:</b> {$u} [{$ir['userid']}]<br />
<b>Money:</b> {$fm}<br />

<b>Crystals:</b> {$ir['crystals']}<br />
<b>Scrap Metal Pieces:</b> {$ir['scrap_pieces']}<br />
<b>Level:</b> {$ir['level']}<br />
[<a href='logout.php'>Emergency Logout</a>]<br /><br />
<b>Energy:</b> {$enperc}% <br /> <img src=barendl.gif><img src=bargreen.gif width=$enperc height=10><img src=barred.gif width=$enopp height=10><img src=barendr.gif><br />
<b>Will:</b> {$wiperc}% <br /> <img src=barendl.gif><img src=bargreen.gif width=$wiperc height=10><img src=barred.gif width=$wiopp height=10><img src=barendr.gif><br />
<b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']} <br /><img src=barendl.gif><img src=bargreen.gif width=$brperc height=10><img src=barred.gif width=$bropp height=10><img src=barendr.gif><br />
<b>EXP:</b> {$experc}% <br /> <img src=barendl.gif><img src=bargreen.gif width=$experc height=10><img src=barred.gif width=$exopp height=10><img src=barendr.gif><br />
<b>Health:</b> {$hpperc}% <br /> <img src=barendl.gif><img src=barblue.gif width=$hpperc height=10><img src=barred.gif width=$hpopp height=10><img src=barendr.gif></td></center></tr></table></center></body>
</html>";
}
}
?>

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