Jump to content
MakeWebGames

Gang error


flipster
 Share

Recommended Posts

in gangs i get this error can someone fix it please

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/chav1/public_html/gangs.php on line 61

<?php
/*-----------------------------------------------------
-- Mono Country v1.0 BETA
-- A product of DBS-entertainment
-- Copyright held 2005 by Dabomstew
-- INDEX.php
-----------------------------------------------------*/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
$_GET['ID'] = abs((int) $_GET['ID']);
if(!$_GET['ID'])
{
print "Invalid use of file";
}
else
{
$gq=mysql_query("SELECT * FROM gangs WHERE gangID={$_GET['ID']}",$c);
$gangdata=mysql_fetch_array($gq);
switch($_GET['action'])
{
case 'view':
gang_view();
break;

case 'userlist':
gang_userlist();
break;

case 'apply':
gang_applyform();
break;

case 'applys':
gang_applysubmit();
break;
}
}
function gang_view()
{
global $ir,$c,$h,$gangdata;
$pq=mysql_query("SELECT * FROM users WHERE userid={$gangdata['gangPRESIDENT']}",$c);
$ldr=mysql_fetch_array($pq);
$vpq=mysql_query("SELECT * FROM users WHERE userid={$gangdata['gangVICEPRES']}",$c);
$coldr=mysql_fetch_array($vpq);
print "<h3><u>{$gangdata['gangNAME']} Gang</u></h3><hr />";
if($gangdata['gangPIC'])
{
print "[img={$gangdata[]<hr />";
}
else
{
print "[b]No Gang Picture[/b]<hr />";
}
President: [url='viewuser.php?u={$ldr[']{$ldr['username']}[/url]

Vice-President: [url='viewuser.php?u={$coldr[']{$coldr['username']}[/url]<hr />";
$cnt=mysql_query("SELECT username FROM users WHERE gang={$gangdata['gangID']}",$c);
print "[b]Members:[/b] ".mysql_num_rows($cnt)."

[b]Description: [/b] {$gangdata['gangDESC']}

[b]Respect Level: [/b] {$gangdata['gangRESPECT']}

> [url='gangs.php?action=userlist&ID={$gangdata[']User List[/url]

> [url='gangs.php?action=apply&ID={$gangdata[']Apply[/url]";
}
function gang_userlist()
{
global $ir,$c,$h,$gangdata;
print "<h3>Userlist for {$gangdata['gangNAME']}</h3>
<table><tr style='background: gray;'><th>User</th><th>Level</th><th>Days In Gang</th></tr>";
$q=mysql_query("SELECT * FROM users WHERE gang={$gangdata['gangID']} ORDER BY daysingang DESC, level DESC",$c);
while($r=mysql_fetch_array($q))
{
print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']}[/url]</td><td>{$r['level']}</td><td>{$r['daysingang']}</td></tr>";
}
print "</table>

[url='gangs.php?action=view&ID={$gangdata[']> Back[/url]";
}
function gang_applyform()
{
global $ir,$c,$h,$gangdata;
if(!$ir['gang'])
{
print "<form action='gangs.php?action=applys&ID={$_GET['ID']}' method='post'>
Type the reason you should be in this gang.

<textarea name='application' rows='7' cols='40'></textarea>

<input type='submit' value='Apply' /></form>";
}
else
{
print "You cannot apply for a gang when you are already in one.";
}
}

function gang_applysubmit()
{
global $ir,$c,$h,$gangdata,$userid;
if(!$ir['gang'])
{
mysql_query("INSERT INTO applications VALUES('',$userid,{$_GET['ID']},'{$_POST['application']}');",$c) or die(mysql_error());
mysql_query("INSERT INTO gangevents VALUES('',{$_GET['ID']},unix_timestamp(),'[url='']{$ir['username']}[/url] sent an application to join this gang.')",$c);
print "You sent your application to the {$gangdata['gangNAME']} gang.";
}
else
{
print "You cannot apply for a gang when you are already in one.";
}
}
$h->endpage();
?>
Link to comment
Share on other sites

Re: Gang error

You were missing this >>> echo " <<< on line 70

 

<?php
/*-----------------------------------------------------
-- Mono Country v1.0 BETA
-- A product of DBS-entertainment
-- Copyright held 2005 by Dabomstew
-- INDEX.php
-----------------------------------------------------*/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
$_GET['ID'] = abs((int) $_GET['ID']);
if(!$_GET['ID'])
{
print "Invalid use of file";
}
else
{
$gq=mysql_query("SELECT * FROM gangs WHERE gangID={$_GET['ID']}",$c);
$gangdata=mysql_fetch_array($gq);
switch($_GET['action'])
{
case 'view':
gang_view();
break;

case 'userlist':
gang_userlist();
break;

case 'apply':
gang_applyform();
break;

case 'applys':
gang_applysubmit();
break;
}
}
function gang_view()
{
global $ir,$c,$h,$gangdata;
$pq=mysql_query("SELECT * FROM users WHERE userid={$gangdata['gangPRESIDENT']}",$c);
$ldr=mysql_fetch_array($pq);
$vpq=mysql_query("SELECT * FROM users WHERE userid={$gangdata['gangVICEPRES']}",$c);
$coldr=mysql_fetch_array($vpq);
print "<h3><u>{$gangdata['gangNAME']} Gang</u></h3><hr />";
if($gangdata['gangPIC'])
{
print "[img={$gangdata[]<hr />";
}
else
{
print "[b]No Gang Picture[/b]<hr />";
}

echo "
President: [url='viewuser.php?u={$ldr[']{$ldr['username']}[/url]

Vice-President: [url='viewuser.php?u={$coldr[']{$coldr['username']}[/url]<hr />";
$cnt=mysql_query("SELECT username FROM users WHERE gang={$gangdata['gangID']}",$c);
print "[b]Members:[/b] ".mysql_num_rows($cnt)."

[b]Description: [/b] {$gangdata['gangDESC']}

[b]Respect Level: [/b] {$gangdata['gangRESPECT']}

> [url='gangs.php?action=userlist&ID={$gangdata[']User List[/url]

> [url='gangs.php?action=apply&ID={$gangdata[']Apply[/url]";
}
function gang_userlist()
{
global $ir,$c,$h,$gangdata;
print "<h3>Userlist for {$gangdata['gangNAME']}</h3>
<table><tr style='background: gray;'><th>User</th><th>Level</th><th>Days In Gang</th></tr>";
$q=mysql_query("SELECT * FROM users WHERE gang={$gangdata['gangID']} ORDER BY daysingang DESC, level DESC",$c);
while($r=mysql_fetch_array($q))
{
print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']}[/url]</td><td>{$r['level']}</td><td>{$r['daysingang']}</td></tr>";
}
print "</table>

[url='gangs.php?action=view&ID={$gangdata[']> Back[/url]";
}
function gang_applyform()
{
global $ir,$c,$h,$gangdata;
if(!$ir['gang'])
{
print "<form action='gangs.php?action=applys&ID={$_GET['ID']}' method='post'>
Type the reason you should be in this gang.

<textarea name='application' rows='7' cols='40'></textarea>

<input type='submit' value='Apply' /></form>";
}
else
{
print "You cannot apply for a gang when you are already in one.";
}
}

function gang_applysubmit()
{
global $ir,$c,$h,$gangdata,$userid;
if(!$ir['gang'])
{
mysql_query("INSERT INTO applications VALUES('',$userid,{$_GET['ID']},'{$_POST['application']}');",$c) or die(mysql_error());
mysql_query("INSERT INTO gangevents VALUES('',{$_GET['ID']},unix_timestamp(),'[url='']{$ir['username']}[/url] sent an application to join this gang.')",$c);
print "You sent your application to the {$gangdata['gangNAME']} gang.";
}
else
{
print "You cannot apply for a gang when you are already in one.";
}
}
$h->endpage();
?>
Link to comment
Share on other sites

Re: Gang error

 

You were missing this >>> echo " <<< on line 70

 

<?php
/*-----------------------------------------------------
-- Mono Country v1.0 BETA
-- A product of DBS-entertainment
-- Copyright held 2005 by Dabomstew
-- INDEX.php
-----------------------------------------------------*/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
$_GET['ID'] = abs((int) $_GET['ID']);
if(!$_GET['ID'])
{
print "Invalid use of file";
}
else
{
$gq=mysql_query("SELECT * FROM gangs WHERE gangID={$_GET['ID']}",$c);
$gangdata=mysql_fetch_array($gq);
switch($_GET['action'])
{
case 'view':
gang_view();
break;

case 'userlist':
gang_userlist();
break;

case 'apply':
gang_applyform();
break;

case 'applys':
gang_applysubmit();
break;
}
}
function gang_view()
{
global $ir,$c,$h,$gangdata;
$pq=mysql_query("SELECT * FROM users WHERE userid={$gangdata['gangPRESIDENT']}",$c);
$ldr=mysql_fetch_array($pq);
$vpq=mysql_query("SELECT * FROM users WHERE userid={$gangdata['gangVICEPRES']}",$c);
$coldr=mysql_fetch_array($vpq);
print "<h3><u>{$gangdata['gangNAME']} Gang</u></h3><hr />";
if($gangdata['gangPIC'])
{
print "[img={$gangdata[]<hr />";
}
else
{
print "[b]No Gang Picture[/b]<hr />";
}

echo "
President: [url='viewuser.php?u={$ldr[']{$ldr['username']}[/url]

Vice-President: [url='viewuser.php?u={$coldr[']{$coldr['username']}[/url]<hr />";
$cnt=mysql_query("SELECT username FROM users WHERE gang={$gangdata['gangID']}",$c);
print "[b]Members:[/b] ".mysql_num_rows($cnt)."

[b]Description: [/b] {$gangdata['gangDESC']}

[b]Respect Level: [/b] {$gangdata['gangRESPECT']}

> [url='gangs.php?action=userlist&ID={$gangdata[']User List[/url]

> [url='gangs.php?action=apply&ID={$gangdata[']Apply[/url]";
}
function gang_userlist()
{
global $ir,$c,$h,$gangdata;
print "<h3>Userlist for {$gangdata['gangNAME']}</h3>
<table><tr style='background: gray;'><th>User</th><th>Level</th><th>Days In Gang</th></tr>";
$q=mysql_query("SELECT * FROM users WHERE gang={$gangdata['gangID']} ORDER BY daysingang DESC, level DESC",$c);
while($r=mysql_fetch_array($q))
{
print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']}[/url]</td><td>{$r['level']}</td><td>{$r['daysingang']}</td></tr>";
}
print "</table>

[url='gangs.php?action=view&ID={$gangdata[']> Back[/url]";
}
function gang_applyform()
{
global $ir,$c,$h,$gangdata;
if(!$ir['gang'])
{
print "<form action='gangs.php?action=applys&ID={$_GET['ID']}' method='post'>
Type the reason you should be in this gang.

<textarea name='application' rows='7' cols='40'></textarea>

<input type='submit' value='Apply' /></form>";
}
else
{
print "You cannot apply for a gang when you are already in one.";
}
}

function gang_applysubmit()
{
global $ir,$c,$h,$gangdata,$userid;
if(!$ir['gang'])
{
mysql_query("INSERT INTO applications VALUES('',$userid,{$_GET['ID']},'{$_POST['application']}');",$c) or die(mysql_error());
mysql_query("INSERT INTO gangevents VALUES('',{$_GET['ID']},unix_timestamp(),'[url='']{$ir['username']}[/url] sent an application to join this gang.')",$c);
print "You sent your application to the {$gangdata['gangNAME']} gang.";
}
else
{
print "You cannot apply for a gang when you are already in one.";
}
}
$h->endpage();
?>

 

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.

 Share

×
×
  • Create New...