Ian2456
Member
- Feb 19, 2013
- 275
- 7
So how do I make a Online code for it check if an member is online
on the site?
here the online code I copy in the DB:
rest are blank.
so I want to add a code to my staff page:
So I want to add: Online (Staff only)
to page: Staff page
any comments?
on the site?
here the online code I copy in the DB:
Code:
Name: Site online (staff only)
Type: ENUM
Length/Values: '0','1'
Default: As defined>: 0
Collation: latin1_swedish_ci
so I want to add a code to my staff page:
HTML:
<?php
define('USERNAME_REQUIRED', TRUE);
define('ACCOUNT_REQUIRED', TRUE);
include('global.php');
define("THIS_SCRIPT", 'staff');
?>
<!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">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<head>
<title><?php echo $sitename." - ".$lang['staff']; ?></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="Public/JS/jquery.history.js"></script>
<link type="text/css" rel="stylesheet" href="Public/Styles/<?php echo $currentstyle ?>/CSS/main.css" />
</head>
<body>
<div class="mainBox">
<?php include("header.php"); ?>
<?php include("system/communitynav.php"); ?>
<div class="mid" id="midcontent">
<div class="column" id="column1">
<?php
$rankq = mysql_query("SELECT * FROM `ranks` WHERE id >= 3 ORDER BY id DESC");
while($rank = mysql_fetch_array($rankq))
{
?>
<div class="contentBox">
<div class="boxHeader"><?php echo $rank['name']; ?></div>
<div class="boxContent">
<?php
$staffq = mysql_query("SELECT * FROM users WHERE rank = ".$rank['id']." ORDER BY rank DESC");
while($staff = mysql_fetch_array($staffq))
{
?>
<div class="StaffBox">
<img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $staff['look']; ?>" alt="<?php echo $staff['username']; ?>" style="float:left" />
<div class="OnlineStatus">
<?php
if($staff['online'] == 1)
{
?>
<div class="Online"><?php echo $lang['online']; ?></div>
<?php
}
else
{
?>
<div class="Offline"><?php echo $lang['offline']; ?></div>
<?php
}
?>
</div>
<div class="Usersname"><a href="home.php?u=<?php echo $staff['username']; ?>"><?php echo $staff['username']; ?></a></div>
<div class="Usersmotto"><?php echo $staff['motto']; ?></div>
<img src="./Public/Images/badges/<?php echo $rank['badgeid']; ?>.gif" alt="Teen Staff" />
</div>
<?php
}
echo('</div></div>');
}
?>
</div>
<div class="column" id="column2">
<div class="contentBox">
<div class="boxHeader">We're Hiring!</div>
<div class="boxContent">(hotel name) is a brand new hotel and our staff team is still pretty small, we're looking out for active users to hire as new moderators over the next few weeks. So keep active and get noticed for your chance at moderator!</div>
</div>
</div>
<?php include("system/sideads.php"); ?>
</div>
<?php include("system/footer.php"); ?>
</div>
</body>
</html>
So I want to add: Online (Staff only)
to page: Staff page
any comments?