<div id="left">
<br/>
<div id="members_header"><strong>Who's Online:</strong></div>
<div id="members_box"> <table class="dataTable" cellspacing="0" cellpadding="0" border="1" width="95%" >
  <tr>
    <td><strong>Total Members:</strong></td>
    <td><strong>Newest Members:</strong></td>
    <td><strong>Visitors Online:</strong></td>
  </tr>
  <tr>
    <td>
		<?php  
		$query = yasDB_select("select count(user.id) as count from user ");
		$row = $query->fetch_array(MYSQLI_ASSOC);
		echo ''.$row['count'].'';  
		?>
	</td>
	<td>
		<?php
		$query = yasDB_select("select * from user order by id desc limit 5");
		while($row = $query->fetch_array(MYSQLI_ASSOC)) {
			echo '<a  href="'.$setting['siteurl'].'showmember/ '.$row['id'].'.html" style="color:'.get_random_color().'"> '.$row['username'].'&nbsp;&nbsp;</a>';
		}
		?>
	</td>
<td><?php  $visitors_online = new usersOnline(); ?><?php echo $visitors_online->count_users();?></td>
</tr>
<td colspan="3" align="center"><strong>Members Online:</strong></td>
<tr>
<td colspan="3" align="left"> <?php
$time = time()- 600;
$query2 = yasDB_select("SELECT membersonline.memberid, user.username FROM membersonline, user WHERE membersonline.memberid = user.id AND membersonline.timeactive >= $time");
echo '<b>Members Online- </b>'.$query2->num_rows.'<br/>';
if ($query2->num_rows > 0) {
	While ($row = $query2->fetch_array(MYSQLI_ASSOC)) {
		echo '<a  href="'.$setting['siteurl'].'showmember/ '.$row['memberid'].'.html" style="color:'.get_random_color().'"> '.$row['username'].'&nbsp;</a>';
	}
}
echo '<b><br/>New Members: <b><br/>';
$query = yasDB_select("select id, username from user order by id desc limit 5");
while($row = $query->fetch_array(MYSQLI_ASSOC)) {
	echo '<a  href="'.$setting['siteurl'].'showmember/ '.$row['id'].'.html" style="color:'.get_random_color().'"> '.$row['username'].'&nbsp;</a>';
}
?> </td>
  </tr>
  <tr>
    <td colspan="3" align="center"><strong>Game Stats:</strong></td>
  </tr>
  <tr>
    <td><strong>Game Plays Today:</strong></td>
    <td><strong>Total Game Plays:</strong></td>
    <td><strong>Total Games:</strong></td>
  </tr>
  <tr>
    <td><?php  $stats = yasDB_select("select * from stats where id=2");
                        $dayplays = $stats->fetch_array(MYSQLI_ASSOC); ?><?php echo $dayplays['numbers'];?></td>
    <td><?php  $stats = yasDB_select("select * from stats where id=1");
                        $totalplays = $stats->fetch_array(MYSQLI_ASSOC); ?><?php echo $totalplays['numbers'];?></td>
    <td><?php  $query = yasDB_select("select count(games.id) as count from games");
						$row = $query->fetch_array(MYSQLI_ASSOC); ?><?php echo $row['count'];?></td>
  </tr>
</table>
</div>
<div id="members_bar"></div><br>                    
</div>