<div class="container-fluid body">
    <div class="row">
        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 left-item">
            <div class="paginationbg">
                <div class="logobg">
                    <div class="pages-height"></div>
                    <?php if ($this->config->item('gk_name_show') != null): ?>
                        <h1 class="text-uppercase text-center" style="color: #ffffff;"><?php echo $this->config->item('gk_name') ?></h1>
                    <?php endif; ?>
                    <a href="javascript:void(0)"><img src="<?php echo UPLOAD_PATH . 'gkpos/logo/' . $this->config->item('gk_logo') ?>" width="196" height="152" class="img-responsive" style="display:inline" /></a>
                    <div class="clockdiv">
                        <p style="font-size: 35px"><?php echo date($this->config->item('timeformat')) ?></p>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 bodyitem no-padding">
            <div class="body-vertical-align-center content-center" style="top: 20%; left: 31%;position: fixed">
                <div class="numpad">
                    <div class="pin-calculatorbg">
                        <form id="loginForm" name="loginForm">
                            <table class="table table-responsive table-bg-color" style="background: #05a6f6 none repeat scroll 0 0;border-radius: 10px;color: #fff;text-transform: capitalize;font-weight: bold;">
                                <tr>
                                    <td style="border: none; vertical-align: middle;">Your Email Address:</td>
                                    <td style="border: none;vertical-align: middle;"><input type="email" name="email" id="email" class="form-control input-lg password-input" autocomplete="off" tabindex="1"></td>
                                </tr>
                                <tr>
                                    <td style="border: none; vertical-align: middle;">System Username:</td>
                                    <td style="border: none;vertical-align: middle;"><input type="text" name="username" id="username" class="form-control input-lg password-input " autocomplete="off" tabindex="2"></td>
                                </tr>
                                <tr>
                                    <td style="border: none;vertical-align: middle;">Your secret Key</td>
                                    <td style="border: none;vertical-align: middle;"><input type="password" name="password" id="password" class="form-control input-lg  password-input" autocomplete="off" tabindex="3"></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><a href="javascript:void(0)" class="btn btn-danger btn-sm round" style="width: 100%" onclick="submit_form()" tabindex="4"><?php echo $this->lang->line('gkpos_numpad_key_enter') ?></a></td>
                                </tr>
                            </table>
                        </form> 
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 right-item">
            <div class="paginationbg">
                <div class="logobg">
                    <div class="pages-height"></div>
                    <?php if ($this->config->item('gk_name_show') != null): ?>
                        <h1 class="text-uppercase text-center" style="color: #ffffff;"><?php echo $this->config->item('gk_name') ?></h1>
                    <?php endif; ?>
                    <a href="javascript:void(0)"><img src="<?php echo UPLOAD_PATH . 'gkpos/logo/' . $this->config->item('gk_logo') ?>" width="196" height="152" class="img-responsive" style="display:inline" /></a>
                    <p style="font-size:35px; font-weight:bold;"><?php echo date($this->config->item('dateformat')) ?></p>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('form:first *:input[type!=hidden]:first').focus();
        manageWindowHeight();
    });
    function submit_form() {
        
        var username = jQuery("#username").val();
        var email = jQuery("#email").val();
        var password = jQuery("#password").val();
        ALERT_TITLE = "<?php echo $this->lang->line('gkpos_alert_title_warning') ?>";
        if (username === '' || email === '') {
            alert("Please provide your email and username");
        } else if (password == '') {
            alert("<?php echo $this->lang->line('gkpos_pin_empty_warning') ?>");
        } else {
            jQuery.ajax({
                type: "POST",
                url: '<?php echo site_url("gkpos/entry/validate") ?>',
                data: {'username': username, 'email': email, 'password': password},
                success: function (response) {
                    if (response.status) {
                        var logBoard = '<?php echo $this->config->item('gk_only_online_admin') ?>';
                        if (logBoard == 'yes') {
                            window.location.replace(base_url + "gkpos/settings/base");
                        } else {
                            window.location.replace(base_url + "gkpos");
                        }
                    } else {
                        ALERT_TITLE = "<?php echo $this->lang->line('gkpos_alert_title_error') ?>";
                        alert("<?php echo $this->lang->line('gkpos_pin_invalid_warning') ?>");
                    }
                },
                dataType: 'json'
            });
        }
    }
</script>
