{if $config.use_profilepopups == 'Y'}
<?xml version="1.0" encoding="{lang mkey='ENCODING}'"?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	{if $title != '' }
		<title>{$title} {lang mkey='view_profile'}</title>
	{else}
		<title>{$config.site_title}  {lang mkey='view_profile'}</title>
	{/if}

	<script type="text/javascript">
	/* <![CDATA[ */
	var loadingTag = "{lang mkey='loading'}";
	var modeRewrite = "{$config.enable_mod_rewrite}";
	var docRoot = "{$smarty.const.DOC_ROOT}";
	{if $config.use_popups == 'N'}
		var use_popups = false;
	{else}
		var use_popups = true;
	{/if}
	{if $config.use_profilepopups == 'N'}
		var use_profilepopups = false;
	{else}
		var use_profilepopups = true;
	{/if}
	/* ]]> */
	function insufficientPrivileges(){ldelim}
		alert("{lang mkey='insufficientPrivileges'}");
		return false;
	{rdelim}
	</script>

	<link href="{$css_path}default.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="{$DOC_ROOT}javascript/validate.js"></script>
	<meta http-equiv="Content-Type" content="text/html; charset={lang mkey='ENCODING'}" />
	</head>
	<body  dir="{lang mkey='DIRECTION'}" >
{/if}
	<script type="text/javascript" src="{$DOC_ROOT}javascript/functions.js"></script>
{if $err == 28 }
	<div style="width:80%; text-align:center;" >
		<div style="text-align:center;" class="subtitle">{lang mkey='profile_details'}</div>
		<div style="text-align:center;">{lang mkey='view_profile_restricted'}</div>
	</div>
{elseif $err == 31 }
	<div style="width:80%; text-align:center;" >
		<div style="text-align:center;" class="subtitle">{lang mkey='profile_details'}</div>
		<div style="text-align:center;">{lang mkey='profile_notset'}</div>
	</div>
{elseif $errid == '999'}
	{include file="display_error.tpl"}
{else}
	{ if $config.use_profilepopups == 'Y'}
		<div  >
	{/if}
	{assign var="page_title" value="{lang mkey='view'}"}
<div >
	{include file="nickpage_logo.tpl"}
	<div class="module_detail_inside" style="padding-left: 2px; padding-right:2px; vertical-align:top;">
		{include file="nickpage_navi.tpl"}
		{if $smarty.get.errid !=  ''}
			{include file="display_error.tpl"}
		{elseif $user.is_banned == 1 }
			{assign var="error_message" value="{lang mkey='user_banned'}" }
			{include file="display_error.tpl"}
		{/if}
		<div style="vertical-align:top; text-align:left;">
			{include file="nickpage_basic.tpl"}
{*  display all pictures in public album  *}
			{if $user.pub_pics|@count > 1}
				<br />
				{assign var="nickpage_hdr_text" value="{lang mkey='additional_pics'}" }
				{include file="nickpage_section_hdr.tpl"}
				<div class="module_detail_inside">
					{assign var="mcnt" value=0}
					{foreach from=$user.pub_pics item=pic}
						{if $mcnt == 0}
							<div style="text-align: left; padding-top: 2px; padding-bottom: 2px; padding-left: 6px; padding-right: 6px;">
						{/if}
						{assign var="mcnt" value=$mcnt+1}
						<a href="#" onClick="javascript:popUpScrollWindow2('userpicgallery.php?id={$user.id}&amp;galpicid={$pic.picno}','center',600,600);">
						<img src="getsnap.php?id={$user.id}&amp;picid={$pic.picno}&amp;typ=tn&amp;width=45&amp;height=45" class="smallpic" style="margin:2px 1px 1px 1px;" alt="" />
						</a>
						{if $mcnt == ($config.album_tnpics_cnt * 2)}
							</div>
							{assign var="mcnt" value=0}
						{/if}
					{/foreach}
					{if $mcnt > 0}</div>{/if}
					<div style="text-align:right; margin-bottom: 4px;">
						<a href="#" onClick="javascript:popUpScrollWindow2('userpicgallery.php?id={$user.id}','center',600,600);" >{lang mkey='view_all_pics'}..</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</div>
				</div>
			{/if}
{* small snaps display end  *}

			<br />
			{include file="nickpage_content.tpl"}

		    {if $ratings|@count > 0}


			<!-- removed old ratings section -->
			<!-- MOD START -->
			{assign var="nickpage_hdr_text" value="{lang mkey='rating'}"}
			{include file="nickpage_section_hdr.tpl"}
			<div class="module_detail_inside">
				{include file="nickpage_newrating.tpl"}

			</div>
		    {/if}

		    {if count($blogs) > 0}
	           {include file="nickpage_bloglist.tpl"}
		    {/if}
            {if $questionid > 0}
               {include file="nickpage_polllist.tpl"}
            {/if}

			<!-- MOD END -->
		</div>
	</div>
</div>
	<div class="headbg" style="height: 16pt; vertical-align:middle;width:100%; ">
		<div class="headerfooter" style="text-align:right; padding-top:2px;">
		{$profile_views}&nbsp;{lang mkey='views'}&nbsp;&nbsp;
		</div>
	</div>

	{*if $smarty.get.id != $smarty.session.UserId}
		<script type='text/javascript'>
			var thisUid = "{$smarty.get.id}";
			var thisUname = "{$user.username}";
			selectedUser(thisUname, thisUid);
		</script>
	{/if*}
	{if $config.use_profilepopups == 'Y'}
		</div>
		<script type="text/javascript"> /* <![CDATA[ */ window.focus(); /* ]]> */</script>
		{closedb}
		</body>
		</html>
	{/if}
{/if}
