<?php
ob_start();
ini_set('session.gc_maxlifetime', 14400);
session_set_cookie_params(14400);
session_start();

if (!isset($_SESSION["nombre"]))
{
    header("Location: ../../login/login.php");
}
else
{
    require '../header.php';

if($_SESSION['registro']==1){

?>

            <div class="content-wrapper">
                <!-- Breadcrumb Section -->
                <section class="content-header">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-sm-12">
                                <nav aria-label="breadcrumb">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item">
                                            <a href="#"><i class="fas fa-home"></i> Panel</a>
                                        </li>
                                        <li class="breadcrumb-item active" aria-current="page">
                                            <a href="list.php">
                                                <i class="module-icon"></i> Olt 
                                            </a>
                                        </li>
                                    </ol>
                                </nav>
                            </div>
                          
                            <div class="col-sm-12" style="margin-top: 20px;">
                                <form class="form" method="post"  id="frmForm" autocomplete="off">
                                    <div class="card">
                                        <div class="card-header">
                                            <h3 class="card-title" id="idtitle" >
                                                <i class="fas fa-plus"></i> <!-- Icono para agregar -->
                                                Registro Olt<!-- Título del formulario -->
                                            </h3>
                                        </div>
                                        <div class="card-body" style="display: block;">
                                            <div class="container-fluid">
                                                <input type="hidden" name="idolt" id="idolt">
                                                <div class="row">
                                                    <!-- Primera columna -->
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label for="nombreolt">Nombre Olt:</label>
                                                            <input type="text" class="form-control" name="nombreolt" id="nombreolt"  placeholder="Nombre Olt" required>
                                                        </div>
                                                    </div>
                                                    <!-- Segunda columna -->
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label >Nombre Tecnologia:</label>
                                                            <select  name="idtecnologia" id="idtecnologia" class="form-control select2"  data-live-search="true" data-style="btn-default" required>
                                                            </select>
                                                        </div>
                                                    </div>
                                                </div>  
                                                <div class="row">
                                                    <!-- Primera columna -->
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label >Nombre Torre:</label>
                                                            <select  name="idtorre" id="idtorre" class="form-control select2"  data-live-search="true" data-style="btn-default" required>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <!-- Segunda columna -->
                                                    <div class="col-sm-6">
                                                        <div class="form-group">
                                                            <label for="vlin" >Vlin:</label>
                                                            <input type="text" class="form-control" name="vlin" id="vlin"  placeholder="Nombre Vlin" required>
                                                        </div>
                                                    </div>
                                                </div>
                                            
                                            </div>
                                        </div>
                                        <div class="card-footer">
                                            <!-- Botones de acción -->
                                            <button type="submit" id="btnGuardar" class="btn btn-primary btn-flat">
                                                <i class="fas fa-save"></i> Guardar registro
                                            </button>
                                            <a href="list.php" class="btn btn-danger btn-flat">
                                                <i class="fas fa-times"></i> Cancelar
                                            </a>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </section>                
            </div>


               
<?php
}
require '../footer.php';
?>
<script type="text/javascript" src="../../scripts/olt.js"></script>

<?php 
}
ob_end_flush();
?>