<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Collection" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzLevelNumber" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.flow.*" %>
<%@ page import="net.sz600.docEngine.*" %>
<%@ include file="/sessionInfo.jsp"%>
<%@ include file="/docEngine/docEngineSession.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>
<%       
    //组合查询条件 
    String id     = SzConvert.toSpaceStr(request.getParameter("id"));    
    int iCount    = SzConvert.toInt(request.getParameter("count"));
    String field = "";
    int cond = 0;
    String value = "";
    StringBuffer sb = new StringBuffer("1=1");
    for (int i=0; i<iCount; i++) {
    	field = SzConvert.toZeroStr(request.getParameter("field" + i));
    	cond = SzConvert.toInt(SzConvert.toZeroStr(request.getParameter("cond" + i)));
    	value = SzConvert.strWriteData(request.getParameter("value" + i));
    	if (!value.equals("")) {
    		sb.append(" AND ");
    		sb.append(field);
    		switch(cond) {
    		case 0:
    			sb.append(" = ");
    			break;
    		case 1:
    			sb.append(" like ");
    			value = "%" + value + "%";
    			break;
    		case 2:
    			sb.append(" > ");
    			break;
    		case 3:
    			sb.append(" >= ");
    			break;
    		case 4:
    			sb.append(" < ");
    			break;
    		case 5:
    			sb.append(" <= ");
    			break; 			
    		}
    		sb.append("'");
    		sb.append(value);
    		sb.append("'");
    	}
    }
    
    String sCond = sb.toString();
    sb = null;
%>    
<form name="formHidden" method="post">
  <input type="hidden" name="searchCond" value="<%=sCond%>">
  <input type="hidden" name="id" value="<%=id%>">      
</form>
<%
  String sUrl = "list_index.jsp";
	out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
%>

