<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.formEngine.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="java.util.*" %>
<%@ include file="/xml/formEngine2/sessionInfo2.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>

<%
    BdTransfer bdTransfer = new BdTransfer();
    int i = 0;
    int iLen = 0;
    ArrayList list = bdTransfer.getList();
    
		String cate_pro = SzConvert.strWriteData(request.getParameter("cate_pro") );
		String cate_fun = SzConvert.strWriteData(request.getParameter("cate_fun") );
	  String moduleName = SzConvert.toSpaceStr(request.getParameter("moduleName"));
	  String formName = SzConvert.toSpaceStr(request.getParameter("formName"));
	  if (moduleName.equals("")) {
		  formName = "";
	  }	  
		BdFormHelp formHelp = new BdFormHelp();
		BdModule bdModule = new BdModule();	  
		ArrayList moduleList = bdModule.getModuleList();		
		ArrayList formList = formHelp.getFormList(moduleName);
%>
<!-----上面的工具栏------>
<%@ include file="/xml/formEngine2/title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <input type="hidden" name="name" value="">
  <tr>
    <td>
    	<% if (isBarManager_SESSION && !moduleName.equals("") && !formName.equals("")) { %>
      <input type="button" name="btnAdd" class="btnClass" value="添加" OnClick="javascript:FormSubmit(formBar, 'update.jsp?OPERATOR=add&name=');">
    	<% }%>
      
    	<%
    	  if (moduleList.size() > 15) {
    	  	out.print("按行业分类：");
    		out.println(formHelp.professionSelectButton("cate_pro", cate_pro, "this.form.submit()"));
    		out.print("按功能分类：");	
    		out.println(formHelp.functionSelectButton("cate_fun", cate_fun, "this.form.submit()"));
    	  }
  	  	  out.print("请选择模块：");  		
  	      out.println(SzPageHelp.selectArrayFunc(moduleList, 0, 0,1,8,"moduleName", moduleName, "txtClass200","simpleform.xml", 5, cate_pro,6, cate_fun, "this.form.submit()"));
  	  	  out.print("请选择表单：");  		
  	  	  out.println(SzPageHelp.selectArrayFunc(formList, 0, 0, 1, -1,"formName", formName, "txtClass200","simpleform.xml", 3, moduleName, -1, "", "this.form.submit()"));    	
    	%>    	
    </td>
  </tr>
  </form>
</table>

<!-----信息列表----->
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">

  <tr class="trClassTitle">
    <td width="30">&nbsp;</td>  
    <td>名称</td>
    <td>模块名称</td>
    <td>表单名称</td>
    <td>说明</td>     
    <td width="40">操作</td>
  </tr>
<%
		String temp = "";
		String str[]=null;
		iLen = list.size();
		int j =0;
    for (i=0; i<iLen; i++ ) {
    	str = (String[])list.get(i);
    	if (!moduleName.equals("") && !str[1].equals(moduleName)) {
    		continue;
    	}
    	if (!formName.equals("") && !str[2].equals(formName)) {
    		continue;
    	}
    	j ++;
%>
  <tr onMouseOver="javascript:this.className='trMouseOver'" onMouseOut="javascript:this.className='trMouseOut'">
  	<td width="30" align="center"><%=j%></td>  
    <td><%=str[0]%>&nbsp;</td>
    <td><%=str[1]%>&nbsp;</td>
    <td><%=str[2]%>&nbsp;</td>
    <td><%=str[3]%>&nbsp;</td>
    <td width="60">	
    <% if (isBarManager_SESSION) { %>
    	<a href="javascript:Update(formBar,'<%=str[0]%>');">修改</a>
    	<a href="javascript:Delete(formBar,'<%=str[0]%>');">删除</a>
    <% } %>
    </td>
  </tr>
<%
    }

    out.println(SzPageHelp.outIndexTableTr(j, SzProperties.I_PageSize, 6));
%>
  </form>
</table>

<!-----下面的工具栏------>
<script language="javascript" src="<%=strLevel_SESSION%>share/js/commonTool.js"></script>
<script language="javascript">
  function Delete(formName, sName) {
  	if (confirm("确定要删除？")) { 
  			formName.name.value = sName; 	
				var url = "control.jsp?OPERATOR=delete";
  	    formName.action = url;
    		formName.submit();
  	}    
  }
  
  function Update(formName, sName) {
  	formName.name.value = sName; 	
		var url = "update.jsp?OPERATOR=update";
  	formName.action = url;
    formName.submit();  
  }  
  

</script>

