<?php 
header("X-Frame-Options: DENY");
include_once "common.inc.php"; if($session->logged_in != 0){ echo '<script type="text/javascript">window.location.href = "index.php";</script>'; } ?>
<!DOCTYPE html>
<html class="lockscreen">
    <head>
        <meta charset="UTF-8">
        <title>Logaholic | Log in</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <link rel="icon" href="favicon.ico" type="image/x-icon">
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
 
        <link href="templates/logaholic_6/css/css.php" rel="stylesheet" type="text/css" />
        <style type="text/css">
            .wlogaholiclogo{ height: 75px; }
            .wlogaholiclogo > span{ float: left; }
            .wlogaholiclogo > i {
                background: rgba(0, 0, 0, 0) url("images/logaholic-ion-logo-blue.png") no-repeat scroll 0 0;
                float: left;
                height: 50px;
                margin: 3px 0 0 90px;
                width: 33px;
            }
            button, a{ cursor: pointer; }
        </style>
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="form-box" id="login-box">
            <div>
                                
                <div class="callout-success-template callout callout-success" style="display:none;">                              
                    <h4></h4>                               
                </div>

                <div class="callout-danger-template callout callout-danger" style="display:none;">                              
                    <h4></h4>                               
                </div>

                <?php
                if (isset($_REQUEST['confirm'])) {
                    echo "<div class='callout-danger-template callout callout-success'><h4>Thanks for confirming your account. You can now log in below.</h4></div><script>document.addEventListener(\"DOMContentLoaded\", function() {  if (typeof trackSignupConfirmed == 'function') { trackSignupConfirmed('".@$_REQUEST['email']."'); } });</script>";
                }
                ?>

            </div>
            <div class="header bg-light-blue wlogaholiclogo"><i></i><span>Logaholic</span></div>
            <form action="../../index.html" method="post">
                <div class="body bg-gray">
                    <div class="form-group">
                        <input type="text" name="login_user" class="form-control" placeholder="Username (Email)"/ value="<?php echo @$_REQUEST['email']; ?>">
                    </div>
                    <div class="form-group">
                        <input type="password" name="login_pass" class="form-control" placeholder="Password"/>
                    </div>          
                    <div class="checkbox">
                        <label><input type="checkbox" name="login_remember"/> Remember me</label>
                    </div>
                </div>
                <div class="footer">                                                               
                    <button type="submit" class="btn btn-success btn-block sign-in">Sign me in</button>  
                    
                    <p><a class="forgot_pass">I forgot my password</a></p>
                    <?php if(getGlobalSetting("SignupPage", 0 )){ ?>
                    <a class="text-center" href="signup.php">Register as new user</a>
                     <?php } ?>
                </div>
            </form>
        </div>

        <script src="templates/logaholic_6/js/js.php" type="text/javascript"></script> 
        <script src="app/controller/login.js" type="text/javascript"></script> 
        <?php
        if (file_exists("templates/custom.css")) {
            echo '<link href="templates/custom.css" rel="stylesheet" type="text/css" />';
        }

        if (file_exists("templates/custom.js")) {
            echo '<script src="templates/custom.js" type="text/javascript"></script>';
        }
        ?>
    </body>
</html>