<?php 
global $options;
foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}
$dateformat = get_option('date_format');
$timeformat = get_option('time_format');
get_header(); ?>

<div id="content">
<div class="wrap">
      
	<?php wp_reset_query(); 
	if (have_posts()) : while (have_posts()) : the_post(); ?>
	      
	<div class="teaser">
		<h1><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
		<p class="postmetadata"><?php _e('By', 'tutspress');?> <?php the_author_posts_link(); ?> <?php _e('in', 'tutspress');?> <span class="category"><?php the_category(', '); ?></span> <?php _e('on', 'tutspress');?> <span class="datetime"><?php the_time("$dateformat $timeformat"); ?></span><?php edit_post_link( __('EDIT', 'tutspress'), ' | ', ''); ?></p>
	</div>
	      
	<div class="column column-wide">
	      
		<div class="single">
		      
			<?php the_content(''); ?>
			      
			<div class="clear">&nbsp;</div>
			<?php wp_link_pages(array('before' => '<p class="pages"><strong>'.__('Pages', 'tutspress').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
			<?php the_tags( '<p class="tags"><strong>'.__('Tags', 'tutspress').':</strong> ', ', ', '</p>'); ?>
			<?php comments_template(); ?>
		      
		</div>
		      
		<?php endwhile; endif; ?>	
		        
		<div class="clear">&nbsp;</div>
	      
	</div><!-- end .column .column-wide -->
	      
	<div class="column column-narrow column-last">
		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar: Content Pages') ) : ?><?php endif; ?>
	</div><!-- end .column .column-narrow .column-last -->
	      
	<div class="clear">&nbsp;</div>
	<div class="sep">&nbsp;</div>

</div><!-- end .wrap -->
</div><!-- end #content -->
<?php get_footer(); ?>
