function generateContent($cell, $args)
 {
     /*			sprintf("<a href='$cell'%s>%s</a>", 
     				!empty($args["target"]) ? " target='".$args["target"]."'" : "",
     				!empty($args["display"]) ? $args["display"] : $cell
     				)**/
     $ret = $cell;
     if (function_exists("setLog")) {
         //setLog("Celda es $cell");
     }
     if ($args["mode"] == "edit" || $args["mode"] == "insert") {
         if (class_exists("MQL")) {
             $mql = new MQL();
             if (isset($args["sql"])) {
                 $opts = "";
                 $qry = $mql->getRecordset($args["sql"]);
                 $rs = $qry->fetch_array(MYSQLI_NUM);
                 /*$result = $mysqli->query($query);
                 		$row = $result->fetch_array(MYSQLI_NUM);
                 		printf ("%s (%s)\n", $row[0], $row[1]);*/
                 //getDataRecord($args["sql"]);
                 //setLog($args["sql"]);
                 foreach ($rs as $row) {
                     $opts .= "<option value=\"" . $row[0] . "\">" . $row[1] . "</option>";
                 }
                 if ($opts != "") {
                     $ret = sprintf("<select>{$opts}</select>");
                 }
             }
         }
     }
     return $ret;
 }
if ($ByAMaterno != "" and $ByAPaterno != "") {
    $ByAPaterno = "AND ( (apellidopaterno SOUNDS LIKE '%{$apaterno}%' OR apellidopaterno LIKE '%{$apaterno}%') OR (apellidomaterno SOUNDS LIKE '%{$amaterno}%' OR apellidomaterno LIKE '%{$amaterno}%') ) ";
    $ByAMaterno = "";
}
$sql = "SELECT\n\t\t`socios_general`.`codigo`          AS `codigo`,\n\t\t`socios_general`.`apellidopaterno` AS `primerapellido`,\n\t\t`socios_general`.`apellidomaterno` AS `segundoapellido`,\n\t\t`socios_general`.`nombrecompleto`  AS `nombres`,\n\t\t`socios_general`.`curp`,\n\t\t'soundlike' AS 'tipo'\n\tFROM\n\t\t`socios_general`\n\tWHERE\n\t\tcodigo != " . DEFAULT_SOCIO . " AND (`tipoingreso`= " . TIPO_INGRESO_SDN . " OR `nivel_de_riesgo_aml` = 100)\n\t\t{$ByNombre} {$ByAPaterno} {$ByAMaterno} {$OrderBy} LIMIT 0,10";
if ($UseJW == true) {
    $sql .= " UNION SELECT\n\t\t`socios_general`.`codigo`          AS `codigo`,\n\t\t`socios_general`.`apellidopaterno` AS `primerapellido`,\n\t\t`socios_general`.`apellidomaterno` AS `segundoapellido`,\n\t\t`socios_general`.`nombrecompleto`  AS `nombres`,\n\t\t`socios_general`.`curp`,\n\t\t'jarowinkler' AS 'tipo'\n\tFROM\n\t\t`socios_general`\n\tWHERE\n\t\tcodigo != " . DEFAULT_SOCIO . " AND (`tipoingreso`= " . TIPO_INGRESO_SDN . " OR `nivel_de_riesgo_aml` = 100)\n\t\t\t{$ByJWNombre}  {$ByJWAPaterno} {$ByJWAMaterno} {$OrderBy}\n\t\t\tLIMIT 0,10";
}
if ($UseMeta == true) {
    $sql .= " UNION SELECT\n\t\t`socios_general`.`codigo`          AS `codigo`,\n\t\t`socios_general`.`apellidopaterno` AS `primerapellido`,\n\t\t`socios_general`.`apellidomaterno` AS `segundoapellido`,\n\t\t`socios_general`.`nombrecompleto`  AS `nombres`,\n\t\t`socios_general`.`curp`,\n\t\t'metaphone' AS 'tipo'\n\tFROM\n\t\t`socios_general`\n\tWHERE\n\t\tcodigo != " . DEFAULT_SOCIO . "\n\t\tAND (`tipoingreso`= " . TIPO_INGRESO_SDN . "\tOR `nivel_de_riesgo_aml` = 100)\n\t\t\t{$ByMNombre} {$ByMAPaterno} {$ByMAMaterno} {$OrderBy} LIMIT 0,10\n\t\t\t";
}
//exit($sql);
header('Content-type: application/json');
$json = array();
$mql = new MQL();
$rs = $mql->getRecordset($sql);
$idx = 0;
$xLng = new cLang();
if ($rs) {
    while ($row = $rs->fetch_assoc()) {
        foreach ($row as $campo => $valor) {
            if (is_string($valor)) {
                $valor = htmlentities($valor);
                //htmlentities( (string) $valor, ENT_QUOTES, 'utf-8', FALSE);
            }
            $json["record_{$idx}"][$campo] = $valor;
            //base64_encode($valor);//utf8_encode($valor);
        }
        $idx++;
        //Generar el Acuse
        if ($getPDF == true) {
 function getJsonSelect()
 {
     $json = array();
     $mql = new MQL();
     $rs = $mql->getRecordset($this->mSQL);
     $idx = 0;
     if ($rs) {
         while ($row = $rs->fetch_assoc()) {
             foreach ($row as $campo => $valor) {
                 if (is_string($valor)) {
                     $valor = htmlentities($valor);
                     //htmlentities( (string) $valor, ENT_QUOTES, 'utf-8', FALSE);
                 }
                 $json["record_{$idx}"][$campo] = $valor;
                 //base64_encode($valor);//utf8_encode($valor);
             }
             $idx++;
         }
     } else {
         $json = $json["error"] = $mql->getMessages(OUT_TXT);
     }
     return json_encode($json);
 }