<?php 
require('cfg/res.php');
require('../_lib/select.php');

?>
<div class="c2">DIRECCIONES</div>
<div style=" margin-bottom:35px;">

	<div class="dper_lbl">EMAIL</div>
    <div><input type="text" id="email" class="dper_txt"    /></div>
	<div  class="dper_err"></div>

	<div class="dper_lbl">CALLE1-CDLA-EDIF</div>
    <div><input type="text" id="calle1" class="dper_txt"    /></div>
	<div  class="dper_err"></div>

	<div class="dper_lbl">CALLE2-MZ-PISO</div>
    <div><input type="text" id="calle2" class="dper_txt"    /></div>
	<div  class="dper_err"></div>

	<div class="dper_lbl">NUM-VILLA-DPTO</div>
    <div><input type="text" id="callen" class="dper_txt"    /></div>
	<div  class="dper_err"></div>

	<div class="dper_lbl">REFERENCIA</div>
    <div><input type="text" id="calle3" class="dper_txt"    /></div>
	<div  class="dper_err"></div>

	<div class="dper_lbl">TELEFONO</div>
    <div><input type="text" id="tlfn" class="dper_txt"    /></div>
	<div  class="dper_err"></div>

	<div class="dper_lbl">EXT</div>
    <div><input type="text" id="ext" class="dper_txt"    /></div>
	<div  class="dper_err"></div>

	<div class="dper_lbl">CONTACTO</div>
    <div><input type="text" id="contacto" class="dper_txt"  style="text-transform:uppercase;"   /></div>
	<div  class="dper_err"></div>

    <div class="dper_lbl">CIUDAD</div>
    <div>
    <?php $cdad=new select();?>
    <select id="ciudad" name="cdad"  class="dper_txt">
        <?php $cdad->select_simple('cfg/res.php',$ciu,'select cdad_codigo,CONCAT(prvc_descri ,"/", cdad_descri) as ciudad from cdad00');?>
    </select>
    </div>
	<div id="dper_err" class="dper_err"></div>
	<div><input type="button" value="Guardar" onClick="_adrsm('0');" id="dper_btn" /></div>
</div>
<hr />
<div>
<?php
$adr_sql='select *from adrs00 where adrs_enti="'.$_SESSION['user_vcrx_id'].'" and adrs_status!="X"';
//echo $adr_sql;
$adr_res=mysql_query($adr_sql,$link_vcrx);
if(mysql_num_rows($adr_res)!=0){?>
	<div id="con_dir">
	
	<?php
	while($adr_r=mysql_fetch_assoc($adr_res)){?>
		
   		<div align="left"   style="height:45px;">
        <input  type="button" id="elegird_btn" onClick="if(confirm('Desea Eliminar direccion?')){_adrsm('<?php echo $adr_r['adrs_codigo'];?>','X');}" value="Eliminar esta Direccion"  style="height:45px; width:100%; background: #F00; color:#FFF; border:none; font-weight:bolder; font-size:16px; cursor:pointer;">
        </div>
	
		<div align="left" class="dper_lbl">EMAIL:</div>
		<div align="left" class="dper_txt" ><?php echo $adr_r['adrs_email'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">CALLE1-CDLA-EDIF:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['adrs_calle1'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">CALLE2-MZ-PISO:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['adrs_calle2'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">NUM.VILLA-DPTO:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['adrs_callen'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">REFERENCIA:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['adrs_calle3'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">TELEFONO:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['adrs_tlfn'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">EXT:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['adrs_ext'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">CIUDAD:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['prvc_descri'].'/'.$adr_r['cdad_descri'];?>&nbsp;</div>
	
	
		<div align="left" class="dper_lbl">CONTACTO:</div>
		<div align="left" class="dper_txt"><?php echo $adr_r['adrs_contacto'];?>&nbsp;</div>
	

		<div align="left"   style="height:45px;">
        <?php if($adr_r['adrs_defa']!='1'){?>
        	<input  type="button" id="elegird_btn" onClick="_adrsm('<?php echo $adr_r['adrs_codigo'];?>','-');" value="Establecer como Principal"  style="height:45px; width:100%; background:#09c; color:#FFF; border:none; font-weight:bolder; font-size:16px; cursor:pointer;">
        <?php } ?>
        </div>
		<hr />    
		
	

		<div style="height:45px;">&nbsp;</div>
    
<?php } ?>

    
	</div>

<?php } ?>

</div>
