<? if (!defined('ROOT')) exit('Can\'t Access !'); ?>

    <div class="lmenu left" id="lmenu">
      <ul>
      
        <li id="home" class="hidden"><span><i class="opened"></i>用户中心</span>
          <ul class="listmenu clearfix">
            <li id="main"><a href="<?=Purl('member_main')?>">欢迎页面</a></li>
<? if($this->member['groupid']=='2') { ?>
<li id="upywy"><a href="<?=Purl('member_upywy')?>">升级业务员</a></li>
<? } else { ?>
            <li id="record"><a href="<?=Purl('member_record')?>">推广中心</a></li>
 <? if($this->member['groupid']>'2'&&$this->member['groupid']!='4') { ?>
  <li id="openywy"><a href="<?=Purl('member_openywy')?>">开通业务员</a></li> 
  <li id="addywy"><a href="<?=Purl('member_addywy')?>">申请业务员</a></li> 
 <? } } ?>
          </ul>
        </li>
        
        <li id="capital" class="hidden"><span><i class="opened"></i>资金管理</span>
          <ul class="listmenu clearfix">
            <li id="money"><a href="<?=Purl('member_money')?>">资金明细</a></li>
            <li id="payment"><a href="<?=Purl('member_payment')?>">现金充值</a></li>
            <li id="myatm"><a href="<?=Purl('member_myatm')?>">我要提现</a></li>
          </ul>
        </li>
        
        <li id="shop" class="hidden"><span><i class="opened"></i>购物中心</span>
          <ul class="listmenu clearfix">
            <li id="shopcart"><a href="<?=Purl('member_shopcart')?>">购物清单</a></li> 
            <li id="order"><a href="<?=Purl('member_order')?>">我的订单</a></li>
          </ul>
        </li>
        
        
<? if($this->member['groupid']=='4') { ?>  
        <li id="store" class="hidden"><span><i class="opened"></i>商户专区</span>
          <ul class="listmenu clearfix">
            <li id="addstore"><a href="<?=Purl('member_addstore')?>">在线下单</a></li> 
            <li id="stores"><a href="<?=Purl('member_stores')?>">商户账单</a></li>
          </ul>
        </li>
<? } if($this->member['groupid']>'4'||$this->member['groupid']=='3') { ?>       
        <li id="join" class="hidden"><span><i class="opened"></i><? if($this->member['groupid']>'4') { ?>代理专区<? } else { ?>商户推广<? } ?></span>
          <ul class="listmenu clearfix">
            <li id="addjoin"><a href="<?=Purl('member_addjoin')?>">申请商户</a></li> 
            <li id="joins"><a href="<?=Purl('member_joins')?>">我的商户</a></li>
            <? if($this->member['groupid']>'4') { ?>
            <li id="qjoins"><a href="<?=Purl('member_qjoins')?>">区域商户</a></li>
            <? } ?>
          </ul>
        </li>
<? } if($this->member['groupid']>'5') { ?>       
        <li id="agent" class="hidden"><span><i class="opened"></i>代理推广</span>
          <ul class="listmenu clearfix">
            <li id="addagent"><a href="<?=Purl('member_addagent')?>">申请代理</a></li> 
            <li id="agents"><a href="<?=Purl('member_agents')?>">我的代理</a></li>
          </ul>
        </li>

<? } ?>
        
        <li id="member" class="hidden"><span><i class="opened"></i>管理账户</span>
          <ul class="listmenu clearfix">
            <li id="password"><a href="<?=Purl('member_password')?>">修改密码</a></li>
            <li id="auth"><a href="<?=Purl('member_auth')?>">用户认证</a></li>
            <li id="profile"><a href="<?=Purl('member_profile')?>">资料修改</a></li>
            <li id="logout"><a href="<?=Purl('member_logout')?>">注销登录</a></li>
          </ul>
        </li>
        
      </ul>
    </div>
<script language="javascript">
$(document).ready(function(){		   
  $('#lmenu ul li span').click(function(){
    var span = $(this), li = span.parent() ,height = li.find("ul").height();
if(li.height()==26){   
   height = height+26;
   li.animate({height:height+"px"}, 300);
   li.find("i").addclass
       li.find("i").removeClass();
       li.find("i").addClass('opened');
}else{
   li.animate({height:"26px"}, 300);
       li.find("i").removeClass();
       li.find("i").addClass('closed');
}
  });
});
</script>