<?php
/*
 * Copyright (c) 2018 Earworks.
 * Codeigniter Project Template Modification
 * Please contact our email for more information :
 * contact@earworks.co.id
 */

defined('BASEPATH') or exit('No direct script access allowed');
$user = $this->session->userdata(CI_NAME . 'log');
?>
<!-- BEGIN SIDEBAR -->
<div class="page-sidebar-wrapper">
    <!-- BEGIN SIDEBAR -->
    <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->
    <!-- DOC: Change data-auto-speed="200" to adjust the sub menu slide up/down speed -->
    <div class="page-sidebar navbar-collapse collapse">
        <!-- BEGIN SIDEBAR MENU -->
        <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) -->
        <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode -->
        <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode -->
        <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->
        <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded -->
        <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed -->
        <ul class="page-sidebar-menu  page-header-fixed " data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" style="padding-top: 20px">
            <!-- DOC: To remove the sidebar toggler from the sidebar you just need to completely remove the below "sidebar-toggler-wrapper" LI element -->
            <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
            <li class="sidebar-toggler-wrapper hide">
                <div class="sidebar-toggler">
                    <span></span>
                </div>
            </li>
            <?php if (in_array($user['roleid'], array(1, 2))) : ?>
                <li class="nav-item start ">
                    <a href="<?php echo base_url('backoffice/dashboard/index') ?>"  class="nav-link nav-toggle">
                        <i class="fa fa-dashboard"></i>
                        <span class="title"><?php echo $this->lang->line('dashboard') ?></span>
                        <span class="selected"></span>
                    </a>
                </li>
                 <li class="nav-item start ">
                    <a href="<?php echo base_url('backoffice/register/lists') ?>"  class="nav-link nav-toggle">
                        <i class="fa fa-user"></i>
                        <span class="title"><?php echo $this->lang->line('guestlist') ?></span>
                        <span class="selected"></span>
                    </a>
                </li>
            <?php endif; ?>
            <?php if (in_array($user['roleid'], array(1,2, 4))) : ?>
                <li class="nav-item start">
                    <a href="javascript:void(0)" class="nav-link nav-toggle">
                        <i class="fa fa-user-plus"></i>
                        <span class="title"><?php echo $this->lang->line('register') ?></span>
                        <span class="selected"></span>
                        <span class="arrow open"></span>
                    </a>
                    <ul class="sub-menu">
                        <li class="nav-item start">
                            <a href="<?php echo base_url('backoffice/register') ?>" class="nav-link nav-toggle" >
                                <span class="title"><?php echo $this->lang->line('guest') ?></span>
                                <span class="selected"></span>
                            </a>
                        </li>
                        <li class="nav-item start">
                            <a href="<?php echo base_url('backoffice/register/media') ?>" class="nav-link nav-toggle">
                                <span class="title"><?php echo $this->lang->line('media') ?></span>
                                <span class="selected"></span>
                            </a>
                        </li>
                        <li class="nav-item start">
                            <a href="<?php echo base_url('backoffice/register/internal') ?>" class="nav-link nav-toggle">
                                <span class="title"><?php echo $this->lang->line('internal') ?></span>
                                <span class="selected"></span>
                            </a>
                        </li>
                    </ul>
                </li>
            <?php endif; ?>
            <?php if (in_array($user['roleid'], array(1,2, 3))) : ?>
                <li class="nav-item start">
                    <a href="<?php echo base_url('backoffice/testride') ?>" class="nav-link nav-toggle">
                        <i class="fa fa-truck"></i>
                        <span class="title"><?php echo $this->lang->line('testride') ?></span>
                        <span class="selected"></span>
                    </a>
                </li>
            <?php endif; ?>
            <?php if (in_array($user['roleid'], array(1,2,5))) : ?>
                <li class="nav-item start">
                    <a href="<?php echo base_url('backoffice/testdrive/index') ?>" class="nav-link nav-toggle">
                        <i class="fa fa-car"></i>
                        <span class="title"><?php echo $this->lang->line('testdrive') ?></span>
                        <span class="selected"></span>
                    </a>
                </li>
            <?php endif; ?>
            <?php if (in_array($user['roleid'], array(1))) : ?>
                <li class="nav-item start">
                    <a href="<?php echo base_url('backoffice/admins/index') ?>" class="nav-link nav-toggle">
                        <i class="fa fa-group"></i>
                        <span class="title"><?php echo $this->lang->line('admins') ?></span>
                        <span class="selected"></span>
                    </a>
                </li>
            <?php endif; ?>
        </ul>
        <!-- END SIDEBAR MENU -->
        <!-- END SIDEBAR MENU -->
    </div>
    <!-- END SIDEBAR -->
</div>
<!-- END SIDEBAR -->