<?php /* Don't remove this line. */ require('./wp-blog-header.php'); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/1">
	<title><?php bloginfo('name'); ?> <?php if (($withcomments) or ($single)) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
	
	<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

	<link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-layout.css" type="text/css" media="screen" />

	<style type="text/css" media="screen">

		/* BEGIN IMAGE CSS */
			/*	To accomodate differing install paths of WordPress, images are referred only here,
				and not in the wp-layout.css file. If you prefer to use only CSS for colors and what
				not, then go right ahead and delete the following lines, and the image files. */
			
			body	 		{ background: url("/<?php echo get_settings('siteurl'); ?>images/kubrickbgcolor.jpg"); }
			#page			{ background: url("/<?php echo get_settings('siteurl'); ?>images/kubrickbg_center.jpg") repeat center; border: none; } 		
			#header 		{ background: url('/<?php echo get_settings('siteurl'); ?>images/kubrickheader_center.jpg') repeat-x center;  }
			#right_header	{ background: url('/<?php echo get_settings('siteurl'); ?>images/kubrickheader_right.jpg') no-repeat center right; }
			#left_header	{ background: url("/<?php echo get_settings('siteurl'); ?>images/kubrickheader_left.jpg") no-repeat center left;}
			#footer 		{ background: url("/<?php echo get_settings('siteurl'); ?>images/kubrickfooter_center.jpg") repeat-x bottom center; border: none;}
			#right_footer	{ background: url('/<?php echo get_settings('siteurl'); ?>images/kubrickfooter_right.jpg') no-repeat bottom right; }
			#left_footer	{ background: url("/<?php echo get_settings('siteurl'); ?>images/kubrickfooter_left.jpg") no-repeat bottom left; }
																						/* Checks to see whether it needs a sidebar or not */ 
			#right_page 	{ background: url("/<?php echo get_settings('siteurl'); ?>images/kubrickbg<?php if ($withcomments && $single) { echo 'wide'; } ?>_right.jpg") repeat-y top right;  }
			#left_page 		{ background: url("/<?php echo get_settings('siteurl'); ?>images/kubrickbg_left.jpg") repeat-y top left; }
			
			/*	Because the template is slightly different, size-wise, with images, this needs to be set here
				If you don't want to use the template's images, you can also delete the following two lines. */
			
			#header 	{ margin: 0 !important; margin: 0 0 0 1px; padding: 1px; height: 198px; width: 758px; }
			#headerimg 	{ margin: 7px 9px 0; height: 192px; width: 740px; } 
		/* END IMAGE CSS */
		

		/* 	To ease the insertion of a personal header image, I have done it in such a way,
			that you simply drop in an image called 'personalheader.jpg' into your /images/
			directory. Dimensions should be at least 760px x 200px. Anything above that will
			get cropped off of the image. */
		
		#headerimg 	{ background: url('<?php echo get_settings('siteurl'); ?>/images/personalheader.jpg') no-repeat top;}
		
	</style>
	
	<link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    <?php wp_get_archives('type=monthly&format=link'); ?>
	
	<?php wp_head(); ?>
</head>
<body>
<div id="page">
<div id="left_page">
<div id="right_page">

<? // Begin Header ?>
<div id="header">
	<div id="left_header">
		<div id="right_header">
			<h1><a href="<?php echo get_settings('siteurl'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
			<div class="description"><?php bloginfo('description'); ?></div>
		</div>
	</div>
</div>
<hr />
<? // End Header ?>


<? // Begin Frontpage ?>
<?php if  (empty($_GET['cat']) and empty($_GET['category_name']) and empty($_GET['m']) and empty($_GET['s']) and empty($_GET['paged']) and empty($_GET['year']) and empty($_GET['monthnum']) and empty($_GET['day'])) {				
	if ((! $withcomments) && (! $single)) { ?>

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

	<?php if ($posts) { ?>
		
		<?php foreach ($posts as $post) : start_wp(); ?>
				
			<div class="post">
				<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
				
				<div class="entry">
					<?php the_content('Read the rest of this entry &raquo;'); ?>
				</div>
		
				<p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p> 
				
				<!--
				<?php trackback_rdf(); ?>
				-->
			</div>
	
		<?php endforeach; ?>

		<div class="navigation">
			<div class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></div>
			<div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></div>
		</div>
		
	<?php } else { ?>

		<h2 class="center">Not Found</h2>
		<p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
		<?php include "kubrick-searchform.php"; ?>

	<?php } ?>

	</div>
	
<? } } // End Frontpage ?>


<? // Begin Permalinks ?>
<?php if (($withcomments) or ($single)) { ?>
	
	<div id="content" class="widecolumn">
				
		<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
	
		<div class="navigation">
			<div class="alignleft"><?php previous_post('&laquo; %','','yes') ?></div>
			<div class="alignright"><?php next_post(' % &raquo;','','yes') ?></div>
		</div>
	
		<div class="post">
			<h2 id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
	
			<div class="entrytext">
				<?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
	
				<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
	
				<p class="postmetadata graybox">
					<small>
						This entry was posted
						<?php /* This is uncommented, because it requires a little adjusting sometimes.
							You'll need to download this plugin, and follow the instructions:
							http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
							/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?> 
						on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
						and is filed under <?php the_category(', ') ?>.
						You can follow any responses to this entry through the <a href="<?php bloginfo_rss('comments_rss2_url'); ?>">RSS 2.0</a>
						feed. 
						
						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
							// Both Comments and Pings are open ?>
							You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(display); ?>">trackback</a> from your own site.
						
						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
							// Only Pings are Open ?>
							Responses are currently closed, but you can <a href="<?php trackback_url(display); ?> ">trackback</a> from your own site.
						
						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// Comments are open, Pings are not ?>
							You can skip to the end and leave a response. Pinging is currently not allowed.
			
						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// Neither Comments, nor Pings are open ?>
							Both comments and pings are currently closed.			
						
						<?php } edit_post_link('Edit this entry.','',''); ?>
						
					</small>
				</p>
	
			</div>
		</div>
		
		<?php include(ABSPATH . 'wp-comments.php'); ?>
	
	<?php endforeach; else: ?>
	
		<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
	
	<?php endif; ?>
	
	</div>

<? } // End Permalinks  ?>


<? // Begin Archives ?>
<?php /* If this page was loaded as an archive or search page */ if ((!empty($_GET['year']) or !empty($_GET['monthnum']) or !empty($_GET['day']) or !empty($_GET['day']) or !empty($_GET['category_name']) or !empty($_GET['author']) or !empty($_GET['cat']) or !empty($_GET['m']) or !empty($_GET['paged'])) or !empty($_GET['s']) and (!($withcomments) or !($single))) {
	if ((! $withcomments) && (! $single)) { ?>
					
	<div id="content" class="narrowcolumn">

	<?php if ($posts) { ?>


		<?php /* If this is a category archive */ if ((isset($_GET['cat']) && !empty($_GET['cat'])) or (isset($_GET['category_name']) && !empty($_GET['category_name']))) { ?>				
		<h2 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h2>
		
		<?php /* If this is a daily archive */ } elseif (isset($_GET['day']) && !empty($_GET['day'])) { ?>
		<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
		
		<?php /* If this is a monthly archive */ } elseif ((isset($_GET['m']) && !empty($_GET['m'])) or (isset($_GET['monthnum']) && ! empty($_GET['monthnum']))) { ?>
		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>

		<?php /* If this is a yearly archive */ } elseif (isset($_GET['year']) && !empty($_GET['year'])) { ?>
		<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
		
		<?php /* If this is a search */ } elseif (isset($_GET['s']) && !empty($_GET['s'])) { ?>
		<h2 class="pagetitle">Search Results</h2>
		
		<?php /* If this is an author archive */ } elseif (isset($_GET['author']) && !empty($_GET['author'])) { ?>
		<h2 class="pagetitle">Author Archive</h2>

		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h2 class="pagetitle">Blog Archives</h2>

		<?php } ?>


		<div class="navigation">
			<div class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></div>
			<div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></div>
		</div>


		<?php foreach ($posts as $post) : start_wp(); ?>
				
			<div class="post">
				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
				<small><?php the_time('l, F jS, Y') ?></small>
				
				<div class="entry">
					<?php the_excerpt() ?>
				</div>
		
				<p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p> 
				
				<!--
				<?php trackback_rdf(); ?>
				-->
			</div>
	
		<?php endforeach; ?>

		<div class="navigation">
			<div class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></div>
			<div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></div>
		</div>
	
	<?php } else { ?>

		<h2 class="center">Not Found</h2>
		<?php include "kubrick-searchform.php"; ?>

	<?php } ?>
		
	</div>

<? } } // End Archives ?>


<? // Begin Sidebar Menu ?>
<?php /* If this is not a permalink page, show the menu */ if (!($withcomments) && (!$single)) { ?>

	<div id="sidebar">
		<ul>
			
			<li>
				<?php include "kubrick-searchform.php"; ?>
			</li>

			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
			<li><h2><?php // _e('Author'); ?></h2>
			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
			</li>
			-->

			<li>
			<?php /* If this is a category archive */ if ((isset($_GET['cat']) && !empty($_GET['cat'])) or (isset($_GET['category_name']) && !empty($_GET['category_name']))) { ?>				
			<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
			for the '<?php echo single_cat_title(); ?>' category.</p>
			
			<?php /* If this is a yearly archive */ } elseif (isset($_GET['day']) && !empty($_GET['day'])) { ?>
			<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
			for the year <?php the_time('l, F jS, Y'); ?>.</p>
			
			<?php /* If this is a monthly archive */ } elseif ((isset($_GET['m']) && !empty($_GET['m'])) or (isset($_GET['monthnum']) && ! empty($_GET['monthnum']))) { ?>
			<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
			for <?php the_time('F, Y'); ?>.</p>

			<?php /* If this is a yearly archive */ } elseif (isset($_GET['year']) && !empty($_GET['year'])) { ?>
			<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
			for the year <?php the_time('Y'); ?>.</p>
			
			<?php /* If this is a monthly archive */ } elseif (isset($_GET['s']) && !empty($_GET['s'])) { ?>
			<p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
			for <strong>'<?php echo htmlentities($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>

			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
			<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>

			<?php } ?>
			</li>
			
		
		
			
			<!-- The Calendar is disabled per default. Uncomment if you want to use it.
			<li><h2><?php // _e('Calendar'); ?></h2>
				<?php // get_calendar(); ?>
			</li>
			-->

			<li><h2><?php _e('Archives'); ?></h2>
				<ul>
				<?php wp_get_archives('type=monthly'); ?>
				</ul>
			</li>

			<li><h2><?php _e('Categories'); ?></h2>
				<ul>
				<?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
				</ul>
			</li>

			<?php /* If this is the frontpage */ if (empty($_GET['cat']) and empty($_GET['m']) and empty($_GET['paged']) and empty($_GET['year']) and empty($_GET['monthnum']) and empty($_GET['day']) and empty($_GET['category_name']) and empty($_GET['author']) and empty($_GET['s'])) { ?>				
				<li><h2><?php _e('Links'); ?></h2>
					<ul>
						<?php get_links('-1', '<li>', '</li>', '<br />'); ?>
					</ul>
				</li>
				
				<li><h2><?php _e('Admin'); ?></h2>
					<ul>
						<li><a href="<?php echo get_settings('siteurl'); ?>/wp-login.php"><?php _e('Login'); ?></a></li>
						<!--
						<li><a href="<?php echo get_settings('siteurl'); ?>/wp-register.php"><?php _e('Register'); ?></a></li>
						-->
					</ul>
				</li>
			<?php } ?>
			
		</ul>
	</div>

<? } // End Sidebar Menu  ?>



<? // Begin Footer ?>
<hr />
<div id="footer">
		<div id="left_footer">
			<p id="right_footer">
				<?php bloginfo('name'); ?> is proudly powered by 
				<a href="http://wordpress.org">WordPress <?php echo $wp_version; ?></a>
				<!--
				and valid <a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional (most of the time)">XHTML</a> and
				<a href="http://jigsaw.w3.org/css-validator/check/referer" title="Valid CSS; hopefully...">CSS</a>.
				-->
				<br /><a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a>
				and <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>.
				<!-- Spawned in <?php timer_stop(1); ?> seconds. -->
				<a href="http://binarybonsai.com/kubrick/">Design by Michael Heilemann.</a>
			</p>
		</div>
</div>
</div>
</div>
</div>

<? // End Footer ?>


<?php /* "Just what do you think you're doing Dave?" */ ?>


</body>
</html>
