function deleteVpn(id) {
    if (confirm("Are you sure you want to delete this VPN?")) {
        $.ajax({
            type: "post",
            url: "./includes/post_smarters_pro_openvpn_config.php",
            data: {
                delete_ovpn: 1,
                vpn_id: id
            },
            success: function () {
                location.reload();
            },
        });
    }
}

function editAccount(username, password) {
    $('#username').val(username);
    $('#password').val(password);
}

function deleteAccount(id) {
    if (confirm("Are you sure you want to delete this account?")) {
        $.ajax({
            type: "post",
            url: "./includes/post_smarters_pro_openvpn_config.php",
            data: {
                delete_credentials: 1,
                id: id
            },
            success: function () {
                location.reload();
            },
        });
    }
}