<?php
if ($is_logged == TRUE){
if (trim($member_id['foto']) == "") {
 $foto = $config_http_url."{THEME}/images/noavatar.png";
} else {
 $foto = $config_http_url."/uploads/fotos/".$member_id['foto'];
}
$login_panel = <<<HTML
<div id="login">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Привет, <a href="{$link_profile}" title="Мой профиль">{$member_id['name']}</a>!
<br>
<img src={$foto} style="border: 0px solid #000000; background-color: #FFFFFF; padding-left:15px;" >		
HTML;
if ($user_group[$member_id['user_group']]['allow_admin']) {
$login_panel .= <<<HTML
	    
        <a href="{$adminlink}" target="_blank">Админцентр</a>
HTML;
}
$login_panel .= <<<HTML
&nbsp;&nbsp;<a onclick="javascript: showBusyLayer()" href="{$link_logout}">Выйти</a>
<ul class="usermenu">
                    <li></li>
                    
				    <li><a href="{$link_stats}">Статистика</a></li>
				    <li><a href="{$link_pm}">Cообщения ({$member_id['pm_unread']}|{$member_id['pm_all']})</a></li>
				    <li><a href="{$link_favorites}">Мои закладки</a></li>
                    <li><a href="{$link_addnews}">Добавить новость</a></li>
                    
					<li><a href="/?do=lastcomments">Комментарии</a></li>
                    <li><a href="{$link_newposts}">Непрочитанное</a></li>
                    
                    <li></li>
</ul>
		<div class="clear"></div>
		</div>

HTML;

} else {
$login_panel = <<<HTML
<br>

<form method="post" onsubmit="javascript:showBusyLayer()" action=''><input name="login" type="hidden" id="login" value="submit" />
<div class="b2"><input class="field" type="text" name="login_name" style="background:url({THEME}/images/member.png) no-repeat;" value="Логин" onFocus="if(this.value!='') this.value=''" onBlur="if(this.value=='') this.value='Логин'">
</div>
<div class="b2"><input class="field"  type="password" name="login_password" style="background:url({THEME}/images/key.png) no-repeat; " value="***" onFocus="if(this.value!='') this.value=''" onBlur="if(this.value=='') this.value='***'">
</div>
&nbsp;<input  src="{THEME}/images/bt.png" onclick="submit();" name="image" type="image" style="width:24px; height:24px; border:0;" >

</form>
<div class="clear"></div>
<span><a href="{$link_regist}" style="none">Регистрация!</a>&nbsp;&nbsp;&nbsp;
<a href="{$link_lost}" >Забыли пароль?</a></span>
HTML;
}
?>
