Dynamic sidebar nav with current page highlighting

I see that you are have a hard time on this so here:

<?php 
    global $post;
    $curent_post = $post;
    $curent_post_id = $post->ID
    $parents = array('4','6','8','10');
    if (in_array($post->post_parent,$parents)){
        query_posts("post_type=page&post_parent=".$post->post_parent."&orderby=menu_order&order=asc"); 
    }
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    ?>
    <a href="https://wordpress.stackexchange.com/questions/12054/<?php the_permalink(); 
    if ($curent_post_id = $post->ID){
        echo" class="highlight"';
    }
    ?>"><?php the_title(); ?></a>

and at the end of your loop add

wp_reset_query();
$post = $curent_post;

no after that i would like to say that you really should use WP_Query instead of query_posts any time that its not the main query in the page.

and when I’ll get back I will post and example using wp_list_pages()

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