<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.system.SzOut" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.drivingSchool.*" %>
<%
    //获取提交的参数
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
    String sPKEY = SzConvert.toZeroStr(request.getParameter("PKEY"));
		String sSubjectOrder = SzConvert.strWriteData(request.getParameter("subjectOrder"));	 //科目
%>
<form name="formHidden" method="post">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="PKEY" value="<%=sPKEY%>">
  <input type="hidden" name="subjectOrder" value="<%=sSubjectOrder%>">  
</form>
<%
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
		Exam exam = new Exam();
    boolean flag = false;
    String sUrl = "kekao.jsp";
    String sMessage = "";
    if (sOPERATOR.equals("kekao")) {
    	sUrl = "kekao.jsp";
    	flag = exam.kekao(request,session);
    } else if (sOPERATOR.equals("xueshi")) {
    	sUrl = "xueshi.jsp";
    	flag = exam.xueshi(request,session);
    } else if (sOPERATOR.equals("yuyue")) {
    	sUrl = "yuyue.jsp";
    	if(sSubjectOrder.equals("1")) {
    		//文考
    		flag = exam.control(request,session);
    	} else {
    		flag = exam.yuyue(request,session);
    	}
    } else if (sOPERATOR.equals("yuyuequeren")) {
    	sUrl = "yuyuequeren.jsp";
		flag = exam.yuyuequeren(request,session);
	} else if (sOPERATOR.equals("chengji")) {
    	sUrl = "chengji.jsp";
    	flag = exam.chengji(request,session);    	
    }
    sMessage = SzOut.getMessage();

    if (flag) {
        out.println(SzPageHelp.jsAlert("操作成功"));
        //out.println(SzPageHelp.jsGoUrl(sUrl));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }
%>