

<style>
       .sn_active{color:#fff !important;font-weight:bold;border-bottom:1px solid #F63;border-top:1px solid #F63;}
       </style>
       <script>
	   
	   $().ready(function(e) {
		   navid = $('#navid').val();

		   if(navid=="order"){id = "#nav_order";}
		   if(navid=="purchase"){id = "#nav_purchase";}

		   if(navid=="masterdata"){id = "#nav_master";}
		   if(navid=="report"){id = "#nav_report";}
		   if(navid=="setting"){id = "#nav_setting";}
		   if(navid=="accounting"){id = "#nav_acct";}
		   if(navid=="home"){id = "#nav_home";}
			$(id).show();
	    });
       </script>
        <!-- Sidebar  -->
        <nav id="sidebar">
            <div class="sidebar-header pt-4 pb-3">
            	<a href="../../home/db/index">
                <h3>DASHBOARD</h3>
                </a>
            </div>
            <ul class="list-unstyled components">
            <input type="hidden" id="navid" value="<?php echo $navid?>">
               
               




               <?php if($prc_flag==1){?>
                <li <?php if($navid=="purchase"){echo 'class="active"';}?>>
                    <a href="#nav_purchase" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">Pembelian</a>
                    <ul class="collapse list-unstyled" id="nav_purchase">
                        <li <?php if($pageid=="po"){echo 'class=" sn_active"';}?>>
                            <a href="../../purchase/po/index">Transaksi Pembelian</a>
                        </li>
                    </ul>
                </li>
				<?php } ?>
                

                

                
               <?php if($md_flag==1){?>
                <li <?php if($navid=="masterdata"){echo 'class="active"';}?>>
                    <a href="#nav_master" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">Masterdata</a>
                    <ul class="collapse list-unstyled" id="nav_master">

                        <li <?php if($pageid=="pc"){echo 'class=" sn_active"';}?>>
                            <a href="../../masterdata/sub_kategori/index">Kategori</a>
                        </li>

                        <li <?php if($pageid=="product"){echo 'class=" sn_active"';}?>>
                            <a href="../../masterdata/product/index">Product</a>
                        </li>
                    </ul>
                </li>
                <?php } ?>
                
              <?php if($rpt_flag==1){?>

             	<li <?php if($navid=="rpt"){echo 'class="active"';}?>>
                    <a href="#nav_report" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">Reports</a>
                    <ul class="collapse list-unstyled" id="nav_report">
                        <li <?php if($pageid=="account"){echo 'class=" sn_active"';}?>>
		                    <a href="../../reports/purchase/index">Lap. Pembelian</a>
                        </li>

                    </ul>
                </li>
              <?php } ?>  
               

                
              <?php if($setting_flag==1){?>

             	<li <?php if($navid=="setting"){echo 'class="active"';}?>>
                    <a href="#nav_setting" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">Setting</a>
                    <ul class="collapse list-unstyled" id="nav_setting">
                        <li <?php if($pageid=="account"){echo 'class=" sn_active"';}?>>
		                    <a href="../../setting/account/index">User Account</a>
                        </li>
                    </ul>
                </li>
              <?php } ?>  
            </ul>
        </nav>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#sidebarCollapse').on('click', function () {
                $('#sidebar').toggleClass('active sn_active');
            });
        });
    </script>