File "FOR-S-CCI-70.php"

Full Path: C:/wamp64/www/CALIDADWEB/CALIDADWEB/FRONTED/HTML/FOR-S-CCI-70.php
File size: 24.86 KB
MIME-type: text/x-php
Charset: utf-8

<?php

if (session_status() !== PHP_SESSION_ACTIVE) {
    session_start();
}

$iduser = isset($_SESSION["iduser"]) ? htmlspecialchars($_SESSION["iduser"]) : 'No Ingresado';
// ⬇️⬇️⬇️ SISTEMA DE PERMISOS - AGREGAR ESTAS LÍNEAS ⬇️⬇️⬇️
$usuario_actual = isset($_SESSION['usuario']) ? $_SESSION['usuario'] : null;
$usuarios_admin = array('12345','63546660');
$es_admin = in_array($usuario_actual, $usuarios_admin);
// ⬆️⬆️⬆️ FIN SISTEMA DE PERMISOS ⬆️⬆️⬆️

?>
<!DOCTYPE html>
<html lang="es">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CALIDADWEB - FOR-S-CCI-70</title>

    <link rel="stylesheet" href="../CSS/style_main.css">
    <link rel="shortcut icon" href="../img/avic.jpeg">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
    <link href="https://unpkg.com/boxicons@2.1.2/css/boxicons.min.css" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs5/dt-1.11.5/datatables.min.css" />
     <script>
            const esUsuarioAdmin = <?php echo ($es_admin === true) ? 'true' : 'false'; ?>;
            const usuarioActualNombre = "<?php echo htmlspecialchars($usuario_actual); ?>";
        </script>
 <script>
    


  

 
 </script>


    <style>
        body {
            background: linear-gradient(135deg, #ffcf4d 0%, #f8ae26 100%);
            min-height: 100vh; /* Para que el fondo cubra toda la pantalla */
          }
        /* Estilos CSS proporcionados */
        .card-header-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: .5rem !important;
        }

        .reloj-container {
            border: 2px solid white;
            border-radius: 10px;
            padding: 10px;
            text-align: left;
        }

        .user-info {
            font-size: 0.9rem;
            text-shadow: 1px 1px 5px black;
            text-decoration: underline;
        }

        /* Estilos para el texto en selects con fondo de color */
        .bg-success,
        .bg-danger,
        .bg-warning,
        .bg-info {
            color: black !important;
            /* Asegura que el texto sea visible */
        }

        /* Estilos generales para el fondo principal */
        body {
            background-color: #f8f9fa;
            /* Color de fondo claro para el cuerpo */
        }
         .nav-tabs .nav-link.active {
            background-color: rgb(255 138 55) !important; /* naranja */
            color: white !important;
        }

        .nav-tabs .nav-link {
            background-color: #f0f0f0; /* inactiva */
            color: black;
        }

    </style>
</head>

<body>

    <?php
    // Mostrar mensajes de sesión (si existen)
    if (!empty($_SESSION["mensaje"])) {
        // Asegura que $tipo, $texto estén definidos
        $tipo = $_SESSION["tipo"] ?? 'info';
        $texto = $_SESSION["mensaje"];
        $clase_alerta = "alert-{$tipo}";

        echo "
        <div class='container mt-3'>
            <div class='alert $clase_alerta alert-dismissible fade show' role='alert'>
                $texto
                <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
            </div>
        </div>";

        // Limpiar las variables de sesión del mensaje
        unset($_SESSION["mensaje"], $_SESSION["tipo"], $_SESSION["icon"]);
    }
    ?>

    <div class="container-lg mt-5 mb-5">
                <form id="formFrecuenciaInspeccion" method="POST" action="../../BACKEND/controller/FOR-S-CCI-70.php">
                    <input type="hidden" name="iduser" value="<?php echo $iduser; ?>">

                    <div class="card shadow-lg" style="background-color: rgb(255 138 55); color:white;">
                        <div class="card-header border-bottom border-white mb-4">
                            <h5 class="text-center mt-2 mb-0">REGISTRO DE LIMPIEZA Y DESINFECCION</h5>
                        </div>

                       
                            <div class="container-fluid">
                                    <div class="col-md-12">
                                                        <div class="card">
                                                            <div class="card-header" style="padding-top:0;">
                                                                <ul class="nav nav-tabs card-header-tabs" id="bologna-list" role="tablist">

                                                                    <li class="nav-item">
                                                                        <a class="nav-link active" id="frecuenciaIn-tab"
                                                                            data-bs-toggle="tab" href="#frecuenciaIn"
                                                                            role="tab" aria-controls="frecuenciaIn"
                                                                            aria-selected="true">FORMATO</a>
                                                                    </li>

                                                                    <li class="nav-item">
                                                                        <a class="nav-link" id="sendfrecuenciaIn-tab"
                                                                            data-bs-toggle="tab" href="#sendfrecuenciaIn"
                                                                            role="tab" aria-controls="sendfrecuenciaIn"
                                                                            aria-selected="false">CONSULTAR CONTROL</a>
                                                                    </li>

                                                                </ul>
                                                            </div>

                                                            <div class="card-body" style="background-color: rgb(255 138 55);">
                                                                <div class="tab-content mt-3">

                                                                    <div class="tab-pane active" id="frecuenciaIn" role="tabpanel"
                                                                        aria-labelledby="frecuenciaIn-tab">

                                                                        <div class="row text-center mt-2">
                                                                            <div class="col-md-6 mb-3">
                                                                                <i class='bx bx-landscape'></i>
                                                                                <legend>Tipo de Planta</legend>
                                                                                <select class="form-select" id="tipoPlantaSelect" name="tipoPlantaSelect">
                                                                                    <option value="" selected hidden>Selecciona Tipo</option>
                                                                                    <option value="DERIVADOS CÁRNICOS PEREIRA">DERIVADOS CÁRNICOS PEREIRA</option>
                                                                                    <option value="BENEFICIO Y PRODUCCIÓN PEREIRA">BENEFICIO Y PRODUCCIÓN PEREIRA</option>
                                                                                </select>
                                                                            </div>

                                                                            <div class="col-md-6 mb-3">
                                                                                <i class='bx bx-landscape'></i>
                                                                                <legend>Proceso</legend>
                                                                                <select class="form-select" id="procesoSelect" name="procesoSelect">
                                                                                    <option value="" selected hidden>Selecciona Proceso</option>
                                                                                </select>
                                                                            </div>
                                                                    
                                                                            <div class="col-md-6 mb-3">
                                                                                <i class='bx bx-user'></i>
                                                                                <label>Responsable</label><br>
                                                                                <input type="text" id="nombreCalidadfrecuencia" name="nombreCalidadfrecuencia" class="form-control" style="height: 62px; " placeholder="Escribe la cédula del líder de calidad" required>
                                                                            </div>
                                                                            <div class="col-md-6 mb-3">
                                                                                <i class='bx bx-user'></i>
                                                                                <label>Verefico</label><br>
                                                                                <input type="text" id="nombreCalidadfrecuencia2" name="nombreCalidadfrecuencia2" class="form-control" style="height: 62px; " placeholder="Escribe la cédula del líder de calidad" required>
                                                                            </div>
                                                                            <div class="col-md-6 mb-5">
                                                                                <i class='bx bx-spreadsheet'></i>
                                                                                <label>Aprobo</label><br>
                                                                                <input type="text" id="nombreCalidadfrecuencia1" name="nombreCalidadfrecuencia1" class="form-control" style="height: 62px; text-transform:uppercase;" placeholder="Escribe una observación" required>
                                                                            </div>
                                                                        </div>

                                                                        <div class="row text-center mt-2">
                                                                            <div class="col-md-6">
                                                                                <legend>Nivel Inspección</legend>
                                                                                <select class="form-select" id="nivelInspeccion">
                                                                                    <option value="" selected hidden>Seleccionar Nivel</option>
                                                                                    <option value="SEMANAL">SEMANAL</option>
                                                                                    <option value="DIARIA">DIARIA</option>
                                                                                    <option value="MENSUAL">MENSUAL</option>
                                                                                    <option value="CADA TRES DIAS">CADA TRES DIAS</option>
                                                                                    <option value="BIMENSUAL">BIMENSUAL</option>
                                                                                    <option value="SEMESTRAL">SEMESTRAL</option>
                                                                                    <option value="QUINCENAL">QUINCENAL</option>
                                                                                    <option value="TRIMESTRAL">TRIMESTRAL</option>
                                                                                </select>
                                                                            </div>

                                                                            <div class="col-md-6">
                                                                                <legend>Nivel Aseo</legend>
                                                                                <select class="form-select" id="nivelaseo">
                                                                                    <option value="" selected hidden>Seleccionar Nivel</option>
                                                                                    <option value="PRE">PRE</option>
                                                                                    <option value="PROF">PROF</option>
                                                                                    <option value="OPE">OPE</option>
                                                                                </select>
                                                                            </div>
                                                                        </div>

                                                                        <div class="mt-4 text-center">
                                                                            <button class="btn btn-light btn-sm mb-4 btnCargarFrecuenciaDatos" type="button">
                                                                                CARGAR DATOS DE INSPECCIÓN
                                                                            </button>

                                                                            <div class="table-responsive">
                                                                                <table class="table table-bordered table-striped table-hover" id="tblFrecuenciaDatos">
                                                                                    <thead style="background-color:#ff8a37; color:white;">
                                                                                        <tr>
                                                                                            <th>Nombre Operación</th>
                                                                                            <th>Tipo Operación</th>
                                                                                            <th>Código Procedimiento</th>
                                                                                            <th>Tipo aseo</th>
                                                                                            <th>Items registro</th>
                                                                                            <th>Se realiza Limpieza</th>
                                                                                            <th>No realiza limpieza</th>
                                                                                            <th>Observacion</th>
                                                                                            <th>Detergente</th>
                                                                                            <th>Detergente%</th>
                                                                                            <th>Desinfectante</th>
                                                                                            <th>Desinfectante%</th>
                                                                                            <th>Cumple limpieza</th>
                                                                                            <th>Accion correctiva</th>
                                        
                                                                                        </tr>
                                                                                    </thead>
                                                                                    <tbody>
                                                                                    </tbody>
                                                                                </table>
                                                                            </div>

                                                                        </div>

                                                                        
                                                                       

                                                                    </div>
                                                                    <div class="tab-pane" id="sendfrecuenciaIn" role="tabpanel"
                                                                        aria-labelledby="sendfrecuenciaIn-tab">

                                                                        <button class="btn btn-light btn-sm mb-4 btnfrecuenciaIn" type="button">
                                                                            CARGAR TABLA DE CONSULTA
                                                                        </button>

                                                                        <div class="table-responsive">
                                                                            <table class="table table-light table-striped table-hover" id="tblfrecuenciaIn">
                                                                                <thead style="vertical-align:revert;">
                                                                                    <tr>
                                                                                        <th>#</th>
                                                                                        <th>Fecha</th>
                                                                                        <th>Nombre Operación</th>
                                                                                        <th>Tipo Operación</th>
                                                                                        <th>Código Procedimiento</th>
                                                                                        <th>Tipo aseo</th>
                                                                                        <th>Items registro</th>
                                                                                        <th>Se realiza Limpieza</th>
                                                                                        <th>No realiza limpieza</th>
                                                                                        <th>Observacion</th>
                                                                                        <th>Detergente</th>
                                                                                        <th>Detergente%</th>
                                                                                        <th>Desinfectante</th>
                                                                                        <th>Desinfectante%</th>
                                                                                        <th>Cumple limpieza</th>
                                                                                        <th>Accion correctiva</th>
                                                                                        <th>Responsable</th>
                                                                                        <th>Aprobo</th>
                                                                                        <th>Verifico</th>
                                                                                        
                                                                                           
                                                                                    </tr>
                                                                                </thead>
                                                                                <tbody>
                                                                                </tbody>
                                                                            </table>
                                                                        </div>

                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="card-footer border-top border-white mt-4" id="footer1">
                                                            <div class="row align-items-center">
                                                                
                                                                <div class="col-md-6 text-center reloj-container">
                                                                    <span id="tiempo" class="d-block h3 mb-1">00 : 00 : 00</span>
                                                                    <p id="fecha" class="mb-1">Cargando fecha...</p>
                                                                    <p class="mb-0 user-info">
                                                                        <i class='bx bx-user-circle'></i> Usuario: 
                                                                        <strong><?php echo $iduser; ?></strong>
                                                                    </p>
                                                                </div>

                                                                <div class="col-md-6 mt-3 mt-md-0">
                                                                    <div class="d-flex flex-column align-items-center gap-2">
                                                                        
                                                                       <button class="btnGuardarFrecuencia btn btn-primary btn-lg w-100 w-lg-auto">
                                                                            <i class='bx bx-save'></i> Guardar 
                                                                        </button>

                                                                        <button type="button" class="btn btn-light btn-lg w-100 w-lg-auto" 
                                                                                onclick="window.location.href='../mainJefe.php';">
                                                                            <i class='bx bx-x'></i> CANCELAR
                                                                        </button>
                                                                        
                                                                    </div>
                                                                </div>

                                                            </div>
                                                        </div>
                                                    </div>
                                
                            
                        </div>

                    </div>
                </form>

    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"></script>

    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/v/bs5/jszip-2.5.0/dt-1.11.5/datatables.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/v/bs5/jszip-2.5.0/dt-1.11.5/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/r-2.2.9/sb-1.3.2/sp-2.0.0/datatables.min.js"></script>



    <script src="../JS/reloj.js"></script>
    <script src="../CONTROLTABLAS.JS/FOR-S-CCI-70.js?v=<?php echo time(); ?>"></script>


    <script src="../INPUTS/FOR-S-CCI-70.js?v=<?php echo time(); ?>"></script>


<script src="../JS/permisos-global.js"></script>

</body>

</html>