Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length


News:

Have you purchased a mod and are struggling to install it? Cronwerks now installs mods for only $3/$2.50 here.


AuthorTopic: mainmenu.php unexpected $end  (Read 193 times)

Jawz

  • Basic Member
  • *
  • Reputation Power: 11
  • Jawz has no influence.
  • Offline Offline
  • Posts: 17
    • View Profile
mainmenu.php unexpected $end
« on: December 12, 2009, 06:55:22 AM »
i have this problem

Parse error: syntax error, unexpected $end in /home/mafia/public_html/mainmenu.php on line 126

here is my mainmenu.php
Code: [Select]
<?php
global $db,$c,$ir$set;
$hc=$set['hospital_count'];
$jc=$set['jail_count'];
$ec=$ir['new_events'];
$mc=$ir['new_mail'];
if(
$ir['hospital'])
{
  print 
"<a href='hospital.php'>Hospital ($hc)</a><br />
      <a href='emergencysurgery.php'>Emergency Surgery</a><br />
  <a href='inventory.php'>Inventory</a><br />"
;
}
elseif(
$ir['jail'])
{
  print 
"<a href='jail.php'>Jail ($jc)</a><br />";
}
else
{
if (
$ir[newann]==0)
  print 
"<a href='index.php'>Home</a><br />
  <a href='inventory.php'>Inventory</a><br />"
;
}
if(
$ec 0) { print "<a href='events.php' style='font-weight: 

800;'>Events ($ec)</a><br />"
; }
else { print 
"<a href='events.php'>Events (0)</a><br />"; }
if(
$mc 0) { print "<a href='mailbox.php' style='font-weight: 

800;'>Mailbox ($mc)</a><br />"
; }
else { print 
"<a href='mailbox.php'>Mailbox (0)</a><br />"; }
if(
$ir['jail'] and !$ir['hospital'])
{
  print 
"<a href='gym.php'>Jail Gym</a><br />
      <a href='Intimidatewitness.php'>Intimidate Witness</a><br />
  <a href='hospital.php'>Hospital ($hc)</a><br />"
;
}
else if (!
$ir['hospital'])
{
  print 
"<a href='explore.php'>Explore</a><br />
  <a href='bank.php'>Bank</a><br />
  <a href='gym.php'>Gym</a><br />
  <a href='criminal.php'>Crimes</a><br />
  <a href='stocks.php'>Stocks</a><br />
  <a href='job.php'>Your Job</a><br />
  <a href='business_home.php'>Your Business</a><br />
  <a href='contactlist.php'>Contact List</a><br />
  <a href='education.php'>Local School</a><br />
<a href='gamestation.php'>The Arcade</a><br />
  <a href='hospital.php'>Hospital ($hc)</a><br />
  <a href='jail.php'>Jail ($jc)</a><br />"
;
}
else
{
 print 
"<a href='forums.php'>Forums</a><br />";
if(
$ir['new_announcements'])
{
print 
"<a href='announcements.php' style='font-weight: 

800;'>Announcements({$ir['new_announcements']})</a><br />"
;
}
else
{
print 
"<a href='announcements.php'>Announcements (0)</a><br />";
}
print 
"
<a href='newspaper.php'>Newspaper</a><br />
<a href='search.php'>Search</a><br />"
;
if(!
$ir['jail'] && $ir['gang'])
{
  print 
"<a href='yourgang.php'>Your Gang</a><br />";
}
if(
$ir['user_level'] > 1)
{
print 
"<hr />
<a href='staff.php'>Staff Panel</a><br />\n"
;



print 
"<hr /><b>Staff Online:</b><br />";
$q=$db->query("SELECT * FROM users WHERE laston>(unix_timestamp()-

15*60) AND user_level>1 ORDER BY userid ASC"
);
while(
$r=$db->fetch_row($q))
{
$la=time()-$r['laston'];
$unit="secs";
if(
$la >= 60)
{
$la=(int) ($la/60);
$unit="mins";
}
if(
$la >= 60)
{
$la=(int) ($la/60);
$unit="hours";
if(
$la >= 24)
{
$la=(int) ($la/24);
$unit="days";
}
}
print 
"<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> 

($la $unit)<br />"
;
}
}
if(
$ir['donatordays'])
{
print 
"<hr />
<b>Donators Only</b><br />
<a href='friendslist.php'>Friends List</a><br />
<a href='blacklist.php'>Black List</a>"
;
}
print 
"<hr />
<a href='preferences.php'>Preferences</a><br />
<a href='preport.php'>Player Report</a><br />
<a href='bugreport.php'>Bug Report</a><br />
<a href='helptutorial.php'>Help Tutorial</a><br />
<a href='gamerules.php'>Game Rules</a><br />
<a href='viewuser.php?u={$ir['userid']}'>My Profile</a><br />
<a href='logout.php'>Logout</a><br /><br />
Time is now<br />
"
;
echo 
date ('F j, Y')."<br />".date('g:i:s a');

?>
Logged

Jawz

  • Basic Member
  • *
  • Reputation Power: 11
  • Jawz has no influence.
  • Offline Offline
  • Posts: 17
    • View Profile
Re: mainmenu.php unexpected $end
« Reply #1 on: December 12, 2009, 07:01:25 AM »
fixed /lock
Logged