<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <?php if($_SESSION['admin_img'] != ""){ ?>
                <img src="<?=$global['absolute-url'].$_SESSION['admin_img'];?>" class="img-circle" alt="User Image">
                <?php } else { ?>
                <img src="<?=$global['absolute-url'].'img/dummy.jpg';?>" class="img-circle" alt="User Image">
                <?php } ?>
            </div>
            <div class="pull-left info">
                <p><?=$_SESSION['admin_username'];?></p>
                <a href="<?=$path['dashboard'];?>"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
            <input type="hidden" id="session-id" value="<?=$_SESSION['admin_id'];?>">
        </div>
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu" data-widget="tree">
            <li class="header">MAIN NAVIGATION</li>
            <li <?php if($curpage == 'dashboard'){ ?> class="active" <?php } ?>>
                <a href="<?=$path['dashboard'];?>">
                    <i class="fa fa-dashboard"></i> <span>Dashboard</span>
                </a>
            </li>
            <?php if($acsg_po == 1){ ?>
            <li <?php if($curpage == 'po'){ ?> class="active" <?php } ?>>
                <a href="<?=$path['po'];?>">
                    <i class="fa fa-archive"></i> <span>Purchase Order</span>
                </a>
            </li> 
            <?php } ?>
            <?php if($acsg_report == 1){ ?>
            <li <?php if($curpage == 'report'){ ?> class="active" <?php } ?>>
                <a href="<?=$path['report'];?>">
                    <i class="fa fa-bar-chart"></i> <span>Report</span>
                </a>
            </li> 
            <?php } ?>
            <?php if($acsg_client == 1){ ?>
            <li <?php if($curpage == 'client'){ ?> class="active" <?php } ?>>
                <a href="<?=$path['client'];?>">
                    <i class="fa fa-users"></i> <span>Client List</span>
                </a>
            </li> 
            <?php } ?>
            <?php if($acsg_region == 1){ ?>
            <li <?php if($curpage == 'region'){ ?> class="active" <?php } ?>>
                <a href="<?=$path['region'];?>">
                    <i class="fa fa-flag"></i> <span>Region List</span>
                </a>
            </li>
            <?php } ?>
            <?php if($acsg_unit == 1 || $acsg_ppn == 1){ ?>
            <li class="treeview <?php if($curpage == 'unit' || $curpage == 'ppn'){ ?> active <?php } ?>">
                <a href="#">
                    <i class="fa fa-cogs"></i> <span>Control</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <?php if($acsg_unit == 1){ ?>
                    <li <?php if($curpage == 'unit'){ ?> class="active" <?php } ?>>
                        <a href="<?=$path['unit'];?>">
                            <i class="fa fa-circle-o"></i> <span>Unit</span>
                        </a>
                    </li>
                    <?php } ?>
                    <?php if($acsg_ppn == 1){ ?>
                    <li <?php if($curpage == 'ppn'){ ?> class="active" <?php } ?>>
                        <a href="<?=$path['ppn'];?>">
                            <i class="fa fa-circle-o"></i> <span>PPN</span>
                        </a>
                    </li>
                    <?php } ?>
                </ul>
            </li>
            <?php } ?>
            <?php if($acsg_admin == 1){ ?>
            <li class="treeview <?php if($curpage == 'admin' || $curpage == 'access' || $curpage == 'role'){ ?> active <?php } ?>">
                <a href="#">
                    <i class="fa fa-user"></i> <span>Admin</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li <?php if($curpage == 'admin'){ ?> class="active" <?php } ?>>
                        <a href="<?=$path['admin'];?>">
                            <i class="fa fa-circle-o"></i> <span>Admin List</span>
                        </a>
                    </li>
                    <?php if($acsg_crud_role == 1){ ?>
                    <li <?php if($curpage == 'role'){ ?> class="active" <?php } ?>>
                        <a href="<?=$path['role'];?>">
                            <i class="fa fa-circle-o"></i> <span>Admin Role</span>
                        </a>
                    </li>
                    <?php } ?>
                    <?php if($_SESSION['admin_role_name'] == 'Developer'){ ?>
                    <li <?php if($curpage == 'access'){ ?> class="active" <?php } ?>>
                        <a href="<?=$path['access'];?>">
                            <i class="fa fa-circle-o"></i> <span>Role Access</span>
                        </a>
                    </li>
                    <?php } ?>
                </ul>
            </li>
            <?php } ?>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>