<?
include 'cnn.php';
include 'estilo.css';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$titulosite?></title>
<style type="text/css">
<!--
.style1 {
	color: #000000;
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.style3 {font-family: Georgia, "Times New Roman", Times, serif}
.style10 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
.style11 {color: #000000}
.style19 {color: #000000; }
-->
</style>
</head>

<body>
<table width="510" border="1" background="imagens/bg2.jpg">
  <tr>
    <th height="515" scope="col"><table width="510" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="30"><img src="imagens/mu.gif" alt="" width="30" height="30" /></td>
        <td width="480" background="imagens/mu_back.png">&nbsp;&nbsp;&nbsp;<strong>Ver Dados do Char</strong></td>
      </tr>
    </table>
      <fieldset style="width:50%; border-color: #000000; border-width: 2px;" >
      <p>
        <legend align="center" class="style19">Busca</legend>
      </p>
      <table width="55%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr></tr>
        <tr>
          <td width="100%"><table border="0" align="left" cellpadding="0" cellspacing="0">
              <tr>
                <td height="103"><form action="" method="post" name="search_" id="search_">
                    <table border="0" cellspacing="4" cellpadding="0">
                      <tr>
                        <td width="53" class="style19"> Nome:</td>
                        <td width="123"><div align="left">
                            <input name="name" type="text" id="name" size="10" maxlength="10" style="width: 120px;"/>
                        </div></td>
                      </tr>
                      <tr class="style11">
                        <td>&nbsp;</td>
                      </tr>
                    </table>
                  <table width="193" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="center"><div align="center">
                            <input name="prossegue" type="submit" value="Buscar" onclick="return search_form();" class="boton_principal" />
                        </div></td>
                      </tr>
                    </table>
                </form></td>
              </tr>
          </table></td>
        </tr>
      </table>
      </fieldset>
      <table width="95%" height="300" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="27"><div align="center" class="style1"><span class="style3">
              <? 
if($_POST['prossegue']) {
$name = stripslashes($_POST['name']);
$VerChar = mssql_num_rows(mssql_query("SELECT name from Character WHERE name='".$name."'"));
$PegarDados = mssql_fetch_array(mssql_query("SELECT * from Character WHERE Name='".$name."'"));
$PegarGuild = mssql_fetch_array(mssql_query("SELECT * from GuildMember WHERE Name='".$name."'"));
$PegarOutros = mssql_fetch_row(mssql_query("SELECT Class,Resets,CtlCode,resetao FROM Character WHERE Name='".$name."'"));
$Conta = $PegarDados[AccountID];
$PegarConexao = mssql_fetch_array(mssql_query("SELECT * FROM MEMB_STAT WHERE MEMB___ID='".$Conta."'"));
$PegarConta = mssql_fetch_array(mssql_query("SELECT * FROM MEMB_INFO WHERE MEMB___ID='".$Conta."'"));
$VerOnline = mssql_fetch_row(mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='".$Conta."'"));
if ($VerChar <= 0 ) 
{ 
echo "<div id='caixa' align='center'><strong>Personagem N&atilde;o Encontrado!</strong><br></div>"; 
}
else if (eregi("[^a-zA-Z0-9_-]", $name)) 
{ 
echo("<div id='caixa' align='center'><strong>Use Apenas Letras e Numeros !</strong><br></div>"); 
}
else {
// BÁSICO
$char['nome']	= $PegarDados[Name];
// CHAR
$char['vit'] 	= $PegarDados[Vitality];
$char['str'] 	= $PegarDados[Strength];
$char['ene'] 	= $PegarDados[Energy];
$char['agi'] 	= $PegarDados[Dexterity];
$char['com'] 	= $PegarDados[Leadership];
$char['class']	= $PegarOutros[0];
$char['resets'] = $PegarOutros[1];
$char['ctlcode']= $PegarOutros[2];
$char['resetao']= $PegarOutros[3];
$char['map'] 	= $PegarDados[MapNumber];
$char['pontos'] = $PegarDados[LevelUpPoint];
$char['level'] 	= $PegarDados[cLevel];
$char['matou'] 	= $PegarDados[PkCount];
$char['zen'] 	= $PegarDados[Money];
$char['guild'] 	= $PegarGuild[G_Name];
$char['login'] 	= $PegarConta[memb___id];
$char['ip'] 	= $PegarConexao[IP];

// CONTA
$conta['mrgold']	= $PegarConta[mrgold];
$conta['vip_a']		= $PegarConta[vip];
$conta['conexao']	= $PegarConexao[ConnectTM];
$conta['stat']		= $VerOnline[0];
// IF DE TRANSFORMAO
// RESET
if ($char['level'] >= $reset['svip'] and $conta['vip_a'] == 2) { $char['level'] = ''.$char['level'].' </font>'; }
if ($char['level'] >= $reset['vip'] and $conta['vip_a'] == 1) { $char['level'] = ''.$char['level'].' </font>'; }
if ($char['level'] >= $reset['free'] and $conta['vip_a'] == 0) { $char['level'] = ''.$char['level'].' </font>'; }
// PONTOS PRA FICAR FULL
if ($char['pontos'] >= $full['pontos']) { $char['pontos'] = '<font color=blue>'.$char['pontos'].' ( Resetão ) </font>'; }
// STATS FULL
if ($char['str'] == $full['str']) { $char['str'] = '<font color=red>65000 ( FuLL )</font>'; }
if ($char['agi'] == $full['agi']) { $char['agi'] = '<font color=red>65000 ( FuLL )</font>'; }
if ($char['vit'] == $full['vit']) { $char['vit'] = '<font color=red>65000 ( FuLL )</font>'; }
if ($char['ene'] == $full['ene']) { $char['ene'] = '<font color=red>65000 ( FuLL )</font>'; }
// STATS
if ($conta['stat'] <= 0) { $conta['stats'] = '<IMG src="imagens/user_offline.gif">'; }
if ($conta['stat'] >= 1) { $conta['stats'] = '<IMG src="imagens/user_online.gif">'; }
// MAPAS
if ($char['map'] == 0) { $char['mapa'] = 'Lorencia'; }
if ($char['map'] == 1) { $char['mapa'] = 'Dungeon'; }
if ($char['map'] == 2) { $char['mapa'] = 'Davias'; }
if ($char['map'] == 3) { $char['mapa'] = 'Noria'; }
if ($char['map'] == 4) { $char['mapa'] = 'Lost Tower'; }
if ($char['map'] == 5) { $char['mapa'] = 'Mapa 5'; }
if ($char['map'] == 6) { $char['mapa'] = 'Stadium'; }
if ($char['map'] == 7) { $char['mapa'] = 'Atlans'; }
if ($char['map'] == 8) { $char['mapa'] = 'Tarkan'; }
if ($char['map'] == 9) { $char['mapa'] = 'Devil Square'; }
if ($char['map'] == 10) { $char['mapa'] = 'Icarus'; }
if ($char['map'] == 11) { $char['mapa'] = 'Blood castle 1'; }
if ($char['map'] == 12) { $char['mapa'] = 'Blood castle 2'; }
if ($char['map'] == 13) { $char['mapa'] = 'Blood castle 3'; }
if ($char['map'] == 14) { $char['mapa'] = 'Blood castle 4'; }
if ($char['map'] == 15) { $char['mapa'] = 'Blood castle 5'; }
if ($char['map'] == 16) { $char['mapa'] = 'Blood castle 6'; }
if ($char['map'] == 17) { $char['mapa'] = 'ERRO'; }
if ($char['map'] == 19) { $char['mapa'] = 'DareDevil'; }
// CLASSE NOMES
if ($char['class'] == 0) { $char['classe'] = 'Dark Wizard'; }
if ($char['class'] == 1) { $char['classe'] = 'Soul Master'; }
if ($char['class'] == 2) { $char['classe'] = 'Grand Master'; }
if ($char['class'] == 16) { $char['classe'] = 'Dark Knight'; }
if ($char['class'] == 17) { $char['classe'] = 'Blade Knight'; }
if ($char['class'] == 18) { $char['classe'] = 'Blade Master'; }
if ($char['class'] == 32) { $char['classe'] = 'Elf'; }
if ($char['class'] == 33) { $char['classe'] = 'Muse Elf'; }
if ($char['class'] == 34) { $char['classe'] = 'High Elf'; }
if ($char['class'] == 48) { $char['classe'] = 'Magic Gladiator'; }
if ($char['class'] == 49) { $char['classe'] = 'Duel Master'; }
if ($char['class'] == 64) { $char['classe'] = 'Dark Lord'; }
if ($char['class'] == 65) { $char['classe'] = 'Lord Emperor'; }
if ($char['class'] == 80) { $char['classe'] = 'Summoner'; }
if ($char['class'] == 81) { $char['classe'] = 'Blood Summoner'; }
if ($char['class'] == 82) { $char['classe'] = 'Dimension Master'; }
// CLASSE NOMES
if ($char['class'] == 0) { $char['foto'] = '<IMG src="imagens/ran/DW.jpg">'; }
if ($char['class'] == 1) { $char['foto'] = '<IMG src="imagens/ran/SM.jpg">'; }
if ($char['class'] == 2) { $char['foto'] = '<IMG src="imagens/ran/GM.jpg">'; }
if ($char['class'] == 16) { $char['foto'] = '<IMG src="imagens/ran/DK.jpg">'; }
if ($char['class'] == 17) { $char['foto'] = '<IMG src="imagens/ran/BK.jpg">'; }
if ($char['class'] == 18) { $char['foto'] = '<IMG src="imagens/ran/BM.jpg">'; }
if ($char['class'] == 32) { $char['foto'] = '<IMG src="imagens/ran/ELF.jpg">'; }
if ($char['class'] == 33) { $char['foto'] = '<IMG src="imagens/ran/MUSE.jpg">'; }
if ($char['class'] == 34) { $char['foto'] = '<IMG src="imagens/ran/HIELF.jpg">'; }
if ($char['class'] == 48) { $char['foto'] = '<IMG src="imagens/ran/MG.jpg">'; }
if ($char['class'] == 49) { $char['foto'] = '<IMG src="imagens/ran/DM.jpg">'; }
if ($char['class'] == 64) { $char['foto'] = '<IMG src="imagens/ran/DL.jpg">'; }
if ($char['class'] == 65) { $char['foto'] = '<IMG src="imagens/ran/LORD.jpg">'; }
if ($char['class'] == 80) { $char['foto'] = '<IMG src="imagens/ran/SUM.jpg">'; }
if ($char['class'] == 81) { $char['foto'] = '<IMG src="imagens/ran/BS.jpg">'; }
if ($char['class'] == 82) { $char['foto'] = '<IMG src="imagens/ran/DL.jpg">'; }
// VIP
if ($conta['vip_a'] == 0) { $conta['vip'] = '<IMG src="imagens/vip-no.gif">'; }
if ($conta['vip_a'] == 1) { $conta['vip'] = '<IMG src="imagens/vip.gif">'; }
if ($conta['vip_a'] == 2) { $conta['vip'] = '<IMG src="imagens/svip.gif">'; }
?>
              <span class="style19">PESQUISA POR PERSONAGEM AVANÇADA</span></span>:<a href="searching.php?name=<?=$char['nome']?>&amp;type=char " >
                <?=$char['nome']?>
              </a></div></td>
        </tr>
        <tr>
          <td height="28"><div align='center'>
            <?=$char['foto']?>
          </div></td>
        </tr>
        <tr>
          <td><table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="13%"><div align="center" class="style19"><strong>Nome</strong></div></td>
                <td width="16%"><div align="center" class="style19"><strong>Login</strong></div></td>
                <td width="20%"><div align="center" class="style19"><strong>Classe</strong></div></td>
                <td width="13%"><div align="center" class="style19"><strong>Level</strong></div></td>
                <td width="16%"><div align="center" class="style19"><strong>Resets</strong></div></td>
                <td width="22%"><div align="center" class="style19"><strong>VIP</strong></div></td>
              </tr>
              <tr bgcolor="#888888">
                <td bgcolor="#cccccc"><div align='center' class="style19"><a href="searching.php?name=<?=$char['nome']?>&amp;type=char " >
                  <?=$char['nome']?>
                </a></div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['login']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['classe']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['level']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['resets']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$conta['vip']?>
                </div></td>
              </tr>
              <tr>
                <td><div align="center" class="style19"><strong>Guild</strong></div></td>
                <td><div align="center" class="style19"><strong>Ultimo IP</strong></div></td>
                <td><div align="center" class="style19"><strong>Mapa</strong></div></td>
                <td><div align="center" class="style19"><strong>Zen</strong></div></td>
                <td><div align="center" class="style19"><strong>PK Status</strong></div></td>
                <td><div align="center" class="style19"><strong>Status</strong></div></td>
              </tr>
              <tr bgcolor="#cccccc">
                <td bgcolor="#cccccc"><div align='center' class="style19"><a href="search_guild.php?name=<?=$char['guild']?>&amp;type=guild ">
                  <?=$char['guild']?>
                </a></div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['ip']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['mapa']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['zen']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['matou']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$conta['stats']?>
                </div></td>
              </tr>
              <tr>
                <td><div align="center" class="style19"><strong>Força</strong></div></td>
                <td><div align="center" class="style19"><strong>Energia</strong></div></td>
                <td><div align="center" class="style19"><strong>Agilidade</strong></div></td>
                <td><div align="center" class="style19"><strong>Life</strong></div></td>
                <td><div align="center" class="style19"><strong>Comando</strong></div></td>
                <td>&nbsp;</td>
              </tr>
              <tr bgcolor="#cccccc">
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['str']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                    <?=$char['ene']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['agi']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                  <?=$char['vit']?>
                </div></td>
                <td bgcolor="#cccccc"><div align='center' class="style19">
                    <?=$char['com']?>
                </div></td>
                <td bgcolor="#cccccc">&nbsp;</td>
              </tr>
            </table>
            <p>
                <? }} ?>
              </p>
          </td>
        </tr>
      </table>
    <a href="javascript:history.back(-1);"><p align="left">&lt;&lt; voltar </p>
      </a></th>
  </tr>
</table>
</body>
</html>