{include file="$gentemplates/$header_tpl"}
{strip}
	<div class="header">
		{$lang.mobile.photogallery}
	</div>
	<div id="mailbox_menu">
		<div>
			<span><a href="photogallery.php?sel=latest" {if $par ne 'latest'}class="unselected"{/if}>{$lang.mobile.latest}</a></span>
			<span id="last"><a href="photogallery.php?sel=categories" {if $par ne 'categories'}class="unselected"{/if}>{$lang.mobile.categories}</a></span>
		</div>
	</div>
	<div id="search_resulits">
	{if $par eq 'latest'}
		{if $last_uploads ne 'no_photos'}
		{foreach item=item from=$last_uploads}
			<div class="user_sr_block">
				<table cellpadding="0" cellspacing="0">
				<tr>
					<td valign="top"><div class="user_icon"><a href="{$item.view_link}"><img src="{$item.thumb_file}" alt="" /></a></div></td>
					<td valign="top">
						<div class="photo_info">
							<div>{$lang.mobile.author}:&nbsp;<a href="viewprofile.php?id={$item.author_id}">{$item.author_login}</a></div>
							<div><b>{$lang.mobile.rating}:</b> {$item.gallery_rate}</div>
							<div><b>{$lang.mobile.views}:</b> {$item.views}</div>
							<div><a href="{$item.view_link}">{$lang.mobile.view}</a></div>
						</div>
					</td>
				</tr>
				</table>
			</div>
		{/foreach}

		{else}
		{$lang.mobile.photos_are_not_found}
		{/if}
	{elseif $par eq 'categories'}

		{if $categories ne 'no_categories'}
		{foreach item=item from=$categories}
			<div class="user_sr_block">
				<table cellpadding="0" cellspacing="0">
				<tr>
					<td valign="top">{if $item.icon}<div class="user_icon"><a href="{$item.view_link}"><img src="{$item.icon}" alt="" /></a></div>{/if}</td>
					<td valign="top">
						<div class="photo_info">
							<div>Category:&nbsp;<a href="{$item.view_link}">{$item.name}</a></div>
							<div class="gray">Photos:&nbsp;{$item.photo_count}</div>
							<div>{$lang.mobile.author}: <a href="viewprofile.php?id={$item.author_id}">{$item.author_login}</a></div>
						</div>
					</td>
				</tr>
				</table>
			</div>
		{/foreach}
		{else}
		{$lang.mobile.photos_are_not_found}
		{/if}

	{/if}

	{if isset($gal_links)}
	<div id="pagination">
	{foreach item=item from=$gal_links}
	<div class="link">{if $item.selected}<span>{else}<a href="{$item.link}">{/if}{$item.name}{if $item.selected}</span>{else}</a>{/if}</div>
	{/foreach}
	<div style="clear: both;"></div>
	{/if}
	</div>
{/strip}
{include file="$gentemplates/$footer_tpl"}