KASLAB Admin Panel login

KASLAB Admin Login Panel with multiple features, if you enter url parameter like "kaslab.in/login?rp=1234567890123456", automatically reset password panel view first and if you enter url parameter like "kaslab.in/login?fp=1234567890123456", automatically forgot password panel view first. That helps you better interface and easy user interface.

by Kanha Sahu

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<title>KASLAB Admin Panel Developer -</title>
<link href='//fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900'>
<link href='//fonts.googleapis.com/css?family=Montserrat:400,700'>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<section class="container">
    <div class="row">
        <div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3">
            <div class="account-wall">
                <div id="my-tab-content" class="tab-content">
						<div class="tab-pane active" id="login">
               		    <img class="profile-img" src="https://lh3.googleusercontent.com/proxy/INaGAY3N5tWQu4Gx9pAurqu02KEOqy5Pf_sxpuOQined3ykkU__wJz-vhfdPSgZUeRsesvzUrUDqO295w14wNGJkq5gZ3MVDqc84fTiy64Tg=s426" alt="">
               			<form class="form-signin" action="" method="">
               				<input type="text" class="form-control" placeholder="Username" required autofocus>
               				<input type="password" class="form-control last" placeholder="Password" required>
                            <span class="no-padding col-lg-6 col-md-6 col-sm-6">
                            	<label class="custom-input" for="remember-me" style="font-weight:100">
                                <input type="checkbox" name="" checked="checked" id="remember-me" class="" />
                                <span>&nbsp;</span> Remeber Me</label> 
                            </span>
                            <span class="no-padding col-lg-6 col-md-6  col-sm-6 text-right">
                            	<a href="#forgot" data-toggle="tab">Forgot Password</a>
                            </span>
   ...

CSS

body{
    background-color:#f5f5f5;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}
.form-signin
{
    max-width: 330px;
    padding: 15px;
    margin: 0 auto;
}
.form-signin .form-control
{
    position: relative;
    font-size: 16px;
    height: auto;
    padding: 10px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.form-signin .form-control:focus
{
    z-index: 2;
}
.form-signin .first,
.form-signin input[type="text"].first,
.form-signin input[type="text"]
{
    margin-bottom: -1px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.form-signin .flat,
.form-signin input[type="text"].flat,
.form-signin textarea.flat
{
    margin-bottom: -1px;
    border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
    -webkit-border-radius: 0;
}
.form-signin .last,
.form-signin input[type="text"].last,
.form-signin textarea.last,
.form-signin input[type="password"].last
{
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius:...

JavaScript

$( document ).ready(function() {
	var reset_password = getUrlParameter('rp');
	var forgot_password = getUrlParameter('fp');
	//alert(reset_password +'&&'+forgot_password);
	if((reset_password != null && reset_password !== null && reset_password !== '') || (forgot_password != null && forgot_password !== null && forgot_password !== '')) 
	{
		$("#my-tab-content div").each(function() {
			return $(this).removeClass("active")
			});
		/*   active removerrrrr   */
			if( typeof reset_password!=="undefined" && reset_password!==null && reset_password.length >= 16 )
			{
				$('#reset_password').addClass('active');
			}
			else if( typeof forgot_password!=="undefined" && forgot_password!==null && forgot_password.length >= 16 ){	
			
				$('#forgot').addClass('active');
			}
			else{
				$('#login').addClass('active');
			}
	}
  });
  
  function getUrlParameter(sParam) {
    var sPageURL = decodeURIComponent(window.location.search.substring(1));
    var sURLVariables = sPageURL.split('&'), sParameterName, i;
    for (i = 0; i < sURLVariables.length; i++) {
        sParameterName = sURLVariables[i].split('=');

        if (sParameterName[0] === sParam) {
            return sParameterName[1] === undefined ? true : sParameterName[1];
        }
    }
}