<?php

get_header();

if ( have_posts() )
{
	echo '<div id="content" class="narrowcolumn">' . "\n";
	echo '	<h2 class="pagetitle">' . __('Search Results', 'german_newspaper') . '</h2>' . "\n";
	echo '	<div class="navigation">' . "\n";
	echo '		<div class="alignleft">';
	next_posts_link(__('&laquo; Older Entries', 'german_newspaper'));
	echo '		</div>' . "\n";
	echo '		<div class="alignright">';
	previous_posts_link(__('Newer Entries &raquo;', 'german_newspaper'));
	echo '		</div>' . "\n";
	echo '	</div>' . "\n";

	while ( have_posts() )
	{
		the_post();
	
		echo '  <div class="post">' . "\n";
		echo '	<h3 id="search-post-' . get_the_ID() . '"><a href="';
		the_permalink();
		echo '" rel="bookmark" title="';
		printf(__('Permanent Link to %s', 'german_newspaper'), the_title_attribute('echo=0'));
		echo '">' . the_title( '', '', false) . '</a></h3>' . "\n";
		echo '	<small>';
		the_time('l, F jS, Y');
		echo '	</small>' . "\n";
		echo '	<p class="postmetadata">';
		the_tags(__('Tags:', 'german_newspaper') . ' ', ', ', '<br />');
		echo ' ';
		printf(__('Posted in %s', 'german_newspaper'), get_the_category_list(', '));
		echo ' | ';
		edit_post_link(__('Edit', 'german_newspaper'), '', ' | ');
		echo ' ';
		comments_popup_link(__('No Comments &#187;', 'german_newspaper'), __('1 Comment &#187;', 'german_newspaper'), __('% Comments &#187;', 'german_newspaper'));
		echo '	</p>' . "\n";
		echo '</div>' . "\n\n";
	}

	echo '<div class="navigation">' . "\n";
	echo '	<div class="alignleft">' . "\n";
	next_posts_link(__('&laquo; Older Entries', 'german_newspaper'));
	echo '	</div>' . "\n";
	echo '	<div class="alignright">' . "\n";
	previous_posts_link(__('Newer Entries &raquo;', 'german_newspaper'));
	echo '	</div>' . "\n";
	echo '</div>' . "\n";
	echo '</div>' . "\n\n";
	
}
else
{
	echo '<div id="content">' . "\n";
	echo '	<h2 class="center">' . __('No posts found. Try a different search?', 'german_newspaper') . '</h2>' . "\n";
	
	include (TEMPLATEPATH . '/searchform.php');
	
	echo '</div>' . "\n\n";
}



get_footer();



?>