%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tjamichg/portal.tjamich.gob.mx/sisofi/modules/forms/
Upload File :
Create Path :
Current File : /home/tjamichg/portal.tjamich.gob.mx/sisofi/modules/forms/c.form.php

<?php
$token = $_GET['token'];
$idform = $_GET['form'];
$inform = mysql_query("SELECT * FROM formatos WHERE idform='$idform'");
$iform = mysql_fetch_array($inform);
$nameForm = $iform['1'];
$tbl = $iform['tabla'];
$tempo = $iform['tempo'];

if(isset($_POST['fraxn'])){
    $legi = $_GET['ley'];
    $arti = $_GET['artic'];
    $fraxx = $_GET['frxn'];
    if(mysql_query("INSERT INTO c_forms (idform, nform, idley, nart, fraxn, tabla, tempo) VALUES ('$idform','$nameForm','$legi','$arti','$fraxx','$tbl','$tempo')")){
        echo "<script> window.location.href = 'index.php?token=".$token."&load=cformats&mod=pload'; </script>";
    }
}

if(isset($_GET['ley'])){
    $tley = $_GET['ley'];
}

if(isset($_GET['artic'])){
    $artc = $_GET['artic'];
}

if(isset($_GET['frxn'])){
    $frxn = $_GET['frxn'];
}

?>

<br />
<div class="content">
    <div class="titulo">Configuración Formato</div><br />
    <div style="text-align: center"><?php echo $nameForm; ?></div><br />
    <div>
        <form name="config" method="post" action="">
            <div class="fcampo">
                <select name="ley" id="ley" onchange="window.location.href=this.value">
                    <option value="">- SELECCIONA UNA LEY -</option>
                    <?php
                    $lsen = mysql_query("SELECT * FROM leyes ORDER BY id ASC");
                    while($ley = mysql_fetch_array($lsen)){
                        $idley = $ley['id'];
                        ?>
                    <option value="index.php?token=<?php echo $token; ?>&mod=conf_form&form=<?php echo $idform; ?>&ley=<?php echo $idley; ?>" <?php if(isset($tley)){ if($tley == $idley){ echo "selected"; }} ?>><?php echo $ley['siglas']; ?></option>
                    <?php
                    }
                    ?>
                </select>
            </div>
            <div class="fcampo">
                <?php
                if(isset($tley)){
                    ?>
                <select name="artic" id="artic" onchange="window.location.href=this.value">
                    <option value="">- SELECCIONA UN ARTÍCULO -</option>
                    <?php
                    $asen = mysql_query("SELECT * FROM articulos WHERE idley='$tley'");
                    while($artic = mysql_fetch_array($asen)){
                    ?>
                    <option value="index.php?token=<?php echo $token; ?>&mod=conf_form&form=<?php echo $idform; ?>&ley=<?php echo $tley; ?>&artic=<?php echo $artic['nart']; ?>" <?php if(isset($artc)){ if($artc == $artic['nart']){ echo "selected"; }} ?>><?php echo $artic['nart']; ?></option>
                    <?php } ?>
                </select>
                <?php
                }
                ?>
            </div>
            <div class="fcampo">
                <?php
                if(isset($artc)){
                    ?>
                <select name="fraxn" onchange="window.location.href=this.value">
                    <option value="">- SELECCIONA UNA FRACCIÓN -</option>
                    <?php
                    $fsen = mysql_query("SELECT * FROM fracciones WHERE nart='$artc'");
                    while($fraxn = mysql_fetch_array($fsen)){
                        ?>
                    <option value="index.php?token=<?php echo $token; ?>&mod=conf_form&form=<?php echo $idform; ?>&ley=<?php echo $tley; ?>&artic=<?php echo $artc; ?>&frxn=<?php echo $fraxn['nfr']; ?>" <?php if(isset($frxn)){ if($frxn == $fraxn['nfr']){ echo "selected"; }} ?>><?php echo $fraxn['nfr'] ?></option>
                    <?php
                    }
                    ?>
                </select>
                <?php
                }
                ?>
            </div>
            <div class="fcampo"><input type="submit" value="Guardar" /></div>
        </form>
    </div>
</div>

Zerion Mini Shell 1.0