HEX
Server: LiteSpeed
System: Linux cpir1.prohostdns.com 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: pelakir (2976)
PHP: 8.2.31
Disabled: exec, shell_exec, system, passthru, proc_open, proc_close, proc_terminate, proc_get_status, popen, pclose, pcntl_exec
Upload Files
File: /home/pelakir/www/wp-content/plugins/digits/gateways/IRSMS/Raygansms/app.js
jQuery(document).ready(function () {
    jQuery("#raygansms_sendpattern").on("change", listener_changes_raygansms)
});
listener_changes_raygansms();

function listener_changes_raygansms() {
    try {
        const raygansmsSendPattern = document.getElementById("raygansms_sendpattern");
        const raygansmsSendPatternVal = raygansmsSendPattern.value;

        if (raygansmsSendPatternVal == 1) {
            hideRow("raygansms_username");
            hideRow("raygansms_password");
            showRow("raygansms_accesscode");
            showRow("raygansms_patterncode");
            showRow("raygansms_token1");
            showRow("raygansms_token2");
            showRow("raygansms_token3");
            hideRowByName("dig_messagetemplate");
        } else {
            showRow("raygansms_username");
            showRow("raygansms_password");
            hideRow("raygansms_accesscode");
            hideRow("raygansms_patterncode");
            hideRow("raygansms_token1");
            hideRow("raygansms_token2");
            hideRow("raygansms_token3");
            showRowByName("dig_messagetemplate");
        }
    } catch (error) {
        console.error("An error occurred in listener_changes_raygansms:", error);
    }
}

function hideRow(elementId) {
    try {
        const element = document.getElementById(elementId);
        if (element) {
            element.closest("tr").style.display = "none";
        }
    } catch (error) {
        console.error(`Error in hideRow for elementId ${elementId}:`, error);
    }
}

function showRow(elementId) {
    try {
        const element = document.getElementById(elementId);
        if (element) {
            element.closest("tr").style.display = "";
        }
    } catch (error) {
        console.error(`Error in showRow for elementId ${elementId}:`, error);
    }
}

function hideRowByName(name) {
    try {
        const element = document.querySelector(`[name=${name}]`);
        if (element) {
            element.closest("tr").style.display = "none";
        }
    } catch (error) {
        console.error(`Error in hideRowByName for name ${name}:`, error);
    }
}

function showRowByName(name) {
    try {
        const element = document.querySelector(`[name=${name}]`);
        if (element) {
            element.closest("tr").style.display = "";
        }
    } catch (error) {
        console.error(`Error in showRowByName for name ${name}:`, error);
    }
}