%PDF- %PDF-
Mini Shell

Mini Shell

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

<?php
require("conn.php");
if(isset($_POST['year'])){
    $year = $_POST['year'];
    $seny = mysqli_query($db, "INSERT INTO nyears (year) VALUES ('$year')");
    if($seny) {
        $seok = "El año fué registrado exitosamente";
    } else {
        $seok = "Hubo un error al registrar el año. favor de notificar al administrador del sistema";
    }
}
?>
<br />
<div class="content">
    <div class="titulo">Años</div>
    <br />
    <div>
        <table class="tablas">
            <tr>
                <td class="ctab">id</td>
                <td class="ctab">Año</td>
            </tr>
            <?php
            $exYear = mysqli_query($db, "SELECT * FROM nyears ORDER BY id ASC");
            while($y = mysqli_fetch_array($exYear)){
                ?>
            <tr>
                <td><?php echo $y['id']; ?></td>
                <td><?php echo $y['year']; ?></td>
            </tr>
            <?php
            }
            ?>
        </table>
    </div>
    <br />
    <div>
        <hr />
        <br />
        <div class="titulo">Agregar Nuevo Año</div>
        <?php
        if(isset($seok)){
            echo"<br />";
            echo "<div class='bmsg'>".$seok."</div>";
            echo"<br />";
        }
        ?>
        <form action="" method="post">
            <div class="fcampo"><input type="text" name="year" size="5" placeholder="Ej: 2000" /></div>
            <div class="fcampo"><input type="submit" value="Guardar" /></div>
        </form>
    </div>
</div>

Zerion Mini Shell 1.0