<?php

// -----------------------------------------------------------------------
// This file is part of AROUNDMe
//
// Copyright (C) 2003 - 2007 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., 51 Franklin St, Fifth Floor, Boston, MA
// 02110-1301, USA.
// -----------------------------------------------------------------------

?>

<style type="text/css">
<!--
@import url(<?php echo $template_path;?>css/aroundme_form.css);
-->
</style>


<form action="index.php?amn=core_msg_view" method="post" name="frm" id="id_frm">
<input type="hidden" name="message_id" value="<?php if (isset($message['message_id'])) { echo $message['message_id'];}?>" /><br />

<div class="col_main">
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_message'];?></h1>
			</div>
		</div>
			
		<div class="box_mid">
			<div class="content">
				<span class="txt_item_title">
					<?php echo $message['message_subject'];?><br />
				</span>
					
				<p>
					<?php echo $message['message_body'];?><br />
				</p>
				
				<img src="<?php echo $template_path;?>img/pixel.png" width="1" height="6" alt="" /><br />
				
				<p class="metadata">
					<?php echo $lang['txt_message_sent'];?>:&nbsp;
					<?php echo $this->date->formatDate($message['message_create_datetime'], 1);?>,&nbsp;
					<?php echo $lang['txt_message_size'];?>:&nbsp;
					<?php echo strlen($message['message_body']);?><br />
				</p>
							
				<img src="<?php echo $template_path;?>img/pixel.png" width="1" height="6" alt="" /><br />
				
				<hr />
				
				<p align="right">
					<input name="delete_message" type="submit" class="input_submit" value="<?php echo $lang['sub_delete'];?>" />&nbsp;&nbsp;
					<?php
					if (isset($identity)) {
					?>
					<input name="reply_message" type="submit" class="input_submit" value="<?php echo $lang['sub_reply'];?>" /><br />
					<?php }?>
				</p>
			</div>	
		</div>
	</div>
</div>

<div class="col_side">
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_from'];?></h1>
			</div>
		</div>
			
		<div class="box_mid">
			<div class="content">
				<?php
				if (isset($identity)) {
					$id_card = $identity;
					$id_card_layout = "portrait";
					include('inc/identity.inc.php');
				}
				else {
					echo $lang['txt_from_system'];
				}
				?>
			</div>
		</div>
	</div>
</div>
</form>