{include file="$gentemplates/$header_tpl"}

	<h2>{$lang.answers.menu.my_a}</h2>
	{include file="$gentemplates/answ_menu.tpl"}
	<input type="button" onclick="location.href='{$file_name}?sel=my_q';" value="{$lang.answers.menu.my_q}">
	<input type="button" onclick="location.href='{$file_name}?sel=my_a';" value="{$lang.answers.menu.my_a}">

	<p style="margin: 10px 0;">
		<input type="radio" {if !$form.best_filter}checked="checked"{/if} onclick="location.href='{$file_name}?sel=my_a&filter=all&page=1';"/> {$lang.answers.all_yours_answers}&nbsp;&nbsp;
		<input type="radio" {if $form.best_filter == '1'}checked="checked"{/if} onclick="location.href='{$file_name}?sel=my_a&filter=best_answ&page=1';"/> {$lang.answers.yours_best_answers}&nbsp;&nbsp;
    </p>

	{foreach name=answers from=$answers item=item}
	<div class="overflowhidden" style="margin-bottom: 10px;">
		<div class="float_left" style="margin-{$default_right}: 10px;">
			{if !$item.root_user}
				<a class="imgcanvas_container" href="{$item.profile_link}"><img alt="" class="imgcanvas" src="{$item.icon_url}" border="0"/></a>
			{else}
				<img alt="" class="imgcanvas" src="{$item.icon_url}" border="0"/>
			{/if}
			<br />
			{if !$item.root_user}
				<a href="{$item.profile_link}">{$item.name}</a>
			{else}
				{$item.name}
			{/if}
			<br />
			{$item.age} {$lang.answers.ans}
		</div>
		<div>
			<span class="text_head">{$lang.answers.asked}:</span> {if !$item.item_life_time}{$lang.answers.asked_now}{else}{$item.item_life_time} {$lang.answers.ago}{/if}&nbsp;|&nbsp;
			<span class="text_head">{$lang.answers.answered}:</span> {$item.comment_life_time}
			{if $item.is_open == '0'}
				&nbsp;|&nbsp;<span class="text_head">{$lang.answers.closed}:</span> {if !$item.item_closed_time}{$lang.answers.asked_now}{else}{$item.item_closed_time} {$lang.answers.ago}{/if}<br />
			{/if}
			<span class="text_head">{$lang.answers.question}:</span> {$item.item_text}<br />
			{if $item.item_details}<span class="text_head">{$lang.answers.details}:</span> <span class="wysiwyg_content">{$item.item_details}</span><br />{/if}
			<span class="text_head">{$lang.answers.in}:</span> {$item.path}<br />
			{if $item.is_best == '1'}<span class="text_head">{$lang.answers.best_answer_header}</span><br />{/if}
			<span class="text_head">{$lang.answers.your_answer}:</span> <span class="wysiwyg_content">{$item.comment_text}</span>
		</div>
	</div>

	{foreachelse}
	<p>{$lang.answers.no_answers}</p>
	{/foreach}

	<!--<div style="margin-top: 10px;">
		{foreach name=links from=$link_arr item=item}
		<a href="{$file_name}?sel=my_a&page={$item.page}" {if $item.selected} style="font-weight:bold; text-decoration:none;"{/if}>{$item.name}</a>
		{/foreach}
	</div>-->
	
	<div class="search_link">
		<div class="sorting-long">
			<div class="b-page-n">	
				{foreach item=item from=$link_arr}
					{if $item.first_page eq 1}
						<a href="{$file_name}?sel=my_a&page={$item.page}" class="first-page-act" title="{$lang.general.first}">&nbsp;</a>
					{elseif $item.first_page eq 2}
						<a href="javascript: void(0);" class="first-page">&nbsp;</a>
					{/if}
					
					{if $item.previous_page eq 1}
						<a href="{$file_name}?sel=my_a&page={$item.page}" class="back-page-act" id="back-page-act_bottom" alt="{$lang.default_select.back}" title="{$lang.general.prev}">&nbsp;</a>
					{elseif $item.previous_page eq 2}
						<a href="javascript: void(0);" class="back">&nbsp;</a>
					{/if}
					
					{if $item.selected}
						<a href="javascript: void(0);" onclick="goToPage('{$item.page}'); return false;" class="act-page">{$item.name}</a>
					{else}
						<a href="{$file_name}?sel=my_a&page={$item.page}">{$item.name}</a>
					{/if}
					
					{if $item.delimiter}
						{$item.delimiter}
					{/if}
					
					{if $item.next_page eq 1}
						<a href="{$file_name}?sel=my_a&page={$item.page}" class="next-page-act" id="next-page-act_bottom" alt="{$lang.default_select.next}" title="{$lang.general.next}">&nbsp;</a>
					{elseif $item.next_page eq 2}
						<a href="javascript: void(0);" class="next">&nbsp;</a>
					{/if}
						
					{if $item.last_page eq 1}
						<a href="{$file_name}?sel=my_a&page={$item.page}" class="last-page-act" title="{$lang.general.last}">&nbsp;</a>
					{elseif $item.last_page eq 2}
						<a href="javascript: void(0);" class="last-page">&nbsp;</a>
					{/if}	
				{/foreach}
			</div>
		</div>
	</div>
</div>
{include file="$gentemplates/$footer_tpl"}