<!DOCTYPE html>
<html lang="en">
    <head>
        <?php require_once 'admin_element/meta_content.php'; ?>
        <?php require_once 'admin_element/head_content.php'; ?>
    </head>

    <body>  

        <section class="login">
            <h1 style="color: limegreen"><img alt="Talha Training" title="Talha Training" src="<?php echo base_url() ?>images/logo-50.png"></h1>
            <div class="login-inner">
                <noscript>
                For full functionality of this page it is necessary to enable JavaScript. Here are the 
                <a href="http://www.enable-javascript.com" target="_blank"> 
                    instructions how to enable JavaScript in your web browser
                </a>
                </noscript>
                <div class="white-bg row">
                    <div class="col-sm-6 col-sm-offset-3">
                        <form class="form-signin" role="form" action="<?php echo base_url(); ?>check-admin-login" method="post">
                            <div class="input-group">
                                <input class="form-control" 
                                       placeholder="Email address" 
                                       required="" 
                                       autofocus="" 
                                       type="email" 
                                       name="person_email" 
                                       id="person_email">
                                <span class="input-group-addon" id="basic-addon1"><i class="fa fa-at"></i></span>
                            </div>
                            <br/>
                            <div class="input-group">
                                <input class="form-control" 
                                       placeholder="Password" 
                                       required="" 
                                       type="password" 
                                       name="person_password" 
                                       id="person_password">
                                <span class="input-group-addon" id="basic-addon1"><i class="fa fa-lock"></i></span>
                            </div>
                            <span><input type="hidden" name="person_time_zone" id="person_time_zone" value=""></span>
                            <div class="col-sm-12" style="padding-top: 10px; color: red">
                                <?php
                                $exception = $this->session->userdata('exception');
                                if (isset($exception)) {
                                    echo $exception;
                                    $this->session->unset_userdata('exception');
                                }
                                ?>
                            </div>
                            <br/><br/>
                            <input type="submit" class="sign-in-btn btn btn-default" value="Sign In"><br/><br/>
                        </form>
                    </div>
                </div>
            </div>
        </section>


        <footer>

            <div class="footer-bottom">
                <p>Copyright &copy 2015 | Talha Corporation All rights reserved.</p>
            </div>
        </footer>
    </body>

    <script type="text/javascript">
        $(document).ready(function () {     //ready() is used to make a function available after the document is loaded
            var tz = jstz.determine();      //autometically detect timezone
            var response_text = 'No timezone found';
            if (typeof (tz) === 'undefined') {
                response_text = 'No timezone found';
            } else {
                response_text = tz.name(); //timezone name
            }
            document.getElementById('person_time_zone').value = response_text;
        });
    </script>
</html>