Location: PHPKode > projects > DeadZone (Ajax BNT) > footer_new.php
<?
global $db,$dbtables;
connectdb();
$res = $db->Execute("SELECT COUNT(*) as loggedin from $dbtables[ships] WHERE (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP($dbtables[ships].last_login)) / 60 <= 5 and email NOT LIKE '%@xenobe'");
$row = $res->fields;
$online = $row[loggedin];

// Update counter

$res = $db->Execute("SELECT last_run FROM $dbtables[scheduler] LIMIT 1");
$result = $res->fields;
$mySEC = ($sched_ticks * 60) - (TIME()-$result[last_run]);
?>
  <div id="Feet"><center>
<?
// Start player online list
$res = $db->Execute("SELECT $dbtables[ships].character_name FROM $dbtables[ships] WHERE (last_login > date_sub(now(),interval 120 minute)) AND email NOT LIKE '%@xenobe'");

// $row = $res->fields;
$online = $res->RecordCount();
print "<TABLE WIDTH=\"740\" ALIGN=CENTER BORDER=2 CELLSPACING=0 CELLPADDING=1>
		<TR>
	<TD align=\"center\" width=\"730\" class=\"themestyle\">";
echo "  <a class=dark><b><span id=myx>$mySEC</span></b> $l_footer_until_update \n";


if($res && $online > 0) 
{ 
    while(!$res->EOF) 
    { 
        $row = $res->fields;
	$names .="<a class=headlines>{" . $row['character_name']. "}</a>";
        $res->MoveNext();
    }
    $names = trim($names);
    echo "<br />Players online:</a>{$names}";
}
?>

	</TD>
	</TR>
	</TABLE>
		<img src="images/star.gif" alt="DeadZone">
	<a class=mnu href="http://deadzone.co.nr">DeadZone &#169 2007 Craig Stanfield</a>
		<img src="images/star.gif" alt="DeadZone">
	<a class=mnu href="http://nitescifi.com">Additional Code &#169 NiteSciFi.com</a>
		<img src="images/star.gif" alt="DeadZone"><br>
		<img src="images/star.gif" alt="DeadZone">
    <a class=dark href="http://www.sourceforge.net/projects/blacknova"> BNT &#169 2000-2005 Ron Harwood and L. Patrick Smallwood</a>
		<img src="images/star.gif" alt="DeadZone"><br>
	</center></div>
Return current item: DeadZone (Ajax BNT)