Location: PHPKode > projects > Teampopor > teampopor-0.5/teampopor/themes/default/extra-network.tpl.php
<?php
/**
 * #extra for network/%network
 */
?>
<div id="extra">
  <div class="leo-module mod-util mod-custom">
    <div class="header">
      <?php
      // Count users active within the defined period.
      $interval = time() - 900;

      // Perform database queries to gather online user lists.  We use s.timestamp
      // rather than u.access because it is much faster.
      $authenticated_count = db_result(db_query('SELECT COUNT(DISTINCT s.uid) FROM {sessions} s WHERE s.timestamp >= %d AND s.uid > 0', $interval));
      ?>
      <h3><?php print t('Online Now'); ?> (<?php print $authenticated_count ?>)</h3>
    </div>
    <div class="content">
    </div>
  </div>
</div>
Return current item: Teampopor