{include file="$gentemplates/$header_tpl"}
<div class="mailbox">
	<h2>{$lang.section.email}</h2>
	
        {*if $form.err}
		<p class="error">*&nbsp;{$form.err}</p>
	{/if*}
	
	<!-- begin top menu table -->
	{strip}
	<!-- main tabs -->	
	<div class="main_tabs">
		<div class="tab_block first {if $par eq 'to'}active{/if}">
			<a href="{$form.inbox_link}" onclick="">{$lang.mailbox.inbox}&nbsp;({$form.inbox_new}/{$form.inbox_all})</a>
		</div>
		<div class="tab_block {if $par eq 'from'}active{/if}">
			<a href="{$form.outbox_link}" onclick="">{$lang.mailbox.outbox}&nbsp;({$form.outbox_all})</a>
		</div>
		<div class="tab_block">
			<a href="{$form.write_link}" onclick="">{$lang.mailbox.compose}</a>
		</div>
	</div>
	<!-- end main tabs -->		
	{/strip}
	<!-- end top menu table -->
			
	<!--  user info-->
	{strip}
		<div class="content_main">				
			<div class="text image">
				{if !$data.root_user}
					<a class="imgcanvas_container" href="{$data.profile_link}" style="position: relative;">
						<img src="{$data.icon_path}" class="icon imgcanvas" alt="" onmouseover="javascript: CreateBigImage(this, event);" />
					</a>
				{else}
					<a class="imgcanvas_container"><img src="{$data.icon_path}" class="icon imgcanvas" alt="" onmouseover="javascript: CreateBigImage(this, event);" /></a>
				{/if}
					
				{if $data.hotlisted}
					<div style="padding:0px; position: relative;"><a class="small_heart_white" style="bottom:5px; {$default_left}:5px; position:absolute;">&nbsp;</a></div>
				{elseif $data.blacklisted}
					<div style="padding:0px; position: relative;"><a class="small_block_white" style="bottom:5px; {$default_left}:5px; position:absolute;">&nbsp;</a></div>
				{/if}
			</div>
			<div class="text cont" style="margin-bottom: 10px;">
				<p style="overflow:hidden;">
					{if !$data.root_user}<a class="float_left" href="{$data.profile_link}">{/if}
					<span class="float_left">{$data.name}</span>
					{if !$data.root_user}</a>{/if}
					<span class="float_left">&nbsp;&nbsp;</span>
					<span class="float_left status{if $data.status eq $lang.status.on}_link{else}_text{/if}">{$data.status}</span>
				</p>
				<p style="overflow:hidden;">
					<span class="float_left">{if $data.city}{$data.city}, {/if}{if $data.region}{$data.region}, {/if}{$data.country}</span><br />
					{$data.age} {$lang.home_page.ans}
				</p>
				<p class="text_hidden" style="overflow:hidden;">	
					{$data.photo_count}&nbsp;{$lang.users.upload_1}
				</p>
				<p>
					{if $form.show_users_group_str eq '1'}{$data.group}{/if}<br />
					{$lang.users.gender_search}&nbsp;{if $data.user_subtypes}{$data.user_subtypes}&nbsp;({$data.user_type}){else}{$data.user_type}{/if} {$lang.users.from} {$data.age_min} {$lang.users.to} {$data.age_max}
				</p>
				<a href="{$data.history_link}">{$lang.mailbox.history}</a>
			</div>							
		</div>	
	{/strip}
	<!-- end user info -->
		<div style="clear:both"></div>
		<!-- other mess info -->
		{strip}
		<div class="message_form">
			<div class="div_comment">
				<div class="float_left text_head">{$data.subject_msg}</div>
				<div class="float_right">{$data.date_msg}</div>			
			</div>
			<div class="wysiwyg_content">{$data.text_msg}</div>
			{if isset($data.attaches)}
				<div class="attaches">
					<div class="text">{$lang.mailbox.attaches}</div>
					{foreach item=item from=$data.attaches}
						<div>
						<a href="{$item.path}" target="_blank">{$item.name}</a>
						</div>
					{/foreach}			
				</div>
			{/if}
			<div class="attaches_button">
				{if $par eq 'to' && $data.reply_link}
				<input type="button" class="index_btn" value="{$lang.mailbox.reply}" onclick="document.location.href='{$data.reply_link}';">
				{elseif $par eq 'from'}
				<input type="button" class="index_btn" value="{$lang.mailbox.resend}" onclick="document.location.href='{$data.resend_link}';">
				{/if}			
			</div>
		</div>
		{if $data.name_msg_last}
			<div class="message_form">
				<div class="div_comment">
					<div class="float_left text_head">{$lang.mailbox.previous_email}:&nbsp;{$data.subject_msg_last}</div>
					<div class="float_right">{$data.date_msg_last}</div>
				</div>			
				<div class="wysiwyg_content">{$data.text_msg_last}</div>	
			</div>
		{/if}
		
		
		
		{/strip}
		<!-- end other mess info -->
		<script language="JavaScript" type="text/javascript">
		</script>
	</div>
	{* {if $banner.right}<div style="float: left;">{$banner.right}</div>{/if}	*}
{include file="$gentemplates/$footer_tpl"}