%PDF- %PDF-
Mini Shell

Mini Shell

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

<?php
if(isset($_POST['year'])){
    $year = $_POST['year'];
    $seny = mysql_query("INSERT INTO years (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 = mysql_query("SELECT * FROM years ORDER BY id ASC");
            while($y = mysql_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