<?php
require_once("includes/common_function.php");
/// check if session is already there then same account should be open
if(isset($_SESSION['userid'])){
   if(isset($_SESSION['utype'])=="admin"){
      header("Location:master/home.php");
      exit;
   }else{
      header("Location:user/home.php");
      exit;
   }
}
?>
<!DOCTYPE html><html class=''>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<link href="css/font-awesome.min.css" rel="stylesheet">
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.js"></script>
<style type="text/css">
body, html {
    height: 100%;
    background-repeat: no-repeat;
    background-image: linear-gradient(rgb(104, 145, 162), rgb(12, 97, 33));
}

.card-container.card {
    max-width: 350px;
    padding: 40px 40px;
}

.btn {
    font-weight: 700;
    height: 36px;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

/*
 * Card component
 */
.card {
    background-color: #F7F7F7;
    /* just in case there no content*/
    padding: 20px 25px 30px;
    margin: 0 auto 25px;
    margin-top: 50px;
    /* shadows and rounded borders */
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;
    -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}

.profile-img-card {
    width: 96px;
    height: 96px;
    margin: 0 auto 10px;
    display: block;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    border-radius: 50%;
}

/*
 * Form styles
 */
.profile-name-card {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin: 10px 0 0;
    min-height: 1em;
}

.reauth-email {
    display: block;
    color: #404040;
    line-height: 2;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.form-signin #inputEmail,
.form-signin #inputPassword {
    direction: ltr;
    height: 44px;
    font-size: 16px;
}

.form-signin input[type=email],
.form-signin input[type=password],
.form-signin input[type=text],
.form-signin button {
    width: 100%;
    display: block;
    margin-bottom: 10px;
    z-index: 1;
    position: relative;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.form-signin .form-control:focus {
    border-color: rgb(104, 145, 162);
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgb(104, 145, 162);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgb(104, 145, 162);
}

.btn.btn-signin {
    /*background-color: #4d90fe; */
    background-color: rgb(104, 145, 162);
    /* background-color: linear-gradient(rgb(104, 145, 162), rgb(12, 97, 33));*/
    padding: 0px;
    font-weight: 700;
    font-size: 14px;
    height: 36px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    border: none;
    -o-transition: all 0.218s;
    -moz-transition: all 0.218s;
    -webkit-transition: all 0.218s;
    transition: all 0.218s;
}

.btn.btn-signin:hover,
.btn.btn-signin:active,
.btn.btn-signin:focus {
    background-color: rgb(12, 97, 33);
}

.forgot-password {
    color: rgb(104, 145, 162);
}

.forgot-password:hover,
.forgot-password:active,
.forgot-password:focus{
    color: rgb(12, 97, 33);
}
</style>
<title></title>
</head>
<body>
<!--
    you can substitue the span of reauth email for a input with the email and
    include the remember me checkbox
    -->
    <div class="container">
        <div class="card card-container" style="position:relative;">
            <!-- <img class="profile-img-card" src="//lh3.googleusercontent.com/-6V8xOA6M7BA/AAAAAAAAAAI/AAAAAAAAAAA/rzlHcD0KYwo/photo.jpg?sz=120" alt="" /> -->
            <!--<img id="profile-img" class="profile-img-card" src="//ssl.gstatic.com/accounts/ui/avatar_2x.png" />-->
             <img src="images/blogo.png" width="230" height="80" style="max-width:350px;">
             
            <p id="profile-name" class="profile-name-card"></p>
            <form class="form-signin" id="login_form" name="login_form" method="post" action="verify.php">
                <span id="reauth-email" class="reauth-email"></span>
                <input type="text" id="inputEmail" name="userid" class="form-control" placeholder="User-Id" required>
                <input style="float:left;" type="password" id="inputPassword" name="pwd" class="form-control" placeholder="Password" required>
				<div style="text-align: center;z-index: 999;margin-bottom: 20px; position: absolute;right: 45px;margin-top: 12px;"><i class='fa fa-eye' style="color:black;font-size: 20px;" onMouseOver="showPass(1)" onMouseOut="showPass(0)" title="View Password" ></i></div>
				
                <button class="btn btn-lg btn-primary btn-block btn-signin" type="submit">Log in</button>
				
            </form><!-- /form -->
            <div align="left" style="color:#FF0000"><samp class="errortext"><?php echo errorMsg(isset($_REQUEST['msg']));?></samp></div>
<!--            <a href="#" class="forgot-password">
                Forgot the password?
            </a>-->
        </div><!-- /card-container -->
    </div><!-- /container -->
   <!-- <div align="center" style="color:#FFFFFF;"><br/><br/><br/><br/><br/>Copyright © 2019. All Rights Reserved. Powered By : <A href="http://olsservices.in/" target="_blank">OLS Software</A></div>-->
</body>
</html>
<script>
////// function for show/hide password //////////
function showPass(val){
	if(val == 1){
		document.getElementById("inputPassword").type = "text";
		document.getElementById("inputPassword").style.color = "black";
	}else{
		document.getElementById("inputPassword").type = "password";
		document.getElementById("inputPassword").style.color = "black";
	}
}
</script>
