<?php 
if(!isset($_SESSION["logado"]) == 1) {
	exit('<div class="box_conteudo">Voc&ecirc; n&atilde;o pode acessar esta p&aacute;gina</div>');
}
else{
$vip = mssql_fetch_row(mssql_query("select ".colum_vip." from memb_info where memb___id='".$_SESSION["login"]."'"));
if($vip[0] < mudar_senha) {
	exit('<div class="box_conteudo">Voc&ecirc; n&atilde;o tem benef&iacute;cio para acessar esta p&aacute;gina</div>');
}
else{
?>
<!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>Untitled Document</title>
</head>

<body>
<div class="about-team-page-top-wrap" style="padding-bottom: 0px; margin-top: -5px;">
    
</div>
<div class="match-list-wrap">
<br />
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="23%" align="right" style="color: #FFF">Personagem:</td>
    <td width="77%"><label>
      <select name="dpontos_personagem" id="dpontos_personagem">
      <?php 
	  $char = mssql_query("select name from character where accountid='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo '<option value="'.$pega[0].'">'.$pega[0].'</option>';
	}
	  ?>
      </select>
    </label></td>
    </tr>
  <tr>
    <td align="right" style="color: #FFF">Força:</td>
    <td><label>
      <input name="dpontos_forca" type="text" id="dpontos_forca" onkeypress="return SomenteNumero(event)" value="0" maxlength="5" />
    </label></td>
    </tr>
  <tr>
    <td align="right" style="color: #FFF">Agilidade:</td>
    <td><label>
      <input name="dpontos_agilidade" type="text" id="dpontos_agilidade" onkeypress="return SomenteNumero(event)" value="0" maxlength="5" />
    </label></td>
    </tr>
  <tr>
    <td align="right" style="color: #FFF">Vitalidade:</td>
    <td><label>
      <input name="dpontos_vitalidade" type="text" id="dpontos_vitalidade" onkeypress="return SomenteNumero(event)" value="0" maxlength="5" />
    </label></td>
    </tr>
  <tr>
    <td align="right" style="color: #FFF">Energia:</td>
    <td><label>
      <input name="dpontos_energia" type="text" id="dpontos_energia" onkeypress="return SomenteNumero(event)" value="0" maxlength="5" />
    </label></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td><label>
      <input type="submit" name="distribuir" id="distribuir" onclick="loading('?go=pontos&distribuir=true'+'&dpontos_personagem='+document.getElementById('dpontos_personagem').value+'&dpontos_forca='+document.getElementById('dpontos_forca').value+'&dpontos_agilidade='+document.getElementById('dpontos_agilidade').value+'&dpontos_vitalidade='+document.getElementById('dpontos_vitalidade').value+'&dpontos_energia='+document.getElementById('dpontos_energia').value, 'dpontos');" value="Distribuir pontos" />
    </label><br />
<br /><div id="dpontos" style="color:#FFF"></div>
</td>
    </tr>
</table>
<br />
<br /><div class="box_conteudo">
<table width="90%" border="0" cellspacing="2" cellpadding="2" align="center">
<?php
$char2 = mssql_query("select name,leveluppoint,strength,dexterity,vitality,energy from character where accountid='".$_SESSION["login"]."'");
for($j=0;$j<mssql_num_rows($char2);$j++) {
$dado = mssql_fetch_row($char2);
echo '<tr>
    <td width="42%" bgcolor="#666666"><strong style="color: #FFF"><br>
      <br>
    '.$dado[0].'</strong></td>
    <td width="51%" bgcolor="#666666">&nbsp;</td>
    </tr>
	 <tr>
    <td style="color: #CCC">Pontos: <span style="color: RED">'.$dado[1].'</span></td>
    <td style="color: #CCC">&nbsp;</td>
    </tr>
	 <tr>
    <td style="color: #CCC">Agilidade:<span style="color: #6C0"> '.$dado[3].'</span></td>
    <td style="color: #CCC">Força:<span style="color: #6C0"> '.$dado[2].'</span></td>
    </tr>
	 <tr>
    <td style="color: #CCC">energia: <span style="color: #6C0">'.$dado[5].'</span></td>
    <td style="color: #CCC">Vitalidade:<span style="color: #6C0"> '.$dado[4].'</span></td>
    </tr>';
}
?>
</table><br />
<br />

</div>
</div>


</body>
</html>
<? }} ?>