Code:
<title>{$owner->user_displayname}</title>
{include file='header.tpl'}
{* $Id: profile.tpl 255 2009-11-18 02:21:01Z steve $ *}
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='profile_leftside' width='200px'>
{* BEGIN LEFT COLUMN *}
{* SHOW USER PHOTO *}
{*UPDATE PHOTO ON MOUSEOVER*}
<table cellpadding='0' cellspacing='0' width='100%'>
<tr><td>
<div class='menu_dropdown_edit_photo' id='menu_dropdown_edit_photo' style='display: none;'>
<div>
<div class='menu_item_dropdown_edit_photo' style='position: absolute; padding-left: 35px; padding-top: 10px;'><a class="edit_profilepicture" href='javascript: TB_show("{lang_print id=769}", "user_editprofile_avatar_TB.php?&TB_iframe=true&height=300&width=450", "", "./images/trans.gif")'><img src='./images/change_profile.jpg' border='0' class='menu_icon2'>Изменить фотографию</a></div>
</div>
</div>
</td></tr><tr>
<td class='profile_photo'>
<div style='vertical-align: bottom; position: absolute;'>{if $is_online}<img src='./images/online.gif' style=''>{/if}</div>
<img src='{$owner->user_photo("./images/nophoto.gif")}' border='0' oncontextmenu='return false;' ondragstart='return false;' border='0' style='vertical-align: top; cursor: pointer;' {if $owner->user_info.user_id == $user->user_info.user_id} onMouseOver="showMenu('menu_dropdown_edit_photo');"{/if}
</div>
</td>
</tr>
</table>
{literal}
<script type='text/javascript'>
<!--
var open_menu;
var current_timeout = new Array();
function showMenu(id1) {
if($(id1)) {
if($(id1).style.display == 'none') {
if($(open_menu)) { hideMenu($(open_menu)); }
$(id1).style.display='inline';
startMenuTimeout($(id1));
$(id1).addEvent('mouseover', function(e) { killMenuTimeout(this); });
$(id1).addEvent('mouseout', function(e) { startMenuTimeout(this); });
open_menu = id1;
}
}
}
function killMenuTimeout(divEl) {
clearTimeout(current_timeout[divEl.id]);
current_timeout[divEl.id] = '';
}
function startMenuTimeout(divEl) {
if(current_timeout[divEl.id] == '') {
current_timeout[divEl.id] = setTimeout(function() { hideMenu(divEl); }, 1000);
}
}
function hideMenu(divEl) {
divEl.style.display = 'none';
current_timeout[divEl.id] = '';
divEl.removeEvent('mouseover', function(e) { killMenuTimeout(this); });
divEl.removeEvent('mouseout', function(e) { startMenuTimeout(this); });
}
//-->
</script>
{/literal}
{* END UPDATE PHOTO ON MOUSEOVER*}
{* BEGIN USER MENU *}
<table class='profile_menu' cellpadding='0' cellspacing='0' width='100%' >
{* SHOW PHOTOS OF THIS PERSON *}
{if $total_photo_tags != 0}
<tr><td class='profile_menu1' nowrap='nowrap'><a href='profile_photos.php?user={$owner->user_info.user_username}'><img src='./images/icons/photos16.gif' class='icon' border='0'>{lang_sprintf id=1204 1=$owner->user_displayname_short 2=$total_photo_tags}</a></td></tr>
{assign var='showmenu' value='1'}
{/if}
{* SHOW BUTTONS IF LOGGED IN AND VIEWING SOMEONE ELSE *}
{if $owner->user_info.user_id != $user->user_info.user_id}
{* SHOW ADD OR REMOVE FRIEND MENU ITEM *}
{if $friendship_allowed != 0 && $user->user_exists != 0}
<tr><td class='profile_menu1' nowrap='nowrap'>
{* JAVASCRIPT FOR CHANGING FRIEND MENU OPTION *}
{literal}
<script type="text/javascript">
<!--
function friend_update(status, id) {
if(status == 'pending') {
if($('addfriend_'+id))
$('addfriend_'+id).style.display = 'none';
if($('confirmfriend_'+id))
$('confirmfriend_'+id).style.display = 'none';
if($('pendingfriend_'+id))
$('pendingfriend_'+id).style.display = 'block';
if($('removefriend_'+id))
$('removefriend_'+id).style.display = 'none';
} else if(status == 'remove') {
if($('addfriend_'+id))
$('addfriend_'+id).style.display = 'none';
if($('confirmfriend_'+id))
$('confirmfriend_'+id).style.display = 'none';
if($('pendingfriend_'+id))
$('pendingfriend_'+id).style.display = 'none';
if($('removefriend_'+id))
$('removefriend_'+id).style.display = 'block';
} else if(status == 'add') {
if($('addfriend_'+id))
$('addfriend_'+id).style.display = 'block';
if($('confirmfriend_'+id))
$('confirmfriend_'+id).style.display = 'none';
if($('pendingfriend_'+id))
$('pendingfriend_'+id).style.display = 'none';
if($('removefriend_'+id))
$('removefriend_'+id).style.display = 'none';
}
}
//-->
</script>
{/literal}
<div id='addfriend_{$owner->user_info.user_id}'{if $is_friend == TRUE || $is_friend_pending != 0} style='display: none;'{/if}><a href="javascript:TB_show('{lang_print id=876}', 'user_friends_manage.php?user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');"><img src='./images/icons/addfriend16.gif' class='icon' border='0'>{lang_print id=838}</a></div>
<div id='confirmfriend_{$owner->user_info.user_id}'{if $is_friend_pending != 1} style='display: none;'{/if}><a href="javascript:TB_show('{lang_print id=887}', 'user_friends_manage.php?user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');"><img src='./images/icons/addfriend16.gif' class='icon' border='0'>{lang_print id=885}</a></div>
<div id='pendingfriend_{$owner->user_info.user_id}'{if $is_friend_pending != 2} style='display: none;'{/if} class='nolink'><img src='./images/icons/addfriend16.gif' class='icon' border='0'>{lang_print id=875}</div>
<div id='removefriend_{$owner->user_info.user_id}'{if $is_friend == FALSE || $is_friend_pending != 0} style='display: none;'{/if}><a href="javascript:TB_show('{lang_print id=837}', 'user_friends_manage.php?task=remove&user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');"><img src='./images/icons/remove_friend16.gif' class='icon' border='0'>{lang_print id=837}</a></div>
</td></tr>
{assign var='showmenu' value='1'}
{/if}
{* --------------- *}
{* SHOW SEND MESSAGE MENU ITEM *}
{if ($user->level_info.level_message_allow == 2 || ($user->level_info.level_message_allow == 1 && $is_friend)) && $owner->level_info.level_message_allow != 0}
<tr><td class='profile_menu1' nowrap='nowrap'><a href="javascript:TB_show('{lang_print id=784}', 'user_messages_new.php?to_user={$owner->user_displayname|escape:url}&to_id={$owner->user_info.user_username}&TB_iframe=true&height=400&width=450', '', './images/trans.gif');"><img src='./images/icons/sendmessage16.gif' class='icon' border='0'>{lang_print id=839}</a></td></tr>
{assign var='showmenu' value='1'}
{/if}
{* GIFTS *}
<tr><td class='profile_menu1' nowrap='nowrap'>
<a style="cursor:pointer;" onclick="guiMessageBox('{$owner->user_info.user_username}');" >Отправить подарок</a>
{literal}
<script type="text/javascript">
function guiMessageBox(user_username){
var messagebox = new MessageBox({title:'Подарок для ' + user_username + ''});
messagebox.addButton({label:'Закрыть', style:'button_no', onClick:function(){messagebox.hide()}});
messagebox.loadContent('user_gifts_add.php?user=' + user_username + '');
messagebox.show();
};
</script>
{/literal}
</td></tr>
{/if}
{* ------------- *}
{* PLUGIN RELATED PROFILE MENU ITEMS *}
{hook_foreach name=profile_menu var=profile_menu_args}
{assign var='showmenu' value='1'}
<tr>
<td class='profile_menu1' nowrap='nowrap'>
<a href='{$profile_menu_args.file}'>
<img src='./images/icons/{$profile_menu_args.icon}' class='icon' border='0' />
{lang_sprintf id=$profile_menu_args.title 1=$profile_menu_args.title_1 2=$profile_menu_args.title_2}
</a>
</td>
</tr>
{/hook_foreach}
</table>
{* END PROFILE MENU *}
{if $showmenu == 1}
<div style='height: 10px; font-size: 1pt;'> </div>
{/if}
{* BEGIN all friend *}
{if $total_friends != 0}
<table cellpadding='0' cellspacing='0' width='100%' >
<tr>
<td class='header'>
<table><tr width='100%'><td width='80%'>
{lang_print id=653} ({$total_friends})
</td><td width='20%'>
{if $total_friends > 6}[ <a href='ufriend.php?user={$owner->user_info.user_username}'>{lang_print id=1021}</a> ]{/if}
</td></tr></table>
</td>
</tr>
<tr>
<td class='profile'>
{section name=friend_loop loop=$friends max=6}
<div align="center">
<div style='width: 80px; float: left;'>
<a href='{$url->url_create("profile",$friends[friend_loop]->user_info.user_username)}'>
<img src='{$friends[friend_loop]->user_photo('./images/nophoto.gif', TRUE)}' class='photo' width='50' border='0'>
</a>
<div align="center">
<a href='{$url->url_create('profile',$friends[friend_loop]->user_info.user_username)}'>{$friends[friend_loop]->user_displayname}</a></div>
</div>
</div>
{cycle values=",<div style='clear: both; height: 10px;'></div>"}
{/section}
</td>
</tr>
</table>
{/if}
{* END all friend *}
{* DISPLAY IF PROFILE IS PRIVATE TO VIEWING USER *}
{if $is_profile_private != 0}
{* END LEFT COLUMN *}
</td>
<td class='profile_rightside'>
{* BEGIN RIGHT COLUMN *}
<img src='./images/icons/error48.gif' border='0' class='icon_big'>
<div class='page_header'>{lang_print id=843}</div>
{lang_print id=844}
{* DISPLAY ONLY IF PROFILE IS NOT PRIVATE TO VIEWING USER *}
{else}
{* END LEFT COLUMN *}
</td>
<td class='profile_rightside'>
{* BEGIN RIGHT COLUMN *}
<div class='page_header'>{$owner->user_displayname}
{* BEGIN STATUS *}
................................