{
    $xForma = new cFormato();
}
//$jxc ->exportFunction('jsAgregarContrato', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
$jxc->process();
//ini_set("display_errors", "on");
$xHP->init("initComponents()");
if ($action == SYS_NINGUNO) {
    $xFRM->addHElem($xFMT->getSelectDeFormatos()->get(true));
    $xFRM->addSubmit();
} elseif ($action == SYS_UNO) {
    //editar
    $xFMT->init($idcontrato);
    $titulo = $xFMT->getTitulo();
    $xFRM->setTitle($titulo);
    $xFRM->addHElem($xFMT->getSelectVariables("", "onchange=\"jsAddText()\" "));
    $xFRM->addSubmit("", "", "");
    $text_default = $xFMT->get();
    $xFRM->addHTML("<textarea class=\"ckeditor\" name=\"ckeditor\" id=\"ckeditor\" rows=\"20\" cols=\"15\">{$text_default}</textarea>");
    $xFRM->addFootElement("<input type='hidden' value='{$idcontrato}' name='idcontrato' />");
    $xFRM->setAction("frmeditor_contratos.php?action=2");
} elseif ($action == SYS_DOS) {
    //guardar
    $s = isset($_REQUEST["ckeditor"]) ? $_REQUEST["ckeditor"] : "";
    $i = parametro("idcontrato");
    $text_default = stripslashes($s);
    if ($s != "" && $i != "") {
        $sqluc = "UPDATE general_contratos SET texto_del_contrato='{$s}' WHERE idgeneral_contratos={$i}";
        $x = my_query($sqluc);
        if ($x[SYS_ESTADO] != false) {
            //$xFRM->addSubmit("", "", "");echo $text_default;