<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.Iterator" %>
<%@ 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.*" %>
<%@ include file="/sessionInfo.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    //传阅窗口，选择人员后，发送给人员，自动关闭
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
    int iFormID = SzConvert.toInt(request.getParameter("FormID"));
    int iInfoID = SzConvert.toInt(request.getParameter("InfoID"));
    LcPass lcPass = new LcPass();
    String str_ID = lcPass.getKeyByInfo(iFormID, iInfoID);
    
    //获取提交的参数
    String sType = SzConvert.toZeroStr(request.getParameter("type"));
    String sPKEY = SzConvert.toZeroStr(request.getParameter("PKEY"));
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
    String sSearchName = SzConvert.strWriteData(request.getParameter("txtSearchName"));

    String sTable_type = "";
    //读取数据
    LcPassDetail lcPassDetail = new LcPassDetail();
    LcPassDetailInfo lcPassDetailInfo = null;
    String sCond = "MXCYID IN (" + str_ID + ")";

    if (!sPKEY.equals("0")) {
        sCond += "";
    }
    String sSortField = SzConvert.toSpaceStr(request.getParameter("txtSortField")); 
    int iSortOrder    = Integer.parseInt(SzConvert.toZeroStr(request.getParameter("txtSortOrder"))); 
    if (sSortField.equals("")) { 
      sSortField = "MXID";
      iSortOrder = SzProperties.I_SortOrder_DESC;
    } 
    int iCurrentPage = 1;
    try {
        iCurrentPage =  Integer.parseInt(sPage);
    }catch(Exception e) {
    }

    Iterator iter = lcPassDetail.getArrayList(sCond, sSortField, iSortOrder, iCurrentPage, sSearch).iterator();

    SzPageInfo pageInfo = lcPassDetail.getPageInfo();
    int iPageCount = pageInfo.getPageCount();
    int iRecordCount = pageInfo.getRecordCount();
    iCurrentPage = pageInfo.getCurrentPage();
    int i = 0;
    SzData szData = null;  
%>
<!-----上面的工具栏------>
<%@ include file="/share/title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="InfoID" value="<%=iInfoID%>">  
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>"> 
  <tr>
    <td>
      <%=SzPageHelp.deleteButton()%>
      <%=SzPageHelp.button("返回","javascript:document.location.href='../../share/formEngine2/index_manage.jsp?FormID=" + iFormID + "'")%>      
    </td>
  </tr>
  </form>
</table>

<!-----信息列表----->
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="InfoID" value="<%=iInfoID%>">  
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>"> 
  <tr class="trClassTitle">
    <td width="120"><%=SzPageHelp.sortTitle("接收人员", "MXDLXM", sSortField, iSortOrder)%></td>
    <td width="60"><%=SzPageHelp.sortTitle("点击次数", "MXCS", sSortField, iSortOrder)%></td>
    <td width="120"><%=SzPageHelp.sortTitle("阅读时间", "MXSJ", sSortField, iSortOrder)%></td>
    <td width="120"><%=SzPageHelp.sortTitle("最后阅读时间", "MXZHSJ", sSortField, iSortOrder)%></td>
    <td>反馈意见</td>
  </tr>
<%
    while (iter != null && iter.hasNext()) {
        lcPassDetailInfo = (LcPassDetailInfo)iter.next();
        i++;
%>
  <tr>
    <td><%=lcPassDetailInfo.getMXDLXM()%>&nbsp;</td>
    <td><%=lcPassDetailInfo.getMXCS()%>&nbsp;</td>
    <td><%=lcPassDetailInfo.getMXSJ()%>&nbsp;</td>
    <td><%=lcPassDetailInfo.getMXZHSJ()%>&nbsp;</td>
        <td><%=lcPassDetailInfo.getMXFK()%>&nbsp;</td>        
  </tr>
<%
    }
    out.println(SzPageHelp.outIndexTableTr(i, SzProperties.I_PageSize, 5));
%>

  </form>
</table>

<!-----下面的工具栏------>
<table width="100%">
  <form name="formPage" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="InfoID" value="<%=iInfoID%>">  
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="txtSearchName" value="<%=sSearchName%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>"> 
  <tr>
    <td align="right">
      <%@ include file="/share/page/page_include.jsp"%>
    </td>
  </tr>
  </form>
</table>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="InfoID" value="<%=iInfoID%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>"> 
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
