Jump to content
MakeWebGames

need help please


Recommended Posts

<?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']}</thttp://216.227.249.192:2082/frontend/x2/files/editit.html?dir=%2fhome%2fgangstas%2fpublic_html&file=header.php
cPanel Xitle>
<style type="text/css">
<!--
body {
background-color: #000000;
margin-top: 0px;
margin-bottom: 0px;
font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: white;
  scrollbar-base-color: #005B70;
  scrollbar-arrow-color: #F3960B;
  scrollbar-DarkShadow-Color: #000000;
}
a:visited,a:active,a:hover,a:link { color: white;text-decoration: none; }
table,tr,td { font-family:[url]http://216.227.249.192:2082/frontend/x2/files/editit.html?dir=%2fhome%2fgangstas%2fpublic_html&file=header.php[/url]
cPanel Xhelvetica, arial, geneva, sans-serif;font-size: 12px; }
img { border:none; }
textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: white; }
.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:#000000;
}
.table3 {
background-color:#000000;
}
.table td {
background-color:#000000;
height:22px;
}
.table3 td {
background-color:#000000;
}
td .alt {
background-color:#000000;
height:22px;
}
td .h {
background-image:url(tablehgrad.png);
background-repeat:repeat-x;
font-weight: bold;
background-color: #000000;
}
.table th {
background-image:url(tablehgrad.png);
background-repeat:repeat-x;
font-weight: bold;
background-color: #000000;
}
-->
</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['mission'] != 0)
{
$mq=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']."",$c);
if(mysql_num_rows($mq)== 0)
{
mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
}
$rm=mysql_fetch_array($mq);
if($rm['location_on']== 1)
{
if($rm['location_value'] != $ir['location'])
{ mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
event_add($ir['userid'],"Your mission has been ended because you have moved city.",$c);
}
}
if($rm['item_on']== 1 && $rm['attack_on']== 0)
{
$invq=mysql_query("SELECT * FROM inventory WHERE inv_userid=".$userid." AND inv_itemid=".$rm['item_value']."",$c);
if(mysql_num_rows($invq))
{
$exp=rand($ir['level'],$ir['level']*5);
mysql_query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c);
$mission=($ir['mission']);
mysql_query("INSERT INTO missdone VALUES ($userid,$mission);",$c);
mysql_query("DELETE FROM inventory WHERE inv_userid=$userid AND inv_itemid=".$rm['item_value']."",$c);
event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c);
}
}
if($rm['item_on']== 0 && $rm['attack_on']== 0)
{
mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
$owner=1;
event_add($owner,"The mission $rm[name] mission ($rm[id]) is not set to a mission, Please do so.",$c);
}
if($rm['item_on']== 0 && $rm['attack_on']== 1)
{
$usa=$_SESSION['mission_attack'];
$aa=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']." AND attack_value=".$_SESSION['mission_attack']."",$c);
if(mysql_num_rows($aa))
{
$exp=rand($ir['level'],$ir['level']*10);
mysql_query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c);
$mission=($ir['mission']);
mysql_query("INSERT INTO missdone VALUES ($userid,$mission);",$c);
event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c);
}
}

if(!$ir['email'])
{
global $domain;
die ("<body>Your account may be broken. Please mail [email][email protected][/email] 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="[img=donator.gif]"; }

$gn="";
global $staffpage;

$bgcolor = '000000';

print <<<OUT
[img=GConArtDeco.jpg]


<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" bgcolor="#$bgcolor" valign="top">

[b]Name:[/b] $gn{$u} [{$ir['userid']}] $d

[b]Money:[/b] {$fm}

[b]Level:[/b] {$ir['level']}

[b]Crystals:[/b] {$ir['crystals']}

[[url='logout.php']Emergency Logout[/url]]
<hr />
[b]Energy:[/b] {$enperc}%

<img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10>

[b]Will:[/b] {$wiperc}%

<img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10>

[b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']}

<img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10>


[b]Health:[/b] {$hpperc}%

<img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10>
<hr />

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

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 menuarea()
{
include "mainmenu.php";
global $ir,$c;
$bgcolor = '000000';
print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%"  bgcolor="#'.$bgcolor.'" valign="top">
<center>';
if($ir['hospital'])
{
 print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes.
";
}
if($ir['jail'])
{
 print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes.
";
}
print "[url='voting.php'][b]Vote for {$set['game_name']} to help make us grow big and reap the rewards!![/b][/url]
";
print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url]
";
}
function smenuarea()
{
include "smenu.php";
global $ir,$c;
$bgcolor = '000000';
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
}
}
}
?>

 

Parse error: syntax error, unexpected '}' in /home/gangstas/public_html/header.php on line 279

i have added and replaced } and now i just cant figure out what it is

Can someone help me?

Link to comment
Share on other sites

Guest Anonymous

Re: need help please

Here try this...

<?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']}</thttp://216.227.249.192:2082/frontend/x2/files/editit.html?dir=%2fhome%2fgangstas%2fpublic_html&file=header.php
cPanel Xitle>
<style type="text/css">
<!--
body {
background-color: #000000;
margin-top: 0px;
margin-bottom: 0px;
font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: white;
scrollbar-base-color: #005B70;
scrollbar-arrow-color: #F3960B;
scrollbar-DarkShadow-Color: #000000;
}
a:visited,a:active,a:hover,a:link { color: white;text-decoration: none; }
table,tr,td { font-family:[url]http://216.227.249.192:2082/frontend/x2/files/editit.html?dir=%2fhome%2fgangstas%2fpublic_html&file=header.php[/url]
cPanel Xhelvetica, arial, geneva, sans-serif;font-size: 12px; }
img { border:none; }
textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: white; }
.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:#000000;
}
.table3 {
background-color:#000000;
}
.table td {
background-color:#000000;
height:22px;
}
.table3 td {
background-color:#000000;
}
td .alt {
background-color:#000000;
height:22px;
}
td .h {
background-image:url(tablehgrad.png);
background-repeat:repeat-x;
font-weight: bold;
background-color: #000000;
}
.table th {
background-image:url(tablehgrad.png);
background-repeat:repeat-x;
font-weight: bold;
background-color: #000000;
}
-->
</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['mission'] != 0)
{
$mq=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']."",$c);
if(mysql_num_rows($mq)== 0)
{
mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
}
$rm=mysql_fetch_array($mq);
if($rm['location_on']== 1)
{
if($rm['location_value'] != $ir['location'])
{ mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
event_add($ir['userid'],"Your mission has been ended because you have moved city.",$c);
}
}
if($rm['item_on']== 1 && $rm['attack_on']== 0)
{
$invq=mysql_query("SELECT * FROM inventory WHERE inv_userid=".$userid." AND inv_itemid=".$rm['item_value']."",$c);
if(mysql_num_rows($invq))
{
$exp=rand($ir['level'],$ir['level']*5);
mysql_query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c);
$mission=($ir['mission']);
mysql_query("INSERT INTO missdone VALUES ($userid,$mission);",$c);
mysql_query("DELETE FROM inventory WHERE inv_userid=$userid AND inv_itemid=".$rm['item_value']."",$c);
event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c);
}
}
if($rm['item_on']== 0 && $rm['attack_on']== 0)
{
mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c);
$owner=1;
event_add($owner,"The mission $rm[name] mission ($rm[id]) is not set to a mission, Please do so.",$c);
}
if($rm['item_on']== 0 && $rm['attack_on']== 1)
{
$usa=$_SESSION['mission_attack'];
$aa=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']." AND attack_value=".$_SESSION['mission_attack']."",$c);
if(mysql_num_rows($aa))
{
$exp=rand($ir['level'],$ir['level']*10);
mysql_query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c);
$mission=($ir['mission']);
mysql_query("INSERT INTO missdone VALUES ($userid,$mission);",$c);
event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c);
}
}

if(!$ir['email'])
{
global $domain;
die ("<body>Your account may be broken. Please mail [email][email protected][/email] 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="[img=donator.gif]"; }

$gn="";
global $staffpage;

$bgcolor = '000000';

print <<<OUT
[img=GConArtDeco.jpg]


<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" bgcolor="#$bgcolor" valign="top">

[b]Name:[/b] $gn{$u} [{$ir['userid']}] $d

[b]Money:[/b] {$fm}

[b]Level:[/b] {$ir['level']}

[b]Crystals:[/b] {$ir['crystals']}

[[url='logout.php']Emergency Logout[/url]]
<hr />
[b]Energy:[/b] {$enperc}%

<img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10>

[b]Will:[/b] {$wiperc}%

<img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10>

[b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']}

<img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10>


[b]Health:[/b] {$hpperc}%

<img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10>
<hr />

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

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 menuarea()
{
include "mainmenu.php";
global $ir,$c;
$bgcolor = '000000';
print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top">
<center>';
if($ir['hospital'])
{
print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes.
";
}
if($ir['jail'])
{
print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes.
";
}
print "[url='voting.php'][b]Vote for {$set['game_name']} to help make us grow big and reap the rewards!![/b][/url]
";
print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url]
";
}
function smenuarea()
{
include "smenu.php";
global $ir,$c;
$bgcolor = '000000';
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;
}
}
}
?>
Link to comment
Share on other sites

Re: need help please

 

<?php
/*---------------------------------
--   MCCodes 2.0
--   By Dabomstew
---------------------------------*/
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 $menuhide;
if(!$menuhide)
{
$h->menuarea();
}

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