<?php

// -----------------------------------------------------------------------
// This file is part of aroundme
//
// Copyright (C) 2003, 2005 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option) any
// later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
// -----------------------------------------------------------------------

?>

<!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" xml:lang="en" lang="en">

<head>
<title><?php echo $lang['txt_page_title'];?></title>
<style type="text/css">
<!--
@import url(<?php echo $templatePath;?>aroundme.css);

-->
</style>
<!--[if IE]>
<style type="text/css">
@import url(<?php echo $templatePath;?>aroundme-IE.css);
</style>
<![endif]-->

</head>

<body bgcolor="#FFFFFF">
<div id="content">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top">
			<table width="100%" border="0" cellspacing="0" cellpadding="4" class="table_stnd">
				<tr>
					<td>
						<?php echo $lang['txt_author'];?><br />
					</td>
					<td>
						<?php echo $author['profile_nic'];?><br />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_author_profile'];?><br />
					</td>
					<td>
						<a href="<?php echo $author['profile_url'];?>" class="txt_footer_link"><?php echo $author['profile_url'];?></a><br />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_source'];?><br />
					</td>
					<td>
						<a href="<?php echo $_SERVER['HTTP_REFERER'];?>" class="txt_footer_link"><?php echo $_SERVER['HTTP_REFERER'];?></a><br />
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="4" alt="" /><br />

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top">
			<?php
			if (isset($schedule)) {
			?>
			<table border="0" cellspacing="0" cellpadding="2">
				<tr>
					<td colspan="2">
						<b><?php echo $lang['hdr_overview'];?></b><br />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<?php echo $schedule['schedule_synopsis'];?><br />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_start'];?><br />
					</td>
					<td>
						<?php echo $schedule['display_schedule_start_datetime'];?><br />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_end'];?><br />
					</td>
					<td>
						<?php echo $schedule['display_schedule_end_datetime'];?><br />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_location'];?><br />
					</td>
					<td>
						<?php echo $schedule['schedule_location'];?><br />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_type'];?><br />
					</td>
					<td>
						<?php
						if (isset($schedule['status_id'])) {
						    echo $lang['schedule']['arr_event_status'][$schedule['status_id']];
						}?><br />
					</td>
				</tr>
			</table>
			<?php }?>

			<?php
			if (isset($blog)) {
			?>
			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $blog['blog_create_datetime'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td>
						<span class="txt_item_title">
						<?php echo $blog['blog_title'];?><br />
						</span>
						<?php echo $blog['blog_body_display'];?><br />
					</td>
				</tr>
			</table>
			<?php }?>

			<?php
			if (isset($subject)) {
			?>
			<table width="100%" cellpadding="4" cellspacing="0" border="0">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $subject['subject_create_datetime'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td valign="top">
						<?php
						if (isset($subject['image'])) {
						?>
						<img src="get_file.php?file=<?php echo $subject['image']['file'];?>" border="0" align="left" class="picture_left" title="<?php echo $subject['image']['file_title'];?>">
						<?php  }?>
						<span class="txt_item_title">
						<?php echo $subject['subject_title'];?><br />
						</span>
						<?php echo $subject['display_subject_body'];?><br />
					</td>
			    </tr>
			</table>
			<?php }?>


			<?php
			if (isset($poll)) {
 			?>
 			<table border="0" cellspacing="4" cellpadding="0" width="100%">
 				<tr>
 					<td class="txt_title" align="right" colspan="2">
 						<?php echo $lang['section_poll'];?><br />
 						<hr />
 					</td>
 				</tr>
					<tr>
						<td class="picture" valign="top">
							<?php
							$print_view = 1;
							include $templatePath . "poll_detail.inc.tpl.php";
							?>
						</td>
						<td valign="top" width="30%" class="picture">
							<table width="100%" cellpadding="4" cellspacing="0" border="0">
								<tr>
									<td valign="top">
										<b><?php echo $lang['hdr_vote_history'];?></b><br />
									</td>
								</tr>
								<?php
								if (isset($poll_history)) {
								foreach($poll_history as $key => $i):
								?>
								<tr>
									<td valign="top" class="txt_footer">
										<?php echo $i['answer_create_datetime'];?><br />
										<?php echo $i['option_body'];?><br />
									</td>
								</tr>
								<?php
								endforeach;
								}
								?>
							</table>
						</td>
				    </tr>
 			</table>
			<?php }?>

			<?php
			if (isset($library)) {
			?>
			<table width="100%" cellpadding="4" cellspacing="0" border="0" class="table_stnd">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $library['display_library_create_datetime'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td>
						<span class="txt_item_title">
						<?php echo $library['library_title'];?><br />
						</span>
						<?php echo $library['library_body'];?><br />
					</td>
				</tr>
			</table>
			<?php }?>
		</td>
	</tr>
</table>

<?php
if (isset($comments)) {
?>
<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="4" alt="" /><br />

<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table_stnd">
	<tr>
		<td colspan="3" class="txt_title" align="right">
			<?php echo $lang['section_comments'];?><br />
			<hr />
		</td>
	</tr>
	<?php
	foreach($comments as $key => $i):
	?>
	<tr>
		<td>
			<table width="100%" cellpadding="4" cellspacing="0" border="0" class="table_nested">
				<tr>
					<td class="txt_footer" colspan="2">
						<?php echo $lang['txt_from'];?>:

						<a href="<?php echo $i['profile_url'];?>" class="txt_footer_link"><?php echo $i['profile_nic'];?></a>&nbsp;(<?php echo $i['profile_url'];?>)<br />



						<?php echo $lang['txt_comment_datetime'];?>: <?php echo $i['comment_create_datetime'];?><br />
					</td>
				</tr>
				<tr>
					<td valign="top">
						<?php echo $i['comment_body'];?><br />
					</td>
					<?php
					if (isset($poll) && empty($poll['poll_anon'])) {
					?>
					<td valign="top" align="right">
						<table cellpadding="2" cellspacing="0" border="0" class="table_nested">
							<tr>
								<td valign="top" colspan="2">
									<?php echo $lang['hdr_vote_history'];?><br />
								</td>
							</tr>
							<?php
							if (isset($i['vote'])) {
							foreach($i['vote'] as $key => $r):
							?>
							<tr>
								<td valign="top" class="txt_footer">
									<?php echo $r['answer_create_datetime'];?><br />
								</td>
								<td valign="top" class="txt_footer">
									<?php echo $r['option_body'];?><br />
								</td>
							</tr>
							<?php
							endforeach;
							}
							?>
						</table>
					</td>
					<?php
					}
					?>
			    </tr>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="4">
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="4" alt="" /><br />
		</td>
	</tr>
	<?php
	endforeach;
	?>
</table>
<?php }?>
</div>
</body>
</html>
