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

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

<?php
declare(strict_types=1);

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

$iduser = isset($_SESSION['iduser'])
    ? htmlspecialchars($_SESSION['iduser'], ENT_QUOTES, 'UTF-8')
    : '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-72</title>
    <link rel="shortcut icon" href="../img/avic.jpeg">

    <!-- CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://unpkg.com/boxicons@2.1.2/css/boxicons.min.css">

    <!-- JS Core -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
     <script>
            const esUsuarioAdmin = <?php echo ($es_admin === true) ? 'true' : 'false'; ?>;
            const usuarioActualNombre = "<?php echo htmlspecialchars($usuario_actual); ?>";
        </script>


    <?php if (!empty($_SESSION['mensaje'])): ?>
    <script>
        window.swalData = {
            title: <?= json_encode($_SESSION['tipo'] === 'success' ? 'Éxito' : 'Atención') ?>,
            text: <?= json_encode($_SESSION['mensaje']) ?>,
            icon: <?= json_encode($_SESSION['tipo']) ?>
        };
    </script>
   <?php
    unset($_SESSION['mensaje'], $_SESSION['tipo'], $_SESSION['icon']);
endif;
?>

<style>
    body {
            background: linear-gradient(135deg, #ffcf4d 0%, #f8ae26 100%);
            min-height: 100vh; /* Para que el fondo cubra toda la pantalla */
          }
    /* Estilos personalizados para el nuevo diseño */
    .card-header-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 0.5rem !important;
    }
    .reloj-container {
        border: 2px solid white;
        border-radius: 10px;
        padding: 10px;
        text-align: left;
    }
    .user-info {
        /* Estilo tomado de tu modal, asegurando la consistencia visual */
        font-size: 0.9rem;
        text-shadow: 1px 1px 5px black;
        text-decoration: underline;
    }

         .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>

<div class="container-lg mt-5 mb-5">
            <form id="formRetiroVehiculo" method="POST" action="../../BACKEND/controller/FOR-S-CCI-72.php">
                <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 fw-bold text-uppercase mb-0"> FOR-S-CCI-72- LIMPIEZA Y DESINFECCIÓN DE VEHÍCULOS</h5>
                    </div>

                <div class="container-fluid">
                    <div class="col-md-12">
                    <div class="card">
                        <div class="card-header">
                        <ul class="nav nav-tabs card-header-tabs" role="tablist">
                            <li class="nav-item">
                                <a class="nav-link active" id="formRetiro-tab" data-bs-toggle="tab" href="#formRetiro" role="tab" aria-controls="formRetiro" aria-selected="true">
                                    FORMATO
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" id="sendVehiculoestado-tab" data-bs-toggle="tab" href="#sendVehiculoestado" role="tab" aria-controls="sendVehiculo" aria-selected="false">
                                    CONSULTAR CONTROL
                                </a>
                            </li>
                        </ul>
                        </div>
                   <div class="card-body" style="background-color: rgb(255 138 55);">
                        <div class="tab-content">

                            <div class="tab-pane fade show active" id="formRetiro" role="tabpanel" aria-labelledby="formRetiro-tab">
                                <div class="row justify-content-center text-center">
                                    <small class="card-title mb-3" style="text-shadow: 5px 5px 10px black; font-size:25px;">
                                        " RETIRO DE SÓLIDOS Y ENJUAGUE DEL VEHÍCULO "
                                    </small>
                                    <hr class="mb-4" style="border-top: dotted 8px black;">
                                    
                                    <div class="col-md-4 mb-4">
                                        <label for="horavehiculo" class="form-label">HORA</label>
                                        <input type="time" name="horavehiculo" id="horavehiculo" class="form-control" required>
                                    </div>
                                    <div class="col-md-8 mb-4"></div> 
                                
                                    <div class="col-md-6 mb-4">
                                        <label for="placaVehiculoestado" class="form-label">PLACA VEHÍCULO</label>
                                        <input type="text" id="placaVehiculoestado" name="placaVehiculoestado" class="form-control text-uppercase" required>
                                    </div>
                                    <div class="col-md-6 mb-4">
                                        <label for="retiroEstadovehiculo" class="form-label">SÓLIDOS ENJUAGUE VEHÍCULO</label>
                                        <select id="retiroEstadovehiculo" name="retiroEstadovehiculo" class="form-select" required onchange="cambiarColor(this)">
                                            <option value="" selected hidden>Seleccionar...</option>
                                            <option value="CUMPLE">CUMPLE</option>
                                            <option value="NO CUMPLE">NO CUMPLE</option>
                                        </select>
                                    </div>
                                    
                                    <div class="col-md-6 mb-4">
                                        <label for="retiroAccionesestado" class="form-label">ACCIONES CORRECTIVAS</label>
                                        <input type="text" id="retiroAccionesestado" name="retiroAccionesestado" class="form-control">
                                    </div>
                                    <div class="col-md-6 mb-4">
                                        <label for="retiroResponsablesestado" class="form-label">RESPONSABLES</label>
                                        <input type="text" id="retiroResponsablesestado" name="retiroResponsablesestado" class="form-control" required>
                                    </div>
                                    
                                    <div class="col-md-6 mb-4">
                                        <label for="retiroVerificaestado" class="form-label">VERIFICA</label>
                                        <input type="text" id="retiroVerificaestado" name="retiroVerificaestado" class="form-control" required>
                                    </div>
                                    <div class="col-md-6 mb-4">
                                        <label for="retiroAproboestado" class="form-label">APROBO</label>
                                        <input type="text" id="retiroAproboestado" name="retiroAproboestado" class="form-control" required>
                                    </div>
                                    
                                </div>
                            </div>

                            <div class="tab-pane fade" id="sendVehiculoestado" role="tabpanel" aria-labelledby="sendVehiculoestado-tab">
                                <div class="text-center mb-3">
                                    <button class="btn btn-light btn-lg w25 fw-semibold btnControlRetiroVehiculo" type="button" >
                                        <i class='bx bx-table'></i> CARGAR TABLA
                                    </button>
                                </div>
                                <div class="table-responsive" style="overflow-x: auto;">
                                    <table class="table table-light table-striped table-hover" style="border-radius: 1em; text-align:center; border: 5px solid transparent; width: 100%;" id="tblControlRetiroVehiculo">
                                      
                                        <thead style="vertical-align:revert;">
                                            <tr>
                                                <th scope="col">#</th>
                                                <th scope="col" style="min-width:200px">Fecha</th>
                                                <th scope="col" style="min-width:100px">Hora</th>
                                                <th scope="col" style="min-width:200px">Placa Vehículo</th>
                                                <th scope="col" style="min-width:250px">Retiro de Sólidos y Enjuague</th>
                                                <th scope="col" style="min-width:250px">Correctivas</th>
                                                <th scope="col" style="min-width:200px">Responsables</th>
                                                <th scope="col" style="min-width:200px">Verifica</th>
                                                <th scope="col" style="min-width:200px">Aprobo</th>
                                             
                                            </tr>
                                        </thead>
                                        <tbody></tbody>
                                    </table>
                                </div>
                            </div>
                            
                        </div>
                        </div>
                        
                    </div>
                    </div>
                    </div>
                    
                    <div class="card-footer border-top border-white" id="footer1">
                        <div class="row align-items-center">
                            <div class="col-md-6 text-start reloj-container">
                                <span id="tiempo" class="d-block h3 mb-1"> 00 : 00 : 00</span>
                                <p id="fecha" class="mb-2">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 d-flex justify-content-md-center">
    
                              <div class="d-flex flex-column gap-2 w-100" style="max-width: 350px;"> 
                                      
                                <button type="submit" name="formRetiroVehiculo" id="controlEnviar" class="btn btn-light btn-lg shadow-lg">
                                  <i class='bx bx-send'></i> ENVIAR REPORTE
                                </button>

                                <button type="button" 
                                        class="btn btn-light" 
                                        id="cancelarGeneral" 
                                        onclick="window.location.href = '../mainJefe.php';">
                                    <i class='bx bx-x'></i> CANCELAR
                                </button>
                                      
                               </div>
                            </div>
                        </div>
                    </div>
            </form>

</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.6/umd/popper.min.js"></script>
<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://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-72.js"></script> 
<script src="../INPUTS/FOR-S-CCI-72.js"></script> 

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

</body>
</html>