$tiempo_transcurrido = strtotime($ahora) - strtotime($fechaGuardada); //comparamos el tiempo transcurrido if ($tiempo_transcurrido >= 600) { //si pasaron 10 minutos o más session_destroy(); // destruyo la sesión header("Location: ../index.html"); //envío al usuario a la pag. de autenticación //sino, actualizo la fecha de la sesión } else { $_SESSION["ultimoAcceso"] = $ahora; } } require '../header.php'; require "../Modelo/MTipo_O.php"; $md = new Tipo_Oficial(); $ID = $_REQUEST['ID']; $sx = $md->Modificar_Tipo_O($ID); $Nm = ""; $Dc = ""; while ($row = mysql_fetch_array($sx)) { $Nm = $row['Nombre']; } ?> <form action="../Controlador/CTipo_O.php" method="POST"> <div class="container" > <h2 style="font-size: 40px; color:black; margin-left: 55px; margin-top: 80px;">Eliminar Tipo de Oficial</h2> <section class="content bgcolor-1" style="margin-left: 80px;"> <span class="input input--nao"> <input class="input__field input__field--nao" type="text" id="input-1" name="ID" value="<?php echo "{$ID}";
//si pasaron 10 minutos o más session_destroy(); // destruyo la sesión header("Location: ../index.html"); //envío al usuario a la pag. de autenticación //sino, actualizo la fecha de la sesión } else { $_SESSION["ultimoAcceso"] = $ahora; } } require '../header.php'; include_once "../Modelo/MOficial.php"; include_once "../Modelo/MGrado.php"; include_once "../Modelo/MTipo_O.php"; $mg = new Grado(); $mt = new Tipo_Oficial(); $md = new Oficial(); $sx = $md->Cargar_Oficiales(); $sy = $mg->Elegir_Grado(); $sz = $mt->Elegir_Tipo_O(); while ($row = mysql_fetch_array($sy)) { $cmgrado .= " <option value='" . $row['Nombre'] . "'>" . $row['Nombre'] . "</option>"; } while ($row = mysql_fetch_array($sz)) { $cmtipo .= " <option value='" . $row['ID_Tipo_O'] . "'>" . $row['Nombre'] . "</option>"; } ?> <h1 style="margin-top: -60px;">OFICIALES POLICIALES</h1> <div class="row" style="margin-top: -200px;"> <table class="table table-striped table-bordered" style="margin-top: 80px;">
<?php include_once '../Modelo/MTipo_O.php'; include_once '../Modelo/MBitacora.php'; $md = new Tipo_Oficial(); $bi = new Bitacora(); date_default_timezone_set("America/Asuncion"); $fecha = date("Y/m/d"); $hora = date("h:i:s"); $ac = "Eliminar Tipo Oficial"; if (isset($_POST['Registrar'])) { $datos['Nombre'] = $_POST['Nombre']; $datos['Descripcion'] = $_POST['Descripcion']; $datos['Cantidad'] = 0; $datos['Estado'] = 1; $sx = $md->Insertar($datos); header("Location: ../Vista/VTipo_O.php"); } if (isset($_POST['Modificar'])) { $datos['ID_Tipo_O'] = $_POST['ID']; $datos['Nombre'] = $_POST['Nombre']; $datos['Descripcion'] = $_POST['Descripcion']; $sx = $md->Modificar($datos); header("Location: ../Vista/VTipo_O.php"); } if (isset($_POST['Eliminar'])) { $datos['ID_Tipo_O'] = $_POST['ID']; $bt['CI_Oficial'] = 9001961; $bt['Fecha'] = $fecha; $bt['Hora'] = $hora; $bt['Accion'] = $ac;
$tiempo_transcurrido = strtotime($ahora) - strtotime($fechaGuardada); //comparamos el tiempo transcurrido if ($tiempo_transcurrido >= 600) { //si pasaron 10 minutos o más session_destroy(); // destruyo la sesión header("Location: ../index.html"); //envío al usuario a la pag. de autenticación //sino, actualizo la fecha de la sesión } else { $_SESSION["ultimoAcceso"] = $ahora; } } require '../header.php'; require "../Modelo/MTipo_O.php"; $md = new Tipo_Oficial(); $sx = $md->Cargar_Tipo_O(); ?> <h1 style="margin-top: -60px;">TIPO DE OFICIAL</h1> <div class="row" style="margin-top: -90px;"> <table class="table table-striped table-bordered"> <thead> <tr> <th style="background:black; color:white; text-align: center;">Codigo</th> <th style="background:black; color:white; text-align: center;">Nombre</th> <th style="background:black; color:white; text-align: center;">Descripcion</th> <th style="background:black; color:white; text-align: center;">Cantidad</th> <th style="background:black; color:white; text-align: center;">Acciones</th> </tr> </thead>
<?php include_once '../Modelo/MOficial.php'; include_once '../Modelo/MTipo_O.php'; include_once '../Modelo/MGrado.php'; include_once '../Modelo/MBitacora.php'; $md = new Oficial(); $mt = new Tipo_Oficial(); $mg = new Grado(); $bi = new Bitacora(); date_default_timezone_set("America/Asuncion"); $fecha = date("Y/m/d"); $hora = date("h:i:s"); $ac = "Eliminar Oficial Policial"; if (isset($_POST['Registrar'])) { $ID = $_POST['cmbTipo']; $Nombre = $_POST['cmbGrado']; $datos['CI'] = $_POST['CI']; $datos['Nombre'] = $_POST['Nombre']; $datos['Direccion'] = $_POST['Direccion']; $datos['Correo'] = $_POST['Correo']; $datos['Telefono'] = $_POST['Telefono']; $datos['Sexo'] = $_POST['cmbSexo']; $datos['Estado_Civil'] = $_POST['cmbEst_Civ']; $datos['Procedencia'] = $_POST['Procedencia']; $datos['Cargo'] = $_POST['cmbGrado']; $datos['Tipo'] = $_POST['cmbTipo']; $datos['Pass'] = $_POST['Password']; $datos['Servicio'] = 0; $datos['Estado'] = 1; $sx = $md->Insertar($datos);