{strip}
{if $config.use_profilepopups == 'Y' or $smarty.session.AdminId > 0}
{include file="popheader.tpl"}
{/if}
<div style="vertical-align:top;" >
	{assign var="page_hdr01_text" value=$username|cat:"\'s "|cat:"{lang mkey='video_galery'}"}
	{assign var="page_title" value="{lang mkey='video_galery'}"}
	{include file="page_hdr01.tpl"}
	<div class="module_detail_inside">
		{if $err != ''}
			{assign var="error_message" value="{lang mkey='errormsgs' skey=$err}" }
			{include file="display_error.tpl" }
		{/if}
		<form name="album01" action="uservideogallery.php" method="post" >
			<input type="hidden" name="username" value="{$username}"/>
			<input name="id" type="hidden" value="{$userid}"/>
			<div class="line_outer">
				{lang mkey='album_hdr'}:&nbsp;&nbsp;
				<select name="album_id" >
				<option value="" selected>{lang mkey='public'}</option>
				{foreach from=$useralbums item=album}
				<option value="{$album.id}" {if $album.id== $album_id} selected {/if}>{$album.name}</option>
				{/foreach}
				</select>
				{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}
				&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.allow_videos == 1  and $smarty.session.security.videoscnt > 0 and $userid == $smarty.session.UserId}
				<a href="#" class="panellink" onClick="javascript: {if $config.use_profilepopups == 'Y'} opener{else}window{/if}.location='uploadvideos.php?userid={$userid}'; {if $config.use_profilepopups == 'Y'}window.close();{/if}" >{lang mkey='manage_videos'}</a>
				{/if}
			</div>
		</form>
		<div class="line_outer">
		{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=""}
			{assign var="vdcnt" value=0}
			{if $smarty.get.galpicid != ''}
				{assign var="galpicid" value=$smarty.get.galpicid}
			{/if}
			<table cellspacing=2 cellpadding=2 border=0>
			{foreach item=pic from=$pics}
				{assign var="vdcnt" value=$vdcnt+1}
				{if $galpicid == ''}
					{assign var="galpicid" value=$pic.videono}
				{/if}
				{if $cntr==1}<tr>{/if}
				<td>
				<a href="{$docroot}videos/showvideo.php?userid={$userid}&amp;videono={$pic.videono}&amp;prog=gallery"  target="MemberFullPic">
				{mylang mkey='video'} - {$vdcnt}
				</a>&nbsp;
				</td>
				{if $cntr == $config.album_tnpics_cnt}
					</tr>
					{assign var="cntr" value="1"}
				{else}
					{assign var="cntr" value=$cntr+1}
				{/if}
			{/foreach}
			{if $cntr <= $config.album_tnpics_cnt}
				</tr>
			{/if}
			</table>
			<div class="line_top_bottom_pad">
				<center>
				<iframe src="{$docroot}videos/showvideo.php?userid={$userid}&amp;videono={$galpicid}&amp;prog=gallery" name="MemberFullPic" align="center" scrolling="auto" frameborder="0" width="500" height="600" >
				<center>Sorry, your browser doesn\'t support iframes.</center>
				</iframe>
				</center>
			</div>
		{/if}
		</div>
	</div>
</div>
{if $config.use_profilepopups == 'Y'}
{include file="popfooter.tpl"}
{/if}
{/strip}