<?php include_once 'config/_globle.php'; ?>
<?php $current_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>

<style>
    .nav-sidebar .nav-link-treeview:hover {
        color: inherit !important; /* Keeps the original color */
        text-decoration: none; /* Removes underline if it's appearing */
    }
</style>

<aside class="main-sidebar elevation-4 sidebar-light-info">
    <a href="<?=$app_url;?>" class="brand-link">
      <img src="<?=$app_url;?>img/logo_sm.png" alt="<?=$app_name;?> Logo" class="brand-image img-circle elevation-2" style="opacity: .8;margin-left:18%;">
      <span class="brand-text font-weight-light"><?=$app_name;?></span>
    </a>
    
    <div class="sidebar">
        <div class="user-panel mt-3 pb-3 mb-3 d-flex">
            <div class="image"> 
                <img src="<?=$app_url;?>img/dummy_user.png" class="img-circle elevation-2" alt="User Image">
            </div>
            <div class="info" style="padding-top: 0px;color: #702576;">

                <p style="margin-bottom: 0px;">
                    <?= isset($_SESSION['user']) ? $_SESSION['user'] : ''; ?>
                </p>
                <a href="#">
                    <?= isset($_SESSION['userrole']) ? $_SESSION['userrole'] : ''; ?>
                </a>

            </div>
        </div>
        <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
                <li class="nav-item">
                    <a href="<?= ((isset($_SESSION['userrole']) && ($_SESSION['userrole'] == 'Admin' || $_SESSION['userrole'] == 'SuperAdmin')) ? $app_url."index_admin.php" : $app_url); ?>" class="nav-link">
                        <i class="nav-icon fa fa-home fa-fw"></i> <p>Home</p>
                    </a>
                </li>

                <?php if($userrole_permission["create_role"]=="1" || $userrole_permission["create_account"]=="1" || $userrole_permission["change_password"]=="1" ){ ?>                       
                    <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fa fa-user"></i>
                        <p>Admin <i class="fas fa-angle-left right"></i></p>
                    </a>
                    <ul class="nav nav-treeview">
                    <?php if($userrole_permission["create_role"]=="1"){ ?> 
                        <li class="nav-item"><a href="<?=$app_url;?>admin/userrolelist.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>User Role</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "admin/userrolelist.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                   <?php if($userrole_permission["create_account"]=="1"){ ?> 
                         <li class="nav-item"><a href="<?=$app_url;?>admin/userlist.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>User Account</p></a></li>  
                        <?php }else{
                            if("http://" . $current_url == $app_url . "admin/userlist.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                   <?php if($userrole_permission["change_password"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>admin/changepassword.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Change Password</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "admin/changepassword.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>                     
                    </ul>
                </li>
                    <?php }
                ?>

                <?php if($userrole_permission["ont"]=="1" || $userrole_permission["package"]=="1" || $userrole_permission["price_change"]=="1" || $userrole_permission["promotion"]=="1" || $userrole_permission["member"]=="1" || $userrole_permission["customer"]=="1" || $userrole_permission["extra_days"]=="1" || $userrole_permission["suspend"]=="1"){ ?>                      
                    <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fa fa-plus-circle"></i>
                        <p>Entry <i class="fas fa-angle-left right"></i></p>
                    </a>
                    <ul class="nav nav-treeview">
                        <?php if($userrole_permission["ont"]=="1"){ ?>                       
                            <li class="nav-item"><a href="<?=$app_url;?>entry/onu.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>ONU</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/onu.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["package"]=="1"){ ?>                       
                            <li class="nav-item"><a href="<?=$app_url;?>entry/package.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Internet Plan</p></a></li> 
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/package.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["price_change"]=="1"){ ?>                              
                            <li class="nav-item"><a href="<?=$app_url;?>entry/price_change.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Monthly Price</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/price_change.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["promotion"]=="1"){ ?>                              
                            <li class="nav-item"><a href="<?=$app_url;?>entry/promotion.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Promotion</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/promotion.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["member"]=="1"){ ?>                       
                            <li class="nav-item"><a href="<?=$app_url;?>entry/member.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Member Type</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/member.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["customer"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>entry/customer.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Customer</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/customer.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>  
                        <?php if($userrole_permission["extra_days"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>entry/extra_days.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Extra Days</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/extra_days.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>  
                        <?php if($userrole_permission["suspend"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>entry/suspend.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Suspend</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/suspend.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>                       
                        
                    </ul>
                </li>
                    <?php } 
                ?>
                                
                    <?php if($userrole_permission["bank_in_out_list"]=="1"){ ?>              
                        <li class="nav-item"><a href="<?=$app_url;?>entry/bank_in_out.php" class="nav-link nav-link-treeview"><i class="nav-icon fa fa-paper-plane"></i><p>Bank In Out List</p></a></li>                   
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/bank_in_out_list.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>

                    <?php if($userrole_permission["order_list"]=="1"){ ?>                         
                        <li class="nav-item"><a href="<?=$app_url;?>entry/order.php" class="nav-link nav-link-treeview"><i class="nav-icon fa fa-hand-holding-usd"></i><p>Order</p></a></li>                 
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/order_list.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>

                    <?php if($userrole_permission["installation"]=="1"){ ?>              
                        <li class="nav-item"><a href="<?=$app_url;?>entry/installation.php" class="nav-link nav-link-treeview"><i class="nav-icon fas fa-industry"></i><p>Installation</p></a></li>                  
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/installation.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                
                    <?php if($userrole_permission["sales"]=="1"){ ?>       

                        <li class="nav-item"><a href="<?=$app_url;?>entry/sales.php" class="nav-link nav-link-treeview"><i class="nav-icon fa fa-hand-holding-usd"></i><p>Sales</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/sales.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>


                    
                    <?php if($userrole_permission["activate_list"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>entry/customer_status.php" class="nav-link nav-link-treeview"><i class="nav-icon fa fa-info-circle"></i><p>Activate List</p></a></li> 
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/customer_status.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    
                    <?php if($userrole_permission["item_sales"]=="1"){ ?> 
                        <li class="nav-item"><a href="<?=$app_url;?>entry/item_sales.php" class="nav-link nav-link-treeview"><i class="nav-icon fa fa-hand-holding-usd"></i><p>Item Sales</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/item_sales.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    <?php if($userrole_permission["complaint"]=="1"){ ?> 
                        <li class="nav-item"><a href="<?=$app_url;?>entry/complaint.php" class="nav-link nav-link-treeview"><i class="nav-icon fa fa-comments"></i><p>Complaint</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/complaint.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    <?php if($userrole_permission["sms"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>entry/sms.php" class="nav-link nav-link-treeview"><i class="nav-icon fa fa-paper-plane"></i><p>SMS</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "entry/sms.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    

                <?php if($userrole_permission["item"]=="1" || $userrole_permission["stock_in"]=="1" || $userrole_permission["stock_out"]=="1" || $userrole_permission["stock_transfer"]=="1"){ ?> 
                    <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fa fa-truck-moving"></i>
                        <p>Inventory <i class="fas fa-angle-left right"></i></p>
                    </a>
                    <ul class="nav nav-treeview">
                        <?php if($userrole_permission["item"]=="1"){ ?> 
                            <li class="nav-item"><a href="<?=$app_url;?>stock/item.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Item</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/item.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>

                        <?php if($userrole_permission["stock_in"]=="1"){ ?> 
                            <li class="nav-item"><a href="<?=$app_url;?>stock/stock_in.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Stock In</p></a></li>  
                             <?php }else{
                                if("http://" . $current_url == $app_url . "stock/stock_in.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>

                        <?php if($userrole_permission["stock_out"]=="1"){ ?>                  
                            <li class="nav-item"><a href="<?=$app_url;?>stock/stock_out.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Stock Out</p></a></li> 
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/stock_out.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>  

                        <?php if($userrole_permission["stock_transfer"]=="1"){ ?>  
                            <li class="nav-item"><a href="<?=$app_url;?>stock/stock_transfer.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Stock Transfer</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/stock_transfer.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
           
                    </ul>
                    </li>
                <?php } 
                ?>   

                <?php if($userrole_permission["expense"]=="1" || $userrole_permission["income"]=="1" || $userrole_permission["transfer"]=="1"){ ?> 
                    <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fa fa-cog"></i>
                        <p>Accounting <i class="fas fa-angle-left right"></i></p>
                    </a>
                    <ul class="nav nav-treeview">
             
                        <?php if($userrole_permission["expense"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>entry/expense.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Expense</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/expense.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["income"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>entry/income.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Income</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/income.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["transfer"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>entry/transfer.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Transfer</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "entry/transfer.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>    
                    </ul>
                    </li>
                <?php }
                ?> 
                <?php if($userrole_permission["item_sales_rpt"]=="1" || $userrole_permission["stock_in_rpt"]=="1" || $userrole_permission["stock_out_rpt"]=="1" || $userrole_permission["stock_transfer_rpt"]=="1" || $userrole_permission["stock_balance_rpt"]=="1"){ ?>                      
                    <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fa fa-chart-bar"></i>
                        <p>Inventory Reports <i class="fas fa-angle-left right"></i></p>
                    </a>
                    <ul class="nav nav-treeview">          
                        <?php if($userrole_permission["item_sales_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>stock/item_sales_rpt.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Item Sales</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/item_sales_rpt.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["stock_in_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>stock/stock_in_rpt.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Stock In</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/stock_in_rpt.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["stock_out_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>stock/stock_out_rpt.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Stock Out</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/stock_out_rpt.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?> 
                        <?php if($userrole_permission["stock_transfer_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>stock/stock_transfer_rpt.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Stock Transfer</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/stock_transfer_rpt.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["stock_balance_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>stock/stock_balance_rpt.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Stock Balance</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "stock/stock_balance_rpt.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?> 
                                                
                    </ul>
                    </li>
                <?php } 
                ?> 
                <?php if($userrole_permission["expense_rpt"]=="1" || $userrole_permission["income_rpt"]=="1" || $userrole_permission["transfer_rpt"]=="1" || $userrole_permission["cash_book_rpt"]=="1" || $userrole_permission["monthly_rpt"]=="1"){ ?>                      
                    <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fa fa-chart-bar"></i>
                        <p>Accounting Reports <i class="fas fa-angle-left right"></i></p>
                    </a>
                    <ul class="nav nav-treeview"> 
                        <?php if($userrole_permission["expense_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>reports/expense.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Expense</p></a></li>

                            <?php }else{
                                if("http://" . $current_url == $app_url . "reports/expense.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["income_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>reports/income.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Income</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "reports/income.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["transfer_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>reports/transfer.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Transfer</p></a></li>
                            <?php }else{
                                if("http://" . $current_url == $app_url . "reports/transfer.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?> 
                        <?php if($userrole_permission["cash_book_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>reports/cash_book.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Cash Book</p></a></li>

                            <?php }else{
                                if("http://" . $current_url == $app_url . "reports/cash_book.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?>
                        <?php if($userrole_permission["monthly_rpt"]=="1"){ ?>                      
                            <li class="nav-item"><a href="<?=$app_url;?>reports/cash_book_main.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Monthly </p></a></li>

                            <?php }else{
                                if("http://" . $current_url == $app_url . "reports/cash_book_main.php"){
                                    echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                                }
                            } 
                        ?> 
                                                
                    </ul>
                    </li>
                <?php } 
                ?>
                 

                <?php if($userrole_permission["control_rpt"]=="1" || $userrole_permission["sales_rpt"]=="1" || $userrole_permission["payment_rpt"]=="1" || $userrole_permission["sales_by_mbps_rpt"]=="1" || $userrole_permission["assign_rpt"]=="1" || $userrole_permission["expire_rpt"]=="1"){ ?>                      
                    <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fa fa-chart-bar"></i>
                        <p>Reports <i class="fas fa-angle-left right"></i></p>
                    </a>
                    <ul class="nav nav-treeview">
                    <?php if($userrole_permission["control_rpt"]=="1"){ ?>       
                        <li class="nav-item"><a href="<?=$app_url;?>reports/control.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Control</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "reports/control.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?> 
                    <?php if($userrole_permission["sales_rpt"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>reports/sales.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Sales</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "reports/sales.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    <?php if($userrole_permission["payment_rpt"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>reports/payment.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Credit_Sale</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "reports/payment.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    <?php if($userrole_permission["sales_by_mbps_rpt"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>reports/sales_by_mbps.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p> Sales (Mbps-Months)</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "reports/sales_by_mbps.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    <?php if($userrole_permission["installation_rpt"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>reports/installation.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Installation</p></a></li>

                        <?php }else{
                            if("http://" . $current_url == $app_url . "reports/installation.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    <?php if($userrole_permission["assign_rpt"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>reports/date_assign.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Assign</p></a></li>
                        <?php }else{
                            if("http://" . $current_url == $app_url . "reports/date_assign.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    <?php if($userrole_permission["expire_rpt"]=="1"){ ?>                      
                        <li class="nav-item"><a href="<?=$app_url;?>reports/expire.php" class="nav-link nav-link-treeview"><i class="fas fa-circle nav-icon"></i><p>Expire</p></a></li> 

                        <?php }else{
                            if("http://" . $current_url == $app_url . "reports/cash_book.php"){
                                echo '<META HTTP-EQUIV=REFRESH CONTENT="1; ' . $app_url .  '">';
                            }
                        } 
                    ?>
                    
                                     
                    </ul>
                    </li>
                <?php }
                ?>
                
            </ul>
        </nav>
    </div>
</aside>
