<?php
include_once('../../../php/sessionStart.php');
include_once('../../../php/db/dbExec.php');
include_once('../../../php/functions.php');
include_once('../../../php/timezone.php');
include_once('../../../php/privileges.php');
include_once('../../../php/maxExecTime.php');

$bitForm = "cxc4030";
$bitMod = "cxc";
$empCod = $_SESSION['empCod'];
$usuCod = utf8_decode($_SESSION['usuCod']);
$usuNom = utf8_decode($_SESSION['usuNom']);

switch ($_POST['action']) {

	case 'consultarCliencc':
		echo consultarCliencc();
		break;


}


function consultarCliencc() {
	global $empCod;
	$txtCod=utf8_decode($_POST['txtCod']);

	# QUERYS
	$sCliencc = "SELECT *, TRIM(cli_nom) AS cli_nom FROM cliencc WHERE cli_emp='$empCod' AND cli_cod='$txtCod'";

	# EJECUCION DE QUERYS
	$db = new dbExec();
	$resp = $db->sEx($sCliencc, "cliencc");
	$db->close();

	$func = new functions();

	return $func->jsonEncodeArray($resp, "cliencc");
}


?>