<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Collection" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.database.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.flow.*" %>
<%@ page import="net.sz600.online.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="net.sz600.formEngine.*" %>
<%@ page import="net.sz600.weboffice.*" %>
<%@ page import="net.sz600.online.*" %>
<%@ page import="com.soarwell.weixin.oa.*" %>
<%@ include file="/sessionInfoWeixin.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no" />
<%@ include file="/share/oa_app_title.jsp"%>
 <link href="../images/soarwell_css.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="<%=strLevel_SESSION%>share/js/commonTool.js"></script> 
<script language="javascript">
  function SendMessageWin() {

    var vUrl = "select_user.jsp";
  	childWin = window.open(vUrl,"","left=100,top=100,scrollbars=yes,resizable=yes,status=yes,width=400px,height=430px");   
  }
</script> 
</head>
<%@ include file="title.jsp"%>

<% 
  String strLevel = "../../"; 
  String sPage = SzConvert.toZeroStr(request.getParameter("page"));    
  String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
  
	OlMessageControl olMessageControl = new OlMessageControl();
	OlMessageInfo olMessageInfo = null;
    
	String sSortField = "FSID";
	int iSortOrder = 1;
	int iCurrentPage = SzConvert.toInt(sPage);
	int iPageSize = SzProperties.I_PageSize_APP;
	int iColumnCount = 5; 
	
    Iterator iter = olMessageControl.getSendList(iDLID_SESSION, "1=1", sSortField, SzProperties.I_SortOrder_DESC, iCurrentPage, sSearch, iPageSize).iterator();

    SzPageInfo pageInfo = olMessageControl.getPageInfo();
    int iPageCount = pageInfo.getPageCount();
    int iRecordCount = pageInfo.getRecordCount();
    iCurrentPage = pageInfo.getCurrentPage();
    
    int i = 0;
%>
<table width="100%">
  <form name="formBar" method="post">
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="from" value="index.jsp">  
  <tr>
    <td>
      <input type="button" name="btnAdd" class="btnClass" value="发送信息" OnClick="javascript:FormSubmit(formPage,'send.jsp?OPERATOR=send');">     	                
    </td>
  </tr>
  </form>
</table>
<table height="227" width="100%" border="0" cellspacing="3" cellpadding="3" style="border:#D7D7D9 1px solid;">
  <form name="formList" method="post">
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="from" value="index.jsp">  
<%

    
    Message message = new Message();
	int iKeyValue = 0;
	while (iter != null && iter.hasNext()) {
    	olMessageInfo = (OlMessageInfo)iter.next();
    	iKeyValue = olMessageInfo.getJSID();    	
    	i++;
%>
<%
	if (i>1) {
%>
  <tr>
    <td height="8" align="left" background="../images/line.gif"></td>
  </tr> 
<% } %>  
  <tr>
    <td>      
			<span class="product_name"><%=i%> 
      <input type="checkbox" name="chkId" id="chkId" value="<%=olMessageInfo.getJSID()%>"> 
      <%=olMessageControl.receiveTag(iKeyValue) %>
                  
      </span>   
      <b>[微信]</b><%=olMessageControl.getWeixinStateName(olMessageInfo.getJSWJJ(), olMessageInfo.getJSDLID()) %>  
      &nbsp;&nbsp;
      <a href="javascript:FormSubmit(formPage,'detail.jsp?OPERATOR=detail&KEY=<%=iKeyValue%>');">详情</a>
    </td>
  </tr>
 
  <tr>
    <td><a href="javascript:FormSubmit(formPage,'detail.jsp?OPERATOR=detail&KEY=<%=iKeyValue%>');"><span class="product_content"><b>[标题]</b><%=message.cutHref(olMessageInfo.getFSBT())%> <%=olMessageControl.newTag(olMessageInfo.getJSYD())%>   </span></a></td>
  </tr>
  <tr>
    <td><span class="product_content">
    <b>[接收人]</b><%=olMessageInfo.getJSDLXM()%>&nbsp;
    <b>[时间]</b><%=olMessageInfo.getFSSJ()%>
    
    </span>
    </td>
  </tr> 
 
  <%  } %>
  <tr><td>&nbsp;</td></tr>
  
  </form>
</table>

<table width="100%" border="0" cellspacing="3" cellpadding="3">
  <form name="formPage" method="post">  
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="from" value="index.jsp">  
  <%@ include file="/app/share/page_include.jsp" %>
  </form>
</table>
<BR><BR>
