{include file="$gentemplates/$header_tpl"}
{strip}
	<div class="header">
	{$data.login}&nbsp;{$lang.mobile.user_photos}&nbsp;-&nbsp;{$lang.mobile.view}
	</div>
	<div id="search_resulits">
		{if $data.nav.prev ne '' || $data.nav.next ne ''}
		<div style="padding-top: 10px;">
			{if $data.nav.prev ne ''}<div style="float: left;"><a href="photogallery.php?sel=photo&from=category&id_category={$id_category}&photo_id={$data.nav.prev}&page={$page}">< Previous</a></div>{/if}
			{if $data.nav.next ne ''}<div style="float: right;"><a href="photogallery.php?sel=photo&from=category&id_category={$id_category}&photo_id={$data.nav.next}&page={$page}">Next ></a></div>{/if}
			<div style="clear: both;"></div>
		</div>
		{/if}
		<div style="padding-top: 10px;">
			<img src="{$data.main_file}" border="0" id="image" style="width: {$data.width}px;">
		</div>

		<div style="padding-top: 7px;">
			{if $data.user_comment}<b>{$lang.mobile.user_comment}</b>&nbsp;:&nbsp;{$data.user_comment}{/if}
		</div>
		<div style="padding-top: 7px;">
			{$lang.mobile.author}&nbsp;:&nbsp;<a href="viewprofile.php?id={$data.user_id}">{$data.login}</a>
		</div>
		<div style="margin-top: 5px;">
			<b>{$lang.mobile.rating}:</b> {$data.gallery_rate}&nbsp;|&nbsp;<b>{$lang.mobile.views}:</b> {$data.views}
		</div>
		{if $data.no_rating ne 1}
		<div style="margin-top: 10px;">
				<table border="0" cellspacing="0" cellpadding="0">
				<tr align="center">
				{foreach from=$vote_arr item=item}
				<td>
				<a href="photogallery.php?sel=vote_act&photo_id={$data.id}&id_category={$id_category}&rate={$item}">
				<img id="mark{$item}" name="mark{$item}" src="{$data.vote_icon_0_path}" onmouseover="marks({$item},'show');" onmouseout="marks({$item},'hide');" border="0">
				</a>
				</td>
				{/foreach}
				</tr>
				</table>
		</div>
		{/if}
	<br>
	<a href="{$data.back_link}">{$lang.mobile.back}</a>
	</div>
{/strip}
{literal}
<script type="text/javascript">
window.onload=function(){
	document.getElementById("image").style.width = (screen.width-40)+'px';
	document.getElementById("image").style.height = "auto";
}
</script>

<script type="text/javascript">

{/literal}{if $data.no_rating ne '1'}{literal}
if (document.images)
{
	var mark_show=new Image;
	mark_show.src="{/literal}{$data.vote_icon_1_path}{literal}"
	var mark_hide=new Image;
	mark_hide.src="{/literal}{$data.vote_icon_0_path}{literal}"
}

function marks(id,type)
{
	if (!document.images)
	{
		return false;
	}
	for (i=1; i<=id; i++)
	{
		if (type=="show")
		{
			document.images["mark"+i].src=mark_show.src;
		}
		else if (type=="hide")
		{
			document.images["mark"+i].src=mark_hide.src;
		}
	}
	return;
}
{/literal}{/if}{literal}
</script>
{/literal}
{include file="$gentemplates/$footer_tpl"}