<?php
error_reporting(0);
ob_start();
session_start();
include_once("include/dbconnect.php");
?>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<div class="mytra-login animate__fadeInDown">
  <form action="functions/authcode.php" method="POST">
    <img src="../assets/images/logo/1.png">
    
    <h1 class="heading">
      Welcome to Palmettotech
    </h1>
    <?php
        if(isset($_SESSION['auth']))
        {
          header('Location: dashboard.php');
        }
if(isset($_SESSION['message']))
{
?>
<strong> Hey! <?=$_SESSION['message'];?>
<?php 
unset($_SESSION['message']);
} ?>
    <p>Please login to your account</p>
    
    <label>Email ID</label>
    <input type="email" name="email" required placeholder="Enter Your Email Id">
    
    <label>Password</label>
    <input type="password" name="password" required placeholder="Enter Password">
    
    <!-- <div class="forgot">
      <label><input type="checkbox"> Keep me signed in</label>
      
      <a>Forget Password?</a> 
    </div>-->
    
    <button type="submit" name="login_btn" class="login">Login</button>
    <!-- <button class="signup">Signup</button> -->
  </form>
  
  <div class="poster">
  </div>
</div>
<!---mytra-login---->

<style>
    *{
  margin:0;
  padding:0;
  box-sizing:border-box;
  transition:all .3s;
  user-select:none;
}


body{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:100vh;
  font-family: 'Open Sans', sans-serif;
 
  background:linear-gradient(45deg, #000000db, #000000cf), url(https://images.unsplash.com/photo-1540340061722-9293d5163008?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1171&q=80);
  background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}


.mytra-login{
  width:900px;
  height:580px;
  display:flex;

}

.mytra-login form{
  background:#fff;
  width:50%;
  padding:25px 20px;
  border-radius: 10px 0px 0px 10px;
}

.mytra-login .poster{
  width:50%;
  background:url('https://images.unsplash.com/photo-1601598851547-4302969d0614?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=764&q=80');
  background-size:cover;
  background-position:0%;
  border-radius: 0px 10px 10px 0px;
}


.mytra-login form img{
  width:200px;
  margin-bottom: 10px;
}

.mytra-login form .heading{
  font-size:1.4em;
  margin-top:15px;
}

.mytra-login form p{
  font-size:.95em;
  color:#444;
  margin-bottom:20px;
  margin-top: 20px;
}

.mytra-login form label{
  display:block;
  margin-top:20px;
  color:#444;
}

.mytra-login form input{
  border:none;
  outline:none;
  border-bottom:0.5px solid #00000061;
  width:100%;
  padding:10px 0px;
}



.mytra-login form .forgot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:20px;
  color:#444;
  font-size:.85em;
}

.mytra-login form .forgot label{
  margin-top:0;
  font-size:1em;
}

.mytra-login form .forgot input{
  width:auto;
}


.mytra-login form .forgot a{
  color:#E72744;
  cursor:pointer;
}


.mytra-login form button{
  border:none;
  outline:none;
  margin-top:40px;
  padding:12px 0px;
  border-radius:5px;
  cursor:pointer;
}

.mytra-login form .login{
    width: 100%; 
    color: #fff;
    background: #8bc34a;
    padding: 10px;
    text-align: center;
    text-decoration: underline;
    font-size: 18px;
    margin-top: 46px;
}

.mytra-login form .login:hover{
  background:#fff;
  color:#E72744;
  box-shadow:0 0 10px #ccc;
}

.mytra-login form .signup{
  width:38.5%;
  color:#E72744;
  background:#fff;
  box-shadow:0 0 10px #ccc;
}

.mytra-login form .signup:hover{
  background:#e72744;
  color:#fff;
}

.animate__fadeInDown {
  animation: fadeInDown; 
  animation-duration: 2s; 
}

@media (min-width: 0px) and (max-width: 800px){
  .mytra-login{
  display:block;
  width:350px;
  height:auto;
  }
  
  .mytra-login form{
    width:100%;
    padding:40px 40px;
  }
  
  .mytra-login .poster{
    display:none;
  }
  
  .mytra-login form .signup{
  width:38%;
  }
  
}
</style>

<!-- jQuery -->
<!-- <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> -->
<!-- jQuery Ripples JS -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.ripples/0.5.3/jquery.ripples.min.js"></script> -->
<link rel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
<script>
    $(document).ready(function(){
	    $("body").ripples({
  resolution: 512,
  dropRadius: 20,
  perturbance: 0.04,
    });
  
  	$(".poster").ripples({
  resolution: 512,
  dropRadius: 20,
  perturbance: 0.04,
    });
});
</script>
<!-----mytra login page---->