/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: ......
 * Generated at: 2020-07-10 22:10:33 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 java.util.*;
import wiseoa.*;
import wiseoa.util.*;
import wiseoa.mail.jstl.*;
import wiseoa.formdesign.jstl.*;
import java.util.*;
import java.net.*;
import wiseoa.*;
import wiseoa.util.*;
import wiseoa.RBAC.*;
import wiseoa.mail.jstl.*;

public final class workbook_005fconfig_005fddlb_005fsql_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.jsp", Long.valueOf(1476341677059L));
  }

  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fif_0026_005ftest;

  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() {
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
  }

  public void _jspDestroy() {
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.release();
  }

  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("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write(" \r\n");
      out.write("\r\n");
      out.write("\r\n");
  
	
	//éå¸¸æ¯å¯¹äºé£æ­¤éè¦æç®¡çåæéçé¡µé¢ç¨åå«æ¬é¡µé¢çæ¹å¼æ¥è¿è¡æéæ§å¶
	// å¦æå½åç¨æ·æç®¡çåæéï¼é£ä¹ç´æ¥è¿å
	// å¦æå½åé¡µé¢æ²¡æå å¥å°å·¥ä½å°ä¸­ï¼è¡¨ç¤ºæ²¡æè¿è¡é¢å¤ææï¼é£ä¹æç¤ºæ æé
	//å¦æå å¥å°äºå·¥ä½å°ï¼å¹¶ä¸åéå½åç¨æ·æ¥ææéï¼é£ä¹ok 
	User user=User.getUserFromRequest( request);
	 
	 if ( user.getRole()!=1) //å¦æä¸æ¯ç³»ç»ç®¡çæéçäººï¼
	 {
		 	String url =WiseFilter.getShortURL( request); 
			int unit = user.getUnit();
		 
			RBAC_cache cache = RBAC_cache.getInstance(null, unit);
 			if (!cache.needVerify(url)) 
 			{
 				String s= User.TIP_NORIGHT;
	 			response.sendRedirect( "SystemTip.jsp?info="+  URLEncoder.encode(s,"UTF-8") );
	 			return;
			} 

            //å¦æä¹æ²¡æè¿è¡å·¥ä½å°ææ
  	 		if ( ! WiseFilter.urlOnCommision( user, url ,0) ) 
			{ 
 	    		String s= User.TIP_NORIGHT;
	 			response.sendRedirect( "SystemTip.jsp?info="+  URLEncoder.encode(s,"UTF-8") );
	 			return;
			}
	 
	 }


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

		request.setCharacterEncoding("UTF-8");
    	FF.setResponseContentType(response);
		 
		DDLB_sql_info si = new DDLB_sql_info(request);
	 
		

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<HTML>\r\n");
      out.write("\t<head><meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\r\n");
      out.write("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\r\n");
      out.write("\t\t<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("\t\t<TITLE></TITLE>\r\n");
      out.write("\r\n");
      out.write("\t\t<META http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("\t\t<META http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("\t\t<META http-equiv=\"expires\" content=\"0\">\r\n");
      out.write("\r\n");
      out.write("\t\t<LINK rel=\"stylesheet\" type=\"text/css\" href=\"css/normal.css\">\r\n");
      out.write(" \r\n");
      out.write("\r\n");
      out.write("\t\t<STYLE>\r\n");
      out.write("   \r\n");
      out.write(" \r\n");
      out.write("\t\tbody {\tmargin-left: 2px;\tmargin-top: 2px;\tmargin-right: 2px; text-align:left}\r\n");
      out.write(" \r\n");
      out.write("     \r\n");
      out.write("\t  .selectspan  { border:1px solid #a0a0a0;overflow:hidden;width:500;}\r\n");
      out.write("\t  .flatselect { width:502; margin:-2;}\r\n");
      out.write("\t    \r\n");
      out.write("\t  \r\n");
      out.write("\t  \r\n");
      out.write("        </STYLE>\r\n");
      out.write("\t\t<LINK rel=\"stylesheet\" type=\"text/css\" href=\"zbutton/zbutton.css\">\r\n");
      out.write("\t\t<SCRIPT type=\"text/javascript\" src=\"zbutton/zbutton.js\"></SCRIPT>\r\n");
      out.write("\r\n");
      out.write("\t\t<SCRIPT type=\"text/javascript\" src=\"js/jsrsClient_rev.js\"></SCRIPT>\r\n");
      out.write("\r\n");
      out.write("\t \r\n");
      out.write("\t\t\r\n");
      out.write("\r\n");
      out.write("\t\t<SCRIPT language=\"javascript\">\r\n");
      out.write("\r\n");
      out.write(" \r\n");
      out.write("\t function Save()\r\n");
      out.write("\t {\r\n");
      out.write("\t \tjsrsExecute2(\"servlet/wiseoa.formdesign.rpc.SQLDDLBManage\", callback, \"Save\", \"sqldefine\",false);\r\n");
      out.write("\t }\r\n");
      out.write("\t   \r\n");
      out.write("\t      \r\n");
      out.write("\tfunction  callback(msg)\r\n");
      out.write("\t{\r\n");
      out.write("\t\tif (extractValue(msg ,\"ok\")==\"true\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t \t \r\n");
      out.write("\t\t    alert('保存成功');\r\n");
      out.write("\t\t}else\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t   alert ( extractValue(msg, \"error\"));\r\n");
      out.write("\t\t}\r\n");
      out.write("\t}\r\n");
      out.write("\t\t\r\n");
      out.write("\t \r\n");
      out.write("  \r\n");
      out.write(" \r\n");
      out.write("\t\r\n");
      out.write("\t</SCRIPT>\r\n");
      out.write("\r\n");
      out.write("\t    <style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write(".style1 {color: #FF6600}\r\n");
      out.write("-->\r\n");
      out.write("        </style>\r\n");
      out.write("\t</HEAD>\r\n");
      out.write("\r\n");
      out.write("\t<BODY>\r\n");
      out.write("\t \r\n");
      out.write("\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("\t\t\t<tr>\r\n");
      out.write("\t\t\t\t<td width=\"64%\" height=\"43\" valign=\"middle\">\r\n");
      out.write("\t\t\t\t\t<div align=\"left\"><span class=\"px16\"> &nbsp;&nbsp;&nbsp;&nbsp;动态列表设置</span>\r\n");
      out.write("\t            </div></td>\r\n");
      out.write("\t\t\t\t<td width=\"36%\" valign=\"bottom\" nowrap style=\"font-size:16px;\"><a href=\"help/formdesign/m2.htm\" target=\"_blank\">\r\n");
      out.write("\t\t\t\t<img src=\"image/help.gif\" border=\"0\" align=\"absmiddle\">示例</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n");
      out.write("\t\t\t    <a href=\"workbook_config_ddlblist.jsp\"><img src='image/click.gif' border=\"0\" align=\"absmiddle\">返回列表</a>\t\t\t\t</td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\t\t\t<tr>\r\n");
      out.write("\t\t\t\t<td colspan=\"2\">\r\n");
      out.write("\t\t\t\t\t<hr size=\"1\">\r\n");
      out.write("\t\t\t\t</td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\r\n");
      out.write("\t\t</table>\r\n");
      out.write("\t\t \r\n");
      out.write("\t<form name=\"sqldefine\" method=\"post\" action=\"\">\r\n");
      out.write("\t \t\t<input type=\"hidden\" id=\"path\" name=\"path\" value=\"");
      out.print(si.path);
      out.write("\">\r\n");
      out.write("\t\t\t  <input type=\"hidden\" id=\"oldname\" name=\"oldname\" value=\"");
      out.print(si.name);
      out.write("\">\r\n");
      out.write("\t\t\t  \r\n");
      out.write("        <table width=\"700\"  border=\"0\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\">\r\n");
      out.write("           \r\n");
      out.write("          <tr>\r\n");
      out.write("            <td width=5% nowrap>名&nbsp;&nbsp;&nbsp;&nbsp;称</td>\r\n");
      out.write("            <td  width=45% nowrap>\r\n");
      out.write("              <input type=\"text\" name=\"name\" id=\"name\"  class=textbox value=\"");
      out.print(si.name);
      out.write("\"   ></td>\r\n");
      out.write("          \r\n");
      out.write("            <td  rowspan=2  width=5% nowrap>说&nbsp;&nbsp;&nbsp;&nbsp;明</td>\r\n");
      out.write("            <td  rowspan=2  width=45% nowrap><textarea  name=\"bz\" id=\"bz\" class=\"textbox\"   rows=3>");
      out.print(si.bz);
      out.write("</textarea></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          \r\n");
      out.write("          <tr>\r\n");
      out.write("                  <td nowrap>数&nbsp;据&nbsp;源</td>\r\n");
      out.write("            <td>");
      out.print(si.dsnHTML);
      out.write("</td>\r\n");
      out.write("            <script>\r\n");
      out.write("            $E('dsn').options.add( new Option( \"脚本\",\"script\"));\r\n");
      out.write("            \r\n");
      out.write("            $E('dsn').value='");
      out.print(si.dsn);
      out.write("';\r\n");
      out.write("            \r\n");
      out.write("            \r\n");
      out.write("            \t\r\n");
      out.write("            function dsn_Changed() \r\n");
      out.write("            {\r\n");
      out.write("             \r\n");
      out.write("             \t var v= $E('dsn').value =='script'? \"none\":\"\";\r\n");
      out.write("   \r\n");
      out.write("\r\n");
      out.write("\t\t\t\t\t$E('filterContainer1').style.display=v;\r\n");
      out.write("\t\t\t\t\t$E('filterContainer2').style.display=v;\r\n");
      out.write("\t\t\t\t\t \r\n");
      out.write("            }\r\n");
      out.write("            \r\n");
      out.write("            \r\n");
      out.write("            $E('dsn').onchange= dsn_Changed ;\r\n");
      out.write("            dsn_Changed() ;\t\r\n");
      out.write("            \r\n");
      out.write("            </script>\r\n");
      out.write("          </tr>\r\n");
      out.write("          \r\n");
      out.write("          <tr>\r\n");
      out.write("            <td>定&nbsp;&nbsp;&nbsp;&nbsp;义</td>\r\n");
      out.write("            <td colspan=3><textarea name=\"sql\" rows=\"10\" class=\"textbox\" id=\"sql\">");
      out.print(si.sql);
      out.write("</textarea></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          \r\n");
      out.write("          <tr>\r\n");
      out.write("            <td nowrap>数据字段</td>\r\n");
      out.write("            <td><input type=\"text\" name=\"datacol\" id=\"datacol\" class=\"textbox\"  value=\"");
      out.print(si.datacol);
      out.write("\"></td>\r\n");
      out.write("            <td nowrap>显示字段</td>\r\n");
      out.write("            <td><input type=\"text\" name=\"showcol\" id=\"showcol\" class=\"textbox\"  value=\"");
      out.print(si.showcol);
      out.write("\"></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr  >\r\n");
      out.write("            <td id= filterContainer1>动态过滤</td>\r\n");
      out.write("            <td id= filterContainer2 colspan=3><textarea rows=3  name=\"filterby\" id=\"filterby\" class=\"textbox\"  >");
      out.print(si.filterby);
      out.write("</textarea></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("           <tr>\r\n");
      out.write("            <td>是否缓存</td>\r\n");
      out.write("            <td colspan=3><select  id=needcache   name=needcache   ><option value=\"true\">需要缓存(适用于数据变化不频繁或数据量大)</option>\r\n");
      out.write("            <option value=\"false\">不缓存(适用于数据变化频繁或数据量小)</option><option value=\"auto\">仅当结果超过2000条时缓存</option>\r\n");
      out.write("            </select>\r\n");
      out.write("            <script>$E('needcache').value='");
      out.print(si.needcache);
      out.write("';</script>\r\n");
      out.write("            </td>\r\n");
      out.write("            \r\n");
      out.write("          </tr>\r\n");
      out.write("          \r\n");
      out.write("         \r\n");
      out.write("          <tr>\r\n");
      out.write("            <td>&nbsp;</td>\r\n");
      out.write("            <td align=\"right\">\r\n");
      out.write("\t\t\t<SCRIPT language=\"javascript\">\r\n");
      out.write("\t\t \t\t\t\tfunction cb_save_onclick()\r\n");
      out.write("\t\t\t\t\t\t{\r\n");
      out.write("\t\t\t\t\t\t   Save();\r\n");
      out.write("\t\t\t\t\t    }\r\n");
      out.write("\t\t\t\t\t");
      if (_jspx_meth_c_005fif_005f0(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("        \t</SCRIPT> \r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table>\r\n");
      out.write("\t</form>\r\n");
      out.write("        <p>&nbsp;</p>\r\n");
      out.write("\t\t<script>\r\n");
      out.write("\t\t");
      if (_jspx_meth_c_005fif_005f1(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("\t\t\r\n");
      out.write("\t\t</script>\r\n");
      out.write("\t</BODY>\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);
    }
  }

  private boolean _jspx_meth_c_005fif_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:if
    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
    _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005fif_005f0.setParent(null);
    // /workbook_config_ddlb_sql.jsp(185,5) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fif_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${param.action!='view'}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue());
    int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
    if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
      do {
        out.write("\r\n");
        out.write("\t\t\t\t\t var cb =new zbutton('cb_save','保存','image/disk.gif');\r\n");
        out.write("\t\t\t\t\t ");
        int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
          break;
      } while (true);
    }
    if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
      return true;
    }
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
    return false;
  }

  private boolean _jspx_meth_c_005fif_005f1(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:if
    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
    _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context);
    _jspx_th_c_005fif_005f1.setParent(null);
    // /workbook_config_ddlb_sql.jsp(195,2) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fif_005f1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${param.action=='view'}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue());
    int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag();
    if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
      do {
        out.write("\r\n");
        out.write("\t\t$E('name').disabled=true;\r\n");
        out.write("\t\t$E('bz').disabled=true;\r\n");
        out.write("\t\t$E('dsn').disabled=true;\r\n");
        out.write("\t\t$E('sql').disabled=true;\r\n");
        out.write("\t\t$E('datacol').disabled=true;\r\n");
        out.write("\t\t$E('showcol').disabled=true;\r\n");
        out.write("\t\t$E('filterby').disabled=true;\r\n");
        out.write("\r\n");
        out.write("\t\t\r\n");
        out.write("\t\t\r\n");
        out.write("\t\t\r\n");
        out.write("\t\t\r\n");
        out.write("\t\t\r\n");
        out.write("\t\t");
        int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody();
        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
          break;
      } while (true);
    }
    if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
      return true;
    }
    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
    return false;
  }
}
