function editar($id_, $f_causa) { $s_1 = "Select * from causas where id='{$id_}'"; $r_1 = mysql_query($s_1); $d_1 = mysql_fetch_array($r_1); if (ver_si_tiene_pendientes($d_1['id']) == 'SI') { $dis = 'disabled'; } ?> <div align="center" class="aviso">Todos los campos son obligatorios</div> <form action="?op=update" method="post" name="form1"> <input type="hidden" name="id_" value="<?php echo $id_; ?> "> <input type="hidden" name="f_causa" value="<?php echo $f_causa; ?> "> <table align="center" class="tabla" cellpadding="0" cellspacing="5"> <caption>Editar Relacionado a</caption> <tr> <td valign="middle" width="70">Nombre:</td> <td><input type="text" name="nombre" class="texto" size="45" value="<?php echo $d_1['nombre']; ?> " <?php echo $dis; ?> > </td> </tr> </table> <br><div align="center"> <input type="button" value="Cancelar" onclick="cancelar('?op=listado');" class="submit"> <input type="button" value="Guardar" onclick="validar();" class="submit"></div> </form> <?php }
function editar($id_) { $s_1 = "Select * from plantas where id='{$id_}'"; $r_1 = mysql_query($s_1); $d_1 = mysql_fetch_array($r_1); if (ver_si_tiene_pendientes($id_) == 'SI') { $dis = 'disabled'; } else { $dis = ''; } ?> <div align="center" class="aviso">Todos los campos son obligatorios</div> <form action="?op=update" method="post" name="form1"> <input type="hidden" name="id_" value="<?php echo $id_; ?> "> <table align="center" class="tabla" cellpadding="0" cellspacing="5"> <caption>Editar Planta</caption> <tr> <td valign="top">Nombre:</td> <td><input type="text" name="nombre" class="texto" size="45" value="<?php echo $d_1['nombre']; ?> " <?php echo $dis; ?> > </td> </tr> <tr> <td valign="top">Ubicación:</td> <td><input type="text" name="ubicacion" class="texto" size="45" value="<?php echo $d_1['ubicacion']; ?> " <?php echo $dis; ?> > </td> </tr> <tr> <td valign="top">Jefe:</td> <td> <select name="jefe" style="width:254px;" class="texto"> <option value=""></option> <?php $s_2 = "select id, nombre, apellidos from empleados where activo='1' and nombre!='' and apellidos!='' order by apellidos"; $r_2 = mysql_query($s_2); while ($d_2 = mysql_fetch_array($r_2)) { ?> <option value="<?php echo $d_2['id']; ?> " <?php if ($d_1['jefe'] == $d_2['id']) { ?> selected="selected"<?php } ?> > <?php echo $d_2['apellidos'] . " " . $d_2['nombre']; ?> </option> <?php } ?> </select> </td> </tr> </table> <br><div align="center"> <input type="button" value="Cancelar" onclick="cancelar('?op=listado');" class="submit"> <input type="button" value="Guardar" onclick="validar();" class="submit"></div> </form> <?php }