/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: ......
 * Generated at: 2020-05-29 00:48:32 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import wiseoa.util.*;
import educ.paper.*;
import java.util.*;
import java.net.*;
import wiseoa.*;
import jun.db.util.*;
import wiseoa.mail.jstl.*;

public final class edu_005fgeneratepolicy_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  static {
    _jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(1);
    _jspx_dependants.put("/rightverify_teacher.jsp", Long.valueOf(1476341628561L));
  }

  private volatile javax.el.ExpressionFactory _el_expressionfactory;
  private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
    if (_el_expressionfactory == null) {
      synchronized (this) {
        if (_el_expressionfactory == null) {
          _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        }
      }
    }
    return _el_expressionfactory;
  }

  public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
    if (_jsp_instancemanager == null) {
      synchronized (this) {
        if (_jsp_instancemanager == null) {
          _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
        }
      }
    }
    return _jsp_instancemanager;
  }

  public void _jspInit() {
  }

  public void _jspDestroy() {
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("    \r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("  ");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");

	//æ¯ä¸æ¯èå¸çæ ¡éª

	//æ£æµæ¯å¦å¯¹æªç»å½ç¨æ·å¼æ¾
	User user_teacher = User.getUserFromRequest(request);
	if (user_teacher.getId() > 0)
	{

		boolean isteacher = User.getUserInfo(User.getUserFromRequest(request).getId(), "isteacher").toString().equals("1");
		if (!isteacher)
		{
			String s = User.TIP_CANTUSEOA;
			s = URLEncoder.encode(s, "UTF-8");
			response.sendRedirect("SystemTip.jsp?info=" + s);
			return;
		}
	}
	else
	{

		String subpath = (String) session.getAttribute("wiseoaappsubpath");
		if (subpath == null) subpath = "";
		String url = request.getRequestURI();
		String qs = request.getQueryString();
		if (qs == null) qs = "";
		if (!qs.equals("")) qs = "?" + qs;
		url = jun.db.util.Escape.escape(url + qs);

		response.sendRedirect(subpath + "/login.jsp?url=" + url);
		return;

	}

      out.write("\r\n");
      out.write("\r\n");
      out.write('\r');
      out.write('\n');
 
    request.setCharacterEncoding("UTF-8");
    FF.setResponseContentType(response);
     
    PaperPolicy  pp=new PaperPolicy();
    pp.init(request , response,getServletContext());
    
    String treeHTML= pp.getTreeHTML( )  ;
    
	
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head><meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\r\n");
      out.write("    <title>试卷生成策略</title>\r\n");
      out.write("    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("\r\n");
      out.write("    <link rel=\"stylesheet\" type=\"text/css\" href=\"css/normal.css\"/>\r\n");
      out.write("    <link rel=\"stylesheet\" type=\"text/css\" href=\"extjs/resources/css/ext-all.css\"/>\r\n");
      out.write("     \r\n");
      out.write("    <script type=\"text/javascript\" src=\"extjs/adapter/yui/yui-utilities.js\"></script>\r\n");
      out.write("    <script type=\"text/javascript\" src=\"extjs/adapter/yui/ext-yui-adapter.js\"></script>\r\n");
      out.write("     \r\n");
      out.write("    <script type=\"text/javascript\" src=\"extjs/ext-all-debug.js\"></script>\r\n");
      out.write("   \r\n");
      out.write("    <script type=\"text/javascript\" src=\"js/json.js\"></script>\r\n");
      out.write("    <script type=\"text/javascript\" src=\"js/jquery.js\"></script>\r\n");
      out.write("    <script type=\"text/javascript\" src=\"js/validator.js\"></script>\r\n");
      out.write("    <script type=\"text/javascript\" src=\"js/zrpc.js.jsp\"></script>\r\n");
      out.write("    <script type=\"text/javascript\" src=\"js/domutil.js\"></script>\r\n");
      out.write("    <script type=\"text/javascript\" src=\"js/jst.js\"></script>\r\n");
      out.write("   \r\n");
      out.write("    <script language=\"JavaScript\"  src=\"fasttree/MzTreeView10.js\"></script>\r\n");
      out.write("    <link rel=\"StyleSheet\" href=\"tree/dtree.css\" type=\"text/css\" />\r\n");
      out.write("    <script type=\"text/javascript\" src=\"js/edu/generatepolicy.js\"></script>\r\n");
      out.write("      \r\n");
      out.write("   \r\n");
      out.write("  \r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("    <div id=\"north-div\" style='background-color:#c3daf9 ;'>\r\n");
      out.write("\t\t <table style=\"display:none\" border=0 cellpadding=\"0\" cellspacing=\"0\" style=\" background-color:#e5effc ;\" width=100%>\r\n");
      out.write("\t\t            <tr><td width=60><img src=\"image/home.png\"  align=\"absmiddle\"></td>\r\n");
      out.write("\t\t            <td style=\"font-size:14px;\">试卷生成策略管理</td></tr>\r\n");
      out.write("\t\t</table>\r\n");
      out.write("\t\t\r\n");
      out.write("\t\t<div id=\"container\" style=\"  \">\r\n");
      out.write("\t\t    <div id=\"toolbar\" ></div>\r\n");
      out.write("\t\t</div>\r\n");
      out.write("\r\n");
      out.write("</div>\r\n");
      out.write("    \r\n");
      out.write("    <div id=\"west-div\"  style=\" font-size:12px;  width:100%;height:100%; overflow-y: auto; overflow-x: auto;\">\r\n");
      out.write(" \r\n");
      out.write(" <DIV class=\"dtree\" id=treeContainer></DIV>\r\n");
      out.write(" \t\t<SCRIPT type=\"text/javascript\">\r\n");
      out.write(" \t\t  ");
      out.print(treeHTML);
      out.write("   \r\n");
      out.write("         </script>\r\n");
      out.write("         \r\n");
      out.write("  \r\n");
      out.write("    </div>\r\n");
      out.write("    \r\n");
      out.write("    <div id=\"center-div\">\r\n");
      out.write("          <iframe id=\"main\" frameborder=\"0\" scrolling=\"auto\" style=\"border:0px none;\"></iframe>\r\n");
      out.write("    </div>\r\n");
      out.write("    \r\n");
      out.write("    <div id=\"south-div\" style='background-color:#c3daf9 ;'>\r\n");
      out.write("  &nbsp;<img src='image/folderclosed.gif' align=\"absmiddle\">&nbsp;当前路径：<span id=fullpath>\\\\</span>\r\n");
      out.write("    </div>\r\n");
      out.write("</body>\r\n");
      out.write("\r\n");
      out.write("</html>\r\n");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
