<?php //session_start();
require('cfg/res.php');
require('../_lib/select.php');
$sql_enti='select *from enti0 where enti_codigo="'.$_SESSION['user_vcrx_id'].'"';

$res_enti=mysql_query($sql_enti,$link_vcrx);

	$n1='';
	$n2='';
	$a1='';
	$a2='';
	$fn='';
	$nik='';
	$c1='';
	$c2='';
	$c3='';
	$c4='';
	$cn='';
	$e1='';
	$t1='';
	$t2='';
	$ref='';
	$pai='';
	$ciu='';
	$cod='';
	$struc='';
	$razsoc='';
	$nomcom='';
	

if(mysql_num_rows($res_enti)!=0){
	$razsoc=mysql_result($res_enti,0,'enti_razsoc');
	$nomcom=mysql_result($res_enti,0,'enti_nomcom');
	$n1=mysql_result($res_enti,0,'enti_nom1');
	$n2=mysql_result($res_enti,0,'enti_nom2');
	$a1=mysql_result($res_enti,0,'enti_ape1');
	$a2=mysql_result($res_enti,0,'enti_ape2');
	$c1=mysql_result($res_enti,0,'enti_calle1');
	$c2=mysql_result($res_enti,0,'enti_calle2');
	$c3=mysql_result($res_enti,0,'enti_calle3');
	$cn=mysql_result($res_enti,0,'enti_callen');
	$e1=mysql_result($res_enti,0,'enti_email');
	$t1=mysql_result($res_enti,0,'enti_telefono');
	$fn=mysql_result($res_enti,0,'enti_fechanac');
	$sexo=mysql_result($res_enti,0,'enti_sexo');
	$pai=mysql_result($res_enti,0,'enti_pais');
	$pas=mysql_result($res_enti,0,'enti_pasaporte');
	$struc=mysql_result($res_enti,0,'enti_struc');
	$nik=mysql_result($res_enti,0,'enti_nickname');
	$ciu=mysql_result($res_enti,0,'enti_cdad');
	$cod=mysql_result($res_enti,0,'enti_codigo');
	
	

	//$t2=mysql_result($res_enti,0,'enti_');
	
}


?>
<div class="c2">DATOS PERSONALES</div>
<div>

	<div class="dper_lbl">CI/RUC</div>
    <div><input type="text" id="ci" class="dper_txt" disabled="disabled" style="background:#FFF;" value="<?php echo $_SESSION['user_vcrx_id'];?>" /></div>
	<div  class="dper_err"></div>
    
	<div class="dper_lbl">RAZON SOCIAL</div>
    <div><input type="text" id="razoc" class="dper_txt"  maxlength="20" value="<?php echo $razsoc;?>" /></div>
	<div id="dper_err_razoc" class="dper_err"></div>

	<div class="dper_lbl">NOMBRE COMERCIAL</div>
    <div><input type="text" id="nomcom" class="dper_txt"  maxlength="20" value="<?php echo $nomcom;?>" /></div>
	<div id="dper_err_nomcom" class="dper_err"></div>

	<div class="dper_lbl">PRIMER NOMBRE *(requerido)</div>
    <div><input type="text" id="n1" class="dper_txt" maxlength="20" value="<?php echo $n1;?>" /></div>
	<div id="dper_err_n1" class="dper_err"></div>

	<div class="dper_lbl">SEGUNDO NOMBRE</div>
    <div><input type="text" id="n2" class="dper_txt" maxlength="20" value="<?php echo $n2;?>" /></div>
	<div id="dper_err_n2" class="dper_err"></div>

	<div class="dper_lbl">APE. PATERNO *(requerido)</div>
    <div><input type="text" id="a1" class="dper_txt" maxlength="20" value="<?php echo $a1;?>" /></div>
	<div id="dper_err_a1" class="dper_err"></div>

	<div class="dper_lbl">APE. MATERNO</div>
    <div><input type="text" id="a2" class="dper_txt"  maxlength="20" value="<?php echo $a2;?>" /></div>
	<div id="dper_err_a2" class="dper_err"></div>  

<!--
	<div class="dper_lbl">CALLE 1 /CDLA. /EDIF. *(requerido)</div>
    <div><input type="text" id="c1" class="dper_txt" maxlength="20" value="<?php //echo $c1;?>"   /></div>
    <div id="dper_err_c1" class="dper_err"></div>

	<div class="dper_lbl">CALLE 2 /MZ /PISO </div>
    <div><input type="text" id="c2" class="dper_txt" maxlength="20" value="<?php //echo $c2;?>"   /></div>
    <div id="dper_err_c2" class="dper_err"></div>

	<div class="dper_lbl">NUM. /VILLA /DPTO</div>
    <div><input type="text" id="cn" class="dper_txt" maxlength="20" value="<?php //echo $cn;?>"   /></div>
    <div id="dper_err_cn" class="dper_err"></div>

	<div class="dper_lbl">REFERENCIA(casa):</div>
    <div><input type="text" id="c3" class="dper_txt" maxlength="20" value="<?php //echo $c3;?>"   /></div>
    <div id="dper_err_c3" class="dper_err"></div>

	<div class="dper_lbl">EMAIL *(requerido)</div>
    <div><input type="text" id="e1" class="dper_txt" maxlength="45"  value="<?php echo $e1;?>"  /></div>
    <div id="dper_err_e1" class="dper_err"></div>

	<div class="dper_lbl">TEL. CONVENCIONAL *(requerido)</div>
    <div><input type="text" id="t1" class="dper_txt" maxlength="20"  value="<?php echo $t1;?>"  /></div>
    <div id="dper_err_t1" class="dper_err"></div>      
-->      
	<div class="dper_lbl">STATUS RUC</div>
    <div >
		<select id="statusr" class="dper_txt">
        	<option value="-" <?php if($struc!='A' && $struc!='S'){ echo 'selected="selected"';} ?> >N/A</option>
            <option value="A" <?php if($struc=='A'){ echo 'selected="selected"';} ?> >Activo</option>
            <option value="S" <?php if($struc=='S'){ echo 'selected="selected"';} ?> >Suspendido</option>
        </select>    
    </div>
	<div class="dper_err"></div>

	<div class="dper_lbl">FECHA NAC*. (aaaa-mm-dd):</div>
    <div><input type="date" id="fn" class="dper_txt" maxlength="10" value="<?php echo $fn;?>"/></div>
	<div id="dper_err_fn" class="dper_err"></div>
    
	<div class="dper_lbl">SEXO</div>
    <div >
    	<select id="sexo" class="dper_txt">
        	<option value="1" <?php if($sexo=='1'){ echo 'selected="selected"';} ?> >Hombre</option>
            <option value="0" <?php if($sexo=='0'){ echo 'selected="selected"';} ?> >Mujer</option>
        </select>
    </div>
	<div class="dper_err"></div>
    
	<div class="dper_lbl">PAIS</div>
    <div>
    <?php $pais=new select();?>
    <select id="pais" name="pais"  class="dper_txt">
        <?php $pais->select_simple('cfg/res.php',$pai,'select pais_codigo,pais_descri from pais0 order by pais_tipo');?>
    </select>
    </div>
	<div class="dper_err"></div>
<!--    
    <div class="dper_lbl">CIUDAD</div>
    <div>
    <?php //$cdad=new select();?>
    <select id="ciudad" name="ciudad"  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 class="dper_err"></div>
-->
	<div class="dper_lbl">PASAPORTE</div>
    <div><input type="text" id="pasaporte" class="dper_txt"  maxlength="20" value="<?php echo $pas;?>" /></div>
	<div id="dper_err_pasaporte" class="dper_err"></div>

	<div class="dper_lbl">ALIAS/ NICK</div>
    <div><input type="text" id="nick" class="dper_txt"  maxlength="20" value="<?php echo $nick;?>" /></div>
	<div id="dper_err" class="dper_err"></div>
	<div><input type="button" value="Guardar" onclick="_dperm();" id="dper_btn" /></div>
	
</div>