is_preview() always return false

is_preview() should return true is it is a preview. Did you try the following on the page.php?

if(is_preview()){ echo "preview" }else{ echo "no preview" }

to check if the is_preview() function is working?

EDIT2: You could work your way around it and check for:

if($_GET['preview'] == true){}

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