<?php
session_start();
require_once 'classconn/class.user.php';
require_once 'action/login/login.php';
if($actionParam->user_is_logged_in() !="")
{
    $actionParam->redirect('dashboard/html/ltr/vertical-menu/');
}
?>

<!DOCTYPE html>
<html lang="zxx">
<head>
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
        '../../../../www.googletagmanager.com/gtm5445.html?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-TAGCODE');</script>
    <!-- End Google Tag Manager -->
    <title>SescentiGate - Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8">
    <!-- External CSS libraries -->
    <link type="text/css" rel="stylesheet" href="assets-1/css/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="assets-1/fonts/font-awesome/css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="assets-1/fonts/flaticon/font/flaticon.css">

    <!-- Favicon icon -->
    <link rel="shortcut icon" href="assets-1/img/favicon.png" type="image/x-icon" >

    <!-- Google fonts -->
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800%7CPoppins:400,500,700,800,900%7CRoboto:100,300,400,400i,500,700">

    <!-- Custom Stylesheet -->
    <link type="text/css" rel="stylesheet" href="assets-1/css/style.css">
    <link rel="stylesheet" type="text/css" id="style_sheet" href="assets-1/css/skins/default.css">

</head>
<body id="top">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TAGCODE"
                  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="page_loader"></div>

<!-- Login 16 start -->
<div class="login-16">
    <div class="container">
        <div class="row login-box">
            <div class="col-lg-5 col-md-12 bg-img none-992 align-self-center">
                <div class="info">
                    <div class="logo clearfix">
                        <a href="index">
                            <img src="assets-1/img/logos/logo.png" alt="logo">
                        </a>
                    </div>
                    <div class="btn-section clearfix">
                        <a href="login" class="link-btn active btn-1 default-bg">Login</a>
                        <div class="clearfix"></div>
                        <a href="register" class="link-btn btn-1">Register</a>
                    </div>
                    <!-- <ul class="social-list">
                        <li>
                            <a href="#" class="facebook-bg">
                                <i class="fa fa-facebook"></i>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="twitter-bg">
                                <i class="fa fa-twitter"></i>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="google-bg">
                                <i class="fa fa-google"></i>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="linkedin-bg">
                                <i class="fa fa-linkedin"></i>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="pinterest-bg">
                                <i class="fa fa-pinterest"></i>
                            </a>
                        </li> -->
                    </ul>
                </div>
            </div>
            <div class="col-lg-7 col-md-12 bg-color-8 align-self-center">
                <div class="form-section">
                    <div class="logo-2 clearfix">
                        <a href="index">
                            <img src="assets-1/img/logos/logo-2.png" alt="logo">
                        </a>
                    </div>
                    <h3>Sign into your account</h3>
                    <div class="login-inner-form">
                <form action="" method="post">
                        <?php if(isset($_GET['account']) && isset($_GET['id'])) { ?>
                                <div class='alert' style='background-color: royalblue; color: #fff; border-left-color: #fff;'>
                                    <?php 
                                          //get variables direct from url
                                          $email_encoded = $_GET['account'];//email
	                                      $password_encoded = $_GET['id'];//password
                                    ?>
                                    An authentication code has been sent to your mail, use it to verify your login attempt. This may take a few seconds.<a href="?resend&account=<?php echo $email_encoded; ?>&id=<?php echo $password_encoded; ?>" style="color: #fff; font-size: 10pt; font-weight: 900;"> Resend code</a>
                                  </div>
								 <?php } ?>
								 <?php if(isset($_GET['authentication-error'])) { ?>
                                <div class='alert' style='background-color: indianred; color: #fff; border-left-color: #fff;'>
                                    Failed to login. Authentication code is not correct.
                                </div>
                            <?php } ?>
                            <?php if(isset($_GET['login-password-error'])) { ?>
                                <div class='alert' style='background-color: #DC143C; color: #fff; border-left-color: #fff;'>
                                    Failed to login. Incorrect password.
                                </div>
                            <?php } ?>
                            <?php if(isset($_GET['login-email-error'])) { ?>
                                <div class='alert' style='background-color: #DC143C; color: #fff; border-left-color: #fff;'>
                                    Failed to login. Incorrect email.
                                </div>
                            <?php } ?>
							<?php if(isset($_GET['account']) && isset($_GET['id'])){ ?>
            
                                <?php }else{ ?>
                            <div class="form-group form-box">
                                <input type="email" name="email" class="input-text" placeholder="Email Address" required>
                                <i class="flaticon-mail-2"></i>
                            </div>
                            <div class="form-group form-box">
                                <input type="password" name="password" class="input-text" placeholder="Password" required>
                                <i class="flaticon-password"></i>
                            </div>
                            <div class="checkbox clearfix">
                                <div class="form-check checkbox-theme">
                                    <input class="form-check-input" type="checkbox" value="" id="rememberMe">
                                    <label class="form-check-label" for="rememberMe">
                                        Remember me
                                    </label>
                                </div>
                                <a href="forgotpassword">Forgot Password</a>
                            </div>
                            <div class="form-group mb-0">
                                <button type="submit" name="btn-login" class="btn-md btn-theme btn-block">Login</button>
                            </div>
                            <p class="text">Don't have an account?<a href="register"> Register here</a></p>
                            <?php } ?>
                        </form>
                        <br><br>
                         <div id="google_translate_element"></div>
                    <script type="text/javascript">
                    function googleTranslateElementInit() {
                      new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
                    }
                    </script>

                    <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
					
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Login 16 end -->

<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/69b3c9713a61e31c3587d370/1jjj4lpgk';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->


<!-- External JS libraries -->
<script src="assets-1/js/jquery-2.2.0.min.js"></script>
<script src="assets-1/js/popper.min.js"></script>
<script src="assets-1/js/bootstrap.min.js"></script>
<!-- Custom JS Script -->
</body>

</html>