| Server IP : 54.36.91.62 / Your IP : 216.73.217.117 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/vesoul/media/com_acym/js/back/ |
Upload File : |
jQuery(function(e){const n=".acym__configuration__mail-settings",a="#acym__configuration__sml__form";function t(n,a){const t=e(`input[name="${a}[mailer_method]"]`);t.on("change",function(){e(`${n} .send_settings`).hide();const t=e(`input[name="${a}[mailer_method]"]:checked`).val(),c=e(`${n} #${t}_settings`);c.length>0&&c.show()}),t.trigger("change")}function c(n,a){let t=e(`#${n}`).val();t=acym_helper.parseJson(t);const c=e(".acym__sending__methods__choose .acym__selection__card-selected");if(0===c.length)return;const o=e(`[name="config[${a}]"]`),i=o.closest(".acym__configuration__mail__option").find(".acym__configuration__mail__info__disabled"),_=o.closest(".acym__configuration__mail__option").find("> .switch-label"),l=o.closest(".acym__configuration__mail__option").find(".switch-paddle");void 0===t[c.attr("data-acym-method")]||t[c.attr("data-acym-method")]?(o.next().removeAttr("disabled"),l.removeClass("disabled").removeAttr("data-acym-tooltip"),i.closest(".acym__tooltip__info").hide()):(1===parseInt(o.val())&&_.trigger("click"),l.addClass("disabled").attr("data-acym-tooltip",i.find(".acym__tooltip__text ").html()),o.next().attr("disabled","true"),i.closest(".acym__tooltip__info").show()),acym_helperTooltip.setTooltip()}function o(e){_(e,".acym__configuration__mail-settings"),l()}function i(e){_(e,"#acym__configuration__sml__form")}function _(e,n){const a=document.querySelector(`${n} #${e.id}_settings`);a&&a.scrollIntoView({behavior:"smooth",block:"center"})}function l(){c("acym__config__mail__embed__image__blocked","embed_images"),c("acym__config__mail__embed__attachment__blocked","embed_files")}e('[name="config[bounce_server]"]').off("input").on("input",function(){const n=e(this).val().toLowerCase(),a=["imap.gmail.com","outlook.office365.com"].includes(n);a?(e(".acym__bounce__classic__auth__params").hide(),e(".acym__bounce__oauth2__auth__params").show(),e('[name="config[bounce_port]"]').val(993),e('[name="config[bounce_connection]"]').val("imap"),e('[name="config[bounce_secured]"]').val("ssl"),e('[name="config[bounce_certif]"]').val(1),"outlook.office365.com"===n?e("#acym__oauth2_bounce_params__tenant").show():e("#acym__oauth2_bounce_params__tenant").hide()):(e(".acym__bounce__oauth2__auth__params").hide(),e(".acym__bounce__classic__auth__params").show())}).trigger("input"),t(),function(){const n=e(`${a} input[name^="config["]`);for(let e=0;e<n.length;e++)n[e].setAttribute("name",n[e].getAttribute("name").replace("config","sml"))}(),t(a,"sml"),function(){const n=e(".acym__configuration__sml__edit"),t=e("#acym__configuration__sml__cancel-edit"),c=e("#acym__configuration__sml__method__id"),o=acym_helper.parseJson(e("#acym__configuration__sml__methods").val()),i=e(a),_=e("#acym__configuration__sml__toggle");n.on("click",function(){_.hide(),i.show();const n=e(this).closest(".acym__configuration__sml__actions").attr("data-acym-method-id");c.val(n),t.show();const l=o[n],s=e(`[name="sml[mailer_method]"][value="${l.mailer_method}"]`).closest(".acym__sending__methods__one");s.find(".acym__selection__card").click();const r=e(`${a} input[name^="sml["]`);for(let e=0;e<r.length;e++){const n=r[e].name.replaceAll(/(sml\[)|\]/gi,"");"mailer_method"!==n&&(r[e].value=l[r[e].name.replaceAll(/(sml\[)|\]/gi,"")])}}),t.on("click",function(){c.val(""),e("#acym__configuration__sml__name").val(""),i.hide(),_.show()})}(),function(){const n=e(".acym__configuration__sml__delete"),a=e('[data-task="addNewSml"]'),t=e("#acym__configuration__sml__method__id");n.on("click",function(){const n=e(this).closest(".acym__configuration__sml__actions").attr("data-acym-method-id");t.val(n),a.attr("data-task","deleteSml"),a.click()})}(),function(){const n=e("#acym__configuration__sml__toggle"),t=e(a);n.on("click",function(){t.show(),n.hide()})}(),t(n,"config"),function(){const n=e("#available_ports");n.html('<i class="acymicon-circle-o-notch acymicon-spin"></i>'),acym_helper.post(ACYM_AJAX_URL,{ctrl:"configuration",task:"ports"}).then(e=>{const a=Object.values(e.data).map(e=>e.open?`<span style="color:#3dea91">${e.message}</span>`:(465===e.port&&jQuery(".acym_port_465_closed").removeClass("is-hidden"),`<span style="color:#ff5259">${e.message}</span>`));n.html(a.join("<br>"))})}(),e(".acym_autoselect").off("click").on("click",function(){this.select()}),e("#checkdb_button").off("click").on("click",function(n){n.preventDefault(),e("#checkdb_report").html('<i class="acymicon-circle-o-notch acymicon-spin"></i>'),e.get(ACYM_AJAX_URL+"&ctrl=configuration&task=checkDBAjax",function(n){e("#checkdb_report").html(n)})}),e("#scanfiles_button").off("click").on("click",function(n){n.preventDefault(),e("#scanfiles_report").html('<i class="acymicon-circle-o-notch acymicon-spin"></i>'),acym_helper.get(ACYM_AJAX_URL,{ctrl:"configuration",task:"scanSiteFiles"}).then(n=>{e("#scanfiles_report").html(n.message)})}),e('input[name="config[auto_bounce]"]').off("change").on("change",function(){e("#acym__configuration__bounce__auto_bounce__configuration").toggle()}),function(){let n=e("#acym__configuration__cron__report--send-to"),a=n.attr("placeholder");n.select2({width:"100%",placeholder:a,tags:!0,theme:"foundation",tokenSeparators:[","," "],createTag:function(n){let a=e.trim(n.term);return acym_helper.emailValid(a)?{id:a,text:a,newTag:!0}:null}})}(),e("#acym__configuration__button__license").off("click").on("click",function(){let n=e("#acym__configuration__license-key").val(),a=parseInt(e(this).attr("data-acym-linked"));if(""===n)return alert(ACYM_JS_TXT.ACYM_PLEASE_SET_A_LICENSE_KEY),!1;let t=a?"unlinkLicense":"attachLicense";e('[name="task"]').val(t),e.acymConfigSave(),e("#acym_form").submit()}),e("#acym__configuration__button__cron").off("click").on("click",function(){let n=parseInt(e(this).attr("data-acym-active")),a=n?"deactivateCron":"activateCron";e('[name="task"]').val(a),e("#acym_form").submit()}),function(){let n="";e("#configmultilingual_default").on("change",function(){let a=e(this).val(),t=e("#configmultilingual_languages");t.find('option[value="'+a+'"]').prop("disabled",!0).prop("selected",!1),t.find('option[value="'+n+'"]').prop("disabled",!1),t.select2({theme:"foundation",width:"100%"}),n=a}).trigger("change"),e.acymConfigSave=function(){e('[name="config[sender_info_translation]"]').length>0&&acym_helperSelectionMultilingual.changeLanguage_configuration(acym_helperSelectionMultilingual.mainLanguage),e('[name="config[unsub_survey_translation]"]').length>0&&acym_helperSelectionMultilingual.changeLanguage_configuration_subscription(acym_helperSelectionMultilingual.mainLanguage),e('input[id^="delayvar"]').trigger("change");let n=e("#configmultilingual_languages").val(),a=e('[name="previous_multilingual_languages"]').val();if(acym_helper.empty(a))return!0;a=a.split(",");let t=acym_helper.empty(n)?a:a.filter(e=>!n.includes(e));return!!acym_helper.empty(t)||(e.each(t,function(n){t[n]=e('#configmultilingual_default option[value="'+t[n]+'"]').text()}),!!acym_helper.confirm(acym_helper.sprintf(ACYM_JS_TXT.ACYM_REMOVE_LANG_CONFIRMATION,t.join(", "))))}}(),function(){let n=e("#acym__configuration__acl__zone");e("#acym__configuration__acl__toggle").off("click").on("click",function(){n.slideToggle()}).trigger("click")}(),acym_helperMailer.setTestCredentialsSendingMethods(),acym_helperMailer.setButtonCopyFromPlugin(),acym_helperMailer.setSynchroExistingUsers(),acym_helperSelectionPage.setSelectionElement(!0,!0,o,void 0,{prefix:n}),acym_helperSelectionPage.setSelectionElement(!0,!0,i,void 0,{prefix:a}),l(),acym_helperSelectionMultilingual.init("configuration"),acym_helperSelectionMultilingual.init("configuration_subscription"),e('[data-task="downloadExportChangesFile"]').on("click",function(){setTimeout(function(){e("#formSubmit")[0].disabled=!1,e('[name="task"]').val("")},5)}),function(){let n=e(".acym__allowed__hosts__select");n.select2({width:"100%",placeholder:n.attr("placeholder"),tags:!0,theme:"foundation",tokenSeparators:[" "],createTag:function(e){let n=jQuery.trim(e.term);return""===n?null:{id:n,text:n}}})}(),function(){const n=e(".acym__survey__answer__select");n.select2({width:"100%",placeholder:n.attr("placeholder"),tags:!0,theme:"foundation",tokenSeparators:[""]})}(),acym_helperMailer.acymailerAddDomains(),acym_helperMailer.displayCnameRecord(),acym_helperMailer.deleteDomain(),acym_helperMailer.domainSuggestion(),acym_helperMailer.updateStatus(),e("#acymailer_domain").on("keypress",function(n){"Enter"===n.key&&(n.preventDefault(),e("#acym__configuration__sending__method-addDomain").trigger("click"))}),jQuery("#acym__configuration__activate__acymailer").off("click").on("click",function(){jQuery('[data-tab-identifier="mail_settings"]').trigger("click"),jQuery("#acymailer").trigger("click")}),function(){const n=e('select[name^="config[acl_"]'),a={},t=e=>e.slice(4,-2);n.each(function(){a[t(e(this).attr("name"))]=e(this).val()}),n.on("change",function(){const n=t(e(this).attr("name"));let c=e(this).val();null===c&&(c=[]),0===c.length?c=["all"]:c.includes("all")&&(a[n].includes("all")?c.length>1&&(c=c.splice(c.indexOf("all")-1,1)):c=["all"]),e(this).val(c).trigger("change.select2"),a[n]=c})}(),jQuery('[name="config[embed_files]"]').off("change").on("change",function(){setTimeout(()=>{const e=jQuery("#attachments_position");"1"===jQuery(this).val()?e.css("display","none"):e.css("display","")},10)}),jQuery(".auto_sending_input").on("change",function(){const e=parseInt(jQuery('[name="config[queue_batch_auto]"]').val()),n=parseInt(jQuery('[name="config[queue_nbmail_auto]"]').val()),a=parseInt(jQuery('[name="config[cron_frequency]"]').val());let t=0===a?900:a;const c=t>600?600:t,o=parseInt(jQuery('[name="config[email_frequency]"]').val());let i=n;o>0&&(i=n*(o+1));let _=n;i>c&&(_=n*c/i);const l=_*e*3600/t;jQuery("#automatic_sending_speed_preview").html(parseInt(l)),jQuery("#automatic_sending_speed_no_wait").css("display",o>0&&i>c?"inline-block":"none"),jQuery("#automatic_sending_speed_too_much").css("display",0===o&&i>c?"inline-block":"none"),jQuery("#automatic_sending_speed_too_many_batches").css("display",e>5?"inline-block":"none")}).trigger("change"),function(){const n=e("#acym__mailbox__edition__configuration__test-loader"),a=e("#acym__mailbox__edition__configuration__test-result"),t=e("#acym__mailbox__edition__configuration__test-icon"),c=e("#acym__mailbox__edition__configuration__test-test"),o={"config[bounce_server]":"mailbox[server]","config[bounce_username]":"mailbox[username]","config[bounce_password]":"mailbox[password]","config[bounce_connection]":"mailbox[connection_method]","config[bounce_secured]":"mailbox[secure_method]","config[bounce_certif]":"mailbox[self_signed]","config[bounce_port]":"mailbox[port]"},i=Object.keys(o).map(e=>e);c.off("click").on("click",function(){n.css("display","flex"),a.empty(),t.hide().removeClass("acymicon-check-circle acym__color__green acymicon-times-circle acym__color__red"),a.removeAttr("data-acym-tooltip").removeClass("acym__tooltip");const c=e(this).closest("form").serializeArray(),_=(e=>e.filter(({name:e})=>i.includes(e)).map(({name:e,value:n})=>o[e]?{name:o[e],value:n}:{name:e,value:n}))(c).concat([{name:"mailbox[id]",value:"configuration"},{name:"ctrl",value:"bounces"},{name:"task",value:"testMailboxAction"}]);acym_helper.post(ACYM_AJAX_URL,_).then(({error:e,message:c,data:o})=>{n.hide(),a.html(c),e?(o.report&&o.report.length&&(a.attr("data-acym-tooltip",o.report.join("<br>")),acym_helperTooltip.setTooltip()),t.addClass("acymicon-times-circle acym__color__red")):t.addClass("acymicon-check-circle acym__color__green"),t.css("display","flex")})})}(),function(){const n=e("#bounceAddress1"),a=e("#bounceAddress2");n.on("input",function(){a.val(e(this).val())}),a.on("input",function(){n.val(e(this).val())})}(),function(){const n=e(".acym__multilingual__selection h4").eq(1);n.length&&n.addClass("xlarge-3 medium-5 small-9");let a=e(".acym__customs__answer__answer[data-response]").length;e("#acym__custom_answer__add-answer").off("click").on("click",function(){let n='<div class="grid-x cell acym__customs__answers acym__content acym_noshadow grid-margin-x margin-y">';n+='<input type="text" name="config[unsub_survey][]" class="cell medium-10 acym__customs__answer__answer" data-response="'+a+'" value="">',n+='<i class="cell acymicon-close small-1 acym__color__red cursor-pointer acym__custom__delete__value"></i>',n+="</div>",e(".acym__customs__answers__listing__sortable").append(n),a++}),e(".acym__customs__answers__listing__sortable").on("click",".acym__custom__delete__value",function(){const n=e(this).closest(".acym__customs__answers");let a=parseInt(n.find(".acym__customs__answer__answer").data("response"));n.remove();for(let e in acym_helperSelectionMultilingual.translation)acym_helperSelectionMultilingual.translation[e].unsub_survey.splice(a,1);e(".acym__customs__answers__listing__sortable .acym__customs__answers").each(function(n){e(this).find(".acym__customs__answer__answer").data("response",n)})})}(),function(){const n=e("#acym__config__settings__color-picker");"function"==typeof n.spectrum&&n.spectrum({showInput:!0,preferredFormat:"hex"})}(),e("#acym__unsubscribe__logo").on("click",function(){acym_helperImage.openMediaManager(function(n){e("#acym__unsubscribe__logo_value").val(n.url).trigger("change"),e(".acym__unsub__logo__text").html(n.url+' <i class="acymicon-trash-o margin-left-1 acym__color__red acym__unsub__logo__remove"></i>')})}),e("#acym__unsubscribe__image").on("click",function(){acym_helperImage.openMediaManager(function(n){e("#acym__unsubscribe__image_value").val(n.url).trigger("change"),e(".acym__unsub__image__text").html(n.url+' <i class="acymicon-trash-o margin-left-1 acym__color__red acym__unsub__image__remove"></i>')})}),e(document).on("click",".acym__unsub__logo__remove",function(){e("#acym__unsubscribe__logo_value").val("").trigger("change"),e(".acym__unsub__logo__text").empty()}),e(document).on("click",".acym__unsub__image__remove",function(){e("#acym__unsubscribe__image_value").val("").trigger("change"),e(".acym__unsub__image__text").empty()}),e('[name="config[dedicated_send_process]"]').on("change",function(n){setTimeout(()=>{1!==Number(e(this).val())||confirm(ACYM_JS_TXT.ACYM_DEDICATED_SENDING_PROCESS_WARNING)||e(`[for="${e(this).data("switch")}"]`).trigger("click")},100)})});