<?php 
require "../../config/Conexion.php"; 
if(strlen(session_id()) < 1)
session_start();
date_default_timezone_set('America/Lima'); 
    $query_verificar = "SELECT count(idverificar)as con FROM verificar_cuota WHERE estado='1'";
    $fila = ejecutarConsultaSimpleFila($query_verificar);
    $numero_cuota = $fila['con'];

    $query_verificar_incidencia = "SELECT count(idincidencia)as inc FROM incidencia WHERE estado='1'";
    $fila_inci = ejecutarConsultaSimpleFila($query_verificar_incidencia);
    $numero_incidencia = $fila_inci['inc'];
?>
<!DOCTYPE html>
<html lang="es">
<head>
    <title>Inntel Peru - Panel</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="author" content="Author Name">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="#"/>

    <!-- DataTables CSS -->
    <link rel="stylesheet" href="../../static/lib/datatables-1.10.25/css/dataTables.bootstrap4.min.css"/>
    <link rel="stylesheet" href="../../static/lib/datatables-1.10.25/plugins/responsive-2.2.9/css/responsive.bootstrap4.min.css"/>
    
    <!-- CSS de botones -->
    <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.7.1/css/buttons.bootstrap4.min.css"/>

    <!--CSS-->
    <link rel="stylesheet" href="../../static/lib/bootstrap-4.6.0/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="../../static/lib/fontawesome-6.1.1/css/all.min.css"/>
    <link rel="stylesheet" href="../../static/lib/jquery-ui-1.12.1/jquery-ui.css"/>

     <!--Javascript-->
    <script src="../../static/lib/bootstrap-4.6.0/js/jquery.min.js"></script>
    <script src="../../static/lib/jquery-ui-1.12.1/jquery-ui.min.js"></script>
    <script src="../../static/lib/bootstrap-4.6.0/js/popper.min.js"></script>
    <script src="../../static/lib/bootstrap-4.6.0/js/bootstrap.min.js"></script>
    <script src="../../static/lib/adminlte-3.2.0/js/adminlte.min.js"></script>

    <!--Template-->
    <link rel="stylesheet" href="../../static/lib/adminlte-3.2.0/css/adminlte.css"/>
    <!--Styles-->
    <link rel="stylesheet" href="../../static/css/style.css"/>
   <!--Libs-->
    <script src="../../static/lib/bootstrap-daterangepicker-3.1/js/moment.min.js"></script>
    <script src="../../static/lib/bootstrap-daterangepicker-3.1/js/moment-with-locales.js"></script>
    <script src="../../static/lib/jquery-confirm-3.3.4/js/jquery-confirm.min.js"></script>
    <link rel="stylesheet" href="../../static/lib/jquery-confirm-3.3.4/css/jquery-confirm.min.css"/>
    <script src="../../static/lib/sweetalert2-11.0.16/js/sweetalert2.all.min.js"></script>
    <link rel="../../stylesheet" href="static/lib/sweetalert2-11.0.16/css/sweetalert2.min.css"/>
    <script src="../../static/lib/jquery-loading-overlay-2.1.7/js/loadingoverlay.min.js"></script>
    <script src="../../static/js/functions.js"></script>

    <link rel="stylesheet" href="../../static/lib/select2-4.0.13/css/select2.min.css">
    <script src="../../static/lib/select2-4.0.13/js/select2.min.js"></script>
    <script src="../../static/lib/select2-4.0.13/js/i18n/es.js"></script>
   
    <link rel="stylesheet" href="../../static/lib/select2-4.0.13/css/select2-bootstrap4.min.css">
    <script src="../../static/lib/tempusdominus-bootstrap-4.5.37.0/js/tempusdominus-bootstrap.js"></script>
    <link rel="stylesheet" href="../../static/lib/tempusdominus-bootstrap-4.5.37.0/css/tempusdominus-bootstrap.css"/> 


</head>

<body class="hold-transition sidebar-mini layout-fixed">
    <div class="wrapper">
        <!-- Header Template -->
        <header>
            <!-- Include the contents of 'vtc_header.html' -->
            <nav class="main-header navbar navbar-expand navbar-dark bg-primary">
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link cursor-pointer collapsedMenu" id="collapsedMenu" data-widget="pushmenu">
                            <i class="fas fa-bars"></i>
                        </a>
                    </li>
                    <li class="nav-item d-none d-sm-inline-block">
                        <a href="../index.php" class="nav-link">Inicio</a>
                    </li>
                </ul>
                <ul class="navbar-nav ml-auto d-flex align-items-center flex-wrap">
                <?php
                    if ($_SESSION['escritorio']==1 and $_SESSION['nombrecargo']=='Administrador' and  $_SESSION['nombrecargo']=='Logistico' and $_SESSION['nombrecargo']=='Asistente'){
                    ?>
                    <li class="nav-item dropdown">
                        <a class="nav-link" href="../incidencia/list.php">
                            Notificacion Incidencia
                            <span class="badge badge-success right"><?php echo $numero_incidencia ;?></span></p>
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link" href="../pago/list_pago_verificar.php">
                            Notificacion Pago
                            <span class="badge badge-danger right"><?php echo $numero_cuota ;?></span></p>
                        </a>
                    </li>
                    <?php
                    }
                    ?>
                    <li class="nav-item dropdown">
                        <a class="nav-link" data-toggle="dropdown" aria-expanded="false">
                            <i class="far fa-user"></i> Usuario: <?php echo $_SESSION['nombre']; ?>
                        </a>
                        <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right" style="left: inherit; right: 0;">
                            <span class="dropdown-header">Datos de tu conexión</span>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item">
                                <p class="text-sm">Dirección IP</p>
                                <p class="text-sm text-muted">127.0.0.1</p>
                            </a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item">
                                <p class="text-sm">Dispositivo</p>
                                <p class="text-sm text-muted">Navegador Web</p>
                            </a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item">
                                <p class="text-sm">Perfil actual</p>
                                <p class="text-sm text-muted">PerfilEjemplo</p>
                            </a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item">
                                <p class="text-sm">Último acceso</p>
                                <p class="text-sm text-muted">2024-11-12 15:30</p>
                            </a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link" data-toggle="dropdown">
                        <i class="fa-solid fa-user-shield"></i> Perfil: <?php echo $_SESSION['nombrecargo']; ?>
                        </a>
                         <div class="dropdown-menu dropdown-menu-right">
                        <a href="#" class="dropdown-item">Otro Perfil</a>
                        </div>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link btnLogout" href="../../ajax/usuario.php?op=salir">
                            <i class="fas fa-power-off"></i>
                        </a>
                    </li>
                </ul>
            </nav>
        </header>

        <!-- Sidebar Template -->
        <aside class="main-sidebar elevation-2 sidebar-dark-primary">
            <a href="../index.php" class="brand-link">
                <img src="../../media/logo.png" alt="Logo" class="brand-image" style="opacity: .8">
                <span class="brand-text font-weight-light">Empresa Inntel</span>
            </a>
            <div class="sidebar">
                <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                    <div class="image">
                        <img src="../../media/empty.png" class="img-circle elevation-2" alt="User Image">
                    </div>
                    <div class="info">
                        <a class="d-block"><?php echo $_SESSION['nombre']; ?></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-header">Módulos</li>

                        <?php 
                         if($_SESSION['torre']==1){
                            echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                <a class="nav-link" data-name="module_header">
                                    <i class="nav-icon icon-class fa-solid fa-tower-cell"></i>
                                    <p>Torres y Repetidoras <i class="right fas fa-angle-left"></i></p>
                                </a>
                                <ul class="nav nav-treeview">
                                    <!-- Module Items Loop -->
                                    <li class="nav-item">
                                        <a href="'. BASE_URL .'torre/list.php" class="nav-link" data-name="submodule" data-id="1">
                                            <i class="icon-class nav-icon far fa-circle"></i>
                                            <p>Torre</p>
                                        </a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="'. BASE_URL .'repetidora/list.php" class="nav-link" data-name="submodule" data-id="1">
                                            <i class="icon-class nav-icon far fa-circle"></i>
                                            <p>Repetidoras</p>
                                        </a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="'. BASE_URL .'ip/list.php" class="nav-link" data-name="submodule" data-id="1">
                                            <i class="icon-class nav-icon far fa-circle"></i>
                                            <p>Ips</p>
                                        </a>
                                    </li>
                                    <!-- Additional Modules as needed -->
                                </ul>
                            </li>';
                            }
    
                            if($_SESSION['mikrotik']==1){
                                echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                    <a class="nav-link" data-name="module_header">
                                        <i class="nav-icon icon-class fa-solid fa fa-wifi"></i>
                                        <p>Mikrotik <i class="right fas fa-angle-left"></i></p>
                                    </a>
                                    <ul class="nav nav-treeview">
                                        <!-- Module Items Loop -->
                                        <li class="nav-item">
                                            <a href="'. BASE_URL .'mikrotik/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                <i class="icon-class nav-icon far fa-circle"></i>
                                                <p>Mikrotik</p>
                                            </a>
                                        </li>                                    
                                    </ul>
                                </li>';
                                }
    
                                if($_SESSION['almacen']==1){
                                    echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fas fa-boxes"></i>
                                            <p>Almacen <i class="right fas fa-angle-left"></i><span class="badge badge-success right">7</span></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'almacen/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Almacen</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                         <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'transferencia/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Transferencia Productos</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'producto/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Producto</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'inventarioingreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Inventario Ingreso</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'inventariosalida/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Inventario Salida</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'inventarioretorno/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Retorno Producto</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                         <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'movimiento/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Movimiento Material</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'movimiento/list_acta.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Movimiento Nro Acta</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'inventariomalogrado/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Inventario Malogrado</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'inventariogeneral/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Inventario General</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'garantia/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Producto Garantia</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'kardex/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Kardex</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'categoria/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Categoria</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                    </li>';
                                    }
    
                                if($_SESSION['compras']==1){
                                    echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fas fa-chart-bar"></i>
                                            <p>Compra <i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'compra/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Ingresos</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                         <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'proveedor/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Proveedores</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                    </li>';
                                    }
    
                                if($_SESSION['ventas']==1 and $_SESSION['nombrecargo']=='Administrador'){
                                    echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fa-shopping-cart"></i>
                                            <p>Venta <i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'venta/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Venta</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                    </li>';
                                    }
                                    if($_SESSION['ventas']==1 and $_SESSION['nombrecargo']=='Venta'){
                                        echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fa-shopping-cart"></i>
                                            <p>Venta <i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'venta/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Venta</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'abrir_caja/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Abrir Caja</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'cerrar_caja/create.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Cerrar Caja</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                    </li>';
                                    }

                                    if($_SESSION['contratos']==1){
                                        echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                            <a class="nav-link" data-name="module_header">
                                                <i class="nav-icon icon-class fa-solid fa fa-file"></i>
                                                <p>Contrato <i class="right fas fa-angle-left"></i></p>
                                            </a>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'contrato/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Contrato</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'contrato/list_negra.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Lista Negra Contrato</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                        </li>';
                                        }
                                if($_SESSION['pago']==1){
                                    echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fas fas fa-calculator"></i>
                                            <p>Pago <i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'pago/list_pago_verificar.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Pago por Verificar</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'pago/list_pendiente_pago.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Pendiente Pago</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'pago/list_recaudo.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Recaudo Caja Huancayo</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                         <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'pago/pendiente_actualizar.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Pendiente Actualizar Linea</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'pago/list_llamada.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Lista Llamada</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                    </li>';
                                    }
    
                                if($_SESSION['movimiento']==1){
                                    echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fa fa-retweet"></i>
                                            <p>Movimientos <i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'llamada/create.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Llamada</p>
                                                </a>
                                            </li>                                     
                                        </ul>
                                    </li>';
                                    }
                                if($_SESSION['registro']==1){
                                    echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fa fa-folder"></i>
                                            <p>Planes / Banco<i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'servicio/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Servicio</p>
                                                </a>
                                            </li>
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'tecnologia/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Tecnologia</p>
                                                </a>
                                            </li>
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'olt/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro OLT</p>
                                                </a>
                                            </li>
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'plan/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Planes</p>
                                                </a>
                                            </li>  
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'banco/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Banco</p>
                                                </a>
                                            </li>                                  
                                        </ul>
                                    </li>';
                                    }
                                if($_SESSION['cliente']==1){
                                    $contador_cliente = $conexion->query("SELECT count(idpersona) as cliente FROM persona WHERE idtipo_persona='1' AND estado='1'");  
                                    $fila = mysqli_fetch_assoc($contador_cliente);
                                    $numero_cliente = $fila['cliente'];
                                    echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fas fa-user-friends"></i>
                                            <p>Clientes<i class="right fas fa-angle-left"></i><span class="badge badge-danger right">'.$numero_cliente.'</span></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'cliente/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Cliente</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'cliente/list_validacion.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Lista Cliente Portal</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'comision/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Personal Comision</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                             <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'sorteo/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                  <p>Lista de Sorteo</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                    </li>';
                                    }
                                    if($_SESSION['adicional']==1){
                                        echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                            <a class="nav-link" data-name="module_header">
                                                <i class="nav-icon icon-class fa-solid fas fa-folder"></i>
                                                <p>Adicional<i class="right fas fa-angle-left"></i></p>
                                            </a>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'categoriaingreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Categoria Ingreso</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'categoriaegreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Categoria Egreso</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'ingreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Agregar Ingreso</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'egreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Agregar Egreso</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'pagar/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Pagar Egreso</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'imagenes/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Imagenes Slider</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                        </li>';
                                        }
                                       if($_SESSION['cobertura']==1){
                                        echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                            <a class="nav-link" data-name="module_header">
                                                <i class="nav-icon icon-class fa-solid fa-satellite-dish"></i>
                                                <p> Cobertura<i class="right fas fa-angle-left"></i></p>
                                            </a>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'cobertura/create.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Cobertura</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'cobertura/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Iconos</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                        </li>';
                                    }
                                if($_SESSION['averia']==1 and ($_SESSION['nombrecargo']=='Administrador' or $_SESSION['nombrecargo']=='Asistente' or $_SESSION['nombrecargo']=='Logistico')){
                                    echo' <li class="nav-header">MODULO DE AVERIA</li> 
                                    <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fas fa-laptop"></i>
                                            <p>Averia<i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'averia/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Registro Trabajos</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'averia/list_terminados.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Trabajos Terminados</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'averia/list_calificacion.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Calificacion</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                         <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'incidencia/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Incidencia</p>
                                                </a>
                                            </li>                                    
                                        </ul>
                                    </li>';
                                    }if($_SESSION['averia']==1 and $_SESSION['nombrecargo']=='Cuadrilla'){
                                        echo' <li class="nav-header">MODULO DE AVERIA</li> 
                                        <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                            <a class="nav-link" data-name="module_header">
                                                <i class="nav-icon icon-class fa-solid fas fa-laptop"></i>
                                                <p>Averia<i class="right fas fa-angle-left"></i></p>
                                            </a>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'averia/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Registro Trabajos</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                             <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'control_ingreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Control Ingreso</p>
                                                </a>
                                            </li>                                     
                                        </ul>
                                              <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'abrir_caja/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Abrir Caja</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'cerrar_caja/create.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Cerrar Caja</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                        </li>';
                                        }
                                        if($_SESSION['facturacion']==1){
                                            echo' <li class="nav-header">MODULO DE FACTURACION</li> 
                                            <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                                <a class="nav-link" data-name="module_header">
                                                    <i class="nav-icon icon-class fa-solid fas fa-line-chart"></i>
                                                    <p>Facturacion<i class="right fas fa-angle-left"></i></p>
                                                </a>
                                                <ul class="nav nav-treeview">
                                                    <!-- Module Items Loop -->
                                                    <li class="nav-item">
                                                        <a href="'. BASE_URL .'facturacion/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                            <i class="icon-class nav-icon far fa-circle"></i>
                                                            <p>Pago a Facturacion</p>
                                                        </a>
                                                    </li>                                     
                                                </ul>
                                                 <ul class="nav nav-treeview">
                                                    <!-- Module Items Loop -->
                                                    <li class="nav-item">
                                                        <a href="'. BASE_URL .'facturacion/list_facturacion.php" class="nav-link" data-name="submodule" data-id="1">
                                                            <i class="icon-class nav-icon far fa-circle"></i>
                                                            <p>Facturacion Completada</p>
                                                        </a>
                                                    </li>                                     
                                                </ul>
                                               
                                            </li>';
                                            }
                                if($_SESSION['ingreso']==1){
                                    echo' <li class="nav-header">MODULO DE INGRESOS</li> 
                                    <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                        <a class="nav-link" data-name="module_header">
                                            <i class="nav-icon icon-class fa-solid fas fa-line-chart"></i>
                                            <p>Ingreso/Egreso<i class="right fas fa-angle-left"></i></p>
                                        </a>
                                        <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'control_ingreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Control Ingreso</p>
                                                </a>
                                            </li>                                     
                                        </ul>
                                           <ul class="nav nav-treeview">
                                            <!-- Module Items Loop -->
                                            <li class="nav-item">
                                                <a href="'. BASE_URL .'control_egreso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Control Egreso</p>
                                                </a>
                                            </li>                                     
                                        </ul>
                                        <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                      <a href="'. BASE_URL .'pagar/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Pagar Egreso</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                        <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'abrir_caja/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Abrir Caja</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'cerrar_caja/create.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Cerrar Caja</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                    </li>';
                                    }

                                    if($_SESSION['finanzas']==1){
                                        echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                            <a class="nav-link" data-name="module_header">
                                                <i class="nav-icon icon-class fa-solid fas fa-hand-holding-usd"></i>
                                                <p>Finanzas<i class="right fas fa-angle-left"></i></p>
                                            </a>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'finanza/caja_principal.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Caja Principal</p>
                                                    </a>
                                                </li>                                     
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'finanza/cajas_cerrada.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Caja Cerradas</p>
                                                    </a>
                                                 </li>                                     
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'finanza/list_pago.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Pendientes Egreso</p>
                                                    </a>
                                                 </li>                                     
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'finanza/reporte_caja.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Reporte Caja</p>
                                                    </a>
                                                 </li>                                     
                                            </ul>
                                        </li>';
                                        }
                                    if($_SESSION['acceso']==1){
                                        echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                            <a class="nav-link" data-name="module_header">
                                                <i class="nav-icon icon-class fa-solid  fas fa-lock"></i>
                                                <p>Acceso<i class="right fas fa-angle-left"></i></p>
                                            </a>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'usuario/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Usuarios</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'tecnico/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Tecnicos</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                              <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'cuadrilla/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Cuadrillas</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'caja/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Caja</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                    <a href="'. BASE_URL .'permiso/list.php" class="nav-link" data-name="submodule" data-id="1">
                                                        <i class="icon-class nav-icon far fa-circle"></i>
                                                        <p>Permiso</p>
                                                    </a>
                                                </li>                                    
                                            </ul>
                                        </li>';
                                        } 
                                    if($_SESSION['consultac']==1){
                                        echo' <li class="nav-item has-treeview" data-name="module_header" data-id="">
                                            <a class="nav-link" data-name="module_header">
                                                <i class="nav-icon icon-class fa-solid  fas fa-chart-pie"></i>
                                                <p>Reporte<i class="right fas fa-angle-left"></i></p>
                                            </a>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                <a href="'. BASE_URL .'reporte/finanzas.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Reporte Finanzas</p>
                                                </a>
                                                 </li>                                   
                                            </ul>
                                            <ul class="nav nav-treeview">
                                                <!-- Module Items Loop -->
                                                <li class="nav-item">
                                                <a href="'. BASE_URL .'reporte/reporte_torres.php" class="nav-link" data-name="submodule" data-id="1">
                                                    <i class="icon-class nav-icon far fa-circle"></i>
                                                    <p>Reporte Torres x Repetidora</p>
                                                </a>
                                                 </li>                                   
                                            </ul>
                                        </li>';
                                        } 
                                    if($_SESSION['acceso']==1){
                                        echo' <li class="nav-item">
                                                <a href="'. BASE_URL .'empresa/create.php?idconfiguracion=1" class="nav-link" data-name="single_module" data-id="">
                                                    <i class="nav-icon fas fa-building"></i>
                                                    <p>Empresa</p>
                                                </a>
                                            </li> ';
                                    }        
                            ?>           
                        <!-- More Single Modules -->
                    </ul>
                </nav>
            </div>
        </aside>