<?php
if ($is_logged == TRUE){

$login_panel = <<<HTML
<table class="login-panel" width="270" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td height="14" align="left" valign="top"><span class="login-mem">Привет, <strong>{$member_id['name']}</strong>!</span></td>
		<td width="10">&nbsp;</td>
HTML;

if ($user_group[$member_id['user_group']]['allow_admin']) {
$login_panel .= <<<HTML
		<td align="left"><a href="{$adminlink}" target="_blank">Админцентр</a></td>
		<td width="10">&nbsp;</td>
        <td align="left" nowrap="nowrap"><a href="{$link_addnews}">Публикация</a></td>
    </tr>
HTML;
}
else {
$login_panel .= <<<HTML
        <td colspan="3">&nbsp;</td>
    </tr>
HTML;
}
$login_panel .= <<<HTML
    <tr>
        <td align="left"><a href="{$link_stats}">Статистика</a></td>
        <td width="10">&nbsp;</td>
        <td align="left"><a href="{$link_pm}">ПС ({$member_id['pm_unread']} | {$member_id['pm_all']})</a></td>
		<td width="10">&nbsp;</td>
		<td align="left"><a href="{$link_profile}">Профиль</a></td>
    </tr>
    <tr>
		<td align="left"><a href="{$link_newposts}">Непрочитанное</a></td>
		<td width="10">&nbsp;</td>
        <td align="left"><a href="{$link_favorites}">Закладки</a></td>
        <td width="10">&nbsp;</td>
		<td align="left"><a onclick="javascript: showBusyLayer()" href="{$link_logout}"><strong>Выход</strong></a></td>
    </tr>
</table>
HTML;

} else {
$login_panel = <<<HTML
<div class="loginform">
	<form action="" method="post" onsubmit="javascript:showBusyLayer()">
		<ul class="loginbox">
			<li>
				<div class="lfield tlogin">
					<div>
						<img src="{THEME}/images/spacer.png" alt="Логин:" title="Логин:" />
						<input type="text" name="login_name" />
					</div>
				</div>
				<div class="lfield tpass">
					<div>
						<img src="{THEME}/images/spacer.png" alt="Пароль:" title="Пароль:" />
						<input type="password" name="login_password" />
					</div>
				</div>
			</li>
			<li class="submit">
				<input name="login" type="hidden" id="login" value="submit" />
				<input onclick="submit();" name="image" class="btn" src="{THEME}/images/spacer.png" type="image" title="Войти" alt="Войти" />
			</li>
		</ul>
	</form>
</div>
HTML;
}
?>