What's wrong with this code? (unexpected $end on last line)
<pre><code>&lt;?php
/*
Template Name: Videos
*/
?&gt;

&lt;?php get_header();?&gt;

    &lt;section id="content"&gt;
        &lt;section id="main"&gt;
            &lt;?php 
                $c=0;
                $i=1;

                $temp = $wp_query;
                $wp_query = null;
                $wp_query = new WP_Query();
                $wp_query-&gt;query('post_type=videos' . '&amp;paged=' . $paged . '&amp;posts_per_page=16');

                while ( $wp_query-&gt;have_posts() ) : $wp_query-&gt;the_post(); $c++;
            ?&gt;

            &lt;?php if (have_posts()) : ?&gt;

                &lt;?php while (have_posts()) : the_post(); $c++; ?&gt;
                    &lt;article class="post&lt;?php if($i%4 == 0) { echo ' right'; }; $i++; ?&gt;" id="post-&lt;?php the_ID(); ?&gt;"&gt;
                        &lt;section class="entry"&gt;
                            &lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'video-thumb' ); } ?&gt;&lt;/a&gt;
                        &lt;/section&gt;
                        &lt;section class="description"&gt;
                            &lt;h2&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
                        &lt;/section&gt;
                    &lt;/article&gt;

                &lt;?php
                    endwhile; 
                    wp_pagenavi();
                    $wp_query = null;
                    $wp_query = $temp;
                    wp_reset_query();
                ?&gt;

                &lt;?php if( $c &lt; 16 ) : for ($dummy= $c; $dummy &lt; 16; $dummy++) : ?&gt;

                    &lt;article class="post&lt;?php if($i%4 == 0) { echo ' right'; }; $i++; ?&gt;" id="post-&lt;?php the_ID(); ?&gt;"&gt;
                        &lt;img src="&lt;?php bloginfo('template_url'); ?&gt;/images/dummy-video.gif" alt="Post coming soon!" /&gt;
                    &lt;/article&gt;

                    &lt;?php endfor;?&gt;

                &lt;?php endif;?&gt;

            &lt;?php endif; ?&gt;

            &lt;section id="map"&gt;
                &lt;img src="&lt;?php bloginfo('template_url') ?&gt;/images/interactive-map.jpg" alt="Interactive Map" /&gt;
            &lt;/section&gt;
        &lt;/section&gt;

&lt;?php get_sidebar(); ?&gt;

    &lt;/section&gt;

&lt;?php get_footer(); ?&gt;
</code></pre>

<p>Here's the pastebin version: <a href="http://pastebin.com/2Grja48U" rel="nofollow">http://pastebin.com/2Grja48U</a></p>
