    <!-- Navigation -->
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <div class="container">
            <a class="navbar-brand" href="https://www.weblottopoker.com"><img style="float: left;" class="zo-main-logo" alt="" src="https://www.weblottopoker.com/images/logo_new4.png"></a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            Servizi
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                        
                        </div>
                    </li>
					  <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                           <? if(!isset($_SESSION["ospite"])){ ?> Il mio account <? }else{ echo "<b>Benvenuto, ".$_SESSION["ospite"]."</b>"; } ?>
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
								<? if(!isset($_SESSION["ospite"])){ ?>
						    
	                 
                            <a class="dropdown-item" style="text-decoration:none;color:black;"href="https://weblottopoker.com/signup/registrazione-landing"><i class="fa fa-sign-in"></i> Registrati </a>
                   
						<? }
						?>
                             
                            <?php if (isset($_SESSION['ospite'])) echo '<a class="dropdown-item"><form action="../signup/users/logout.php" method="POST"> <input type="hidden" value="cucina"> <button name="btnLogout" value="btnLogout" type="submit" style="	background: none;
	                                                                        color: inherit;	border: none;	padding: 0;	font: inherit;	cursor: pointer;	outline: inherit;" >Logout</button> </form></a>';
                            else { 
                            ?>
                            
                            <a  class="dropdown-item" data-toggle="modal" style="border:0px!important;" data-target="#mdlLogin">  <i class="fa fa-sign-in"></i> Login </a>
                            <? } ?> 
                       
                        </div>
                    </li>
               
                   
                </ul>
            </div>
        </div>
    </nav>
    <script>

      function tryLogin() {

    //costruzione di qs concatenando i parametri
    var qs = "";
    var parser, xmlDoc, errore, msgErr;
    var username,password;
     username= $("#txtUsr").val();
    password= $("#txtPippo").val();
    qs="?txtUsr="+username;
    qs=qs+"&txtPippo="+password;
         
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
      if (this.status == 500) {
        $("#mdlLogin").modal("hide");
        alert("Dati Incorretti");
      }
      if (this.readyState == 4 && this.status == 200) {

        $("#mdlLogin").modal("hide");
        //alert(this.responseText);
        if(this.responseText=="Yis"){
           // alert("Benvenuto");
            location.replace("https://weblottopoker.com");
        }else if((this.responseText=="Incorrectdata") || (this.responseText=="Queryfallita")){
            alert("Combinazione di mail e password incorretta.");
        }
        
      }
    };
    xhttp.open("POST", "vinci/users/loginLogic.php", false);
    xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    if (qs.length > 2) {
      qs = qs.slice(1);
    }
    //alert(qs);
    xhttp.send(qs);
  } 
</script>
<script>
          
function openRecovery(){
       $("#mdlLogin").modal("hide");
        $("#mdlRecovery").modal("show");   
}
function ajaxRecovery(){
    //costruzione di qs concatenando i parametri
    indir=txtMailRecover.value;
  qs="?mail="+indir;

    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function(){
      if (this.status == 500) {
        alert("C'è stato un problema. Riprova più tardi.");
      }
      if (this.readyState == 4 && this.status == 200) {
      $("#mdlRecovery").modal("hide"); 
          
  
        if (this.responseText!=="Nope"){

            alert("Richiesta inviata con successo! Controlla la tua mail..");
        }else{ alert(this.responseText);       //location.reload();
            
        }
      }
    };
    xhttp.open("POST", "../../signup/scripts/recoverPassword.php", true);
    xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    if (qs.length > 2) {
      qs = qs.slice(1);
    }
    //alert(qs);
    xhttp.send(qs);
}
  </script>
  <!-- Login Modal -->
<div class="modal fade" id="mdlLogin" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalCenterTitle">Effettua il login</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
   


<form id="frmLogin" method="POST" name="frmLogin" onsubmit="tryLogin();return false;">
  <div class="form-group row">
    <label class="col-5 col-form-label" for="txtUsr">Username:</label> 
    <div class="col-7">
      <input id="txtUsr" name="txtUsr" placeholder="Inserisci qua la tua email.." type="email" class="form-control" required="required">
    </div>
  </div>
  <div class="form-group row">
    <label for="txtPippo" class="col-5 col-form-label">Password:</label> 
    <div class="col-7">
      <input id="txtPippo" name="txtPippo" placeholder="Inserisci qua la tua password.." type="password" class="form-control" required="required">
    </div>
  </div> 
  <div class="form-group row">
    <div class="offset-5 col-7">
      <button name="submit" type="submit" class="btn btn-primary">Accedi</button>
    </div>
  </div>
</form>
  <hr>
   <div class="form-group row">
        <div class="offset-5 col-7">
          <button onclick="openRecovery()">
             <i class="fa fa-sign-in"></i> Hai dimenticato la password? 
          </button>
        </div>
    </div>
      </div>
      
    </div>
  </div>
</div>
 <!-- Recover password Modal -->
<div class="modal fade" id="mdlRecovery" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitleRecvoery" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalCenterTitleRecvoery">Recupera la password!</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
   


<form id="frmRecovery" method="POST" name="frmRecovery" onsubmit="ajaxRecovery(this);return false;">
  <div class="form-group row">
    <label class="col-5 col-form-label" for="txtMailRecover">Inserisci la tua mail!</label> 
    <div class="col-7">
      <input id="txtMailRecover" name="txtMailRecover" placeholder="Inserisci qua la tua email.." type="email" class="form-control" required="required">
    </div>
  </div>
 
  <div class="form-group row">
        <div class="offset-5 col-7">
          <button name="submit" type="submit" class="btn btn-primary"> Recupera </button>
        </div>
    </div>
    <div class="form-group row">
        <div class="offset-5 col-7">
          <a >
             <i class="fa fa-sign-in"></i> Verrà inviata una mail a questo indirizzo.
          </a>
        </div>
    </div>
  </div>
</form>
  <hr>
  <!--<p><a href="#" class="tooltip-test" title="Ti verrà inviata una mail con le istruzioni.">Hai dimenticato la password?</a> </p>-->
<hr>
      </div>
      
    </div>
</div>