function upload() { if ($("#blob").val()) { swal({ title: "'.tr('Avviare la procedura?').'", type: "warning", showCancelButton: true, confirmButtonText: "'.tr('Sì').'" }).then(function (result) { $("#upload").ajaxSubmit({ url: globals.rootdir + "/actions.php", data: { op: "save", id_module: "'.$id_module.'", id_plugin: "'.$id_plugin.'", }, type: "post", success: function(data){ data = JSON.parse(data); if (!data.already) { launch_modal("'.tr('Righe fattura').'", globals.rootdir + "/actions.php?id_module=" + globals.id_module + "&id_plugin=" + '.$id_plugin.' + "&op=list&id=" + data.id + "&filename=" + data.filename + "&id_segment=" + data.id_segment); } else { swal({ title: "'.tr('Fattura già importata!').'", type: "info", }) } }, error: function(data) { alert("'.tr('Errore').': " + data); } }); }) } else { swal({ title: "'.tr('Selezionare un file!').'", type: "error", }) } }

'.tr('Carica un XML').'

{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module='.$id_module.' ORDER BY name", "value": "'.$_SESSION['module_'.$id_module]['id_segment'].'" ]}
';