next_posts_link() always generates second page link on custom post type

use this:

get_query_var('paged') instead of get_query_var('page')

  $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;

hope this will help!

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