<? 
$nivel = $_GET["nivel"];
$nombrevar =$_GET["nombreuser"];
$nif =$_GET["nif"];
$hoy=date("Y-m-d");
require_once('../../conf/connection.php');

$query="SELECT * FROM clientes WHERE rut_clientes='$nif'";
$rs_query=mysql_query($query);



?>
<script src="../../jquery.js"></script>
<script>
$(document).ready(function(){
// Demo 5
$('#identidad').Rut({
  on_error: function(){ alert('Rut incorrecto'); },
  format_on: 'keyup' 
});
$("#content > ul").tabs();
});

function cerrar() {
			window.close();
		}
		
</script>  
   <script type="text/javascript" src="../js/jquery-1.6.2.js"></script>
   <script src="../js/jquery.Rut.js" type="text/javascript"></script>
   <script type="text/javascript" src="../js/funciones/scripts.js"></script>

        <h3>Modificar cliente </h3>
     <p >
       <form id="frm_add" name="frm_add" method="post" action="mod_reg.php">
   <table width="514">
     <tr>
       <td height="2" colspan="2"><strong>FORMULARIO DE INGRESO</strong></td>
     </tr>
     <tr>
       <td height="2" colspan="2">&nbsp;</td>
     </tr>
     
     <tr>
       <td width="217" height="32">R.U.T:</td>
       <td width="285">
       <input name="identidad" type="text" id="identidad" value="<?php echo mysql_result($rs_query,0,"rut_clientes")?>" readonly  /></td>
     </tr>
     <tr>
       <td height="15"><label>RAZON SOCIAL:</label></td>
       <td><input type="text" name="nombre" id="nombre" value="<?php echo mysql_result($rs_query,0,"nombre_cliente")?>" /></td>
     </tr>
     <tr>
       <td height="16">GIRO:</td>
       <td><input type="text" name="giro" id="giro" value="<?php echo mysql_result($rs_query,0,"giro_cliente")?>" /></td>
     </tr>
     <tr>
       <td height="26">DIRECCION:</td>
       <td><input type="text" name="dir" id="dir" value="<?php echo mysql_result($rs_query,0,"dir_cliente")?>" /></td>
     </tr>
           <tr>
       <td height="13"><label>FONO:</label></td>
       <td><input type="text" name="fono" id="fono" value="<?php echo mysql_result($rs_query,0,"fono_cliente")?>" /></td>
     </tr>
      <tr>
        <td height="6">CORREO: </td>
        <td><input type="text" name="correo" id="correo" value="<?php echo mysql_result($rs_query,0,"correo_cliente")?>" /></td>
      </tr>
     
     <tr>
       <td colspan="2" align="right">
         <input type="submit" id="enviar" name="enviar" value="Modificar" class="art-button" />
         <input type="reset" id="cancel" name="cancel" value="Cancelar" class="art-button" />
         <input type="submit" value="Cerrar ventana" class="art-button" onClick="cerrar()" /></td>
     </tr>
     </table></form>
 

     
     <div id="resultado"></div>