<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); if($_G['uid']) { ?>

<ul class="log-dropdown wk_userzt" style="display:none;">
<?php if(!empty($_G['setting']['pluginhooks']['global_usernav_extra1'])) echo $_G['setting']['pluginhooks']['global_usernav_extra1'];?>
    <?php if(!empty($_G['setting']['pluginhooks']['global_usernav_extra2'])) echo $_G['setting']['pluginhooks']['global_usernav_extra2'];?>
    <?php if(!empty($_G['setting']['pluginhooks']['global_usernav_extra3'])) echo $_G['setting']['pluginhooks']['global_usernav_extra3'];?>
    <li><a href="home.php?mod=space&amp;uid=<?php echo $_G['uid'];?>" target="_blank" title="访问我的空间" onMouseOver="showMenu({'ctrlid':this.id,'ctrlclass':'a'})"><?php echo $week_lang['20'];?></a></li>
    <?php if(check_diy_perm($topic)) { ?>
        <li><a href="javascript:saveUserdata('diy_advance_mode', '');openDiy();" title="DIY简洁模式">DIY简洁模式</a></li>
        <li><a href="javascript:saveUserdata('diy_advance_mode', '1');openDiy();" title="DIY高级模式">DIY高级模式</a></li>
    <?php } ?>
    <li><a href="home.php?mod=space&amp;do=notice" title="提醒">提醒 <?php if($_G['member']['newprompt']) { ?><span class="msg-num">(<?php echo $_G['member']['newprompt'];?>)</span><?php } ?></a></li>
    <?php if($_G['setting']['taskon'] && !empty($_G['cookie']['taskdoing_'.$_G['uid']])) { ?>
    <li><a href="home.php?mod=task&amp;item=doing" title="进行中的任务">进行中的任务</a></li>
    <?php } ?>
    <?php if($_G['uid']) { ?>
      <li><a href="forum.php?mod=guide&amp;view=my" title="<?php echo $week_lang['7'];?>"><?php echo $week_lang['7'];?></a></li>
      <li><a href="home.php?mod=space&amp;do=favorite&amp;view=me" title="收藏">收藏</a></li>
      <li><a href="home.php?mod=space&amp;do=friend" title="好友">好友</a></li>
      <li><a href="home.php?mod=space&amp;do=pm" title="消息">消息</a></li>
      <?php if(!empty($_G['setting']['pluginhooks']['global_myitem_extra'])) echo $_G['setting']['pluginhooks']['global_myitem_extra'];?>
    <?php } ?> 
    <li><a href="home.php?mod=spacecp&amp;ac=credit&amp;showcredit=1" title="积分:<?php echo $_G['member']['credits'];?>">积分: <span class="msg-num"><?php echo $_G['member']['credits'];?></span></a></li>
    <li><a href="home.php?mod=spacecp" title="设置">设置</a></li>
    <?php if(($_G['group']['allowmanagearticle'] || $_G['group']['allowpostarticle'] || $_G['group']['allowdiy'] || getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 6) || getstatus($_G['member']['allowadmincp'], 2) || getstatus($_G['member']['allowadmincp'], 3))) { ?>
    <li><a href="portal.php?mod=portalcp"><?php if($_G['setting']['portalstatus'] ) { ?>门户管理<?php } else { ?>模块管理<?php } ?></a></li>
    <?php } ?> 
    <?php if($_G['uid'] && $_G['adminid'] == 1 && $_G['setting']['cloud_status']) { ?>
    <li><a href="admin.php?frames=yes&amp;action=cloud&amp;operation=applist" target="_blank" title="云平台">云平台</a></li>
    <?php } ?> 
    <?php if($_G['uid'] && $_G['group']['radminid'] > 1) { ?>
    <li><a href="forum.php?mod=modcp&amp;fid=<?php echo $_G['fid'];?>" target="_blank" title="<?php echo $_G['setting']['navs']['2']['navname'];?>管理"><?php echo $_G['setting']['navs']['2']['navname'];?>管理</a></li>
    <?php } ?> 
    <?php if($_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)) { ?>
    <li><a href="admin.php" target="_blank" title="管理中心">管理中心</a></li>
    <?php } ?> 
    <li><a href="member.php?mod=logging&amp;action=logout&amp;formhash=<?php echo FORMHASH;?>" title="退出">退出</a></li>
    <?php if(!empty($_G['setting']['pluginhooks']['global_usernav_extra4'])) echo $_G['setting']['pluginhooks']['global_usernav_extra4'];?>
</ul>
    
<?php } elseif(!empty($_G['cookie']['loginuser'])) { ?>

<ul class="log-dropdown" style="display:none;">
    <li><a id="loginuser" class="username"><?php echo dhtmlspecialchars($_G['cookie']['loginuser']); ?></a></li>
    <li><a href="member.php?mod=logging&amp;action=login" onClick="showWindow('login', this.href)" title="激活">激活</a></li>
    <li><a href="member.php?mod=logging&amp;action=logout&amp;formhash=<?php echo FORMHASH;?>" title="退出">退出</a></li>
</ul> 
    
<?php } elseif(!$_G['connectguest']) { ?>

<ul class="log-dropdown" style="display:none;">
    <li><a href="member.php?mod=logging&amp;action=login&amp;referer=<?php echo rawurlencode($dreferer); ?>" onclick="showWindow('login', this.href);return false;" title="<?php echo $week_lang['4'];?>" onMouseOver="showMenu({'ctrlid':this.id,'ctrlclass':'a'})" class="week-button week-button-primary center" style="color:#FFF !important;"><?php echo $week_lang['4'];?></a></li>
    <li class="signup-help"><?php echo $week_lang['0'];?> <a href="member.php?mod=<?php echo $_G['setting']['regname'];?>" title="<?php echo $week_lang['3'];?>"><?php echo $week_lang['3'];?></a></li>
    <li><hr class="log-dd-sep"></li>
    <li><a href="connect.php?mod=login&amp;op=init&amp;referer=index.php&amp;statfrom=login" title="<?php echo $week_lang['2'];?>"><span class="i_qq"></span><?php echo $week_lang['2'];?></a></li>
    <?php if($wk_wxdl) { ?>
    <li><a href="plugin.php?id=wechat:login" title="<?php echo $week_lang['1'];?>"><span class="i_wx"></span><?php echo $week_lang['1'];?></a></li>
    <?php } else { ?>
    <li><a href="javascript:;" onClick="showWindow('wechat_bind', 'plugin.php?id=wechat:bind')" title="<?php echo $week_lang['1'];?>"><span class="i_wx"></span><?php echo $week_lang['1'];?></a></li>
    <?php } ?>
</ul> 
        
<?php } else { ?>

<ul class="log-dropdown" style="display:none;">
    <li><a href="home.php?mod=spacecp&amp;ac=usergroup" class="nousername" title="<?php echo $_G['member']['username'];?>"><?php echo $_G['member']['username'];?></a></li>
    <li><a href="member.php?mod=logging&amp;action=logout&amp;formhash=<?php echo FORMHASH;?>" title="退出">退出</a></li>
</ul>
    
<?php } ?>