{include file="$gentemplates/$header_tpl"}
<div class="profile_general_table">
	<div class="quick_search_table">
		<h2>{$lang.section.perfect_match}</h2>
		<!--<div class="text">{$header_s.toptext_perfect}<br>&nbsp;</div>-->
		{*if $form.err}
			<div class="error"><font class="error_msg">*&nbsp;{$form.err}</font><br>&nbsp;</div>
		{/if*}
		
		{strip}
			<!-- main tabs -->	
			<div class="main_tabs">				
				<div class="tab_block first {if $form.filter eq 'all'} active{/if}">
					<a href="{$form.view_all_link}">
						{$lang.search.view_all} ({math equation='x+y' x=$form.online_count y=$form.offline_count})
					</a>
				</div>
				<div class="tab_block {if $form.filter eq 'online'} active{/if}">
					<a href="{$form.view_online_link}">
						{$lang.search.view_online} ({$form.online_count})
					</a>
				</div>
				<div class="tab_block {if $form.filter eq 'new'} active{/if}">
					<a href="{$form.view_new_link}">
						{$lang.search.view_new} ({$form.new_count})
					</a>
				</div>
				<div class="view">
					{if $form.view eq 'gallery'}
						<a href="{$form.view_list_link}" class="view-list-icon" title="{$lang.search.view_list}">&nbsp;</a>
					{else}
						<a href="{$form.view_gallery_link}" class="view-gal-icon" title="{$lang.search.view_gallery}">&nbsp;</a>
					{/if}					
				</div>
			</div>
			<!-- end main tabs -->		
		{/strip}  	
		<div class="pagination_top">
			<div class="float_left">
				<span>{$lang.search.members}:&nbsp;</span>
				<select name="select_menu" onchange="window.location=this.options[this.selectedIndex].value;">
					<option value="{$form.hotlist_text_1_1_link}{if $form.online_count ne 0 or $form.offline_count ne 0}?view_select=1{/if}" selected="">{$lang.matches.hotlist_text_1_1}</option>
					<option value="{$form.hotlist_text_1_2_link}{if $form.online_count ne 0 or $form.offline_count ne 0}?view_select=1{/if}">{$lang.matches.hotlist_text_1_2}</option>
					<option value="{$form.hotlist_text_1_3_link}{if $form.online_count ne 0 or $form.offline_count ne 0}?view_select=1{/if}">{$lang.matches.hotlist_text_1_3}</option>
				</select>
			</div>
			{include file="$gentemplates/pagination_top.tpl"}
		</div>
		{if $empty eq 1}
			<div class="error"><font class="error_msg">*&nbsp;{$header_s.empty_result}</font><br>&nbsp;</div>
		{elseif $empty eq 2}
			<div class="error">
				<font class="error_msg">*&nbsp;{$form.not_fill}</font>&nbsp;
				<a href="{$form.perfect_link}?edit=1"><b>{$header_s.perfect_match}</b></a><br>&nbsp;
			</div>
		{/if}

		{if $empty ne 1 && $empty ne 2}			

			<div class="search_result_list" style="width:100%;">
				<!-- begin results list -->
					<div style="height: 10px; margin: 0px">
						<img src="{$site_root}{$template_root}{$template_images_root}/empty.gif" height="5px" alt="">
					</div>
					{if $form.view eq 'gallery'}
						{foreach key=key item=item from=$search_res name=s}
							<div class="search_result_gallery" {if $smarty.foreach.s.iteration is div by 6}style="margin-right:0px"{/if}>
								<div class="">
								<a class="imgcanvas_container" href="{$item.profile_link}" style="position: relative;">
									<img src="{$item.icon_path}" class="icon imgcanvas" alt="" onmouseover="javascript: CreateBigImage(this, event{if $smarty.foreach.s.iteration is div by 6}, true{else}, false{/if}, false);">
								</a>
									{if $item.hotlisted}
										<div style="position: relative;"><a class="small_heart_white" style="top:-38px; {$default_left}:5px; position:absolute;">&nbsp;</a></div>
									{elseif $item.blacklisted}
										<div style="position: relative;"><a class="small_block_white" style="top:-38px; {$default_left}:5px; position:absolute;">&nbsp;</a></div>
									{/if}
								<p>
									<a href="{$item.profile_link}">{$item.name|truncate:18:"...":true}</a><br />
									{if $item.location}{$item.location|truncate:18:"...":true}<br />{/if}
									{$item.age} {$lang.home_page.ans}<br />
									<span class="text_hidden">{$item.photo_count} {$lang.users.upload_1}</span>
								</p>
								</div>
							</div>
						{/foreach}
						<div style="clear:both"></div>
					{else}
					{foreach key=key item=item from=$search_res name=s}
						<div class="table_result_list {if $item.is_me eq 1} home_menu {/if}" >					
							<div class="image_col">	
								<a class="imgcanvas_container" href="{if $item.is_me ne 1}{$item.profile_link}{else}#{/if}" style="position: relative;">
									<img src="{$item.icon_path}" class="icon imgcanvas" alt="" onmouseover="javascript: CreateBigImage(this, event, false{if $smarty.foreach.s.last eq 1}, true{else}, false{/if});" >	
								</a>
								{if $item.hotlisted}
									<div style="position: relative;"><a class="small_heart_white" style="top:-38px; {$default_left}:5px; position:absolute;">&nbsp;</a></div>
								{elseif $item.blacklisted}
									<div style="position: relative;"><a class="small_block_white" style="top:-38px; {$default_left}:5px; position:absolute;">&nbsp;</a></div>
								{/if}
							</div>
							<div class="info_col">							
								{if $item.is_me ne 1}
									<a class="float_left" href="{$item.profile_link}">
								{/if}
									{$item.name|truncate:20:"...":true}
								{if $item.is_me ne 1}</a>{/if}
								<span class="float_left">&nbsp;&nbsp;</span>								
								<span class="float_left status{if $item.status eq $lang.status.on}_link{else}_text{/if}">{$item.status}</span><br /><br />
								{if $item.location}{$item.location|truncate:30:"...":true}<br />{/if}
								{$item.age} {$lang.home_page.ans}<br />							
								<span class="text_hidden">{$item.photo_count} {$lang.users.upload_1}</span>
															
								{if $form.show_users_group_s eq '1'}					
									<p>{$item.group}</p>				
								{/if}							
								<p class="text_hidden">
									{$lang.users.gender_search}&nbsp;
									{if $item.user_subtypes}{$item.user_subtypes}&nbsp;({$item.user_type})
									{else}{$item.user_type}
									{/if} 
									{$lang.users.from} {$item.age_min} {$lang.users.to} {$item.age_max}
								</p>							
							</div>				
							<div class="annonce" style="text-align:{$default_right}">
								<p style="text-align: {$default_right};">
									{$item.date_registration}
								</p>
							</div>
						</div>
				{/foreach}
				</div>
			{/if}			
		<!-- end results list -->
		
			{include file="$gentemplates/pagination_bottom.tpl"}
		{/if}		
	</div>
{include file="$gentemplates/$footer_tpl"}