{strip}
{if $config.use_profilepopups == 'Y' or $smarty.session.AdminId > 0}
{include file="popheader.tpl"}
{/if}
<div class="module_detail"  style="width:99.9%;vertical-align:top;display:inline; float:left;" >
	{if $type == 'gallery'}
		{assign var="page_hdr01_text" value=$username|cat:"\'s "|cat:"{lang mkey='picture_gallery'}"}
		{assign var="page_title" value="{lang mkey='picture_gallery'}"}
		{if $userid == $smarty.session.UserId}
			{assign var="page_hdr01_text_r" value='<a href="uploadsnaps.php?type='|cat:$type|cat:'" class="subhead">'|cat:"{lang mkey='upload_pictures'}"|cat:'</a>&nbsp;&nbsp;'}
		{/if}
	{else}
		{assign var="page_hdr01_text" value=$username|cat:"\'s "|cat:"{lang mkey='profilepics_gallery'}"}
		{assign var="page_title" value="{lang mkey='profilepics_gallery'}"}
		{if $userid == $smarty.session.UserId}
			{assign var="page_hdr01_text_r" value='<a href="uploadsnaps.php?type='|cat:$type|cat:'" class="subhead">'|cat:"{lang mkey='upload_profilepics'}"|cat:'</a>&nbsp;&nbsp;'}
		{/if}
	{/if}
	{include file="page_hdr01.tpl"}
	<div class="module_detail_inside" style="margin-top: 4px;">
	{if $err != ''}
		{assign var="error_message" value="{mylang mkey='errormsgs' skey=$err}" }
		{include file="display_error.tpl"}
	{/if}
	{if $useralbums|@count > 0 }
		<form name="album01" action="userpicgallery.php" method="post" >
		<input type="hidden" name="username" value="{$username}"/>
		<input name="id" type="hidden" value="{$userid}" />
		<input type="hidden" name="type" value="{$type}" />
		<div class="line_outer" style="margin-left: 6px; margin-top: 6px; margin-bottom: 3px;">
			{lang mkey='album_hdr'}:&nbsp;&nbsp;
			<select name="album_id" >
			{foreach from=$useralbums item=album}
				<option value="{$album.id}" {if $album.id== $album_id} selected {/if}>{$album.name}</option>
			{/foreach}
			</select>
		{if $albumpasswd > 0 }
			{if $smarty.session.UserId != $userid }
				&nbsp;&nbsp;&nbsp;
				{lang mkey='signup_password'}&nbsp;
				<input name="album_passwd" type="password" size="15"/>
			{else}
				<input name="album_passwd" type="hidden" value='' size="15"/>
			{/if}
		{/if}
			&nbsp;&nbsp;
			<input type="submit" class="formbutton" value="{lang mkey='show'}"/>
			&nbsp;&nbsp;
		{if $smarty.session.expired != 1 and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'Active') and $smarty.session.security.uploadpicture == 1  and $smarty.session.security.uploadpicturecnt > 0 and $userid == $smarty.session.UserId}
			<a href="#" class="panellink" onClick="javascript: {if $config.use_profilepopups == 'Y'} opener{else}window{/if}.location='uploadsnaps.php'; {if $config.use_profilepopups == 'Y'}window.close();{/if}" >{lang mkey='upload_pictures'}</a>
		{/if}
		</div>
	    </form>
	{/if}
	{if $pics|@count <= 0}
		{assign var="error_message" value="{lang mkey='errormsgs' skey=82}" }
		{include file="display_error.tpl"}
	{else}
		{assign var="cntr" value="1"}
		{assign var="galpicid" value=""}
		{if $smarty.get.galpicid != ''}
		{assign var="galpicid" value=$smarty.get.galpicid}
		{/if}
	{foreach item=pic from=$pics}
		{if $galpicid == ''}
		{assign var="galpicid" value=$pic.picno}
		{/if}
		{if $cntr==1}<div style="margin: 2px; 6px; 2px; 6px;">{/if}
		<div style="display:inline; float:left;">
		<a href="showpic_iframe.php?id={$userid}&amp;picid={$pic.picno}&amp;typ=pic&amp;album_id={$album_id}" target="MemberFullPic" >
		<img src="getsnap.php?id={$userid}&amp;typ=tn&amp;picid={$pic.picno}&amp;album_id={$album_id}" alt="{$username}'s picture # {$pic.picno}" border="0" class="smallpic" /></a>&nbsp;
		</div>
		{if $cntr == $config.album_tnpics_cnt}
		<div style="clear:both;"></div>
		</div>
		{assign var="cntr" value="1"}
		{else}
		{assign var="cntr" value=$cntr+1}
		{/if}
	{/foreach}
	{if $cntr <= $config.album_tnpics_cnt}
		<div style="clear:both;"></div>
	</div>
	{/if}
	<div style="width:100%"><hr size="2" /></div>
	<div style="vertical-align:top; width:100%; text-align: left;" >
		<center>
		<iframe src="showpic_iframe.php?id={$userid}&amp;picid={$galpicid}&amp;typ=pic&amp;album_id={$album_id}" name="MemberFullPic" scrolling="auto" frameborder="0" width="100%" height="600" class="picgallery" style="text-align: center;">
		<center>Sorry, your browser doesn\'t support iframes.</center>
		</iframe>
		</center>
	</div>
	{/if}
	</div>
</div>
<div style="clear:both;"></div>
{if $config.use_profilepopups == 'Y'}
{include file="popfooter.tpl"}
{/if}
{/strip}