Some code in shortcode function being ignored

This line is your issue:

$log_string += "Dealing with " . count($atts) . " tab(s)\n";

It should be:

$log_string .= "Dealing with " . count($atts) . " tab(s)\n";

It looks like you confused the javascript and PHP concatenation operator. Don’t worry, it’s something I’ve done numerous times! Ugh!

Edit: Actually, looks like you’ve made this mistake on other lines as well.

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