globals.php
<?php
session_start();
ob_start();
if(get_magic_quotes_gpc() == 0)
{
foreach($_POST as $k => $v)
{
$_POST[$k]=addslashes($v);
}
foreach($_GET as $k => $v)
{
$_GET[$k]=addslashes($v);
}
}
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
include "config.php";
global $_CONFIG;
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$set=array();
$settq=$db->query("SELECT * FROM settings");
while($r=$db->fetch_row($settq))
{
$set[$r['conf_name']]=$r['conf_value'];
}
$domain=$_SERVER['HTTP_HOST'];
global $jobquery, $housequery;
if($jobquery)
{
$is=$db->query("SELECT u.*,us.*,j.*,jr.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON jr.jrID=u.jobrank WHERE u.userid=$userid");
}
else if($housequery)
{
$is=$db->query("SELECT u.*,us.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid");
}
else
{
$is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid");
}
$ir=$db->fetch_row($is);
if($ir['force_logout'])
{
$db->query("UPDATE users SET force_logout=0 WHERE userid=$userid");
session_unset();
session_destroy();
header("Location: login.php");
exit;
}
global $macropage;
if($macropage && !$ir['verified'] && $set['validate_on']==1)
{
header("Location: macro1.php?refer=$macropage");
exit;
}
check_level();
$h = new headers;
$h->startheaders();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
global $atkpage;
if($atkpage)
{
$h->userdata($ir,$lv,$fm,$cm,0);
}
else
{
$h->userdata($ir,$lv,$fm,$cm);
}
?>
global_func.php
<?php
function money_formatter($muny,$symb='$')
{
return $symb.number_format($muny);
}
function itemtype_dropdown($connection,$ddname="item_type",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM itemtypes ORDER BY itmtypename ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['itmtypeid']}'";
if ($selected == $r['itmtypeid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['itmtypename']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function item_dropdown($connection,$ddname="item",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM items ORDER BY itmname ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['itmid']}'";
if ($selected == $r['itmid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['itmname']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function item2_dropdown($connection,$ddname="item",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM items ORDER BY itmname ASC");
if($selected < 1) { $ret.="<option value='0' selected='selected'>-- None --</option>"; }
else { $ret.="<option value='0'>-- None --</option>"; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['itmid']}'";
if ($selected == $r['itmid']) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['itmname']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function location_dropdown($connection,$ddname="location",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM cities ORDER BY cityname ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['cityid']}'";
if ($selected == $r['cityid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['cityname']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function shop_dropdown($connection,$ddname="shop",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM shops ORDER BY shopNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['shopID']}'";
if ($selected == $r['shopID'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['shopNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function user_dropdown($connection,$ddname="user",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM users ORDER BY username ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['userid']}'";
if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['username']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function challengebot_dropdown($connection,$ddname="bot",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT cb.*,u.* FROM challengebots AS cb LEFT JOIN users AS u ON cb.cb_npcid=u.userid ORDER BY u.username ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['userid']}'";
if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['username']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function fed_user_dropdown($connection,$ddname="user",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM users WHERE fedjail=1 ORDER BY username ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['userid']}'";
if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['username']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function mailb_user_dropdown($connection,$ddname="user",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM users WHERE mailban > 0 ORDER BY username ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['userid']}'";
if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['username']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function forumb_user_dropdown($connection,$ddname="user",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM users WHERE forumban > 0 ORDER BY username ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['userid']}'";
if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['username']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function job_dropdown($connection,$ddname="job",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM jobs ORDER BY jNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['jID']}'";
if ($selected == $r['jID'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['jNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function jobrank_dropdown($connection,$ddname="jobrank",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT jr.*,j.* FROM jobranks jr LEFT JOIN jobs j ON jr.jrJOB=j.jID ORDER BY j.jNAME ASC, jr.jrNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['jrID']}'";
if ($selected == $r['jrID'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['jNAME']} - {$r['jrNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function house_dropdown($connection,$ddname="house",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM houses ORDER BY hNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['hID']}'";
if ($selected == $r['hID'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['hNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function house2_dropdown($connection,$ddname="house",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM houses ORDER BY hNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['hWILL']}'";
if ($selected == $r['hWILL'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['hNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function course_dropdown($connection,$ddname="course",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM courses ORDER BY crNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['crID']}'";
if ($selected == $r['crID'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['crNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function crime_dropdown($connection,$ddname="crime",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM crimes ORDER BY crimeNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['crimeID']}'";
if ($selected == $r['crimeID'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['crimeNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function crimegroup_dropdown($connection,$ddname="crimegroup",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM crimegroups ORDER BY cgNAME ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['cgID']}'";
if ($selected == $r['cgID'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.=">{$r['cgNAME']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function event_add($userid,$text,$connection=0)
{
global $db;
$text=mysql_escape($text);
$db->query("INSERT INTO events VALUES('',$userid,UNIX_TIMESTAMP(),0,'$text')");
$db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$userid}");
return 1;
}
function mysql_escape($str)
{
return str_replace("'","''",$str);
}
function check_level()
{
global $db;
global $ir,$c,$userid;
$ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2);
if($ir['exp'] >= $ir['exp_needed'])
{
$expu=$ir['exp']-$ir['exp_needed'];
$ir['level']+=1;
$ir['exp']=$expu;
$ir['energy']+=2;
$ir['brave']+=2;
$ir['maxenergy']+=2;
$ir['maxbrave']+=2;
$ir['hp']+=50;
$ir['maxhp']+=50;
$ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2);
$db->query("UPDATE users SET level=level+1,exp=$expu,energy=energy+2,brave=brave+2,maxenergy=maxenergy+2,maxbrave=maxbrave+2,
hp=hp+50,maxhp=maxhp+50 where userid=$userid");
}
}
function get_rank($stat, $mykey)
{
global $db;
global $ir,$userid,$c;
$q=$db->query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0") ;
return $db->fetch_single($q)+1;
}
function item_add($user, $itemid, $qty, $notid=0)
{
global $db;
if($notid > 0)
{
$q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid} AND inv_id != {$notid}");
}
else
{
$q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid}");
}
if($db->num_rows($q) > 0)
{
$r=$db->fetch_row($q);
$db->query("UPDATE inventory SET inv_qty=inv_qty+{$qty} WHERE inv_id={$r['inv_id']}");
}
else
{
$db->query("INSERT INTO inventory (inv_itemid, inv_userid, inv_qty) VALUES ({$itemid}, {$user}, {$qty})");
}
}
function item_remove($user, $itemid, $qty)
{
global $db;
$q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} AND inv_itemid={$itemid}");
if($db->num_rows($q) > 0)
{
$r=$db->fetch_row($q);
if($r['inv_qty']>$qty)
{
$db->query("UPDATE inventory SET inv_qty=inv_qty-{$qty} WHERE inv_id={$r['inv_id']}");
}
else
{
$db->query("DELETE FROM inventory WHERE inv_id={$r['inv_id']}");
}
}
}
function forum_dropdown($connection,$ddname="forum",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM forum_forums ORDER BY ff_name ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['ff_id']}'";
if ($selected == $r['ff_id'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['ff_name']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function forum2_dropdown($connection,$ddname="forum",$selected=-1)
{
global $db;
$ret="<select name='$ddname' type='dropdown'>";
$q=$db->query("SELECT * FROM forum_forums WHERE ff_auth != 'gang' ORDER BY ff_name ASC");
if($selected == -1) { $first=0; } else { $first=1; }
while($r=$db->fetch_row($q))
{
$ret.="\n<option value='{$r['ff_id']}'";
if ($selected == $r['ff_id'] || $first == 0) { $ret.=" selected='selected'";$first=1; }
$ret.= ">{$r['ff_name']}</option>";
}
$ret.="\n</select>";
return $ret;
}
function make_bigint($str, $positive=1)
{
$str = (string) $str;
$ret = "";
for($i=0;$i<strlen($str);$i++)
{
if((ord($str[$i]) > 47 && ord($str[$i]) < 58) or ($str[$i]=="-" && $positive == 0)) { $ret.=$str[$i]; }
}
if(strlen($ret) == 0) { return "0"; }
return $ret;
}
function stafflog_add($text)
{
global $db, $ir;
$IP = ($_SERVER['HTTP_X_FORWARDED_FOR'])
? $_SERVER['HTTP_X_FORWARDED_FOR']
: $_SERVER['REMOTE_ADDR'];
$text=$db->escape($text);
$db->query("INSERT INTO stafflog VALUES(NULL, {$ir['userid']}, unix_timestamp(), '$text', '$IP')");
}
function time_format($seconds)
{ // Seconds = The currect timestamp minus the second value, stated in the formula
$seconds = floor($seconds);
$days = @intval($seconds / 86400);
$seconds -= ($days * 86400);
$hours = @intval($seconds / 3600);
$seconds -= ($hours * 3600);
$minutes = @intval($seconds / 60);
$seconds -= ($minutes * 60);
$result = array();
if($days) { $result[] = sprintf("%u day%s", number_format($days), ($days == 1) ? "" : "s"); }
if($hours) { $result[] = sprintf("%u hour%s", $hours, ($hours == 1) ? "" : "s"); }
if($minutes && (count($result) < 2)) { $result[] = sprintf("%u minute%s", $minutes, ($minutes == 1) ? "" : "s"); }
if(($seconds && (count($result) < 2)) || !count($result)) { $result[] = ($seconds == 0) ? "Just Now" : sprintf("%u second%s", $seconds, ($seconds == 1) ? "" : "s"); }
return implode(", ", $result);
}
?>
header.php
<?php
class headers {
function startheaders() {
global $ir, $set;
$count = 3;
$x = -1;
while($x < $count)
{
$places_to_be_secured = array("ID","viewforum","viewtopic");
$x++;
$_GET[$places_to_be_secured[$x]] = abs(@intval($_GET[$places_to_be_secured[$x]]));
}
$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="";
// include "thetrophies.php";
?>
<!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>Solar Battles</title>
<link rel="SHORTCUT ICON" href="favicon.ico" />
<style type="text/css">
<!--
body,td,th {
color: #bfcbd7;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
}
a:link {
color: #bfcbd7;
}
a:visited {
color: #bfcbd7;
}
a:hover {
color: #bfcbd7;
}
a:active {
color: #bfcbd7;
}
.style1 {font-size: 12px}
body {
background-color: #000000;
}
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:#1F1F1F;
}
.table3 {
background-color:#1F1F1F;
}
.table td {
background-color:#1F1F1F;
height:22px;
}
.table3 td {
background-color:#1F1F1F;
}
td .alt {
background-color:#1F1F1F;
height:22px;
}
td .h {
background-repeat:repeat-x;
font-weight: bold;
background-color: #FF0000;
}
.table th {
background-repeat:repeat-x;
font-weight: bold;
background-color: #FF0000;
}
.style2 {color: #FFFFCC; font-size: 9px;}
.style4 {color: #000000}
.style5 {
font-size: 10px;
font-weight: bold;
}
-->
</style></head>
<body>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="49" colspan="5" bgcolor="#042449"><table width="1000" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="672">Hello solar battler, you are logged in as <? print "[b]{$ir['username']}[/b]";?>. </td>
<td width="328">[url="index.php"]Home[/url] | [url="usersonline.php"]Usersonline[/url] | [url="forums.php"]Forums[/url] | [url="preferences.php"]Preferences[/url] | [url="logout.php"]Logout[/url] </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="5" background="images/sbh1.jpg" height="247"><table width="1000" height="247" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
<tr>
<td height="105"><table width="1000" height="105" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="103"></td>
<td width="194"><table width="190" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><? include "stats.php"; ?> </td>
</tr>
</table></td>
<td width="703"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="103" bgcolor="#2e353d"></td>
<td width="194" bgcolor="#8c8e91" valign="top"><table width="190" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><? include "mainmenu.php"; ?></td>
</tr>
</table></td>
<td width="9" bgcolor="#2E353D"></td>
<td width="574" bgcolor="#8C8E91" valign="top" align="center">
<?
}
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'];
$IP = mysql_real_escape_string($_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;
}
global $staffpage;
$bgcolor = '333333';
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 BlackSheep-Mafia 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 BlackSheep-Mafia, there is no way around this.</font>[/b]</body></html>");
}
}
function smenuarea()
{
include "smenu.php";
global $ir,$c;
$bgcolor = '333333';
print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>';
}
function endpage()
{
global $db;
print <<<OUT
</td>
<td width="120" bgcolor="#2E353D"></td>
</tr>
<tr>
<td colspan="5" bgcolor="#042449"><div align="center">© 2009-2010 [url="http://www.worldascendancy.com"]worldascendancy.com[/url], All Rights Reserved. Design brought to you by [url="http://www.iiistudios.com"]Illes Ignath[/url]</div></td>
</tr>
</table>
</body>
</html>
OUT;
}
}
?>
Could someone fix this problem for me please :D Thankyouu