<?
$msconnect=mssql_connect("[COLOR="Red"]Your IP[/COLOR]","[COLOR="Red"]dbuser[/COLOR]","[COLOR="Red"]dbpass[/COLOR]");
$msdb=mssql_select_db("muonline",$msconnect);
$admin="select Name,AccountID,ctlcode From Character where ctlcode='8'";
$sql_admin_check=mssql_query($admin);
echo'<table align=center width=240 border=1 bordercolor=#654B2A cellpadding=0 cellspacing=0>
<tr><td width=10><font color=#654B2A><font color=#FFFFFF>#</td>
<td width=100><font color=#654B2A><font color=#FFFFFF>Name:</td>
<td width=80><font color=#654B2A><font color=#FFFFFF>Status:</td></tr>';
for($i=0;$i < mssql_num_rows($sql_admin_check);++$i)
{
$nr=$i+1;
$row=mssql_fetch_row($sql_admin_check);
$status="select ConnectStat from MEMB_STAT where memb___id='$row[1]'";
$sql_status_check=mssql_query($status);
$row1=mssql_fetch_row($sql_status_check);
if($row1[0] == 0){ $row1[0] ='<font color=red><b>Offline';
}
if($row1[0] == 1){ $row1[0] ='<font color=green><b>Online';
}
echo"<tr><td width=10><font color=#FFFFFF>$nr</td>
<td width=100><a href='index.php?op=character&character=$row[0]'>$row[0]</a></td>
<td width=80><font color=#654B2A>$row1[0]</td></tr>"; }
?>
</table><br>