

<style>
/*    --------------------------------------------------
	:: Login Section
	-------------------------------------------------- */

#login .form-wrap {
   
  
		box-shadow: 0 0 3px 3px #888;
  border-radius:2px;
    padding: 20px;
}
#login h1 {
    color: #1fa67b;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
    padding-bottom: 20px;
}
#login .form-group {
   
}
#login .checkbox {
    
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}
#login .checkbox.show:before {
    content: '\e013';
    color: #1fa67b;
    font-size: 17px;
    margin: 1px 0 0 3px;
    position: absolute;
    pointer-events: none;
    font-family: 'Glyphicons Halflings';
}
#login .checkbox .character-checkbox {
    width: 25px;
    height: 25px;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid #ccc;
    vertical-align: middle;
    display: inline-block;
}
#login .checkbox .label {
    color: #6d6d6d;
    font-size: 13px;
    font-weight: normal;
}
#login .btn.btn-custom {
    font-size: 14px;
	margin-bottom: 20px;
}
#login .forget {
    font-size: 13px;
	text-align: center;
	display: block;
}

/*    --------------------------------------------------
	:: Inputs & Buttons
	-------------------------------------------------- */
.form-control {
    color: #212121;
}
.btn-custom {
    color: #fff;
	background-color: #1fa67b;
}
.btn-custom:hover,
.btn-custom:focus {
    color: #fff;
}

/*    --------------------------------------------------
    :: Footer
	-------------------------------------------------- */
#footer {
    color: #6d6d6d;
    font-size: 12px;
    text-align: center;
}
#footer p {
    margin-bottom: 0;
}
#footer a {
    color: inherit;
}

</style>
		
	   
    
    
    
    
    

			<div id="login">
       
        <div class="container">
            <div id="login-row" class="row justify-content-center align-items-center">
                
                <div id="login-column" class="col-md-6" style=' '>
                    <div style='text-align: center'>
                        <br/>
                    <img src='logo.jpg' width="150">
                    </div>
                    <div id="login-box" class="col-md-12">
                        
                        <form id="login-form" >
                            <h3 class="text-center text-info">Login</h3>
                            <div class="form-group1">
                                <label for="username" class="text-info">Username:</label><br>
                                <input type="text" name="username" id="uname" class="form-control">
                            </div>
                            <div class="form-group">
                                <label for="password" class="text-info">Password:</label><br>
                                <input type="password" name="password" id="pwd" class="form-control">
                            </div>
                            <div class="form-group">
                               
                                <button class='btn btn-primary' id='login1'>Login</button>
                                 <a href="logout.php" class="" style="color: black" onclick="return fun()">Logout</a>
                            </div>
                            
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


<script>
function fun(){
    if(confirm("Are you sure?")){
        return true
    }
    return false
}

function showPassword() {
    
    var key_attr = $('#key').attr('type');
    
    if(key_attr != 'text') {
        
        $('.checkbox').addClass('show');
        $('#key').attr('type', 'text');
        
    } else {
        
        $('.checkbox').removeClass('show');
        $('#key').attr('type', 'password');
        
    }
    
}

</script>
<script>
$("#login1").click(function(e){
    e.preventDefault()
 $(this).attr("disabled",true)
    var formData = new FormData(document.querySelector('#login-form'))
    $.ajax({
      url:"update_session.php",
     
      data:formData,
      dataType:"json",
      type:"POST",
       processData: false,
        contentType: false,
      success:function(data){
         $("#login1").removeAttr("disabled")
$(".forget-modal").modal("hide")

       
      },error:function(data){
         $("#login1").removeAttr("disabled")
         alert(data.responseText)
      }



    })

  })
  </script>
<style>
    /*.modal-backdrop{z-index:9999999 !important;}*/
</style>