<#assign sec=JspTaglibs["http://www.springframework.org/security/tags"]>
<div id="headDiv">	
    <div id="logoa">
	<img class="logo1" src="${ctx}/assets/images/datacross.png">		
	<img class="logo2" src="${ctx}/assets/images/cut-off-rule.png">		
	<img class="logo3" src="${ctx}/assets/images/wificross.png">	
	</div>	
	<ul id="menu">
		<li><a href="${ctx}/back/main/dashboard"><span>首页</span></a></li>
		
		<@sec.authorize access="hasAnyRole('ROLE_back_advertiser_report,ROLE_MANAGER')">
		<li><a href="${ctx}/back/main/ad/report/advertiser-report"><span>需求方报表</span></a></li>
		</@sec.authorize>
		
		<@sec.authorize access="hasAnyRole('ROLE_back_operator_report,ROLE_MANAGER')">
		<li><a href="${ctx}/back/main/ad/operator/operator-report"><span>媒体数据报表</span></a></li>
		</@sec.authorize>
		
		<@sec.authorize access="hasAnyRole('ROLE_back_audit,ROLE_MANAGER')">
		<li><a href="${ctx}/back/main/audit/audit-banner"><span>审核</span></a></li>
		</@sec.authorize>
		
		<@sec.authorize access="hasAnyRole('ROLE_back_finance,ROLE_MANAGER')">
		<li><a href="${ctx}/back/main/finance/finance-management"><span>财务管理</span></a></li>
		</@sec.authorize>
		
		<@sec.authorize access="hasAnyRole('ROLE_back_client_account,ROLE_MANAGER')">
		<li><a href="${ctx}/back/main/client-account"><span>客户账号管理</span></a></li>
		</@sec.authorize>
		
		<@sec.authorize access="hasAnyRole('ROLE_back_ap,ROLE_MANAGER')">
		<li><a href="${ctx}/back/main/ap/apmac/list"><span>热点管理</span></a></li>
		</@sec.authorize>
		
		<@sec.authorize access="hasAnyRole('ROLE_back_authority,ROLE_MANAGER')">
		<li><a href="${ctx}/back/main/authority"><span>权限管理</span></a></li>  	
		</@sec.authorize>		
	</ul>	
	<div id="divselect" >
	    <div id="currentOpa">
			<cite><li>${userSession.description}</li><li>${userSession.accountName}</li></cite>
		</div>
		<ul>
			<li><a href="${ctx}/back/main/authority/loginperson" selectid="1">修改个人信息</a></li>
			<li><a href="${ctx}/logout" selectid="2">退出登录</a></li>       
		</ul>
		<input type="hidden" value="${ctx!}" id="ctx"/>
		<input type="hidden" id="role" value="agent"/>
		<input type="hidden" id="sessionagentId" value="${userSession.agentId!}"/>
		<input type="hidden" id="sessionoperatorId" value="${userSession.operatorId!}"/>
	</div>    		
</div>	   	
<script type="text/javascript">
	$(function(){
		var path = window.location.pathname;
		if(path.indexOf("dashboard") != -1){
			$("#menu a:first").addClass("menu_change");
		};
		if(path.indexOf("ad/report") != -1){
			$("#menu a:eq(1)").addClass("menu_change");
		};
		if(path.indexOf("ad/operator") != -1){
			$("#menu a:eq(2)").addClass("menu_change");
		};
		if(path.indexOf("audit") != -1){
			$("#menu a:eq(3)").addClass("menu_change");
		};
		if(path.indexOf("finance") != -1){
			$("#menu a:eq(4)").addClass("menu_change");
		};
		if(path.indexOf("client-account") != -1){
			$("#menu a:eq(5)").addClass("menu_change");
		};
		if((path.indexOf("ap/apmac") != -1) || (path.indexOf("ap/place") != -1)){
			$("#menu a:eq(6)").addClass("menu_change");
		};
		if(path.indexOf("authority") != -1){
			$("#menu a:eq(7)").addClass("menu_change");
		};
	});
</script>
