<?php
if ($is_logged == TRUE){
if (trim($member_id['foto']) == "") {
 $foto = $config['http_home_url']."{THEME}/images/noavatar.gif";
} else {
 $foto = $config['http_home_url']."uploads/fotos/".$member_id['foto'];
}
$login_panel = <<<HTML
				    <table width="100" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="100" align="left" valign="top">
						  <table width="100" border="0" cellpadding="0" cellspacing="0" class="cpbkgr_log">
                            <tr>

                             
                            </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 onclick="javascript: showBusyLayer()" href="{$link_logout}"><strong>Завершить сеанс</strong></a></td>
                                  </tr>
                                </table>
                              </td>
                            </tr>
                          </table></td>
                    
                      </tr>
                    </table>
HTML;
} else {
$login_panel = <<<HTML
                    <table width="140" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                    
                        <td width="170" align="left" valign="top">
                          <table width="170" border="0" cellpadding="0" cellspacing="0" class="cpbkgr_nolog">
                            <tr>
                              <td height="0" 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="10" align="center" valign="top">
							  
							  
							  <div class="lpanel">
  <a href="#" onclick="return hs.htmlExpand(this,{contentId:'highslide-html',align:'center'})"><img src="{THEME}/images/loginb.png" border="0" alt=""></a>
<div class="highslide-html-content" id="highslide-html">
	<div class="highslide-header">
		<ul>
			<li class="highslide-close">
				<a href="#" onclick="return hs.close(this)"><img src="{THEME}/images/lpanel/button.gif" border="0" alt=""></a>
			</li>
		</ul>	    
	</div>
	<div class="highslide-body">
	  <table> 
        <tr>
          <td align="left" ><div style="height:145px;padding-top: 0px">
	        <form name="s" method="post" onsubmit="javascript:showBusyLayer()" action="">
              <div id="ibox">
                <input type="text" id="s" name="login_name" 
                value="Логин"  onfocus="if(this.value=='Логин')this.value=''"
	            onblur="if(this.value=='')this.value='Логин'" >
              </div>
              <div id="ibox">
                <input type="password" id="s" name="login_password" 
                value="Пароль"  onfocus="if(this.value=='Пароль')this.value=''"
	            onblur="if(this.value=='')this.value='Пароль'" >
              </div>
	          <div class="clear" type="submit" style="padding-top:5px;">
			    <a class="button" href="javascript:document.s.submit();" ><span>Отправить</span></a>
	          </div>
			  <div class="llink" style="padding-top:10px;">
                <img style="vertical-align: middle" src="{THEME}/images/lpanel/rdo.gif" alt=""  />		
                <a href="{$link_lost}" title="Забыли пароль">Забыли пароль</a>							
              </div>
	          <div class="llink" style="padding-top:5px;">
                <img style="vertical-align: middle" src="{THEME}/images/lpanel/rdo.gif" alt=""  />			
                <a href="{$link_regist}" title="Регистрация">Регистрация</a>					
              </div>
            <input name="login" type="hidden" id="login" value="submit" />			  
            </form>
	      </td>
	   <td align="right" >
     
              <img src="{THEME}/images/lpanel/login.png" alt=""  />
            </div>
          </td>
        </tr>
      </table>	
    </div> 
</div> 
							  
							  </td>
                            </tr>
                          </table>
                        </td>
                      
                      </tr>
                    </table>
HTML;
}
?>