<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>云阅卷</title>
	<meta name="decorator" content="default"/>
	<%@include file="/WEB-INF/views/include/head.jsp" %>
	<style type="text/css">
		#main {padding:0;margin:0;} #main .container-fluid{padding:0 7px 0 10px;}
		#header {margin:0 0 10px;position:static;} #header li {font-size:14px;_font-size:12px;}
		#header .brand {font-family:Helvetica, Georgia, Arial, sans-serif, 黑体;font-size:26px;padding-left:33px;}
		#footer {margin:8px 0 0 0;padding:3px 0 0 0;font-size:11px;text-align:center;border-top:2px solid #0663A2;}
		#footer, #footer a {color:#999;} 
	</style>
	<script type="text/javascript"> 
		$(document).ready(function() {
			$("#menu a.menu").click(function(){
				$("#menu li.menu").removeClass("active");
				$(this).parent().addClass("active");
				if(!$("#openClose").hasClass("close")){
					$("#openClose").click();
				}
			});
			
			$(".accordion-heading a").click(function(){
				$('.accordion-toggle i').removeClass('icon-chevron-down');
				$('.accordion-toggle i').addClass('icon-chevron-right');
				if(!$($(this).attr('href')).hasClass('in')){
					$(this).children('i').removeClass('icon-chevron-right');
					$(this).children('i').addClass('icon-chevron-down');
				}
			});
			$(".accordion-body a").click(function(){
				$("#menu li").removeClass("active");
				$("#menu li i").removeClass("icon-white");
				$(this).parent().addClass("active");
				$(this).children("i").addClass("icon-white");
			}); 
			$(".accordion-body a:first i").click();
			$('#mainFrame').load(function(){
			    var path = window.frames[0].window.location.pathname;
			    $('#menu li').each(function(){
			        var src = $(this).find('a').attr('href');
			        if(src.indexOf(path)>=0) {
			            $('#menu li').removeClass('active');
		                $("#menu li i").removeClass("icon-white");
			            $(this).addClass('active');
			        }
			    });
			});
		});
	</script>
</head>
<body>
	<div id="main">
		<div id="header" class="navbar navbar-fixed-top">
	      <div class="navbar-inner">
	      	 <div class="brand">奥鹏教育</div>
	         <div class="nav-collapse">
	           <%-- <ul id="menu" class="nav">
				 <c:set var="firstMenu" value="true"/>
		 		<li class="menu "><a class="menu" href="${ctx }/admin/exam" target="menuFrame" >考试管理</a></li>
				<li class="menu "><a class="menu" href="" target="menuFrame" >基础管理</a></li>
	           </ul> --%>
	           <ul class="nav pull-right">
			  	 <li id="themeSwitch" class="dropdown">
			       	<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="主题切换"><i class="icon-th-large"></i></a>
				    <ul class="dropdown-menu">
				      <li><a href="#" onclick="location='${ctx}/admin/home/theme/default?url='+location.href">默认主题</a></li>
				      <li><a href="#" onclick="location='${ctx}/admin/home/theme/cerulean?url='+location.href">天蓝主题</a></li>
				      <li><a href="#" onclick="location='${ctx}/admin/home/theme/readable?url='+location.href">橙色主题</a></li>
				      <li><a href="#" onclick="location='${ctx}/admin/home/theme/united?url='+location.href">红色主题</a></li>
				      <li><a href="#" onclick="location='${ctx}/admin/home/theme/flat?url='+location.href">Flat主题</a></li>
				    </ul>
				    <!--[if lte IE 6]><script type="text/javascript">$('#themeSwitch').hide();</script><![endif]-->
			     </li>
			     <li class="dropdown">
                     <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="切换学校">当前学校：${web_user.schoolName}</a>
                     <ul class="dropdown-menu">
                         <c:forEach items="${web_user.schools}" var="school">
                         <li><a href="#" onclick="location='${ctx}/admin/sys/school/${school.id}?url='+location.href" target="mainFrame"><i class="icon-home"></i>&nbsp; ${school.name}</a></li>
                         </c:forEach>
                     </ul>
                 </li>
			  	 <li class="dropdown">
				    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="个人信息">${web_user.name}</a>
				    <ul class="dropdown-menu">
				      <li><a href="${ctx}/admin/sys/user/info" target="mainFrame"><i class="icon-user"></i>&nbsp; 个人信息</a></li>
				      <li><a href="${ctx}/admin/sys/user/modifyPwd" target="mainFrame"><i class="icon-lock"></i>&nbsp;  修改密码</a></li>
				    </ul>
			  	 </li>
			  	 <li><a href="${ctx}/admin-logout" title="退出登录">退出</a></li>
			  	 <li>&nbsp;</li>
	           </ul>
	         </div><!--/.nav-collapse -->
	      </div>
	    </div>
	    <div class="container-fluid">
			<div id="content" class="row-fluid">
				<div id="left">
							<div class="accordion" id="menu"><c:set var="firstMenu" value="true"/>
							<div class="accordion-group">
							    <%-- <div class="accordion-heading">
							    	<a class="accordion-toggle" data-toggle="collapse" data-parent="#menu" href="#collapse${menu.id}" title="考试管理"><i class="icon-chevron-${firstMenu?'down':'right'}"></i>&nbsp;考试管理</a>
							    </div> --%>
							    <div id="collapse1" class="accordion-body collapse ${firstMenu?'in':''}">
									<div class="accordion-inner">
										<ul class="nav nav-list">
											<c:if test="${web_user.type.value==0 || web_user.type.value==6}">
											<li><a href="${ctx}/admin/exam/list" target="mainFrame" ><i class="icon-th-list"></i>考试管理</a></li>
											</c:if>
											<c:if test="${web_user.type.value==0}">
											<li><a href="${ctx}/admin/exam-param/student" target="mainFrame" ><i class="icon-user"></i>考生管理</a></li>
											</c:if>
											<%-- <li><a href="${ctx}/admin/exam-param/subject" target="mainFrame" ><i class="icon-th-list"></i>科目管理</a></li>--%>
											<%-- <li><a href="${ctx}/admin/exam-param/header" target="mainFrame" ><i class="icon-leaf"></i>科组长管理</a></li> --%>
											<!-- 
											<c:if test="${web_user.type.value==0}">
											<li><a href="${ctx}/admin/exam-param/paper" target="mainFrame" ><i class="icon-tasks"></i>试卷管理</a></li>
											</c:if>
											 -->
											<c:if test="${web_user.type.value==0}">
											<li class="dropdown">
											<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-signal"></i>试卷管理</a> 
												<ul class="dropdown-menu">
													<li><a href="${ctx}/admin/exam-param/paper" target="mainFrame" ><i class="icon-upload"></i>Excel导入</a></li>
													<li><a href="${ctx}/admin/exam-param/subjectPaper" target="mainFrame" ><i class="icon-list-alt"></i>科目配置</a></li>
												</ul>
											</li>
											</c:if>
										<%-- 	<li><a href="${ctx}/admin/exam-param/objective" target="mainFrame" ><i class="icon-tasks"></i>客观题管理</a></li>
											<li><a href="${ctx}/admin/exam-param/subjective" target="mainFrame" ><i class="icon-th-large"></i>主观题管理</a></li> --%>
											<c:if test="${web_user.type.value==0}">
											<li><a href="${ctx}/admin/exam-param/marker" target="mainFrame" ><i class="icon-eye-open"></i>评卷员管理</a></li>
											</c:if>
											
											<c:if test="${web_user.type.value==0}">
											<li><a href="${ctx}/admin/exam/scan" target="mainFrame" ><i class="icon-th-list"></i>扫描进度</a></li>
											</c:if>
											<c:if test="${web_user.type.value==0 || web_user.type.value==5}">
											<li><a href="${ctx}/admin/exam/mark" target="mainFrame" ><i class="icon-th-list"></i>评卷进度</a></li>
											</c:if>
											<c:if test="${web_user.type.value==0 || web_user.type.value==5 || web_user.type.value==6}">
											<li><a href="${ctx}/admin/exam/score" target="mainFrame" ><i class="icon-tag"></i>成绩查询</a></li>		
											</c:if>
											<c:if test="${web_user.type.value==0}">
											<li><a href="${ctx}/admin/exam/statistics" target="mainFrame" ><i class="icon-th-list"></i>成绩分析</a></li>		
											</c:if>
											<c:if test="${web_user.type.value==0}">
											<li><a href="${ctx}/admin/exam/tag" target="mainFrame" ><i class="icon-tag"></i>标记试卷</a></li>	
											</c:if>
											<c:if test="${web_user.type.value==0}">
											<li><a href="${ctx}/admin/exam/check/answer" target="mainFrame" ><i class="icon-th-list"></i>数据检查</a></li>							
											</c:if>
											<c:set var="firstMenu" value="false"/>
										</ul>
									</div>
							    </div>
							</div>
						</div>
				</div>
				<div id="openClose" class="close">&nbsp;</div>
				<div id="right">
					<iframe id="mainFrame" name="mainFrame" src="" style="overflow:auto;"
						scrolling="yes" frameborder="no" width="100%" height="650"></iframe>
				</div>
			</div>
		    <div id="footer" class="row-fluid">
		       <!--  Copyright ©武汉启明软件 2012-2014--> 
			</div>
		</div>
	</div>
	<script type="text/javascript"> 
		var leftWidth = "160"; // 左侧窗口大小
		function wSize(){
			var minHeight = 500, minWidth = 980;
			var strs=getWindowSize().toString().split(",");
			$("#menuFrame, #mainFrame, #openClose").height((strs[0]<minHeight?minHeight:strs[0])-$("#header").height()-$("#footer").height()-32);
			$("#openClose").height($("#openClose").height()-5);
			if(strs[1]<minWidth){
				$("#main").css("width",minWidth-10);
				$("html,body").css({"overflow":"auto","overflow-x":"auto","overflow-y":"auto"});
			}else{
				$("#main").css("width","auto");
				$("html,body").css({"overflow":"hidden","overflow-x":"hidden","overflow-y":"hidden"});
			}
			$("#right").width($("#content").width()-$("#left").width()-$("#openClose").width()-5);
		}
	</script>
	<script src="${ctxStatic}/common/wsize.min.js" type="text/javascript"></script>
</body>
</html>