{include file="$gentemplates/$header_tpl"}
	
	<div style="width:100%;" class="mailbox">
		<h2>{$lang.section.email}</h2>
		
                {*if $form.err}
			<p class="error">*&nbsp;{$form.err}</p>
		{/if*}
		
		<div class="sep">&nbsp;</div>
		<!-- begin top menu table -->
		{strip}
		<!-- main tabs -->	
		<div class="main_tabs">
			<div class="tab_block first">
				<a href="{$form.inbox_link}" onclick="">{$lang.mailbox.inbox}&nbsp;({$form.inbox_new}/{$form.inbox_all})</a>
			</div>
			<div class="tab_block active">
				<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}
				
		<!-- begin message list -->
		{strip}
		<div>
			{if !$maillist}
				<div class="mailbox_div">
					<div align="center"><font class="error_msg">{$lang.mailbox.empty}</font></div>
				</div>
			{else}
				{if $links_top}
				<div style="display:table;width:100%;padding: 15px 0;">					
					{include file="$gentemplates/pagination_top.tpl"}
				</div>
				{/if}
				<form action="{$form.action}" method="post" name="mailbox_form">
					{$form.hidden}
					<div class="mailbox_table">
						{section name=s loop=$maillist}
							<dl class="dl_line">
								<dd style="width: 35px">
									<img src="{$site_root}{$template_root}{$template_images_root}/message_reply_icon.gif" border="0" alt="" vspace="0" hspace="0">
								</dd>
								<dd style="width: 150px; -o-text-overflow: ellipsis; text-overflow: ellipsis; overflow: hidden;">
									{$maillist[s].from}
								</dd>
								<dd style="width:390px"><a href="{$maillist[s].read_link}">{if $maillist[s].subject eq ''}{$lang.mailbox.subject}{else}{$maillist[s].subject}{/if}</a></dd>
								<dd style="width:130px">{$maillist[s].date}&nbsp;{$maillist[s].time}</dd>
								<dd style="width:20px">
									{if $maillist[s].was_read eq '1'}
										<img src="{$site_root}{$template_root}{$template_images_root}/read_icon.gif" border="0" alt="" vspace="0" hspace="0">
									{else}&nbsp;
									{/if}
								</dd>
								<dd style="width:14px">
									<input type="checkbox" name="delete[{$smarty.section.s.index}]" value="{$maillist[s].id}">
								</dd>					
							</dl>
						{/section}					
						<dl>
							<dd class="button float_left" style="padding-top: 10px; text-align:{$default_right};float:{$default_right};margin-{$default_right}:10px;">
								<input type="button" class="index_btn" onclick="javascript: document.forms['mailbox_form'].submit();" value="{$lang.button.delete}">
							</dd>
						</dl>
					</div>
				</form>
				{include file="$gentemplates/pagination_bottom.tpl"}
			{/if}
		</div>
	</tr>
	</div>  							  
	{/strip}
{include file="$gentemplates/$footer_tpl"}