
<!DOCTYPE html><html lang="pt-br">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="https://www.encontrospet.com.br//pd-themes/encontrospet/css/owl.transitions.css">
<link rel="stylesheet" type="text/css" href="https://www.encontrospet.com.br//pd-themes/encontrospet/css/owl.carousel.css">
<link rel="stylesheet" type="text/css" href="https://www.encontrospet.com.br//pd-themes/encontrospet/css/owl.theme.css">
<link rel="stylesheet" type="text/css" href="https://www.encontrospet.com.br//pd-themes/encontrospet/css/estilo.css">
<link rel="stylesheet" href="https://www.encontrospet.com.br//pd-themes/encontrospet/css/bootstrap.css">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<title>Encontros Pet</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script>
 
function statusChangeCallback(response) {
    
  console.log('statusChangeCallback');  
  console.log(response);

    if (response.status === 'connected'){

  testAPI(); 

    }else{
top.location=window.location="https://www.facebook.com/v2.8/dialog/oauth?client_id=186785718176654&redirect_uri=https://encontrospet.com.br&display=popup&response_type=token";

    }

}

  function checkLoginState() {

   jQuery('#preload').show();

    FB.getLoginStatus(function(response) {
      statusChangeCallback(response);
    });

  }

  window.fbAsyncInit = function() {
 
 FB.init({
    appId      : '186785718176654',
    cookie     : false,  // enable cookies to allow the server to access 
    xfbml      : true,  // parse social plugins on this page
    version    : 'v2.8' // use graph api version 2.8
  });

 
 url   = String(window.location);

check = url.split('#access_token');
check2 = url.split('?autenticar');

if(check[1] > ''){

window.location = '/?autenticar=facebook';

}else if(check2[1] > ''){

 FB.getLoginStatus(function(response) {
  statusChangeCallback(response);
  });

}


  

  };
  
  // Load the SDK asynchronously
  (function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/sdk.js";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));
  

  function testAPI() {
  
    console.log('Welcome!  Fetching your information.... ');
    FB.api('/me?fields=id,name,email,permissions', function(response) {
     
     console.log('Successful login for: ' + response.name);

    //'Thanks for logging in, ' + response.name + '!' + 'Email: ' + response.email;
		

	   jQuery.ajax({
                type      : 'get',            
		url       : 'http://www.encontrospet.com.br',            
		data      : 'logar=facebook&id='+response.id+'&nome='+response.name+'&email='+response.email,                     
		success : function(txt){
		window.location='/';
		
           }
         
        });		
		
    });
  };
  
  
</script>
</head>
<body style="background:#65C6BB;">
<div class="col-md-4 col-md-offset-4 logo-cad-user">
<a href="http://www.encontrospet.com.br/"><img src="https://www.encontrospet.com.br//pd-themes/encontrospet/img/pet.png"></a>
</div>
<div class="container">
<div class="conteudo-geral">
<div class="texto-conteudo area-cad-user col-md-4 col-md-offset-4">
<div class="form-login">
<div class="col-md-12">
<button class="fb-cad" scope="public_profile,email" onclick="checkLoginState();">
<img style="display:none;" id="preload" src="https://www.encontrospet.com.br//pd-themes/encontrospet//img/loading.gif" width="20"> <i class="fa fa-facebook" aria-hidden="true"></i> Entre com o Facebook
</button>
</div>
<form name="cadastrar" id="cad-user" onSubmit="return myFunction()" method="post">
<div class="col-md-12">
 <p class="n-postaremos-nada"> Nunca publicaremos nada em seu mural </p>
<p class="cad-ou-lines"> OU </p>
<div class="grupo-cad-user">
<input type="text" class=" input-cad-user" name="val_nome" id="nome" value placeholder="Seu nome">
</div>
<div class="grupo-cad-user">
<input type="text" class=" input-cad-user" name="val_email" id="email" value placeholder="Email" required>
</div>
<div class="grupo-cad-user">
<input type="password" class="input-cad-user" name="val_senha" value id="senha1" placeholder="Senha">
</div>
<div class="grupo-cad-user">
<input type="password" class="input-cad-user" id="senha2" name="val_senha2" value placeholder="Confirme sua senha">
</div>
</div>
<div class="col-md-12">
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" id="termos" name="tremos">
Li e concordo com os Termos de uso e a PolÃ­tica de privacidade.
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<strong style="color:#F00"></strong>
</label>
</div>
<input type="hidden" name="form_type" value="1">
<button class="btn-cad-user">Cadastrar</button>
</div>
</form>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<script>

	    function myFunction() {
			
         	var pass1 = document.getElementById("senha1").value;
         	var pass2 = document.getElementById("senha2").value;
			var nome  = document.getElementById("nome").value;
			var email = document.getElementById("email").value;
			var login = document.getElementById("email").value;
            var termos = document.getElementById('termos').checked;
			
         	var ok = true;
			
			if (nome== '') {
				
				alert("Nome Ã© obrigatÃ³rio");
				document.getElementById("nome").style.borderColor = "#E34234";
				ok = false;
					
			}else  if (email == '') {
						
				alert("Email Ã© obrigatÃ³rio");
				document.getElementById("mail").style.borderColor = "#E34234";
				ok = false;		
						
			}else  if (login == '' ) {
				
			    alert("Login Ã© obrigatÃ³rio");
				document.getElementById("login").style.borderColor = "#E34234";
				ok = false;
			
         	}else  if (pass1 != pass2) {
         		
         		document.getElementById("senha1").style.borderColor = "#E34234";
         		document.getElementById("senha2").style.borderColor = "#E34234";
         		ok = false;
				
			}else if (termos  == false) {
				
				alert("Termos Ã© obrigatÃ³rio");
				document.getElementById("termos").style.borderColor = "#E34234";
				ok = false;
					
         	}else {
         		document.getElementById("senha1").style.borderColor = "#14c374";
         		document.getElementById("senha2").style.borderColor = "#14c374";
         	}
			
         	return ok;
			
         }
	  
	 
		 
      </script>
<script src="https://use.fontawesome.com/7f5467c655.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<br>
<div class="footer-cad">
<div class="container">
<a href="https://www.encontrospet.com.br/termos-de-uso/"> Termos de uso </a> | <a href="https://www.encontrospet.com.br/contato/">Contato</a>
<p>Copyright Encontros Pet Â© 2017. Todos Direitos Reservados</p>
</div>
</div>
</body>
</html>