<?php
// Subroutine: mainmenu.php
// Xinfeng Chen, 2002.12.07
// require: class CUser, CBoard
// input: $sv_user,$bid,$oBrd,$oUsr

$_url=($bid!='') ? $oBrd->o_url : $hpurl;

$_m_regusr="<a href=zuser_reg.php title='新用户注册'>注册</a>";
$_m_pass  ="<a href=zuser_pass.php title='忘记密码无法登录'>忘记密码</a>";
$_m_online="<a href=viewonline.php title='查看在线名单'>在线</a>";
$_m_regbrd="<a href=zboard_reg.php title='申请新论坛'>注册论坛</a>";
$_m_help  ="<a href=help.php style='CURSOR: hand' title='常见问题的解答'>帮助</a>";
$_m_about ="<a href=about.php title='ZBB软件信息'>关于</a>";

$tmp=($bid!='') ? "viewboard.php?bid=$bid" : '';
$_m_logon ="<a href=logon.php?url=$tmp title='设定身份进入论坛'>登录</a>";
$_m_logoff="<a href=logon.php?url=$tmp title='注销当前用户身份'>注销</a>";

$tmp=($sv_user!='') ? "($oUsr->msg/$oUsr->oldmsg)" : '';
$_m_gbook ="<a href=mailbox.php?user=$sv_user title='本人查看留言'>我的留言簿</a>$tmp";
$_m_edtusr="<a href=zuser_edit.php?user=$sv_user title='编辑用户资料'>资料</a>";
$_m_edtbrd="<a href=zboard_edit.php?bid=$bid title='版主编辑论坛资料'>论坛资料</a>";

if($sv_user!=''){
 $_guestName=$sv_user;
 $_menu="$_m_logoff | $_m_edtusr | $_m_gbook | $_m_online | $_m_regbrd";
 if($bid!=''){
  if($oBrd->isModerator($sv_user)){$_menu.=" | $_m_edtbrd";}
 }
 $_menu.=" | $_m_help | $_m_about";
}else{
  $_guestName='客人';
  $_menu="$_m_logon | $_m_regusr | $_m_pass | $_m_online | $_m_help | $_m_about";
}

$tmp=($bid!='') ? '100%' : '95%';
menu_bar("&gt;&gt; 欢迎您，<b>$_guestName</b>： $_menu", $_url, $tmp);

?>