<?php



require_once("../../config/Cado.php");

require_once("../cliente/cCliente.php");

$oCliente = new cCliente();



	$dts=$oCliente->mostrarUno($_POST['cli_id']);

	$dt = mysqli_fetch_array($dts);

	$tip=$dt['tb_cliente_tip'];

	$nom=$dt['tb_cliente_nom'];

	$doc=$dt['tb_cliente_doc'];

	$con=$dt['tb_cliente_con'];

	$tel=$dt['tb_cliente_tel'];

	$ema=$dt['tb_cliente_ema'];

	mysqli_free_result($dts);





if($_POST['action']=="editarcorreo"){

	

	$dts=$oCliente->filtrarcorreo_uno($_POST['cli_id']);

	$dt = mysqli_fetch_array($dts);

	$connom=$dt['tb_clientecorreo_nom'];

	$contel=$dt['tb_clientecorreo_tel'];

	$conema=$dt['tb_clientecorreo_ema'];

	mysqli_free_result($dts);

			

	

}

	

?>



<div class="modal-header">

	<h4 class="modal-title" id="titlemodal">CONTACTOS DEL CLIENTE </strong> <strong class="text-red" ><?php echo $nom;?></strong></h4> 

</div>



 <input name="action_con" id="action_con" type="hidden" value="<?php echo $_POST['action']; ?>">

 

<div class="row">

	<div class="col-lg-3 col-xs-6">

          <label for="txt_cli_emanom">Nombre:</label>      

		   <input name="txt_cli_emanom" id="txt_cli_emanom" type="text" value="<?php echo $connom?>" class="form-control">

		  

	</div>

	

	<div class="col-lg-3 col-xs-6">

          <label for="txt_cli_ematel">Telefono:</label>      

		   <input name="txt_cli_ematel" id="txt_cli_ematel" type="text" value="<?php echo $contel?>" class="form-control">

	</div>

	

	<div class="col-lg-3 col-xs-6">

          <label for="txt_cli_emacor">Correo:</label>      

		   <input name="txt_cli_emacor" id="txt_cli_emacor" type="text" value="<?php echo $conema?>" class="form-control">

		  

	</div>

</div>





<div class="modal-footer pull-right">	

<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Cancelar</button> 

	<button type="button" class="btn btn-primary pull-left" onclick="agregarcorreo('',<?php echo $_POST['cli_id']; ?>);" data-dismiss="modal">Guardar</button>

	

</div>





<script type="text/javascript">



	$('#txt_cli_emanom,#txt_cli_ematel,#txt_cli_emacor').change(function(){

		$(this).val($(this).val().toUpperCase());

	});

	



	$('#txt_cli_emanom').keydown(function(ev){

		if(ev.keyCode==13){			

			$('#txt_cli_ematel').focus();			

			return false;}		

	});

	

	$('#txt_cli_ematel').keydown(function(ev){

		if(ev.keyCode==13){			

			$('#txt_cli_emacor').focus();

			return false;}

	});

	

	$('#txt_cli_emacor').keydown(function(ev){

		if(ev.keyCode==13){			

			

			return false;}

	});



</script>