HEX
Server: LiteSpeed
System: Linux sg-cp4.cloudnetwork.vn 4.18.0-553.69.1.lve.el8.x86_64 #1 SMP Wed Aug 13 19:53:59 UTC 2025 x86_64
User: thu28850 (1134)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/thu28850/www/wp-content/plugins/wp-helper-lite/functions/ajax.php
<?php
function whp_ajax_sendmail_popup()
{
    $data = $_POST['data'];

    $email = sanitize_text_field($data[0]['value']);

    $content = whp_get_option('whp_popup_mail_template');
    $content = str_replace(['{email}'], $email, $content);
    $mail_from = whp_get_option('whp_smtp_email');
    $headers = array('Content-Type: text/html; charset=UTF-8');
    $result = wp_mail($mail_from, 'Thông báo thành viên đăng ký mới', $content, $headers);
    if ($result) {
        wp_send_json(['status' => 200]);
    } else {
        wp_send_json(['status' => 500]);
    }
}
add_action('wp_ajax_whp_ajax_sendmail_popup', 'whp_ajax_sendmail_popup');
add_action('wp_ajax_nopriv_whp_ajax_sendmail_popup', 'whp_ajax_sendmail_popup');



function whp_ajax_table_sidebar_admin()
{

    $data = $_POST['data'];
    wp_send_json(['status' => 200]);
}
add_action('wp_ajax_whp_ajax_table_sidebar_admin', 'whp_ajax_table_sidebar_admin');