<div class="col-lg-10 col-md-10 col-sm-10 col-xs-10 bodyitem">
    <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="enableDisableKeyBoard('<?php echo $is_touch ?>')">
        <i class="fa fa-3x fa-keyboard-o center-block"></i>
        <h1><?php $is_touch == 'enable' ? print $this->lang->line('gkpos_disable') : print $this->lang->line('gkpos_enable') ?></h1>
    </div>
    <?php if ($this->session->userdata('gkpos_usertype') == 1): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="enableDisableCallerId('<?php echo $is_caller_id ?>')">
            <i class="fa fa-3x fa-phone center-block"></i>
            <h1><?php $is_caller_id == 'enable' ? print $this->lang->line('gkpos_disable') : print $this->lang->line('gkpos_enable') ?></h1>
        </div>
    <?php endif; ?>
    <div  class="col-lg-2 col-md-2 col-sm-2  col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/report/online') ?>', '<?php echo $this->lang->line('gkpos_online_order') ?>')">
        <i class="fa fa-3x fa-list-ol center-block"></i>
        <h1><?php echo $this->lang->line('gkpos_online_order') ?></h1>
    </div>
    <?php if ($this->config->item('gk_only_online_admin') == 'no'): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2  col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/voidorders/index') ?>', '<?php echo $this->lang->line("gkpos_void_orders") ?>')">
            <i class="fa fa-3x fa-list-ul center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_void_orders') ?></h1>
        </div>
    <?php endif; ?>

    <?php if ($this->session->userdata('gkpos_usertype') == 1): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2  col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/restaurant_setup') ?>', '<?php echo $this->lang->line("gkpos_restaurant_setup") ?>')">
            <i class="fa fa-3x fa-desktop center-block"></i>
            <h1 style="font-size: 12px;"><?php echo $this->lang->line('gkpos_restaurant_setup') ?></h1>
        </div>
    <?php endif; ?>

    <?php if ($this->session->userdata('gkpos_usertype') == 1 || $this->session->userdata('gkpos_usertype') == 2): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/expense') ?>', '<?php echo $this->lang->line("gkpos_system_expense") ?>')">
            <i class="fa fa-3x fa-money center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_expense') ?></h1>
        </div>
    <?php endif; ?>

    <?php if ($this->session->userdata('gkpos_usertype') == 1 || $this->session->userdata('gkpos_usertype') == 2): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="pageExit('<?php echo site_url('gkpos/menumanagement') ?>', 'Menu Manager')">
            <i class="fa fa-3x fa-list-alt center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_update_menu') ?></h1>
        </div>
    <?php endif; ?>
    <?php if ($this->session->userdata('gkpos_usertype') == 1 || $this->session->userdata('gkpos_usertype') == 2): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/report/index') ?>', '<?php echo $this->lang->line('gkpos_system_view_report') ?>')">
            <i class="fa fa-3x fa-folder-open center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_view_report') ?></h1>
        </div>
    <?php endif; ?>

    <?php if ($this->session->userdata('gkpos_usertype') == 1): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1"  onclick="getSettingPage('<?php echo site_url('gkpos/userlogs/index') ?>', '<?php echo $this->lang->line('gkpos_system_log_register') ?>')">
            <i class="fa fa-3x fa-lock center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_log_register') ?></h1>
        </div>
    <?php endif; ?>


    <?php if ($this->config->item('gk_only_online_admin') == 'no'): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/giftcard') ?>', '<?php echo $this->lang->line('gkpos_system_gift_card') ?>')">
            <i class="fa fa-3x fa-gift center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_gift_card') ?></h1>
        </div>
    <?php endif; ?>

    <?php if ($this->session->userdata('gkpos_usertype') == 1): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/view_user') ?>', '<?php echo $this->lang->line('gkpos_system_user') ?>')">
            <i class="fa fa-3x fa-users center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_user') ?></h1>
        </div>
    <?php endif; ?>

    <?php if ($this->session->userdata('gkpos_usertype') == 1 || $this->session->userdata('gkpos_usertype') == 2): ?>
        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1"  onclick="getSettingPage('<?php echo site_url('gkpos/settings/general') ?>', '<?php echo $this->lang->line('gkpos_system_general_setting') ?>')">
            <i class="fa fa-3x fa-gear center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_general_setting') ?></h1>
        </div>
    <?php endif ?>
    <?php if ($this->session->userdata('gkpos_usertype') == 1 || $this->session->userdata('gkpos_usertype') == 2): ?>
        <?php if ($this->config->item('gk_only_online_admin') == 'no'): ?>
            <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/printer') ?>', '<?php echo $this->lang->line('gkpos_system_printer_setting') ?>')">
                <i class="fa fa-3x fa-print center-block"></i>
                <h1><?php echo $this->lang->line('gkpos_system_printer_setting') ?></h1>
            </div>
        <?php endif ?>
    <?php endif ?>

    <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1"  onclick="getSettingPage('<?php echo site_url('gkpos/settings/special') ?>', '<?php echo $this->lang->line('gkpos_system_spacial') ?>')">
        <i class="fa fa-3x fa-list-alt center-block"></i>
        <h1><?php echo $this->lang->line('gkpos_system_spacial') ?></h1>
    </div>
    <?php if ($this->session->userdata('gkpos_usertype') == 1 || $this->session->userdata('gkpos_usertype') == 2): ?>
        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1"  onclick="getSettingPage('<?php echo site_url('gkpos/settings/locale') ?>', '<?php echo $this->lang->line('gkpos_Localisation') ?>')">
            <i class="fa fa-3x fa-map-o center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_Localisation') ?></h1>
        </div>
    <?php endif ?>
    <?php if ($this->config->item('gk_only_online_admin') == 'no'): ?>
        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/locked_orders') ?>', 'Locked Orders')">
            <i class="fa fa-3x fa-unlock center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_system_unlock_order') ?></h1>
        </div>
    <?php endif; ?>
    <?php if ($this->session->userdata('gkpos_usertype') == 1 || $this->session->userdata('gkpos_usertype') == 2): ?>
        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1"  onclick="getBaseAjaxPage('<?php echo site_url('gkpos/online/index') ?>', '<?php echo $this->lang->line('gkpos_online_setup') ?>')">
            <i class="fa fa-3x fa-windows center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_online_setup') ?></h1>
        </div>
    <?php endif; ?>
    <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1"  onclick="cleanGarbage()">
        <i class="fa fa-3x fa-recycle center-block"></i>
        <h1><?php echo $this->lang->line('gkpos_clean_garbage') ?></h1>
    </div>
    <?php if ($this->config->item('gk_only_online_admin') == 'no'): ?>
        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="unlockBillPrinter()">
            <i class="fa fa-3x fa-unlock center-block"></i>
            <h1><?php echo $this->lang->line('gkpos_unlock_bill_printer') ?></h1>
        </div>
    <?php endif; ?>
    <?php if ($this->config->item('page_reservation') == 'yes'): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/booking') ?>', 'Booking')">
            <i class="fa fa-3x fa-bookmark center-block"></i>
            <h1>Booking</h1>
        </div>
    <?php endif; ?>

    <?php if ($this->config->item('gk_order_table') == 'yes'): ?>
        <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/engaged_table') ?>', 'Engaged Table')">
            <i class="fa fa-3x fa-list-alt center-block"></i>
            <h1>Locked Table</h1>
        </div>
    <?php endif; ?>

    <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getSettingPage('<?php echo site_url('gkpos/settings/caller_logs') ?>', 'Caller Logs')">
        <i class="fa fa-3x fa-list-alt center-block"></i>
        <h1>Caller Logs</h1>
    </div>

    <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="getBaseAjaxPage('<?php echo site_url('gkpos/indexajax') ?>', 'Mainboard')">
        <i class="fa fa-3x fa-home center-block" style="color: green;"></i>
        <h1>Home</h1>
    </div>
   
    <?php if ($this->config->item('gkpos_go_offline') == 'yes'): ?>
        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="javascript:goofonline('<?php echo $this->config->item('gkpos_go_offline') ?>');">
            <i class="fa fa-3x fa-power-off center-block" style="color: #c99a29;font-weight: bold;"></i>
            <h1 style="color: #000">Go Online</h1>
        </div>
    <?php else: ?>
        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1" onclick="javascript:goofonline('<?php echo $this->config->item('gkpos_go_offline') ?>');">
            <i class="fa fa-3x fa-power-off center-block" style="color: #008c52;font-weight: bold;"></i>
            <h1 style="color: #000">Go Offline</h1>
        </div>
    <?php endif; ?>
     <div  class="col-lg-2 col-md-2 col-sm-2 col-xs-2 tabbg1">
        <a href="<?php echo site_url('gkpos/logoff') ?>" style="color: #333333;">
            <i class="fa fa-3x fa-power-off center-block" style="color: #ff0000"></i>
            <h1><?php echo $this->lang->line('gkpos_system_logout') ?></h1>
        </a>
    </div>
</div>
<script>

    function enableDisableKeyBoard(is_touch) {
        var keyboard = '';
        if (is_touch === 'enable') {
            keyboard = 'disable';
        } else {
            keyboard = 'enable';
        }
        $.post("<?php echo site_url('gkpos/keyboard_setting') ?>", {is_touch: keyboard}, function (output) {
            if (output === 1) {
                ALERT_TITLE = "Success!";
                alert('Keyboard update successfully');
                getSettingPage('<?php echo site_url("gkpos/settings/indexcontent") ?>');
            }
        }, 'json');

    }
    function enableDisableCallerId(is_caller_id) {
        var is_caller_id_value = '';
        if (is_caller_id === 'enable') {
            is_caller_id_value = 'disable';
        } else {
            is_caller_id_value = 'enable';
        }
        $.post("<?php echo site_url('gkpos/settings/caller_id_setting') ?>", {is_caller_id: is_caller_id_value}, function (output) {
            if (output === 1) {
                ALERT_TITLE = "Success!";
                alert('Caller ID  update successfully');
                getSettingPage('<?php echo site_url("gkpos/settings/indexcontent") ?>');
            }
        }, 'json');

    }
    function cleanGarbage() {
        $.ajax({
            url: '<?php echo site_url('gkpos/settings/garbagecollector') ?>',
            dataType: 'json',
            beforeSend: function () {
                console.log('before send');
            },
            success: function (output) {
                if (output.success) {
                    ALERT_TITLE = "Success!";
                }
                alert(output.message);
            }
        });
    }
    function unlockBillPrinter() {
        $.ajax({
            url: '<?php echo site_url('gkpos/settings/clear_billcopy_table') ?>',
            dataType: 'json',
            beforeSend: function () {
                console.log('before send');
            },
            success: function (output) {
                if (output.success) {
                    ALERT_TITLE = "Success!";
                }
                alert(output.message);
            }
        });
    }

    function goofonline(status) {
        $.ajax({
            url: '<?php echo site_url('gkpos/settings/go_onofline') ?>',
            dataType: 'json',
            type: 'post',
            data: {
                gkpos_go_offline: status
            },
            success: function (output) {
                if (output.success) {
                    getSettingPage('<?php echo site_url('gkpos/settings/indexcontent') ?>', 'Setting Manager');
                }
            }
        });
    }
</script>