<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

   <head>
      <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
      <meta name="author" content="carros" />

      <title>::Eliminar Cliente::</title>
      <script  type="text/javascript">
         function direccionar(url){
           document.frmusuarios.action=url;
           document.frmusuarios.submit();
         }
      </script>       
   </head>

   <body>
      <?php
         $mId_registro = $_GET['Id_registro'];
         
         $mCon = mysql_connect("localhost","egocar1_conecto","123");
         $mBD  = mysql_select_db("egocar1_conecto");
         
         $mConsul = "SELECT * FROM registro WHERE Id_usuario='$mId_registro'";
         $mRs = mysql_query($mConsul);
         
         if(mysql_num_rows($mRs)>0){
            $mRow = mysql_fetch_array($mRs, MYSQL_ASSOC);
      ?>
         <table width="450px" border="0" align="center">
            <caption><span style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; color: #424242; font-weight: bold;'>:: Datos del Usuario ::</span></caption>
            <tr>
               <td width="125px">Num. Control</td>
               <td width="325px"><?php echo $mId_registro; ?></td>
            </tr>
            <tr>
               <td >Nombre(s)</td>
               <td>
                  <input type="text" name="txtNombre" size="48" value="<?php echo $mRow['nombre'] ?>" />
               </td>
            </tr>
            <tr>
               <td>Empresa </td>
               <td>
                  <input type="text" name="txtEmpresa" size="48" value="<?php echo $mRow['empresa']; ?>" />
               </td>
            </tr>            
            <tr>
               <td>Ciudad</td>
               <td>
                  <input type="text" name="txtCiudad" size="48" value="<?php echo $mRow['ciudad']; ?>" />
               </td>
            </tr>
            <tr>
               <td>Codigo Postal</td>
               <td>
                  <input type="text" name="txtCP" size="48" value="<?php echo $mRow['cp']; ?>" />
               </td>
            </tr>            
            <tr>
               <td>Email</td>
               <td>
                  <input type="text" name="txtEmail" size="48" value="<?php echo $mRow['email']; ?>" />
               </td>
            </tr>
			<tr>
               <td>Calle y Numero</td>
               <td>
                  <input type="text" name="calle" size="48" value="<?php echo $mRow['calle']; ?>" />
               </td>
			   <tr>
               <td>Telefono con Clave Lada</td>
               <td>
                  <input type="text" name="tel" size="48" value="<?php echo $mRow['tel']; ?>" />
               </td>
			   <tr>
               <td>Celular o Nextel</td>
               <td>
                  <input type="text" name="nex" size="48" value="<?php echo $mRow['nex']; ?>" />
               </td>
          </table>
         

      <form method="GET" name="frmusuarios">
           <input type="hidden" name="Id_registro" value="<?=$mId_registro ?>" />
         <center>
            <h1>
               Esta seguro de querer borrar definitivamente este Registro?
            </h1>
            <input type="button" value="Aceptar" name="btnaceptar" onclick="direccionar('Borrar.php');" />
            <input type="button" value="Cancelar" name="btncancelar" onclick="direccionar('Consultar.php');" />
         </center>
      </form>
         
      <?php
         }
         else{
            echo "<center><h1>No se encontro ningun Cliente con el numero de Registro dado $mId_registro</h1></center>";
         }
         mysql_close($mCon);
      ?>
   </body>
</html>