Ответов: 6 Просмотров: 0
|
для "шапки" используем следующий файл logos.tpl
CODE:<?php
$admincenter = (defined('IS_ADMIN')) ? '<a href="admincenter.php" title="'.$fm->LANG['Admincenter'].'">'.$fm->LANG['Admincenter'].'</a> · ' : '';
$unread = ($fm->user['unread'] === 0) ? '':'('.$fm->user['unread'].')';
$allmessages = $fm->_Read('messages/'.$fm->user['id'].'-msg.php');
$totalmessages = count($allmessages);
$useravatar = '<img src="im/avatars/'.(($fm->user['id']) ? $fm->user['avatar'] : 'noavatar.gif').'">';
echo <<<DATA
{$GLOBALS['fm']->_NewEmail}
<table width="100%" id='logostrip' cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.php" title="{$fm->exbb['boardname']}"><img src="./templates/ExBBXBlue/im/logo.gif" alt="{$fm->exbb['boardname']}" width="207" height="52" border="0" /></a></td>
<td valign="bottom" align="right"><a href="index.php" style="margin-right:20px;color:#ffffff">{$fm->exbb['boardname']}</a><br /><span style="margin-right:15px;">{$fm->exbb['boarddesc']}</span></td>
</tr>
</table>
<table width="100%" cellspacing="6" border="0">
<tr>
<td width="189"rowspan="2">
<a href=http://www.calend.ru target=_blank><img src=http://www.calend.ru/img/export/informer.png width=189 alt="Праздники сегодня" border=0></a>
</td>
<td valign="top">
DATA;
if ($fm->user['id'] !== 0) {
echo <<<DATA
<table width="100%" id="logomenu">
<tr>
<td align="left" valign="bottom" nowrap >
<img src="./templates/ExBBXBlue/im/home.gif" border="0" alt="" /> <a href="index.php" ><b>Главная</b></a>
<img src="./templates/ExBBXBlue/im/help.gif" border="0" alt="" /> <a href="tools.php?action=help" title="{$fm->LANG['Help']}"><b>{$fm->LANG['Help']}</b></a>
<img src="./templates/ExBBXBlue/im/search.gif" border="0" alt="" /> <a href="search.php" title="{$fm->LANG['Search']}"><b>{$fm->LANG['Search']}</b></a>
<img src="./templates/ExBBXBlue/im/members.gif" border="0" alt="" /> <a href="tools.php?action=members" title="{$fm->LANG['Users']}"><b>{$fm->LANG['Users']}</b></a>
<img src="./templates/ExBBXBlue/im/attention.gif" border="0" alt="" /> <a href="tools.php?action=rules"><b>{$fm->LANG['ForumRules']}</b></a>
</td>
</tr>
</table>
<table width="100%" id="userlinks" cellspacing="6">
<tr>
<td align="right">
<script language="JavaScript">var h=(new Date()).getHours();
if (h > 23 || h <7) document.write('Доброй ночи,');
if (h > 6 && h < 12) document.write('Доброе утро,');
if (h > 11 && h < 19) document.write('Добрый день,');
if (h > 18 && h < 24) document.write('Добрый вечер,');
</script> <b> {$fm->user['name']}</b><br><br><a href="profile.php" title="{$fm->LANG['YourProfile']}">{$fm->LANG['YourProfile']}</a> ·
<a href="announcements.php" title="{$fm->LANG['Announ']}">{$fm->LANG['Announ']}</a> · {$admincenter}
<a href="loginout.php?action=logout" title="{$fm->LANG['Exit']}">{$fm->LANG['Exit']}</a> ·
<a href="search.php?action=newposts" title="{$fm->LANG['NewPosts']}">{$fm->LANG['NewPosts']}</a><br><br>
<a href="messenger.php?action=inbox">Входящие</a> <b>$unread</b> ·
<a href="messenger.php?action=outbox">Исходящие</a> ·
<a href="messenger.php?action=new">Написать сообщение</a>
</td>
<td align="right">{$useravatar}</td>
</tr>
</table>
</td>
</tr>
</table>
DATA;
} else {
echo <<<DATA
<table width="100%" id="logomenu">
<tr>
<td align="left" valign="bottom" nowrap >
<img src="./templates/ExBBXBlue/im/home.gif" border="0" alt=""> <a href="index.php" ><b>Главная</b></a>
<img src="./templates/ExBBXBlue/im/members.gif" border="0" alt=""> <a href="register.php"><b>{$fm->LANG['Registration']}</b></a>
<img src="./templates/ExBBXBlue/im/search.gif" border="0" alt=""> <a href="search.php" ><b>{$fm->LANG['Search']}</b></a>
<img src="./templates/ExBBXBlue/im/help.gif" border="0" alt=""> <a href="tools.php?action=help" ><b>{$fm->LANG['Help']}</b></a>
<img src="./templates/ExBBXBlue/im/attention.gif" border="0" alt=""> <a href="tools.php?action=rules"><b>{$fm->LANG['ForumRules']}</b></a>
</td>
</tr>
</table>
<table width="100%" id="userlinks" cellspacing="6">
<tr>
<td align="center" > Добро пожаловать, <b> {$fm->user['name']}</b>.<br>Пожалуйста, <a href="loginout.php" ><b>войдите</b></a> или <a href="register.php"><b>зарегестируйтесь</a></b>.<br><br>
<br>
<form action="loginout.php" method="post">
<input type=hidden name="action" value="login">
<input type="text" class="forminput" size="10" name="imembername" onfocus=this.value="" value="User Name" />
<input type="password" class="forminput" size="10" name="ipassword" onfocus=this.value="" value="ibfrules" />
<input type="submit" class="go" name="submit" value="{$fm->LANG['Login']}">
</form><br><br>
<a href="profile.php?action=lostpassword" title="{$fm->LANG['ForgottenPass']}">{$fm->LANG['ForgottenPass']}</a></td>
</tr>
</table>
</td>
</tr>
</table>
DATA;
}
?>
привожу полностью, поскольку изменения существенно коснулись всех частей, возможно использовать для других шаблонов с учетом замены имени каталога на свой |