403Webshell
Server IP : 185.252.147.100  /  Your IP : 216.73.217.33
Web Server : nginx/1.27.3
System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
User : mitr ( 1000)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/html/consulting/wordpress/wp-content/plugins/da-contact-form/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/consulting/wordpress/wp-content/plugins/da-contact-form/assets/da_cf.js
//console.log('da is here');

document.addEventListener('click', function(event) {

    let handler = event.target.getAttribute('data-type');
    if (handler == 'send-button') {

        //console.log(event.target);

        const form = event.target.closest('form');

        //console.log(ajax_object.ajax_url);

        fetchForm(form);

    }

});


const fetchForm = async (form) => {

    form.querySelector('.message-sent').innerHTML = '';
    form.querySelector('.message-error').innerHTML = '';

    const data = new FormData(form);
    const sendButton = form.querySelector('[data-type="send-button"]');

    sendButton.classList.add('loading');

    data.append('action', 'submit_contact_form');

    const response = await fetch(ajax_object.ajax_url, {
        method: "POST",
        mode: "same-origin",
        cache: "no-cache",
        credentials: "same-origin",
        referrerPolicy: "origin",
        body: data,
    });

    const res = await response.json();

    if (response.ok) {

        //console.log(res);

        sendButton.classList.remove('loading');

        form.querySelector('.message-sent').innerHTML = res.success ?? '';
        form.querySelector('.message-error').innerHTML = res.notsent ?? '';


    } else {

        //console.log('no res!');

        form.querySelector('.message-error').innerHTML = 'Произошла ошибка, мы уже её устраняем! А пока можете связаться с нами другими способами.';

    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit