Jump to content
MakeWebGames

[mccodesV2]main menu help


JD
 Share

Recommended Posts

<?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 "[url='hospital.php']Hospital ($hc)[/url]

 [url='inventory.php']Inventory[/url]
";
}
elseif($ir['jail'])
{
 print "[url='jail.php']Jail ($jc)[/url]
";
}
else
{
 print "[url='index.php']Home[/url]

 [url='inventory.php']Inventory[/url]
";
}
if($ec > 0) { print "[url='events.php']Events ($ec)[/url]
"; }
else { print "[url='events.php']Events (0)[/url]
"; }
if($mc > 0) { print "[url='mailbox.php']Mailbox ($mc)[/url]
"; }
else { print "[url='mailbox.php']Mailbox (0)[/url]
"; }
if($ir['jail'] and !$ir['hospital'])
{
 print "[url='gym.php']Jail Gym[/url]

 [url='hospital.php']Hospital ($hc)[/url]
";
}
else if (!$ir['hospital'])
{
 print "[url='explore.php']Explore[/url]

 [url='gym.php']Gym[/url]

 [url='criminal.php']Crimes[/url]

 [url='job.php']Your Job[/url]

 [url='education.php']Local School[/url]

 [url='hospital.php']Hospital ($hc)[/url]

 [url='jail.php']Jail ($jc)[/url]
";
}
else
{
 print "[url='jail.php']Jail ($jc)[/url]
";
}
print "[url='forums.php']Forums[/url]
";
if($ir['new_announcements'])
{
print "[url='ann.php']Announcements ({$ir['new_announcements']})[/url]
";
}
else
{
print "[url='ann.php']Announcements (0)[/url]
";
}
print "
[url='newspaper.php']Newspaper[/url]

[url='search.php']Search[/url]
";
if(!$ir['jail'] && $ir['gang'])
{
 print "[url='yourgang.php']Your Gang[/url]
";
}
if($ir['user_level'] > 1)
{
print "<hr />
[url='staff.php']Staff Panel[/url]
\n";



print "<hr />[b]Staff Online:[/b]
";
$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 "[url='viewuser.php?u={$r[']{$r['username']}[/url] ($la $unit)
";
}
}
if($ir['donatordays'])
{
print "<hr />
[b]Donators Only[/b]

[url='friendslist.php']Friends List[/url]

[url='blacklist.php']Black List[/url]";
}
print "<hr />
[url='preferences.php']Preferences[/url]

[url='preport.php']Player Report[/url]

[url='helptutorial.php']Help Tutorial[/url]

[url='gamerules.php']Game Rules[/url]

[url='viewuser.php?u={$ir[']My Profile[/url]

[url='logout.php']Logout[/url]


Time is now

";
echo date ('F j, Y')."
".date('g:i:s a');
?>

 

Could anyone please remove staffonline & move announcements to just below mailbox?

and btw ive tryed it & i failed although ive done it before lol

Link to comment
Share on other sites

Re: [mccodesV2]main menu help

Try this out, not tested...

 

<?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 "[url='hospital.php']Hospital ($hc)[/url]

 [url='inventory.php']Inventory[/url]
";
}
elseif($ir['jail'])
{
 print "[url='jail.php']Jail ($jc)[/url]
";
}
else
{
 print "[url='index.php']Home[/url]

 [url='inventory.php']Inventory[/url]
";
}
if($ec > 0) { print "[url='events.php']Events ($ec)[/url]
"; }
else { print "[url='events.php']Events (0)[/url]
"; }
if($mc > 0) { print "[url='mailbox.php']Mailbox ($mc)[/url]
"; }
else { print "[url='mailbox.php']Mailbox (0)[/url]
"; }
if($ir['new_announcements'])
{
print "[url='ann.php']Announcements ({$ir['new_announcements']})[/url]
";
}
else
{
print "[url='ann.php']Announcements (0)[/url]
";
}
if($ir['jail'] and !$ir['hospital'])
{
 print "[url='gym.php']Jail Gym[/url]

 [url='hospital.php']Hospital ($hc)[/url]
";
}
else if (!$ir['hospital'])
{
 print "[url='explore.php']Explore[/url]

 [url='gym.php']Gym[/url]

 [url='criminal.php']Crimes[/url]

 [url='job.php']Your Job[/url]

 [url='education.php']Local School[/url]

 [url='hospital.php']Hospital ($hc)[/url]

 [url='jail.php']Jail ($jc)[/url]
";
}
else
{
 print "[url='jail.php']Jail ($jc)[/url]
";
}
print "[url='forums.php']Forums[/url]
";
print "
[url='newspaper.php']Newspaper[/url]

[url='search.php']Search[/url]
";
if(!$ir['jail'] && $ir['gang'])
{
 print "[url='yourgang.php']Your Gang[/url]
";
}
if($ir['user_level'] > 1)
{
print "<hr />
[url='staff.php']Staff Panel[/url]
\n";
}
if($ir['donatordays'])
{
print "<hr />
[b]Donators Only[/b]

[url='friendslist.php']Friends List[/url]

[url='blacklist.php']Black List[/url]";
}
print "<hr />
[url='preferences.php']Preferences[/url]

[url='preport.php']Player Report[/url]

[url='helptutorial.php']Help Tutorial[/url]

[url='gamerules.php']Game Rules[/url]

[url='viewuser.php?u={$ir[']My Profile[/url]

[url='logout.php']Logout[/url]


Time is now

";
echo date ('F j, Y')."
".date('g:i:s a');
?>
Link to comment
Share on other sites

Re: [mccodesV2]main menu help

 

Try this out, not tested...

 

<?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 "[url='hospital.php']Hospital ($hc)[/url]

 [url='inventory.php']Inventory[/url]
";
}
elseif($ir['jail'])
{
 print "[url='jail.php']Jail ($jc)[/url]
";
}
else
{
 print "[url='index.php']Home[/url]

 [url='inventory.php']Inventory[/url]
";
}
if($ec > 0) { print "[url='events.php']Events ($ec)[/url]
"; }
else { print "[url='events.php']Events (0)[/url]
"; }
if($mc > 0) { print "[url='mailbox.php']Mailbox ($mc)[/url]
"; }
else { print "[url='mailbox.php']Mailbox (0)[/url]
"; }
if($ir['new_announcements'])
{
print "[url='ann.php']Announcements ({$ir['new_announcements']})[/url]
";
}
else
{
print "[url='ann.php']Announcements (0)[/url]
";
}
if($ir['jail'] and !$ir['hospital'])
{
 print "[url='gym.php']Jail Gym[/url]

 [url='hospital.php']Hospital ($hc)[/url]
";
}
else if (!$ir['hospital'])
{
 print "[url='explore.php']Explore[/url]

 [url='gym.php']Gym[/url]

 [url='criminal.php']Crimes[/url]

 [url='job.php']Your Job[/url]

 [url='education.php']Local School[/url]

 [url='hospital.php']Hospital ($hc)[/url]

 [url='jail.php']Jail ($jc)[/url]
";
}
else
{
 print "[url='jail.php']Jail ($jc)[/url]
";
}
print "[url='forums.php']Forums[/url]
";
print "
[url='newspaper.php']Newspaper[/url]

[url='search.php']Search[/url]
";
if(!$ir['jail'] && $ir['gang'])
{
 print "[url='yourgang.php']Your Gang[/url]
";
}
if($ir['user_level'] > 1)
{
print "<hr />
[url='staff.php']Staff Panel[/url]
\n";
}
if($ir['donatordays'])
{
print "<hr />
[b]Donators Only[/b]

[url='friendslist.php']Friends List[/url]

[url='blacklist.php']Black List[/url]";
}
print "<hr />
[url='preferences.php']Preferences[/url]

[url='preport.php']Player Report[/url]

[url='helptutorial.php']Help Tutorial[/url]

[url='gamerules.php']Game Rules[/url]

[url='viewuser.php?u={$ir[']My Profile[/url]

[url='logout.php']Logout[/url]


Time is now

";
echo date ('F j, Y')."
".date('g:i:s a');
?>

 

Works like a treat +1 to BlueDevil123

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