Exemple #1
0
        </div>
        <div class="campoForm">
        <label>Paciente</label><select class="PACIENTE_ID" name="PACIENTE_ID" onchange="generoDePax(this,'#servicios');"><?php 
                echo array2optMod($pacientes["data"], array('PACIENTE_ID', 'NOMBRE'));
                ?>
</select><br />
        </div>
        <div class="campoForm">
        <label>Género</label><select class="GENERO" onchange="concDeEmpGen('#servicios');"><?php 
                echo array2opt($genero);
                ?>
</select><br />
        </div>
        <div class="campoForm">
        <label>Servicio</label><select class="CONCEPTO_ID" name="CONCEPTO_ID"><?php 
                echo array2optMod($conceptos["data"], array('CONCEPTO_ID', 'NOMBRE'));
                ?>
</select><br />
        </div>
     </div>
     <?php 
            }
            ?>
        <div class="campoForm" align="right">
        <input type="submit" value="Solicitar" /><input type="reset" />
        </div>
    </form>
    <?php 
            break;
    }
    //termina el switch
Exemple #2
0
 <?php 
         foreach ($post as $ctrl => $d) {
             ?>
 <div class="paquete">
 	<?php 
             $raw = (array) json_decode($d);
             $estan = array('id', 'CONCEPTO_ID', 'NOMBRE', 'APELLIDOS', 'GENERO');
             $data = array();
             foreach ($raw as $c => $v) {
                 if (in_array($c, $estan)) {
                     $data[$c] = $v;
                 }
             }
             $ocultar = array('id');
             $select = array('CONCEPTO_ID');
             $options = array('CONCEPTO_ID' => array2optMod($conceptos["data"], array('CONCEPTO_ID', 'NOMBRE')));
             $cambiar = array('FOLIO' => 'id');
             $fijos = array('NOMBRE', 'APELLIDOS', 'GENERO');
             foreach ($data as $c => $v) {
                 if (in_array($c, $ocultar)) {
                     echo '<input type="hidden" name="row[' . $ctrl . '][' . cambiarCampo($c, $cambiar) . ']" value="' . $v . '" />';
                 } elseif (in_array($c, $select)) {
                     echo '<div class="campoForm">';
                     echo '<label>' . columnas($c) . '</label><select class="' . $c . '" name="row[' . $ctrl . '][' . cambiarCampo($c, $cambiar) . ']" value="' . $v . '" >' . $options[$c] . '</select>';
                     echo '</div>';
                 } elseif (in_array($c, $fijos)) {
                     echo '<div class="campoForm">';
                     echo '<label>' . columnas($c) . '</label><input type="text" readonly="readonly" value="' . $v . '" />';
                     echo '</div>';
                 } else {
                     echo '<div class="campoForm">';