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

$login_panel = <<<HTML
				    <table width="239" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="54" align="left" valign="top"><img src="{THEME}/images/dlet_top_28.gif" width="54" height="130" /></td>
                        <td width="170" align="left" valign="top">
						  <table width="170" border="0" cellpadding="0" cellspacing="0" class="cpbkgr_log">
                            <tr>
                              <td height="37" align="right" class="ltitle">Панель управления</td>
                            </tr>
                            <tr>
                              <td align="right" valign="top"><img src="{THEME}/images/spacer.gif" width="1" height="7" /></td>
                            </tr>
                            <tr>
                              <td height="122" align="right" valign="top">
                                <table width="170" border="0" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td height="18" colspan="3" align="right" valign="top">Привет, <strong>{$member_id['name']}</strong>!</td>
                                  </tr>
HTML;

if ($user_group[$member_id['user_group']]['allow_admin']) {
$login_panel .= <<<HTML
                                  <tr>
                                    <td colspan="3" align="right" class="slink"><a href="{$adminlink}" target="_blank">Админцентр</a></td>
                                  </tr>
HTML;
}
else {
$login_panel .= <<<HTML
                                  <tr>
                                    <td colspan="3" align="right" class="stext">&nbsp;</td>
                                  </tr>
HTML;
}
$login_panel .= <<<HTML
                                  <tr>
                                    <td colspan="3"><img src="{THEME}/images/spacer.gif" width="1" height="3" /></td>
                                  </tr>
                                  <tr>
                                    <td align="right" class="stext"><a href="{$link_profile}">Профиль</a></td>
                                    <td width="5" align="left">&nbsp;</td>
                                    <td align="right" class="stext"><a href="{$link_pm}">ПС ({$member_id['pm_unread']} | {$member_id['pm_all']})</a></td>
                                  </tr>
                                  <tr>
                                    <td colspan="3"><img src="{THEME}/images/spacer.gif" width="1" height="3" /></td>
                                  </tr>
                                  <tr>
                                    <td align="right" class="stext"><a href="{$link_stats}">Статистика</a></td>
                                    <td width="5" align="left">&nbsp;</td>
                                    <td align="right" class="stext" nowrap="nowrap"><a href="{$link_addnews}">Добавить новость</a></td>
                                  </tr>
                                  <tr>
                                    <td colspan="3"><img src="{THEME}/images/spacer.gif" width="1" height="3" /></td>
                                  </tr>
                                  <tr>
                                    <td align="right" class="stext"><a href="{$link_favorites}">Закладки</a></td>
                                    <td width="5" align="left">&nbsp;</td>
                                    <td align="right" class="stext"><a href="{$link_newposts}">Непрочитанное</a></td>
                                  </tr>
                                  <tr>
                                    <td colspan="3"><img src="{THEME}/images/spacer.gif" width="1" height="3" /></td>
                                  </tr>
                                  <tr>
                                    <td height="30" colspan="3" align="right" class="slink"><a href="{$link_logout}"><strong>Завершить сеанс</strong></a></td>
                                  </tr>
                                </table>
                              </td>
                            </tr>
                          </table></td>
                        <td width="15" align="left" valign="top"><img src="{THEME}/images/dlet_top_29_1.gif" width="15" height="166" /></td>
                      </tr>
                    </table>
HTML;

} else {
$login_panel = <<<HTML
                    <table width="239" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="54" align="left" valign="top"><img src="{THEME}/images/dlet_top_28.gif" width="54" height="130" /></td>
                        <td width="170" align="left" valign="top">
                          <table width="170" border="0" cellpadding="0" cellspacing="0" class="cpbkgr_nolog">
                            <tr>
                              <td height="37" align="right" class="ltitle">Панель управления</td>
                            </tr>
                            <tr>
                              <td align="right" valign="top"><img src="{THEME}/images/spacer.gif" width="1" height="7" /></td>
                            </tr>
                            <tr>
                              <td height="122" align="right" valign="top">
                                <form method="post" action=''>
                                  <table width="170" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td align="left" class="ltitle_small">логин :</td>
                                      <td width="5" height="18" align="left">&nbsp;</td>
                                      <td align="right"><input name="login_name" type="text" class="a_field" style="width:104px" /></td>
                                    </tr>
                                    <tr>
                                      <td colspan="3" align="left"><img src="{THEME}/images/spacer.gif" width="1" height="3" /></td>
                                    </tr>
                                    <tr>
                                      <td align="left" class="ltitle_small">пароль :</td>
                                      <td width="5" height="18" align="left">&nbsp;</td>
                                      <td align="right"><input name="login_password" type="password" class="a_field" style="width:104px" /></td>
                                    </tr>
                                    <tr>
                                      <td colspan="3" align="left"><img src="{THEME}/images/spacer.gif" width="1" height="4" /></td>
                                    </tr>
                                    <tr>
                                      <td align="left">&nbsp;</td>
                                      <td width="5" height="18" align="left">&nbsp;</td>
                                      <td align="right"><input onclick="submit();" name="image" type="image" src="{THEME}/images/dlet_bttn_login.gif" style="width:50px; height:18px; border:0" /><input name="login" type="hidden" id="login" value="submit" /></td>
                                    </tr>
                                    <tr>
                                      <td align="left">&nbsp;</td>
                                      <td width="5" height="17" align="left"><img src="{THEME}/images/spacer.gif" width="1" height="17" /></td>
                                      <td align="right">&nbsp;</td>
                                    </tr>
                                    <tr>
                                      <td height="28" colspan="3" align="right"><table width="125" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="15" align="left"><img src="{THEME}/images/dlet_cp_point_1.gif" width="15" height="14" /></td>
                                            <td width="110" align="left" class="copy"><a href="{$link_regist}">Регистрация</a></td>
                                          </tr>
                                          <tr>
                                            <td width="15" align="left"><img src="{THEME}/images/dlet_cp_point_1.gif" width="15" height="14" /></td>
                                            <td width="110" align="left" class="copy"><a href="{$link_lost}">Напомнить пароль?</a></td>
                                          </tr>
                                        </table></td>
                                    </tr>
                                  </table>
                                </form>
                              </td>
                            </tr>
                          </table>
                        </td>
                        <td width="15" align="left" valign="top"><img src="{THEME}/images/dlet_top_29.gif" width="15" height="166" /></td>
                      </tr>
                    </table>
HTML;
}
?>