rendered paste body<?php get_header(); ?>
<div id="main-area-wrap">
<div id="wrapper">
<div id="main">
<div class="post">
<?php if (get_option('glow_integration_single_top') <> '' && get_option('glow_integrate_singletop_enable') == 'on') echo(get_option('glow_integration_single_top')); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="new-post">
<?php include(TEMPLATEPATH . '/includes/postinfo.php'); ?>
<h1><?php the_title(); ?></h1>
<div id="post-content">
<?php if (get_option('glow_thumbnails') == 'on') { ?>
<?php $width = get_option('glow_thumbnail_width_posts');
$height = get_option('glow_thumbnail_height_posts');
$classtext = 'thumbnail alignleft';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>
<?php
// get post tags, if post less than certain days and has specific tag, display message
$tags = wp_get_post_tags($post->ID);
$tagsarray = array();
foreach ($tags as $tag) {
$tagarray[] = $tag->name;
}
$taglist = implode(',', $tagarray);
$todaylimit = 1 * 86400;
$todaytag = 'Today';
$jdlimit = 365 * 86400;
$jdtag = 'Update';
$newlimit = 5 * 86400; //days * seconds per day
$newtag = 'Latest';
$updatedlimit = 15 * 86400; //days * seconds per day
$updatedtag = 'New';
$finallimit = 200 * 86400; //days * seconds per day
$finaltag = 'Old';
$message = '';
$post_age = date('U') - mysql2date('U', $post->post_date_gmt);
if ( ($post_age < $jdlimit) && (strpos($taglist, $jdtag) !== false) ) {
echo '<div align="right"><img src="http://gj4u.in/wp-content/uploads/2012/03/updated_post.png" border=1></div>';
}
else if ( ($post_age < $todaylimit) && (strpos($taglist, $todaytag) !== false) ) {
echo '<div align="right"><img src="http://gj4u.in/wp-content/uploads/2012/03/today_post1.png" border=1 ></div>';
}
else if ( ($post_age < $newlimit) && (strpos($taglist, $newtag) !== false) ) {
echo '<div align="right"><img src="http://gj4u.in/wp-content/uploads/2012/03/latest_post.png" border=1></div>';
}
else if ( ($post_age < $updatedlimit) && (strpos($taglist, $updatedtag) !== false) ) {
echo '<div align="right"><img src="http://gj4u.in/wp-content/uploads/2012/03/new_post.png" border=1></div>';
}
else if ( ($post_age < $finallimit) && (strpos($taglist, $finaltag) !== false) ) {
echo '<div align="right"><img src="http://gj4u.in/wp-content/uploads/2012/03/old_post.png" border=1></div>';
}
if ($message) {
echo $message;
}
?>
<?php if($thumb <> '') { ?>
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
<?php };
}; ?>
<?php the_content(); ?>
<?php edit_post_link(__('Edit this page','Glow')); ?>
</div> <!-- end #post-content -->
</div> <!-- end new-post -->
<?php if (get_option('glow_integration_single_bottom') <> '' && get_option('glow_integrate_singlebottom_enable') == 'on') echo(get_option('glow_integration_single_bottom')); ?>
<?php if (get_option('glow_468_enable') == 'on') { ?>
<a href="<?php echo(get_option('glow_468_url')); ?>"><img src="<?php echo(get_option('glow_468_image')); ?>" alt="468 ad" class="foursixeight" /></a>
<?php } ?>
<?php if (get_option('glow_show_postcomments') == 'on') comments_template('', true); ?>
<?php endwhile; ?>
<?php else : ?>
<!--If no results are found-->
<div id="post-content">
<h1><?php _e('No Results Found','Glow'); ?></h1>
<p><?php _e('The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.','Glow'); ?></p>
</div>
<!--End if no results are found-->
<?php endif; ?>
</div> <!-- end post -->
</div> <!-- end main -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>