<HTML>
<HEAD>
<TITLE>Mu Black Soul</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">

<? 
include 'cnn.php'; 
$QueryListUsersOn = mssql_query("SELECT Memb___Id FROM Memb_Stat WHERE ConnectStat>0 ORDER By Memb___Id ASC");
set_time_limit(120)
?>
                  <h1>Jogadores Onlines</h1>

        
  
<table border='0' width='99%'>
  <tr> 
<td align='center' bgcolor='#cccccc'><strong>Personagem</strong></td>
<td align='center' bgcolor='#cccccc'><strong>Guild</strong></td>
<td align='center' bgcolor='#cccccc'><strong>Cidade</strong></td>
<td align='center' bgcolor='#cccccc'><strong>Resets</strong></td>
<td align='center' bgcolor='#cccccc'><strong>Conta</strong></td>
      <td width="27%" align='center' bgcolor='#cccccc'><strong>Server</strong></td>
    </tr>
    <? 
  for($r=0;$r<mssql_num_rows($QueryListUsersOn);$r++) {
  $rank=$r+1;
  $rListOn = mssql_fetch_row($QueryListUsersOn);
	$qGameIdc = mssql_query("SELECT GameIdc from AccountCharacter WHERE Id='".$rListOn[0]."'");
	$rGameIdc = mssql_fetch_row($qGameIdc);
	$qCharOn = mssql_query("SELECT Name,Resets,cLevel,AccountID FROM Character WHERE Name='".$rGameIdc[0]."'");
	$rCharOn = mssql_fetch_row($qCharOn);
	$qPegaSala = mssql_query("SELECT ServerName FROM Memb_STAT WHERE Memb___Id='".$rListOn[0]."'");
	$rMostraSala = mssql_fetch_row($qPegaSala);
	$qGuild = mssql_query("SELECT G_Name FROM GuildMember where Name='".$rCharOn[0]."'");
	$rGuild = mssql_fetch_row($qGuild);
	
$link = "<a href='index.php?go=gsearch&guild=$rGuild[0]'>";

		if ($rGuild == 0) { 
			$rGuild[0] = 'Sem Guild'; $link = '';
		}
			
	$query_check_condi = mssql_query("SELECT vip FROM MEMB_INFO WHERE memb___id='".$rCharOn[3]."'");
	$check_condi = mssql_fetch_row($query_check_condi);

if ($check_vip[0] == 0) { $vip = "Free"; }
if ($check_vip[0] == 1) { $vip = "Vip Silver"; }
if ($check_vip[0] == 2) { $vip = "Vip Gold"; }

	$query_check_map = mssql_query("SELECT MapNumber FROM Character WHERE Name='".$rGameIdc[0]."'");
	$check_map = mssql_fetch_row($query_check_map);

if ($check_map[0] == 0) { $map = "Lorencia"; }
if ($check_map[0] == 1) { $map = "Dungeon"; }
if ($check_map[0] == 2) { $map = "Devias"; }
if ($check_map[0] == 3) { $map = "Noria"; }
if ($check_map[0] == 4) { $map = "Losttower"; }
if ($check_map[0] == 5) { $map = "Exile (Erro)"; }
if ($check_map[0] == 6) { $map = "Stadium"; }
if ($check_map[0] == 7) { $map = "Atlans"; }
if ($check_map[0] == 8) { $map = "Tarkan"; }
if ($check_map[0] == 9) { $map = "Devil Square"; }
if ($check_map[0] == 10) { $map = "Icarus"; }
if ($check_map[0] == 11) { $map = "BlodCastle 1"; }
if ($check_map[0] == 12) { $map = "BlodCastle 2"; }
if ($check_map[0] == 13) { $map = "BlodCastle 3"; }
if ($check_map[0] == 14) { $map = "BlodCastle 4"; }
if ($check_map[0] == 14) { $map = "BlodCastle 5"; }
  ?>
    <tr> 
      <td align='center' bgcolor=''>
        <a href="index.php?go=csearch&char=<?=$rGameIdc[0]?>"><?=$rGameIdc[0]?></a>
      </td>
      
    <td align='center' bgcolor=''>
      <?=$link?>
      <?=$rGuild[0]?>
    </td>
      <td align='center' bgcolor=''> 
        <?=$map?>
      </td>
      <td align='center' bgcolor=''>
        <?=$rCharOn[1]?>
      </td>
      <td align='center' bgcolor=''> 
        <?=$condi?>
      </td>
	  
    <td align='center' bgcolor=''> 
      <?=$rMostraSala[0]?>
    </td>
    </tr>
<? } ?>
</blockquote>
  </table>
</body>
</html>

<p>&nbsp;</p>
<center><script type="text/javascript"><!--
google_ad_client = "pub-1842245584922040";
/* 468x60, criado 20/06/09 */
google_ad_slot = "5049809278";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>