<?php
get_header();
?>

<div class="contwrap">
 <?php get_sidebar(); ?>
<div class="left">
 
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
      <div class="posttop">
        <div class="date">
        	<div class="day">
            <?php the_time('d', '', ''); ?>
          </div>
          <div class="month"><?php the_time('M', '', ''); ?></div>
          
        </div>
        <h1 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark">
          <?php the_title(); ?>
          </a></h1>
          
          <div class="indexomment"><?php comments_popup_link(__('0 Comments'), __(' 1 Comment'), __(' % Comments')); ?></div>
        
        <div class="clear"></div>
        <div class="storycontent">
          <?php the_content(__('more...')); ?>
     
        </div>
        
        
         

<?php if(is_single()){ ?>

<div class="entry-meta">
					<?php printf(__('This entry was written by %1$s and posted on <abbr class="published" title="%2$sT%3$s">%4$s at %5$s</abbr> and filed under %6$s. Bookmark the <a href="%7$s" title="Permalink to %8$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%9$s" title="Comments RSS to %8$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'sandbox'),
						'<span class="author vcard"><a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a></span>',
						get_the_time('Y-m-d'),
						get_the_time('H:i:sO'),
						the_date('', '', '', false),
						get_the_time(),
						get_the_category_list(', '),
						get_permalink(),
						wp_specialchars(get_the_title(), 'double'),
						comments_rss() ) ?>

<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Comments and trackbacks open ?>
					<?php printf(__('<a class="comment-link" href="#postcomment" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?>
<?php elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Only trackbacks open ?>
					<?php printf(__('Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?>
<?php elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Only comments open ?>
					<?php printf(__('Trackbacks are closed, but you can <a class="comment-link" href="#postcomment" title="Post a comment">post a comment</a>.', 'df')) ?>
<?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?>
					<?php _e('Both comments and trackbacks are currently closed.') ?>
<?php endif; ?>
<?php edit_post_link(__('Edit', 'df'), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>"); ?>

				</div>

<?php } ?>


   
          <?php if(is_single()){ ?>
          
           <script type="text/javascript"><!--
google_ad_client = "pub-7138347755911117";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2007-05-27: CSS XHTML, Design, Web Design, photoshop design, web 2.0
google_ad_channel = "1747091900+9564706439+0274153584+5471741700+1230736743";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "78B749";
google_color_text = "7F7F7F";
google_color_url = "3D81EE";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
          
          
          <?php } ?>
        
        <div class="feedback">
          <?php wp_link_pages(); ?>
          
        </div>
      </div>
      <?php comments_template(); // Get wp-comments.php template ?>
</div>
      <?php endwhile; else: ?>
      <p class="sorrydialog">
        <?php _e('Sorry, no posts matched your criteria.'); ?>
      </p>
      <?php endif; ?>
      <div class="navigation">
        <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
      </div>
      <!--<?php posts_nav_link('&nbsp;&nbsp;', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>-->


</div>
</div>
<?php get_footer(); ?>