<?php $this->load->view('header');?>

	<!-- BEGIN PAGE HEADER-->

	<div class="row-fluid">

		<div class="span12">

			<!-- BEGIN PAGE TITLE & BREADCRUMB-->

			<h3 class="page-title"><?php echo ($selected_tab == MESSAGE_SENT) ? $this->lang->line('message_outbox_message') : $this->lang->line('message_inbox_message');?></h3>

			<ul class="breadcrumb">

				<li>

					<i class="icon-home"></i>

					<a href="<?php echo base_url();?>home/"><?php echo $this->lang->line('hf_home');?></a> 

					<i class="icon-angle-right"></i>

				</li>
				<li><?php echo $this->lang->line('hf_private_message');?> <i class="icon-angle-right"></i></li>

				<li>

					<?php echo ($selected_tab == MESSAGE_SENT) ? $this->lang->line('message_outbox_message') : $this->lang->line('message_inbox_message');?>

				</li>
			</ul>

			<!-- END PAGE TITLE & BREADCRUMB-->

		</div>

	</div>

	<!-- END PAGE HEADER-->

	<!-- BEGIN PAGE CONTENT-->

	<div class="row-fluid">

		<div class="span12">

			<div class="portlet box blue">

				<div class="portlet-title">

					<div class="caption"><i class="icon-reorder"></i><?php echo ($selected_tab == MESSAGE_SENT) ? $this->lang->line('message_outbox_message') : $this->lang->line('message_inbox_message');?></div>

				</div>

				<div class="portlet-body form">

					<div class="form-horizontal form-view">
						<div class="control-group">
							<label class="control-label"><?php echo ($selected_tab == MESSAGE_SENT) ? $this->lang->line('message_receiver') : $this->lang->line('message_sender');?></label>
							<div class="controls">
								<span class="text"><?php echo isset($username) ? $username : '';?></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label"><?php echo $this->lang->line('message_subject');?></label>
							<div class="controls">
								<span class="text"><?php echo isset($subject) ? $subject : '';?></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label"><?php echo $this->lang->line('message_message');?></label>
							<div class="controls">
								<span class="text"><?php echo isset($message) ? nl2br($message) : '';?></span>
							</div>
						</div>					
						<div class="form-actions">
							<button type="button" class="btn blue" onClick="location.href='<?php echo base_url();?>message/edit/<?php echo $selected_tab;?>/<?php echo isset($message_id) ? $message_id : '';?>/';"><i class="icon-ok"></i> <?php echo $this->lang->line('message_edit');?></button>
							<button type="button" class="btn blue" onClick="location.href='<?php echo base_url();?>message/reply/<?php echo $selected_tab;?>/<?php echo isset($message_id) ? $message_id : '';?>/';"><i class="icon-ok"></i> <?php echo $this->lang->line('message_reply');?></button>
						</div>
					</div>	

				</div>

			</div>

		</div>

	</div>

	<!-- END PAGE CONTENT -->

<?php $this->load->view('footer');?>