<?
$login = stripslashes($_COOKIE['logSiteMU']);
if (empty($login)) { 
?>
<p>&nbsp;</p>
<p align="center"><b><font color="#FF0000" face="Verdana" size="2">
Você não está conectado no site.</font></b></p>
<?} else {
?>
<STYLE type=text/css>
A:link { text-decoration: none}
A:visited { text-decoration: none}
A:hover {color: #000099; text-decoration: none}
</style>
<script>
function rusure() { 

 if (confirm("Você tem certeza que deseja alterar os dados dessa Conta ?")) { 
return true; 
 } else { 

return false; 
 } 
} 
</script>
<script>
function MuGoias(theURL,winName,features) {
  	window.open(theURL,winName,'toolbar=0,location=0,status=0,menubar=0,scrollbars=no,resizable=0,width=550,height=230');
}
</script>
<?
include("config.php");
$login = stripslashes($_GET['login']);
$campo = stripslashes($_GET['campo']);
$sql_on = @mssql_query("SELECT memb___id,memb__pwd,memb_name,addr_info,addr_deta,phon_numb,mail_addr,fpas_ques,fpas_answ,bloc_code,vip,creditos FROM MEMB_INFO WHERE $campo='$login'");
$row = mssql_fetch_row($sql_on);

$username_check = mssql_num_rows($sql_on);
if ($username_check == 0) { 
?><center><br><br><br>
<font face="Verdana" size="3" color="#000000">
Nenhum resultado<br>foi<br>encontrado
<?}Else{
	if($row[9] == 0){ $row[9] = 'Desbloqueado';}
	if($row[9] == 1){ $row[9] = 'Bloqueado';}
	?>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4">
  <tr>
    <td width="65%" bgcolor="#c0c0c0">
    <form method="POST" action="bloc2.php" onsubmit="return rusure()">
    <input type="hidden" value="<?=$row[0]?>" name="conta">
      <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Login:</font></td>
          <td width="64%">
          <font face="Verdana" size="3" color="#000000">&nbsp;<b><?=$row[0]?></b></font></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Senha:</font></td>
          <td width="64%">
          <input type="text" name="senha" size="20" value="<?=$row[1]?>"></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Nome:</font></td>
          <td width="64%">
          <input type="text" name="nome" size="20" value="<?=$row[2]?>"></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Endereço:</font></td>
          <td width="64%">
          <input type="text" name="endereco" size="43" value="<?=$row[3]?>"></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">CEP:</font></td>
          <td width="64%">
          <input type="text" name="cep" size="20" value="<?=$row[4]?>"></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Telefone:</font></td>
          <td width="64%">
          <input type="text" name="telefone" size="20" value="<?=$row[5]?>"></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">E-mail:</font></td>
          <td width="64%"><font face="Verdana" size="2" color="#000000">
          <?=$row[6]?></font></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Pergunta Secreta:</font></td>
          <td width="64%">
          <input type="text" name="pergunta" size="43" value="<?=$row[7]?>"></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Resposta Secreta:</font></td>
          <td width="64%">
          <input type="text" name="resposta" size="37" value="<?=$row[8]?>"></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Status da conta:</font></td>
          <td width="64%"><font size="2" face="Verdana">&nbsp;<b><?=$row[9]?></b></font></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Tipo de Vip:</font></td>
          <td width="64%"><font size="2" face="Verdana">&nbsp;<?=$row[10]?></font></td>
        </tr>
        <tr>
          <td width="36%" align="right">
          <font face="Verdana" size="2" color="#808080">Créditos:</font></td>
          <td width="64%"><font size="2" face="Verdana">&nbsp;<?=$row[11]?></font></td>
        </tr>
      </table>
      <p align="center"><input type="submit" value="Alterar Dados"></p>
    </form>
<?
$sql_on1 = @mssql_query("SELECT memb___id, IP, ConnectStat, ConnectTM, DisConnectTM FROM MEMB_STAT WHERE memb___id = '$row[0]' ORDER BY memb___id");
$row1 = mssql_fetch_row($sql_on1);
	if($row1[2] == 0){ $row1[2] = 'Off';}
	if($row1[2] == 1){ $row1[2] = 'On';}
?>
<?PHP
  function randomkeys($length)
  {
    $pattern = "1234567890";
    for($i=0;$i<$length;$i++)
    {
      $key .= $pattern{rand(0,9)};
    }
    return $key;
  }
$bau = randomkeys(4);
?>
    </td>
    <td width="35%" valign="top"><br>&nbsp;<a href="ip.php?ip=<?=$row1[1]?>"><font face="Verdana" size="2" color="#000000">• Outras ACCs que usa esse IP</font></a>
    <p><a href="javascript:MuGoias('desc.php?char=<?=$row[0]?>&status=<?=$row[9]?>')"><font face="Verdana" size="2" color="#000000">&nbsp;• Bloquear/Desbloquear Char</font></a></p>
    <p><a href="bloc.php?bloc=1&char=<?=$row[0]?>"><font face="Verdana" size="2" color="#000000">&nbsp;• Bloquear conta</font></a></p>
    <p><a href="bloc.php?bloc=0&char=<?=$row[0]?>"><font face="Verdana" size="2" color="#000000">&nbsp;• Desbloquear conta</font></a>
    <p><a href="bloc4.php?bau=<?=$bau;?>&conta=<?=$row[0]?>"><font face="Verdana" size="2" color="#000000">&nbsp;• Bloquear Bau</font></a></p>
    <p><a href="bloc4.php?bau=0&conta=<?=$row[0]?>"><font face="Verdana" size="2" color="#000000">&nbsp;• Desbloquear Bau</font></a></p>
<hr><form method="POST" action="bloc3.php">
<input type="hidden" value="<?=$row[0]?>" name="conta">
  <font face="Verdana" size="2">&nbsp;Alterar email:<br></font>
  &nbsp;<input type="text" name="email" size="35" value="<?=$row[6]?>"><br><br>
  &nbsp;<input type="submit" value="alterar email"></p>
</form></td>
  </tr>
</table>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
  <tr>
    <td width="26%" align="center"><a href="ip.php?ip=<?=$row1[1]?>"><font face="Verdana" size="2" color="#000000"><?=$row1[1]?></a></font></td>
    <td width="18%" align="center"><font face="Verdana" size="2"><?=$row1[2]?></font></td>
    <td width="27%" align="center"><font face="Verdana" size="2"><?=$row1[3]?></font></td>
    <td width="29%" align="center"><font face="Verdana" size="2"><?=$row1[4]?></font></td>
  </tr>
</table>
<?
}
}?>