<html lang="pt">
<head><SCRIPT language=JavaScript>
var message="";
function clickIE()
{
    if (document.all)
    {
        (message);
        return false;
    }
}
function clickNS(e)
{
    if(document.layers||(document.getElementById&&!document.all))
    {
        if (e.which==2||e.which==3)
        {
            (message);
            return false;
        }
    }
}
if (document.layers)
{
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS;
}
else
{
    document.onmouseup=clickNS;
    document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
</SCRIPT>
<meta name="description" content="Lucas Thompson" />
<title>Painel</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<? session_start();
include 'cnn.php';
include 'estilo.css';
include 'configs/conf_extras.php';
include 'configs/conf_reset.php';
include 'configs/conf_opcoes.php';
@$login = $_SESSION['login'];
@$senha = $_SESSION['senha'];
if(!isset($_SESSION['login'])) { echo "Para acessar essa pagina é preciso esta logado!"; }
else{
$vip=mssql_fetch_row(mssql_query("select vip from memb_info where memb___id='".$login."'"));
$Gms = mssql_fetch_row(mssql_query("select contagm from memb_info where memb___id='".$login."'"));
?>
<style type="text/css">
<!--
body {
	background-color: #B4B6C9;
	font-weight: bold;
}
.style11 {
	color: #879A26;
	font-weight: bold;
	text-align: center;
}
.style12 {
	color: #879A26;
	font-weight: bold;
}
.style13 {
	color: #000000;
	font-weight: bold;
}
-->
</style></head>

<body>
<table width="510" border="1" background="imagens/bg2.jpg">
  <tr>
    <th width="660" scope="col"><table width="99%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="4%"><img src="imagens/mu.gif" width="30" height="30"></td>
        <td width="96%" background="imagens/mu_back.png">&nbsp;&nbsp;&nbsp;
            <?
  if($Gms[0] == 0) { ?>
            <strong>PAINEL USUARIO</strong>
            <? }else echo ''; ?>
            <?
  if($Gms[0] == 1) { ?>
            <strong>PAINEL GAME MASTER</strong>
            <? }else echo ''; ?>
            <?
  if($Gms[0] >= 2) { ?>
            <strong>PAINEL ADMINISTRA&Ccedil;&Atilde;O</strong>
            <? }else echo ''; ?></td>
      </tr>
    </table>
      <br>
      <table width="95%" border="0" cellspacing="0" cellpadding="0">
        <?
  $Personagens = mssql_query("select name,clevel,resets,leveluppoint,resetao from character where accountid='".$login."'");
  for($i=0;$i<mssql_num_rows($Personagens);$i++) {
  $MostraP = mssql_fetch_row($Personagens);
  $QueryCharsPainel = mssql_query("SELECT Name,cLevel,Resets,resetao,LevelUpPoint,Strength,Dexterity,Vitality,Energy,Leadership,Class,Money FROM Character WHERE AccountId='".$login."'");
$QueryCharsPainel2 = mssql_query("SELECT Name FROM Character WHERE AccountId='".$login."'");
  }
  ?>
      </table>
      <table width="100%" border="1" align="left" cellpadding="0" cellspacing="0">
        <tr bgcolor="#323232">
          <td width="15%" height="19" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Nome</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Level</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Resets</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Reset&atilde;o</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Pontos</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">For&ccedil;a</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Agilid.</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Vida</div></td>
          <td width="10%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Energia</div></td>
          <td width="15%" bgcolor="#cccccc" class="style11"><div align="center" class="style13">Zen</div></td>
        </tr>
        <? if ($QueryCharsPainel2 <> 0){
         		  for($i=0;$i<mssql_num_rows($QueryCharsPainel);$i++) {  		  
		            $rMostraPerso = mssql_fetch_row($QueryCharsPainel);  		  ?>
        <tr bgcolor="#666666">
          <td width="15%" height="18" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[0]?>
          </div></td>
          <td width="10%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[1]?>
          </div></td>
          <td width="10%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[2]?>
          </div></td>
          <td width="10%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[3]?>
          </div></td>
          <td width="10%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[4]?>
          </div></td>
          <td width="10%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[5]?>
          </div></td>
          <td width="10%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[6]?>
            </div>
          <td width="10%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[7]?>
          </div></td>
          <td width="15%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[8]?>
          </div></td>
          <td width="15%" bgcolor="#888888"><div align="center">
              <?=$rMostraPerso[11]?>
          </div></td
  >
        </tr>
        <? } } ?>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <table width="510" border="1">
        <tr>
          <th width="650" scope="col"><img src="imagens/bannerpainel.png" width="510" height="19"></th>
        </tr>
      </table>
      <table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
        <tr>
          <td width="39%"><table width="99%" border="0" cellspacing="1" cellpadding="0">
              <?
              if($mostraroptreset == 1){ 
              	
  if($vip[0] == 0) { ?>
              <tr>
                <td width="100%"><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=resetar" target="iframe">Resetar</a></td>
              </tr>
              <? }else echo ''; ?>
              <?
  if($vip[0] == 1) { ?>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=resetarvip" target="iframe">Resetar</a></td>
              </tr>
              <? }else echo ''; ?>
              <?
  if($vip[0] == 2) { ?>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=resetarsvip" target="iframe">Resetar</a></td>
              </tr>
              <? }else echo ''; }?>
              <? if($mostraroptresetao == 1) {
   ?>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=resetao" target="iframe">Reset&atilde;o</a></td>
              </tr>
              <? }else echo ''; ?>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=pontos" target="iframe">Distribuir Pontos</a></td>
              </tr>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=senha" target="iframe">Mudar Senha</a></td>
              </tr>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=pk" target="iframe">Limpar Pk </a></td>
              </tr>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=nick" target="iframe">Mudar Nick </a></td>
              </tr>
              <? if($mapavip == 1) {
   ?>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=vipmap">Mapa vip</a><img src="http://i365.photobucket.com/albums/oo97/ramonvic/new.gif" width="34" height="5"></td>
              </tr>
              <? }else{ echo''; } ?>
              <tr>
                <td ><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=teleportar" target="iframe">Teleportar</a></td>
              </tr>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=desbugarzen" target="iframe">Desbugar Zen</a><img src="http://i365.photobucket.com/albums/oo97/ramonvic/new.gif" width="34" height="5"></td>
              </tr>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=desbugar" target="iframe">Desbugar Pontos </a></td>
              </tr>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=classe" target="iframe">Mudar Classe </a></td>
              </tr>
              <tr>
                <? if($limpar == 1) {
   ?>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=limparinvent" target="iframe">Resetar Inventario</a><img src="http://i365.photobucket.com/albums/oo97/ramonvic/new.gif" width="34" height="5"></td>
              </tr>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=limparbau" target="iframe">Resetar B&aacute;u</a><img src="http://i365.photobucket.com/albums/oo97/ramonvic/new.gif" alt="" width="34" height="5"></td>
              </tr>
              <? }else{ echo''; } ?>
              <? if($altbau == 1) {
   ?>
              <tr>
                <td><img src="imagens/013.png" width="13" height="13"> <a href="ir.php?pagina=mudarbau" target="iframe">Mudar Ba&uacute; </a><img src="http://i365.photobucket.com/albums/oo97/ramonvic/new.gif" alt="" width="34" height="5"></td>
              </tr>
              <? }else{ echo''; } ?>
              <?
  if($Gms[0] >= 1) { ?>
          </table></td>
          <td width="61%"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="1">
              <tr>
                <td width="56%" height="25" class="style12">Character
                </td> 
                <? if($Gms[0] > 1) { ?>
                <td width="44%" class="style12">Vip</td>
                <? } ?>  
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=desbanir" target="iframe">Desbanir Char</a>
                </td>
                <? if($Gms[0] > 1) { ?>
                <td><img src="imagens/013.gif" alt="" width="13" height="13"> <a href="ir.php?pagina=addvip" target="iframe">Adicionar Vip</a>
                </td> <? } ?>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=banir" target="iframe">Banir Char</a></td>
                <? if($Gms[0] > 1) { ?>
                <td><img src="imagens/013.gif" alt="" width="13" height="13"> <a href="ir.php?pagina=addsvip" target="iframe">Adicionar Vip Master</a></td>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=editchar" target="iframe">Editar Char</a></td>
                <td><img src="imagens/013.gif" alt="" width="13" height="13"> <a href="ir.php?pagina=tiravip" target="iframe">Retirar Vip</a></td>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=deletchar" target="iframe">Deletar Char</a></td>
                <td><img src="imagens/013.gif" alt="" width="13" height="13"> <a href="ir.php?pagina=alteratemp" target="iframe">Alterar Tempo</a></td>
              </tr>
            <? }else{ echo''; } ?>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=vercharban" target="iframe">Ver Chars Banidos</a></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=dadoschar" target="iframe">Ver Dados Chars</a></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="25" class="style12">Account</td>
                <? if($Gms[0] > 1) { ?>
                <td class="style12">Gerenciar Not&iacute;cias</td> <? } ?>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=desbaniracc" target="iframe">Desbanir Account</a></td>
                <? if($Gms[0] > 1) { ?>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=addnoticia" target="iframe">Adicionar Not&iacute;cia</a>
                	</td> <? } ?>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=baniracc" target="iframe">Banir Account</a></td>
                <td>&nbsp;</td>
              </tr>
              <?
  if($Gms[0] > 1) { ?>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=editacc" target="iframe">Editar Account</a></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=deletacc" target="iframe">Deletar Account</a></td>
                <td>&nbsp;</td>
              </tr>
            <? }else{ echo''; } ?>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=veraccban" target="iframe">Ver Contas Banidas</a></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=vercharban" target="iframe">Ver Dados Account</a></td>
                <td>&nbsp;</td>
              </tr>
              <tr><? if($Gms[0] > 1) { ?>
                <td height="25" class="style12">Itens</td>
                <td class="style12">&nbsp;</td>
              </tr>
            <tr>
                <td><img src="imagens/013.gif" width="13" height="13"> <a href="ir.php?pagina=adicionaritem" target="iframe">Adicionar itens</a>
                	</td> <? } else { ?> <td>&nbsp;</td> <tr></td><tr></td><? }?>
                <td>&nbsp;</td>
            </tr>
              <tr>
                <td height="25" class="style12">&nbsp;</td>
                <td class="style12">&nbsp;</td>
              </tr>

          </table></td>
        </tr>
      </table>
    <? }else{ echo''; } ?></th>
  </tr>
</table>
</body>
</html>
<? } ?> 
