<input type="hidden" id="adrs_ci" value="<?php echo $_POST['ci'];?>" />
<input type="hidden" id="adrs_nom" value="<?php echo $_POST['nom'];?>" />
<?php
if(isset($_POST['ci']) || !empty($_POST['ci']))
{
	$ci=$_POST['ci'];
}
if(isset($_GET['ci']) || !empty($_GET['ci']))
{
	$ci=$_POST['ci'];
}

?>
<div align="center">
	<div style="border: #000 solid 2px; border-radius:5px; width:95%; padding:5px;  ">
		<div style="background: #EEE; font-size:16px; font-weight:bolder; color:#000;"><?php echo $ci.' - '.$_POST['nom'] ?></div>
        <div>
        	
            

			<?php
				require('../cfg/res.php');
				require('../../_lib/select.php');
				$sql_adrs='select *from adrs00 where adrs_enti="'.$ci.'" and adrs_status!="X"';
				//echo $sql_adrs;
				$res_adrs=mysql_query($sql_adrs,$link_vcrx);
			
			?>
            <table border="0" style="font-size:12px;border-collapse:collapse;">
			<tr valign="top" style="font-size:10px;" >
            	<th></th>
                <th>TEL.</th>
                <th>EXT.</th>
                <th>CONTACTO.</th>
                <th>CALLE 1 /CDLA. /EDIF.</th>
                <th>CALLE 2 /MZ /PISO</th>
                <th>NUM. /VILLA /DPTO</th>
                <th>REFERENCIA(casa):</th>
                <th>PROV /CIUDAD:</th>
                <th>EMAIL:</th>
            </tr>
            <tr>
            	<td><input type="image" width="20" src="http://vcrxol.com/_img/add_address.png" onclick="add_adr('<?php echo $_POST['ci'];?>');" /></td>
            	<td><input type="tel"    class="txt_adr" id="tel" maxlength="10"/></td>
                <td><input type="tel"    class="txt_adr" id="ext"  maxlength="5" /></td>
                <td><input type="tel"    class="txt_adr" id="contacto" maxlength="30"/></td>
            	<td><input  type="text"  class="txt_adr" id="c1"/></td>
            	<td><input  type="text"  class="txt_adr" id="c2"/></td>
            	<td><input  type="text"  class="txt_adr" id="cn"/></td>
            	<td><input  type="text"  class="txt_adr" id="c3"/></td>
            	<td>
				<?php $ciudad=new select();?>
        		<select id="ciudad" name="ciudad" class="txt_adr"   style="font-size:10px;border: #535353 solid 1px;">
        		<?php $ciudad->select_simple('../cfg/res.php',$ciu,'select cdad_codigo,concat(prvc_descri," /",cdad_descri)as cdad_descri from cdad00');?>
        		</select>
        		</td>
            	<td><input  type="email"  class="txt_adr" id="email"/></td>
            </tr>
           
            <tr valign="top" style="font-size:10px; border-bottom:solid 2px #000000; " >
            	<td><div style="height:5px;"></div></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>

            
            <?php while($r_adrs=mysql_fetch_assoc($res_adrs)){?>
			
			<tr valign="top" id="<?php echo $r_adrs['adrs_codigo'];?>" >
   				<td><input type="image" src="http://vcrxol.com/_img/x.png" width="20" onclick="delete_adr('<?php echo $r_adrs['adrs_codigo'];?>','<?php echo $r_adrs['adrs_enti'];?>');"  /></td>
                <td><?php echo $r_adrs['adrs_tlfn'];?></td>
                <td><?php echo $r_adrs['adrs_ext'];?></td>
                <td><?php echo $r_adrs['adrs_contacto'];?></td>
                <td><?php echo $r_adrs['adrs_calle1'];?></td>
                <td><?php echo $r_adrs['adrs_calle2'];?></td>
                <td><?php echo $r_adrs['adrs_calle3'];?></td>
                <td><?php echo $r_adrs['adrs_callen'];?></td>
                <td><?php echo $r_adrs['adrs_ciudad'].$r_adrs['cdad_descri'];?></td>
                <td><?php echo $r_adrs['adrs_email'];?></td>
            </tr>
			<?php }?>
            </table>
        </div>
    </div>
</div>
