<?php require ('customfunctions.php');
define('ALBUMCOLUMNS', 3);
define('IMAGECOLUMNS', 5);
$themeResult = getTheme($zenCSS, $themeColor, 'effervescence');
normalizeColumns(ALBUMCOLUMNS, IMAGECOLUMNS);?>
<!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>
	<?php zenJavascript(); ?>
	<title><?php echo getBareGalleryTitle(); ?> | <?php echo gettext('Archive'); ?></title>
	<link rel="stylesheet" href="<?php echo  $zenCSS ?>" type="text/css" />
	<script type="text/javascript" src="<?php echo  $_zp_themeroot ?>/scripts/bluranchors.js"></script>
</head>

<body onload="blurAnchors()">

	<!-- Wrap Header -->
	<div id="header">
		<div id="gallerytitle">

		<!-- Logo -->
			<div id="logo">
			<?php printLogo(); ?>
			</div>
		</div> <!-- gallerytitle -->

		<!-- Crumb Trail Navigation -->
		<div id="wrapnav">
			<div id="navbar">
				<span><?php printHomeLink('', ' | '); ?>
				<?php
				if (getOption('custom_index_page') === 'gallery') {
				?>
				<a href="<?php echo htmlspecialchars(getGalleryIndexURL(false));?>" title="<?php echo gettext('Main Index'); ?>"><?php echo gettext('Home');?></a> | 
				<?php	
				}					
				?>
				<a href="<?php echo htmlspecialchars(getGalleryIndexURL());?>" title="<?php echo gettext('Albums Index'); ?>"><?php echo getGalleryTitle();?></a></span>
								<?php printPageTitle(" | "); ?>
			</div>
		</div> <!-- wrapnav -->

		<!-- Random Image -->
		<?php printHeadingImage(getRandomImages()); ?>
	</div> <!-- header -->

	<!-- Wrap Main Body -->
	<div id="content">
	
		<small>&nbsp;</small>
		<div id="main2">
			<div id="content-left">
<h2><?php printPageTitle(); ?></h2>
<?php if (!checkForPassword()) { ?>
	<div id="pagetext">
	<?php printCodeblock(1); ?>
	<?php printPageContent(); ?> 
	<?php printCodeblock(2); ?>
	</div>
	
	<?php 
	if (getOption('zenpage_comments_allowed')) { ?>
					<div id="comments">
			<?php $num = getCommentCount(); echo ($num == 0) ? "" : ("<h3>".gettext("Comments")." ($num)</h3>"); ?>
				<?php while (next_comment()){  ?>
				<div class="comment">
					<div class="commentmeta">
						<span class="commentauthor"><?php printCommentAuthorLink(); ?></span> <?php gettext("says:"); ?>
					</div>
					<div class="commentbody">
						<?php echo getCommentBody();?>
					</div>
					<div class="commentdate">
						<?php echo getCommentDateTime();?>
						<?php printEditCommentLink(gettext('Edit'), ' | ', ''); ?>
					</div>
				</div>
				<?php }; ?>
							
				<?php if (zenpageOpenedForComments()) { ?>
				<div class="imgcommentform">
								<!-- If comments are on for this image AND album... -->
					<h3><?php echo gettext("Add a comment:"); ?></h3>
					<form id="commentform" action="#" method="post">
					<div><input type="hidden" name="comment" value="1" />
								<input type="hidden" name="remember" value="1" />
									<?php
									printCommentErrors();
									$stored = getCommentStored();
									?>
						<table border="0">
							<tr>
								<td><label for="name"><?php echo gettext("Name:"); ?></label>
									(<input type="checkbox" name="anon" value="1"<?php if ($stored['anon']) echo " CHECKED"; ?> /> <?php echo gettext("don't publish"); ?>)
								</td>
								<td><input type="text" id="name" name="name" size="20" value="<?php echo $stored['name'];?>" class="inputbox" />
								</td>
							</tr>
							<tr>
								<td><label for="email"><?php echo gettext("E-Mail:"); ?></label></td>
								<td><input type="text" id="email" name="email" size="20" value="<?php echo $stored['email'];?>" class="inputbox" />
								</td>
							</tr>
							<tr>
								<td><label for="website"><?php echo gettext("Site:"); ?></label></td>
								<td><input type="text" id="website" name="website" size="40" value="<?php echo $stored['website'];?>" class="inputbox" /></td>
							</tr>
													<?php if (getOption('Use_Captcha')) {
	 													$captchaCode=generateCaptcha($img); ?>
	 													<tr>
	 													<td><label for="code"><?php echo gettext("Enter Captcha:"); ?>
	 													<img src=<?php echo "\"$img\"";?> alt="Code" align="bottom"/>
	 													</label></td>
	 													<td><input type="text" id="code" name="code" size="20" class="inputbox" /><input type="hidden" name="code_h" value="<?php echo $captchaCode;?>"/></td>
	 													</tr>
													<?php } ?>
								<tr><td colspan="2"><input type="checkbox" name="private" value="1"<?php if ($stored['private']) echo " CHECKED"; ?> /> <?php echo gettext("Private (don't publish)"); ?></td></tr>
						</table>
						<textarea name="comment" rows="6" cols="40"><?php echo $stored['comment']; ?></textarea>
						<br />
						<input type="submit" value="<?php echo gettext('Add Comment'); ?>" class="pushbutton" /></div>
					</form>
				</div>
						<?php } else { echo gettext('Comments are closed.'); } ?> 
		</div>			
		<?php 
	} 
}?>
	
			</div><!-- content left-->
			<div id="sidebar">
			<?php include("sidebar.php"); ?>
			</div><!-- sidebar -->
			<br style="clear:both" />
		</div> <!-- main2 -->
		
	</div> <!-- content -->

<?php include('footer.php'); ?>
		<!-- Administration Toolbox -->
<?php if (function_exists('printAdminToolbox')) printAdminToolbox(); ?>

</body>
</html>