{strip}
<div style="vertical-align:top; text-align:left;" >
{assign var="page_hdr01_text" value="{lang mkey='search_results'}"}
{assign var="page_title" value="{lang mkey='search_results'}"}
{include file="admin/admin_page_hdr01.tpl"}
	<div class="module_detail_inside"  style="padding-top:1px;">
		<div class="line_outer">
		{if $error == 1 }
			<div class="line_top_bottom_pad">
				{lang mkey='no_record_found'}
			</div>
		{else}
			<div class="line_top_bottom_pad">
				{lang mkey='total_profiles_found'}&nbsp;{$totalrecs}
			</div>
			<div class="line_top_bottom_pad">
				<form action="advsearch.php" method="post">
				<input type="hidden" name="userid" value="{$userid}" />
				<div style="text-align:left; display:inline; float:left; width:60%;">
					{lang mkey='sort_by'}&nbsp;
					<select name="sort_by">
						<option value="username" {if $sort_by eq 'username'} selected="selected" {/if}>{lang mkey='username_without_colon'}</option>
						<option value="age" {if $sort_by eq 'age'}selected{/if}> {lang mkey='age'} </option>
						<option value="logintime" {if $sort_by eq 'logintime'}selected{/if}>{lang mkey='logintime'}</option>
						<option value="online" {if $sort_by eq 'online'}selected{/if}>{lang mkey='online'}</option>
						<option value="level" {if $sort_by eq 'level'}selected{/if}>{lang mkey='membership_hdr'}</option>
					</select>&nbsp;
					<select name="sort_order">
						{html_options options=$lang.sort_types selected=$sort_order}
					</select>
				</div>
				<div style="text-align:right; padding-right: 10px; display:inline; float:left; width:38%;">
					{lang mkey='results_per_page'}&nbsp;
					<select name="results_per_page">
						{html_options options=$lang.search_results_per_page selected=$psize}
					</select>
					&nbsp;<input type="submit" name="advsearch" class="formbutton" value="{lang mkey='show'}" />
				</div>
				</form>
				<div style="clear:both;"></div>
			</div>
			<div class="line_top_bottom_pad">
				{lang mkey='showing'}&nbsp;{$start+1}{lang mkey='to'}{assign var="totl" value=$data|@count}{$start+$totl}
			</div>
			<div class="line_top_bottom_pad">
				{assign var="ccount" value="0"}
				{foreach item="item" key=key from=$data}
				{if $item.id > 0}
				{if $ccount==0}
					<div>
				{/if}
					<div style="display:inline; float:left; width:49%; vertical-align:top; margin-top:2px; margin-left: 1px;">
						{include file="userresultviewsmall.tpl"}
					</div>
				{if $ccount==1}
						<div style="clear:both;"></div>
					</div>
				{/if}
					{math equation="$ccount+1" assign="ccount"}
					{math equation="$ccount%2" assign="ccount"}
				{/if}
				{/foreach}
				{if $ccount==1}
						<div style="clear:both;"></div>
					</div>
				{/if}
				<div style="clear:both;"></div>
			</div>
			{if $pages neq ""}
			<div class="line_top_bottom_pad" align="center">
			{if $prev != "" }
				<a href="advsearch.php?advsearch-1&amp;page={$prev}
				" >&lt;-- {lang mkey='previous'}</a>&nbsp;&nbsp;
			{/if}
			{if $cpage != "" && $pages != "" }
				{lang mkey='pageno'} {$cpage} {lang mkey='of'} {$pages}
			{/if}
			{if $next != "" }
				&nbsp;&nbsp;<a href="advsearch.php?advsearch=1&amp;page={$next}">{lang mkey='next'} --&gt;</a>
			{/if}
			</div>
			{/if}
		{/if}
		</div>
	</div>
</div>
{/strip}