<div style="width:100%;">
	<div class="panelbox_div" >
		<a class="panellink" href="{$docroot}index.php">{lang mkey='site_links' skey='home'}</a>
	</div>
	<div class="panelbox_div" >
		<a class="panellink" href="{$docroot}logout.php">{lang mkey='sign_out'}</a>
	</div>
</div>
{* My Profile *}
<div class="panellinkhdr_div" >
	{lang mkey='myprofile'}
</div>
	<div class="panelbox_div" >
		<a class="panellink"
		{if $config.enable_mod_rewrite == 'Y'}
			href="javascript:popUpScrollWindow2('{if $config.seo_username == 'Y'}{$smarty.session.UserName}{else}{$smarty.session.UserId}.htm{/if}','top',650,screen.height)">
		{else}
			href="javascript:popUpScrollWindow2('{$docroot}showprofile.php?{if $config.seo_username == 'Y'}username={$smarty.session.UserName}{else}id={$smarty.session.UserId}{/if}','top',650,screen.height)">
		{/if}
		{lang mkey='view_profile'}</a>
	</div>
{if $smarty.session.expired != 1 and $smarty.session.active == '1' }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}edituser.php">{lang mkey='edit_profile'}</a>
	</div>
{/if}
{if $smarty.session.expired != 1 and $smarty.session.active == '1' and $smarty.session.security.allow_mysettings == 1 }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}mysettings.php">{lang mkey='mysettings'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div"><a class="panellink" href="{$docroot}mysettings.php">{lang mkey='mysettings'}</a>
	</div>
{/if}
{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}
	<div class="panelbox_div"><a class="panellink" href="javascript:popUpScrollWindow2('{$docroot}userpicgallery.php?id={$smarty.session.UserId}','center',650,600)">{lang mkey='picturegallery'}</a>
	</div>
	<div class="panelbox_div"><a class="panellink" href="{$docroot}uploadsnaps.php">{lang mkey='upload_pictures'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='picturegallery'}</a>
	</div>
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='upload_pictures'}</a>
	</div>
{/if}
{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}
	<div class="panelbox_div"><a class="panellink" href="{$docroot}uploadvideos.php">{lang mkey='videogallery'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_hdr">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='videogallery'}</a>
	</div>
{/if}
{if ($smarty.session.security.blog == 1 or $smarty.session.security.blog == 'Y')  and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}bloglist.php">{lang mkey='myblog'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div"><a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='myblog'}</a>
	</div>
{/if}

{* Searches *}
{if $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') }
	<div class="panellinkhdr_div" >
		{lang mkey='search'}
	</div>
	<div class="panelbox_div"><a class="panellink" href="{$docroot}mymatches.php">{lang mkey='my_matches'}</a>
	</div>
	{if $smarty.session.security.extsearch == 1  }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}advsearch.php?search_new=1">{lang mkey='profilesearch'}</a>
	</div>
	{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='profilesearch'}</a>
	</div>
	{/if}
	{if ($smarty.session.security.blog == 1 or $smarty.session.security.blog == 'Y') }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}blogsearch.php">{lang mkey='blog_search_menu'}</a>
	</div>
	{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div"><a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='blog_search_menu'}</a>
	</div>
	{/if}
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panellinkhdr_div" >
		{lang mkey='search'}
	</div>
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='my_matches'}</a>
	</div>
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='profilesearch'}</a>
	</div>
	<div class="panelbox_div"><a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='blog_search_menu'}</a>
	</div>
{/if}

{* My Lists *}
<div class="panellinkhdr_div" >
	{lang mkey='mylists'}
</div>
{if $smarty.session.security.favouritelist == 1 and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}buddybanlist.php?act=B&amp;show=1">{lang mkey='bans'}</a>
	</div>
	<div class="panelbox_div"><a class="panellink" href="{$docroot}buddybanlist.php?act=F&amp;show=1">{lang mkey='mybuddies'}</a>
	</div>
	<div class="panelbox_div"><a class="panellink" href="{$docroot}buddybanlist.php?act=H&amp;show=1">{lang mkey='hotprofiles'}</a>
	</div>
	{if $smarty.session.security.saveprofiles == 1}
	<div class="panelbox_div"><a class="panellink" href="{$docroot}watchedprofiles.php?act=W">{lang mkey='watchedprofiles'}</a>
	</div>
	{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick=	"javascript:insufficientPrivileges();">{lang mkey='watchedprofiles'}</a>
	</div>
	{/if}
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div"><a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='bans'}</a>
	</div>
	<div class="panelbox_div"><a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='mybuddies'}</a>
	</div>
	<div class="panelbox_div">
		<a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='hotprofiles'}</a>
	</div>
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick=	"javascript:insufficientPrivileges();">{lang mkey='watchedprofiles'}</a>
	</div>
{/if}
	<div class="panelbox_div"><a class="panellink" href="{$docroot}listviewswinks.php?act=V">{lang mkey='views'}</a>
	</div>
{if $smarty.session.security.sendwinks == 1}
	<div class="panelbox_div"><a class="panellink" href="{$docroot}listviewswinks.php?act=W">{lang mkey='winks'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='winks'}</a>
	</div>
{/if}

{* Tools *}
{if $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1' or ( $config.enable_php121 == 'Y' && $smarty.session.security.allow_php121 == 1) or ($smarty.session.security.event_mgt == 1 and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') and $allcalendars|@count > 0 ) or ($smarty.session.expired != '1' and $smarty.session.active == '1') or ($smarty.session.security.chat == 1  and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active')) or ($smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active'))  }
<div class="panellinkhdr_div" >
	{lang mkey='tools'}
</div>
{/if}
{* php121 messenger, This is just a testing one  *}
{if $config.enable_php121 == 'Y' && $smarty.session.security.allow_php121 == 1}
	<div class="panelbox_div"><a class="panellink" href="{$docroot}php121/php121im.php" target="new">php121 Messenger</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
	<a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">php121 Messenger</a>
	</div>
{/if}
{if $smarty.session.security.event_mgt == 1 and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') and $allcalendars|@count > 0 }
	<div class="panelbox_div">
			{if $config.use_popups == 'Y'}
				<a class="panellink" href="javascript:popUpScrollWindow('{$docroot}calendar.php','center',950,600)">{lang mkey='calendar_title'}</a>
			{else}
				<a class="panellink" target="_blank" href="{$docroot}calendar.php">{lang mkey='calendar_title'}</a>
			{/if}
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='calendar_title'}</a>
	</div>
{/if}
{if $smarty.session.security.event_mgt == 1 and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') and $allcalendars|@count > 0 }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}watchevents.php">{lang mkey='watched_events'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
	 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='watched_events'}</a>
	</div>
{/if}
{if  $smarty.session.expired != '1' and $smarty.session.active == '1' }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}changempass.php">{lang mkey='change_password'}</a>
	</div>
{/if}
{if $smarty.session.security.chat == 1  and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') }
	<div class="panelbox_div">
	<form name='frmChat' id='frmChat' action="{$docroot}chat/flashchat_osdate.php" method='get' target="new">
		<input type="hidden" name='username' value="{$smarty.session.UserName}" />
		<input type="hidden" name='whatIneed' value="{$smarty.session.whatIneed}" />
	</form>
		<a class="panellink" href="#" onclick="javascript:document.frmChat.submit(); return(false);">{lang mkey='chat'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
	 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='chat'}</a>
	</div>
{/if}
{if $smarty.session.security.forum == 1  and $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') }
	<div class="panelbox_div">
		<form name='frmForum' id='frmForum' action="{$docroot}forum/login_osdate.php" method='post' {if $config.forum_display_in_same_window != 'Y'} target="new"{/if}>
			<input type="hidden" name='login' value="Log in" />
			<input type="hidden" name='username' value="{$smarty.session.UserName}" />
			<input type="hidden" name='whatIneed' value="{$smarty.session.whatIneed}" />
		</form>
		<a href="#" class="panellink" onclick="javascript:document.frmForum.submit(); return(false);" >{lang mkey='forum'}</a>
	</div>
{elseif $config.display_all_menu_items == 'Y' or $config.display_all_menu_items == '1'}
	<div class="panelbox_div">
		 <a class="panellink" href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='forum'}</a>
	</div>
{/if}
{if  $smarty.session.expired != '1' and $smarty.session.active == '1' and ( $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active') }
	<div class="panelbox_div"><a class="panellink" href="{$docroot}mailmessages.php?messages=inbox" >{lang mkey='mail_messages'}&nbsp;[&nbsp;{$new_messages|default:0}&nbsp;{lang mkey='unread'}&nbsp;]</a>
	</div>
{/if}

{* My Membership *}
<div class="panellinkhdr_div" >
	{lang mkey='membership'}
</div>
{ if $smarty.session.status == $lang.status_enum.active or $smarty.session.status == 'active' }
	<div class="panelbox_div"><a class="panellink" href="payment.php">{lang mkey='upgrade_membership'}</a>
	</div>
{/if}
	<div class="panelbox_div"><a class="panellink" href="{$docroot}userstats.php">{lang mkey='user_stats'}</a>
	</div>
	<div class="panelbox_div"><a class="panellink" href="{$docroot}cancel.php">{lang mkey='cancel_hdr'}</a>
	</div>
{if $modosdate_umenu|@count > 0 && $smarty.session.active == '1'}
{* Plugins *}
<div class="panellinkhdr_div" >
	{lang mkey='plugin'}
</div>
{* The modosdate_umenu is defined when modOsDate is created in init.php *}
{foreach item=item key=key from=$modosdate_umenu}
 <div class="panelbox_div">
	<a class="panellink" href="{$item.href}">{$item.text}</a>
 </div>
{/foreach}
{/if}
