function jsaListadoDeEventos($generadoEn, $programado)
{
    $xPRG = new cAlertasDelSistema();
    $cnt = "";
    $xSel = new cHSelect();
    $xRuls = new cReglaDeNegocio();
    if ($generadoEn == SYS_ALERTA_POR_EVENTO) {
        $xProg = new cAlertasDelSistema();
        $xSel->addOptions($xRuls->getEventos());
        $cnt = $xSel->get("idprogramacion", "TR.Evento Marcado");
    } else {
        $xTxtA = new cHTextArea();
        $xFld = new cHFieldset("TR.Programacion");
        if ($programado == "") {
            //$xFld->addHElem(  );
        } else {
            //$xFld->addHElem(  );
        }
        $xFld->addHElem($xTxtA->get("idprogramacion", "", "TR.programacion"));
        $cnt .= $xFld->get();
    }
    return $cnt;
}
$jxc = new TinyAjax();
$jxc->exportFunction('jsaGuardarReestructura', array('idsolicitud', 'idmonto', 'idpagos', 'idperiocidad', 'idtasa', 'idobservaciones', 'idpdto', 'idtipopago'), "#resultados");
$jxc->process();
echo $xHP->getHeader();
//$xHP->setTamannio(500,800);
$jsb = new jsBasicForm("frmrenegociar");
echo $xHP->setBodyinit();
echo "<input type='hidden' id='idsolicitud' value='{$credito}'>";
$xCred = new cCredito($credito);
$xCred->init();
$oBtn = new cHButton();
$oTxt = new cHText();
$oFech = new cHDate();
$oSel = new cSelect("");
$oUL = new cHUl();
$oTa = new cHTextArea();
$xCE = new cCreditos_estatus();
$xSelEA = $xCE->query()->html()->select($xCE->descripcion_estatus()->get());
$xCP = new cCreditos_periocidadpagos();
$xSelCP = $xCP->query()->html()->select($xCP->descripcion_periocidadpagos()->get());
$xCTP = new cCreditos_tipo_de_pago();
$xSelTP = $xCTP->query()->html()->select($xCTP->descripcion()->get());
$xPP = new cCreditos_tipoconvenio();
$xSelPP = $xPP->query()->html()->select($xPP->descripcion_tipoconvenio()->get());
$oFRM = new cHForm("frmrenegociar", "", "idfrmrenegociar");
$oFRM->addHElem($xSelPP->get("idpdto", "Producto Actual", $xCred->getClaveDeProducto()));
$oFRM->addHElem($xSelCP->get("idperiocidad", "Nueva Periocidad", $xCred->getPeriocidadDePago()));
$oFRM->addHElem($xSelTP->get("idtipopago", "Nuevo Tipo de Pago", $xCred->getTipoDePago()));
$oFRM->addHElem($oTxt->getDeMoneda("idmonto", "Monto a Renegociar", $xCred->getSaldoActual()));
$oFRM->addHElem($oTxt->getDeMoneda("idpagos", "Pagos nuevos", $xCred->getPagosAutorizados()));
$oFRM->addHElem($oTxt->getDeMoneda("idtasa", "Tasa Nueva", $xCred->getTasaDeInteres() * 100));
$xFRM = new cHForm("frm_alertas", "./");
$xBtn = new cHButton();
$xTxt = new cHText();
$xDate = new cHDate();
$xSel = new cHSelect();
$jsb->setNameForm($xFRM->getName());
$selcat = $xSel->getCatalogoDeRiesgos();
$selcat->addEvent("onblur", "jsGetListadoAvisos()");
$selcat->addEvent("onchange", "jsGetListadoAvisos()");
$selcat->addEspOption(SYS_TODAS);
$selcat->setOptionSelect(SYS_TODAS);
$xFRM->addHElem($xDate->get($xFRM->lang("fecha inicial"), false, 1));
$xFRM->addHElem($xDate->get($xFRM->lang("fecha final"), false, 2));
$xFRM->addHElem($selcat->get($xFRM->lang(array("tipo de", "Riesgo")), true));
$xFRM->addSubmit("", "jsGetListadoAvisos()");
$xta = new cHTextArea();
$xFRM9 = new cHForm("frmupdateriesgo");
$xFRM9->addHElem("<div id='tx1'>" . $xta->get("iddetalles", "", "TR.Notas") . "</div>");
//$xFRM9->addObservaciones();
$xFRM9->addSubmit("", "jsGuardarDescarto()", "jsCancelarAccion()");
$xFRM->addHTML("<div class='inv' id='iduriesgo'>" . $xFRM9->get() . "</div>");
//$xFRM->addCreditBasico();
$xFRM->addHTML("<div id='lstalertas'></div>");
$xFRM->addHTML("<input type='hidden' id='idriesgo' />");
$xFRM->addAviso("", "idmsg");
echo $xFRM->get();
echo $xHP->setBodyEnd();
$jsb->show();
$jxc->drawJavaScript(false, true);
?>
<!-- HTML content -->
}
$_SESSION["current_file"] = addslashes($theFile);
//=====================================================================================================
$xHP = new cHPage("", HP_FORM);
$DDATA = $_REQUEST;
//$jxc = new TinyAjax();
//$jxc ->exportFunction('datos_del_pago', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
//$jxc ->process();
echo $xHP->getHeader();
$jsb = new jsBasicForm("frmjson");
//$jxc ->drawJavaScript(false, true);
echo $xHP->setBodyinit();
$xFRM = new cHForm("frmjson", "../install/update.json.php");
$xBtn = new cHButton();
$xTxt = new cHText();
$xArea = new cHTextArea("idjson", "idjson", "Texto JSON a Exportar");
$xFRM->addHElem($xArea->get());
$xFRM->addHElem($xBtn->getBasic("Enviar", "jsSubmit()", "guardar"));
echo $xFRM->get();
echo $xHP->setBodyEnd();
$jsb->show();
?>
<style>
<!--

-->
#idjson {
	width: 99%;
	height: 400px;
}
</style>
    $xAml->setGuardarDocumentoValidado($documento, AML_KYC_DOCTO_NO_VERIFICADO, $observaciones);
    return $xAml->getMessages(OUT_HTML);
}
$jxc->exportFunction('jsaMarcarFalso', array('iddocumento', 'idobservaciones', 'idpersona'), '#idmsg');
$jxc->exportFunction('jsaMarcarReal', array('iddocumento', 'idobservaciones', 'idpersona'), '#idmsg');
$jxc->exportFunction('jsaMarcarSinInfo', array('iddocumento', 'idobservaciones', 'idpersona'), '#idmsg');
$jxc->process();
$xHP->setTitle($xHP->lang("validacion de", "documentos"));
echo $xHP->getHeader();
$jsb = new jsBasicForm("");
//$jxc ->drawJavaScript(false, true);
echo $xHP->setBodyinit();
$xFRM = new cHForm("frmvalidardocumentos", "./");
$xBtn = new cHButton();
$xTxt = new cHText();
$xAt = new cHTextArea();
$xFRM->setTitle($xHP->getTitle());
$sql = "SELECT\r\n\t`personas_documentacion`.`clave_de_control`,\r\n\t`personas_documentacion`.`clave_de_persona`,\r\n\t`socios`.`nombre`,\r\n\t`personas_documentacion`.`fecha_de_carga`,\r\n\t`personas_documentacion_tipos`.`nombre_del_documento`,\r\n\t`personas_documentacion`.`observaciones`,\r\n\t`personas_documentacion`.`estado_en_sistema`,\r\n\t`personas_documentacion`.`tipo_de_documento`  \r\nFROM\r\n\t`personas_documentacion` `personas_documentacion` \r\n\t\tINNER JOIN `socios` `socios` \r\n\t\tON `personas_documentacion`.`clave_de_persona` = `socios`.`codigo` \r\n\t\t\tINNER JOIN `personas_documentacion_tipos` \r\n\t\t\t`personas_documentacion_tipos` \r\n\t\t\tON `personas_documentacion`.`tipo_de_documento` = \r\n\t\t\t`personas_documentacion_tipos`.`clave_de_control` \r\nWHERE\r\n\t(`personas_documentacion`.`estado_en_sistema` =1)";
$ql = new cPersonas_documentacion();
$tdocto = new cPersonas_documentacion_tipos();
$sel = $ql->query()->select();
$sel->set($sql);
$data = $sel->exec();
foreach ($data as $rows) {
    $ql->setData($rows);
    $socio = $ql->clave_de_persona()->v();
    $tipo = $ql->tipo_de_documento()->v();
    $tdocto->setData($tdocto->query()->initByID($tipo));
    $id = $ql->clave_de_control()->v();
    //var_dump($rows);
    $str = "<div class='tx1'>";
    if ($xAml->init() == true) {
        $nivelcargado = $xAml->setAnalizarNivelDeRiesgo();
        $notas = $xAml->getMessages();
    }
}
//$jxc = new TinyAjax();
//$jxc ->exportFunction('datos_del_pago', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
//$jxc ->process();
$xHP->init();
//$jxc ->drawJavaScript(false, true);
$xFRM = new cHForm("frmriesgo", "registro_persona_riesgosa.frm.php?action=" . MQL_ADD);
$xBtn = new cHButton();
$xTxt = new cHText();
$xSel = new cHSelect();
$xFec = new cHDate();
$xTa = new cHTextArea();
if ($action == SYS_NINGUNO) {
    $xUsers = $xSel->getUsuarios("idusuarioreportado");
    $xFRM->setTitle($xHP->getTitle());
    $xFRM->addPersonaBasico("", false, $persona);
    $xFRM->addJsBasico(iDE_AML);
    $xFRM->ODate("idfechaevento", false, "TR.Fecha de Evento");
    $xFRM->addHElem($xSel->getListaDeNivelDeRiesgo("", $nivelcargado)->get("TR.Nivel de Riesgo", true));
    $xFRM->addHElem($xTa->get("idmensaje", $notas, "TR.Razones por la cual se cambia el Nivel de riesgo"));
    $xFRM->addSubmit();
} else {
    if (setNoMenorQueCero($persona) > 0) {
        $fecha = parametro("idfechaevento", false, MQL_DATE);
        $mensaje = parametro("idmensaje");
        $nivel = parametro("idnivelderiesgo", 0, MQL_INT);
        $xSoc = new cSocio($persona);
 function OTextArea($id, $valor, $titulo, $add = true)
 {
     $xTxt = new cHTextArea();
     if ($add == true) {
         $this->addHElem($xTxt->get($id, $valor, $titulo));
     }
     return $xTxt;
 }
$xHP->setTitle($xHP->lang("REPORTAR", "CONDUCTA_INADECUADA"));
$DDATA = $_REQUEST;
$action = isset($DDATA["action"]) ? $DDATA["action"] : SYS_NINGUNO;
//$jxc = new TinyAjax();
//$jxc ->exportFunction('datos_del_pago', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
//$jxc ->process();
echo $xHP->getHeader();
$jsb = new jsBasicForm("");
//$jxc ->drawJavaScript(false, true);
echo $xHP->setBodyinit();
$xFRM = new cHForm("frmreporteempleado", "reportar_empleado.frm.php?action=" . SYS_UNO);
$xBtn = new cHButton();
$xTxt = new cHText();
$xSel = new cHSelect();
$xFec = new cHDate();
$xTa = new cHTextArea();
if ($action == SYS_NINGUNO) {
    $xUsers = $xSel->getUsuarios("idusuarioreportado");
    $xMot = $xSel->getListaDeRiesgosAML("", AML_CLAVE_OPERACIONES_INTERNAS);
    $xFRM->setTitle($xHP->getTitle());
    $xFRM->ODate("fecha_de_evento", false, "TR.Fecha de Suceso");
    $xFRM->addHElem($xUsers->get($xHP->lang("usuario", "reportado"), true));
    $xFRM->addHElem($xMot->get($xHP->lang("motivos"), true));
    $xFRM->addPersonaBasico("", false, false, "", "TR.Persona Relacionada");
    $xFRM->addHElem($xTxt->get("iddocumento", DEFAULT_CREDITO, $xHP->lang("documento", "relacionado")));
    $xFRM->addHElem($xSel->getListaDeObjetosEnSistema()->get(true));
    $xFRM->addHElem($xTa->get("idmensaje", "", $xHP->lang("mensaje")));
    //$xFRM->addCreditBasico();
    $xFRM->addSubmit();
} else {
    //LOS REPORTES DIRECTOS SI SE NOTIFICAN AL OFICIAL