Jump to content
MakeWebGames

View pages while in jail or hosp


Kaotic07

Recommended Posts

Re: View pages while in jail or hosp

My mainmenu is as follows, edit it to your liking :)

 

<?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 "<font color='black'>Hospital ($hc)

<font color='black'>Inventory

";

}

elseif($ir['jail'])

{

print "<font color='black'>Jail ($jc)

";

}

else

{

print "<font color='black'>Home

<font color='black'>Inventory

";

}

if($ec > 0) { print "<font color='red'>Events ($ec)

"; }

else { print "<font color='black'>Events (0)

"; }

if($mc > 0) { print "<font color='red'>Mailbox ($mc)

"; }

else { print "<font color='black'>Mailbox (0)

"; }

if($ir['jail'] and !$ir['hospital'])

{

print "<font color='black'>Jail Gym

<font color='black'>Hospital ($hc)

";

}

else if (!$ir['hospital'])

{

print "<font color='black'>Explore

<font color='black'>Gym

<font color='black'>Crystal Gym

<font color='black'>Crimes

<font color='black'>Your Job

<font color='black'>Local School

<font color='black'>Hospital ($hc)

<font color='black'>Jail ($jc)

";

}

else

{

print "Jail ($jc)

";

}

print "<font color='red'>Forums

";

if($ir['new_announcements'])

{

print "<font color='black'>Announcements ({$ir['new_announcements']})

";

}

else

{

print "<font color='black'>Announcements (0)

";

print "<font color='black'>Inventory

";

}

print "

<font color='black'>Newspaper

<font color='black'>Search

";

if(!$ir['jail'] && $ir['gang'])

{

print "Your Gang

";

}

if($ir['user_level'] > 1)

{

print "<hr />

<font color='black'>Staff Panel

\n";

 

print "<hr /><font color='black'>Staff Online:

";

$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 "{$r['username']} ($la $unit)

";

}

}

if($ir['donatordays'])

{

print "<hr />

Donators Only

<font color='red'>Friends List

<font color='red'>Black List";

}

print "<hr />

<font color='black'>Preferences

<font color='black'>Player Report

<font color='black'>Bug Report Center

<font color='black'>Help Tutorial

<font color='black'>Game Rules

<font color='black'>My Profile

<font color='black'>Logout

 

Time is now

";

echo date ('F j, Y')."

".date('g:i:s a');

?>

Link to comment
Share on other sites

  • 11 months later...

Re: View pages while in jail or hosp

I just fixed this up in my game. One line needs to be added and its so cool cause im only new to PHP...lol realise this is an old post but might help someone else down the track 8-)

if($ir['hospital'])

{

print "<font color='black'>Hospital ($hc)

<font color='black'>Inventory

";

}

elseif($ir['jail'])

{

print "<font color='black'>Jail ($jc)

<font color='black'>Inventory

";

}

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