//Fake users online
$max_guid=mssql_fetch_row(mssql_query("select top 1 memb_guid from memb_info order by memb_guid desc"));
while($rank < 2*$i){
$memb_guid=rand(1,$max_guid[0]);
$memb___id=mssql_query("select memb___id from memb_info where memb_guid='$memb_guid'");
while (mssql_num_rows($memb___id) <1 or in_array($memb_guid,$zaeti_guid))$memb_guid=rand(1,$max_guid[0]);
$row=mssql_fetch_row($memb___id);
if(mssql_num_rows(mssql_query("select connectstat from memb_stat where memb___id='$row[0]' and connectstat='1'")) >=1)continue;
$accchar = mssql_fetch_row(mssql_query("Select GameIDC From AccountCharacter where Id='$row[0]'"));
$character = mssql_fetch_row(mssql_query("Select Name,Class,MapNumber,clevel,resets From Character where Name='$accchar[0]'"));
if($character[3] <10 or $character[0]=='' or empty($character[0]))continue;
$rank++;$zaeti_guid[]=$memb_guid;
echo "<tr>
<td align=left><font size=1 color=#666666><b><center>$rank</center></b></font></td>
<td align=left><font size=1 color=#999999><b><center><a href=index.php?op=character&character=$character[0]&show=1>$character[0]</a></center></b></td>
<td align=left><font size=1 color=#FFFFFF><b><center>$character[3]</center></b></td>
<td align=left><font size=1 color=#ed1c24><b><center>[$character[4]]</center></b></td>
<td align=left><font size=1 color=#0076a3><b><center>".decode_class($character[1])."</center></b></td>
</tr>
";
}
//End of fake users