<?php get_header(); ?>
<?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
<?php include (TEMPLATEPATH . '/featured.php'); ?>
<?php }?>
<div id="content">
<div class="ctop"></div>
<div class="contentarea">
<h2>New Movies</h2>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="ptop"></div>
<div class="postsbody">
<div class="afis">
<?php if( get_post_meta($post->ID, "afis", true) ): ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php $values = get_post_custom_values("afis"); echo $values[0]; ?>&w=120&zc=1&q=176" width="120" height="176" alt="<?php the_title(); ?>"><div src="" class="kucukIcon"></div></a>
<?php else: ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/resimyok.gif" width="120" height="176" alt="<?php the_title(); ?>"><div src="" class="kucukIcon"></div></a>
<?php endif; ?>
</div>
<div class="film">
<p><span class="kalin">Movie Name:</span> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
<p><span class="kalin">Genre:</span> <?php the_category(', '); ?></p>
<p><span class="kalin">IMDB Rating:</span> <?php if( get_post_meta($post->ID, "imdb", true) ): ?><?php $values = get_post_custom_values("imdb"); echo $values[0]; ?><?php else: ?>Bulunamadı<?php endif; ?></p>
<p><span class="kalin">Movie Summary:</span> <?php the_excerpt('Devamını okuyun »'); ?></p>
<div class="comm"><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></div>
</div>
</div>
<div class="pbottom"></div>
<?php endwhile; ?>
<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi('', '', '', '', 3, false);} ?>
</div>
<?php else : ?>
<div class="ptop"></div>
<div class="postsbody">
<p>Sorry, but you are looking for something that isn't here.</p>
</div>
<div class="pbottom"></div>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<div class="cbottom"></div>
</div>
<?php get_footer(); ?>