Bad request 400 using class based files

I noticed something in your ajax call.

$.ajax({
            type: 'POST',
            url: ajaxurl,
            data: data,

Shouldn’t it be ajax_object.ajaxurl instead of just ajaxurl ?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)