<?php 
if(!isset($_SESSION["logado"]) == 1) {
	exit('<header style="background: url(images/page-fon-bg.jpg) center top no-repeat; height: 307px;">
  
<div class="container">
<div class="hero"></div>
</div>

</header>
<div class="container">
<div style="position: absolute; top:-300px; left:470px; z-index:10;"><img src="images/gl2.png"/></div>
    
<div id="content">
<div id="box1">
 <div class="title1">
 <h1>SEM REGISTRO.</h1>
 </div>
        
	<br><br><br><br><br><br><br><br><br>	
<TABLE>
<TD align="right">

<TD align="left" valign="top"><div class="or"><span>LOGUE-SE PARA ACESSAR.</span></div>
	O Conteudo a seguir, não pode ser acessado por voce.. <br><br>
	  Opcionais restritas a usuarios registrados. <br><br><br><br><div class="i_note">Registre-se gratuitamente, agora mesmo..</div><br><br><br><br><br><br><br><br><br><br></TD>
	</TABLE>
    </div>
</div>


        </div>');
}
else{
$vip = mssql_fetch_row(mssql_query("select ".colum_vip." from memb_info where memb___id='".$_SESSION["login"]."'"));
if($vip[0] < resetar) {
	exit('<header style="background: url(images/page-fon-bg.jpg) center top no-repeat; height: 507px;">
  
<div class="container">
<div class="hero"></div>
</div>

</header>
<div class="container">
<div style="position: absolute; top:-400px; left:370px; z-index:10;"><img src="images/dl.png"/></div>
    
<div id="content">
<div id="box1">
 <div class="title1">
 <h1>SEM REGISTRO.</h1>
 </div>
        
	<br><br><br><br><br><br>	
<TABLE>
<TD align="right">

<TD align="left" valign="top"><div class="or"><span>LOGUE-SE PARA ACESSAR.</span></div>
	O Conteudo a seguir, não pode ser acessado por voce.. <br><br>
	  Opcionais restritas a usuarios registrados. <br><br><br><br><div class="i_note">Registre-se gratuitamente, agora mesmo..</div><br><br><br><br><br><br><br><br><br><br></TD>
	</TABLE>
    </div>
</div>


        </div>');
}
else{
?>
<header style="background: url(images/page-fon-bg.jpg) center top no-repeat;
  height: 507px;">
  


<div class="container">
	
	<div class="hero"></div>
</div><!--container-->
</header><!--header-->

	<div class="container">
    
    <!-- FIM HEADER -->
    <!-- INICIO MEIO -->






<div style="position: absolute; top:-450px; left:300px; z-index:10;"><img src="images/gl2.png"/></div>
<div id="content">
    <div id="box1">
        <div class="title1">
            <h1>Painel de Controle</h1>
        </div>
        <div id="content_center">
            <div class="box-style1" style="margin-bottom: 20px;">
                <h2 class="title">Olá, <?php 
	  $char = mssql_query("select memb_name from memb_info where memb___id='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></h2>
                <div class="entry">
                    <div id="ucp_info">
                        <div class="half">
                            
                            
                            
                            
                           <table width="100%">
                                <tr>
                                    <td width="5%"><img
                                                src="images/icons/user.png"/>
                                    </td>
                                    <td width="45%">Login de acesso</td>
                                    <td width="50%"><?php 
	  $char = mssql_query("select memb___id from memb_info where memb___id='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></td>
                                </tr>
                                <tr>
                                    <td><img
                                                src="images/icons/email.png"/>
                                    </td>
                                    <td>E-mail</td>
                                    <td><?php 
	  $char = mssql_query("select mail_addr from memb_info where memb___id='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></td>
                                </tr>
                                <tr>
                                    <td><img
                                                src="images/icons/award_star_bronze_1.png"/>
                                    </td>
                                    <td>Status da Conta</td>
                                    <td><?   if(!isset($_SESSION['login'])) {
		echo ''; }
		elseif(isset($_SESSION['login'])) {
		$login = $_SESSION['login'];
		$senha = $_SESSION['senha'];
		$tipoconta = mssql_fetch_row(mssql_query("select connectstat from memb_stat where memb___id='".$login.""));
		switch($tipoconta[1]) {
			case 2: $sintaxe = " Dias";
				break;
			case 1: $sintaxe = " Dias";
				break;
			case 0: $sintaxe = " Dias";
				break;
			default: $sintaxe = " Dias";
		}
		switch($tipoconta[0]) {
			case 0: $tipodeconta = "<img src='images/off-icon.png'/> Offline"; 
				break;
			case 1: $tipodeconta = "<img src='images/off-icon.png'/> Online";
				break;
			case 2: $tipodeconta = "Vip Silver";
				break;
			default : $tipodeconta = "Error";
		}
		echo ''.$tipodeconta.'';
		}
		?></td>
                                </tr>
                                <tr>
                                    <td><img
                                                src="images/icons/server.png"/>
                                    </td>
                                    <td>Tipo de Conta</td>
                                    <td><?   if(!isset($_SESSION['login'])) {
		echo ''; }
		elseif(isset($_SESSION['login'])) {
		$login = $_SESSION['login'];
		$senha = $_SESSION['senha'];
		$tipoconta = mssql_fetch_row(mssql_query("select AccountLevel, Accountexpiredate from memb_info where memb___id='".$login."' AND memb__pwd='".$senha."'"));
		switch($tipoconta[1]) {
			case 2: $sintaxe = " Dias";
				break;
			case 1: $sintaxe = " Dias";
				break;
			case 0: $sintaxe = " Dias";
				break;
			default: $sintaxe = " Dias";
		}
		switch($tipoconta[0]) {
			case 0: $tipodeconta = "<font color='red'>Free</font>"; 
				break;
			case 1: $tipodeconta = "<font color='#3C0'>VIP Silver</font>";
				break;
			case 2: $tipodeconta = "<font color='#0CF'>VIP Platinum</font>";
				break;
			default : $tipodeconta = "Error";
		}
		echo ''.$tipodeconta.'';
		}
		?></td>
                                </tr>
                                
                                    <tr>
                                        <td><img
                                                    src="images/icons/shield.png"/>
                                        </td>
                                        <td>Vencimento</td>
                                        <td> ( <a href="javascript: void(0);" onclick="loading('?go=paineluser', 'conteudo');"><?php 
	  $char = mssql_query("select accountexpiredate from memb_info where memb___id='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></a> )</td>
                                    </tr>
                             
                            </table>
                        </div>
                        <div class="half">
                            <table width="100%">
                                <tr>
                                    <td width="5%"><img
                                                src="images/icons/date.png"/>
                                    </td>
                                    <td width="40%">Ultimo Login</td>
                                    <td width="55%"><?php 
	  $char = mssql_query("select servername from memb_stat where memb___id='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></td>
                                </tr>
                                <tr>
                                    <td><img
                                                src="images/icons/shield.png"/>
                                    </td>
                                    <td>Desconectado</td>
                                    <td><?php 
	  $char = mssql_query("select disconnecttm from memb_stat where memb___id='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?>
                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td><img
                                                src="images/icons/dollares.png"/>
                                    </td>
                                    <td>Saldo WcoinC</td>
                                    <td><?php 
	  $char = mssql_query("select WcoinC from CashShopData where AccountID='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></td>
                                </tr>
                                <tr>
                                    <td><img
                                                src="images/icons/coins.png"/>
                                    </td>
                                    <td>Saldo WcoinP</td>
                                    <td><?php 
	  $char = mssql_query("select Wcoinp from CashShopData where AccountID='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></td>
                                </tr>
                            
                                    <tr>
                                        <td><img
                                                    src="images/icons/coins.png"/>
                                        </td>
                                        <td>Saldo Goblin Points</td>
                                        <td><?php 
	  $char = mssql_query("select GoblinPoint from CashShopData where AccountID='".$_SESSION["login"]."'");
	  for($i=0;$i<mssql_num_rows($char);$i++) {
		$pega = mssql_fetch_row($char);
		echo ''.$pega[0].'';
	}
	  ?></td>
                                    </tr>
                                
                            </table>
		
                            
                            
                        </div>
                        <div style="clear:both;"></div>
                        
                    </div>
                </div>
            </div>
            <a class="custom_button" href="javascript: void(0);" onclick="loading('?go=geconta', 'menu');">GERENCIAR CONTA</a> | <a class="custom_button" href="javascript: void(0);" onclick="loading('?go=geperson', 'menu');">GERENCIAR PERSONAGEM</a> | <a class="custom_button" href="javascript: void(0);" onclick="loading('?go=gesuporte', 'menu');">GERENCIAR SUPORTE</a> | <a class="custom_button" href="javascript: void(0);" onclick="loading('?go=paineladmin', 'conteudo');">ADMINCP</a>
            
             | <a class="custom_button" href="paginas/logout.php" target="_parent">DESLOGAR-ME</a>
             
            <div class="box-style4" id="menu">
                <br>
                <h2 class="title">Escolha uma opcao acima.</h2>
               
            </div>
        </div>
    </div>
</div>




        
        
        <!--FIM MEIO-->
        <!--INICIO FOOTER-->
        </div>
        
        <? }} ?>