<?php get_header(); ?>

	<div id="content" class="narrowcolumn">

		<?php if (have_posts()) : ?>

		<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
		
        <?php /* If this is a category archive */ if (is_category()) { ?>				
		<div class="title">
		  <h2>Archiv f&uuml;r die Kategorie '<?php echo single_cat_title(); ?>'</h2>
		</div>
		
 	    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<div class="title">
		  <h2>Archiv f&uuml;r <?php the_time('j.m.Y'); ?></h2>
		</div>
		
	    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<div class="title">
		  <h2>Archiv f&uuml;r <?php the_time('m.Y'); ?></h2>
		</div>
		
	    <?php /* If this is a search */ } elseif (is_search()) { ?>
		<div class="title">
		  <h2>Suchergebnisse</h2>
		</div>
		
		<?php } ?>

		<?php while (have_posts()) : the_post(); ?>
		    <div class="archive">
				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink zu <?php the_title(); ?>"><?php the_title(); ?></a></h3>
			      <p>Geschrieben von: <strong><?php the_author() ?></strong> am <?php the_time('j.m.Y') ?></p>
			</div>
	
		<?php endwhile; ?>
	
	<?php else : ?>

		<div class="title">
		  <h2>Nicht gefunden</h2>
		</div>
        <div class="post">
		  <p class="center">Zu der Anfrage wurden keine Ergebnisse gefunden.</p>
		  <?php include (TEMPLATEPATH . "/searchform.php"); ?>
	    </div>
	<?php endif; ?>
		
	</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>