Check if sidebar is active on page with id

You mean like this:

if (is_active_sidebar($sidebar-name) && is_page($page-id)) {do your thing}

?

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