%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tjamichg/portal.tjamich.gob.mx/infofi/modules/ley/
Upload File :
Create Path :
Current File : /home/tjamichg/portal.tjamich.gob.mx/infofi/modules/ley/form.ley.php

<?php
require("conn.php");
if(isset($_POST['nley'])){
    $nley = $_POST['nley'];
    $siglas = $_POST['siglas'];
    $fechaap = $_POST['fechaap'];
    $sql = "INSERT INTO nleyes (nley, siglas, fechaap) VALUES ('$nley','$siglas','$fechaap')";
    if(mysqli_query($db, $sql)){
        $atrue = "La ley fué ingresada con éxito";
    }
}
?>
<script>
function regnorm(){
    window.location.href = 'index.php?token=<?php echo $_GET['token']; ?>&mod=cfnorm';
}
</script>
<br />
<div class="content">
    <div class="titulo">Nueva Normatividad</div>
    <br />
    <?php
    if(isset($atrue)){
    ?>
    <div class="msg"><?php echo $atrue; ?></div>
    <?php
    }
    ?>
    <form name="nley" action="" method="post">
        <div class="fcampo">
            <input type="text" name="nley" placeholder="Nombre de la ley" size="100" />
        </div>
        <div class="fcampo">
            <input type="text" name="siglas" placeholder="Siglas" size="50" />
        </div>
        <div class="fcampo">
            <label>Fecha de aprobación</label> <input type="date" name="fechaap" />
        </div>
        <div class="fcampo">
            <input type="button" value="Atrás" onclick="regnorm();" />
            <input type="submit" value="Guardar" />
        </div>
    </form>
</div>

Zerion Mini Shell 1.0