{include file="$gentemplates/$header_tpl"}

{if $upload_type eq 'f'}
	<script language="JavaScript" type="text/javascript" src="{$site_root}{$template_root}/js/class.gallery.js"></script>
	{literal}
		<script>
			$(document).ready(function(){
				gallery = new gallery({
					id: 'gallery_ajax',
					url: SERVER+'/ajax_backend.php',
					gallery_url: SERVER+'/gallary.php',
					button_title: '{/literal}{$lang.button.view_more}{literal}',
					load_on_scroll: 1,
					id_category: 0
				});
				gallery.init().loadLines();
			});
		</script>
	{/literal}
{/if}
	
<div class="profile_general_table">
{strip}
<div>
<h2 style="position: relative;">{$lang.gallary.$upload_type}
	<span class="gallery_icon_container">
	{if $upload_type eq 'f'}
		<span class="add_video_icon">
			<ins onclick="javascript:location.href='{$site_root}/{$seo.myprofile}?sel=4&sub=8';" class="photo-icon gallary_sub_icon" title="{$lang.gallary.my_photos}">&nbsp;</ins>
		</span>
	{/if}
	{if $upload_type eq 'v'}
		<span class="add_video_icon">
			<ins onclick="javascript:location.href='{$site_root}/{$seo.myprofile}?sel=4&sub=10';" class="video-icon gallary_sub_icon" title="{$lang.gallary.my_videos}">&nbsp;</ins>
		</span>
	{/if}
	
	{if $group_adult_allow}
		<span class="adult_gallery_check_span float_right">
			<label for="adult_content_check">{$lang.adult_content_check}</label>&nbsp;&nbsp;
			<input id="adult_content_check" type="checkbox" {if $user_adult_allow}checked{/if} onclick="changeAdultAllow(this, {literal}function(resp){if(resp.status == 1){location.reload();}}{/literal})" />
		</span>
	{/if}
	
	</span>
</h2>
	<!-- begin main cell -->
	<div id="pop_cat">
		{include file="$gentemplates/gallary_table_photo_categories.tpl"}
	</div>
	
	{if $upload_type eq 'v'}
		<div class="video_gallery_search">
			<form class="gallery_search_form" method="POST" action="{$server}/{$seo.gallery}">
				<input type="hidden" name="upload_type" value="v" />
				<input type="hidden" name="id_category" value="0" />
				<input type="hidden" name="sel" value="search" />
				<input type="text" name="search_kw" value="{$form.search_kw}" placeholder="{$lang.gallary.keyword}" />
				<input type="submit" value="{$lang.button.search_video}" />
			</form>
		</div>
	{/if}
	
	<div id="last_uploads">
		{include file="$gentemplates/gallary_table_last_uploads.tpl"}
	</div>

	{*if $upload_type eq 'v'}
		<div id="pop_cat">
			{include file="$gentemplates/gallary_table_pop_categories.tpl"}
		</div>
	{/if*}
</div>
{/strip}
{include file="$gentemplates/$footer_tpl"}