{include file="$gentemplates/$header_tpl"}
<div class="profile_general_table">	
<div class="quick_search_table" style="width:100%;">		
	<h2>{$lang.subsection.visit}</h2>	
	
	<!-- 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} ({$form.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.button.view_as_list}">&nbsp;</a>
			{else}
				<a href="{$form.view_gallery_link}" class="view-gal-icon" title="{$lang.button.view_as_gal}">&nbsp;</a>
			{/if}					
		</div>
	</div>
	<!-- end main tabs -->	
	
	<!--<p>{$header_s.toptext_visit}<br>&nbsp;</p>-->
	{*if $form.err}<p class="error error_msg">*&nbsp;{$form.err}</p>{/if*}
	{if $empty eq 1}
		<p class="error error_msg">*&nbsp;{$lang.matches.empty_result}</p>
	{/if}

	
	{if $search_res}
		{strip}
		{if $links_top}
			<div class="pagination_top">
				{include file="$gentemplates/pagination_top.tpl"}
			</div>
		{/if}
				
		<!-- begin results list -->
		<div class="search_result_list" style="width:100%;">
			{if $form.view eq 'gallery'}
				{foreach key=key item=item from=$search_res name=s}		
				<div class="search_result_gallery" style="height: 205px; {if $smarty.foreach.s.iteration is div by 6}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="bottom:5px; {$default_left}:5px; position:absolute;">&nbsp;</a></div>
					{elseif $item.blacklisted}
						<div style="position: relative;"><a class="small_block_white" style="bottom:5px; {$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}
						{if $item.age}{$item.age} {$lang.home_page.ans}<br />{/if}
						<span class="text_hidden">{$item.photo_count} {$lang.users.upload_1}</span>
					</p>
				</div>	
				</div>
				{/foreach}
			{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}" {if $smarty.foreach.s.iteration eq 1 && $smarty.foreach.s.last eq 1}style="height: 200px;"{/if}>				
					<div class="image_col">
						<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, 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_kiss" style="width:459px;">	
						{if $item.is_me ne 1}
							<a href="{$item.profile_link}" class="float_left">
						{/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}
						{if $item.age}{$item.age} {$lang.home_page.ans}<br />{/if}						
						<span class="text_hidden">{$item.photo_count} {$lang.users.upload_1}</span>
													
						{if $form.show_users_group_s eq '1'}					
							{$item.group}<br/>			
						{/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 style="width:145px;text-align:{$default_right};" class="text_hidden image_col">
						<span style="text-align: {$default_right};">
							{$item.visit_date}
						</span>
					</div>	
				</div>			
			{/foreach}
			{/if}
		</div>
			
		{include file="$gentemplates/pagination_bottom.tpl"}
		{/strip}
		<!-- end results list -->
	{/if}
</div>			
{include file="$gentemplates/$footer_tpl"}