<table width="100%" height=25px border="0" cellpadding="0" cellspacing="0" id="topbar">
<tr>
<td width="300" class="headerlogin">
<{if $xoops_isuser}>
<!--
<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>
-->
<{if $msgcount > 0}>
<a href="<{$xoops_url}>/viewpmsg.php">
<img src="<{$xoops_imageurl}>images/prvmsg_on.jpg" alt=You have <{$msgcount}>
new message border="0" /></a>
<{else}>
<a href="<{$xoops_url}>/viewpmsg.php">
<img src="<{$xoops_imageurl}>images/prvmsg_off.jpg"
alt="You have no new messages" border="0" /></a>
<{/if}>
<a href="<{$xoops_url}>/user.php" align="middle">
<{$xoops_uname}></a>
<a href="<{$xoops_url}>/user.php?op=logout">
<img src="<{$xoops_imageurl}>images/exit_small.jpg" alt="EXIT" border="0" /></a>
<{else}>
<form style="margin-top: 0px; margin-bottom: 0px"
action="<{$xoops_url}>/user.php" method="post">
<img src="<{$xoops_imageurl}>images/username_small.jpg"
alt="Username" border="0" width="16" height="16" align="middle" />
<input name="uname" type="text" value="" size="14" />
<img src="<{$xoops_imageurl}>images/password_small.jpg"
alt="Password" border="0" width="16" height="16" align="middle" />
<input name="pass" type="password" value="" size="12" />
<input name="op" type="hidden" value="login" />
<input name="submit" type="submit" value="<{$smarty.const._LOGIN}>" />
</form>
<{/if}></td>
<td align="left" class="headercenter">
<{if $xoops_isuser}> <{else}>
<form style="margin-top: 0px; margin-bottom: 0px"
action="<{$xoops_url}>/register.php" method="post">
<input name="submit" type="submit" value="<{$smarty.const._REGISTER}>" />
</form>
<{/if}> </td>
<td width="*" align="right" class="headersearch">
<form style="margin-top: 0px; margin-bottom: 0px"
action="<{$xoops_url}>/search.php" method="post">
<a href="<{$xoops_url}>/search.php">
<img src="<{$xoops_imageurl}>images/search_small.jpg"
alt="Advanced Search" border="0" width="16" height="16" align="middle" /></a>
<input name="query" type="text" size="15" class="button" />
<input name="action" type="hidden" value="results" />
<input name="submit" type="submit" value="<{$smarty.const._SEARCH}>" />
</form></td>
</tr>
</table>