<%@ page contentType="text/html; charset=GBK"%>
<%@ page import = "zr.zrpower.common.util.SysPreperty"%>
<%@ page import = "zr.zrpower.common.util.DateWork"%>
<%@ page import = "zr.zrpower.entity.sys.SessionUser"%>
<%@ page import = "zr.zrpower.flowengine.mode.monitor.FLOW_RUNTIME_PROCESS"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService"%>
<%@ page import = "zr.zrpower.flowengine.service.FlowMonitor"%>
<%@ page import = "java.lang.Object"%>
<%@ page import = "java.util.Hashtable"%>
<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
FLOW_RUNTIME_PROCESS[] flow = null;
FlowMonitor fm =new FlowMonitor();
%>
<%


 //得到查询的记录集
 flow = fm.GetFlowTransactList(user.getUserID(),"1");

%>
<HTML>
<HEAD>
<TITLE></TITLE>
<meta http-equiv="refresh" content="300">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<%if (flow!=null && flow.length>0){%>
<bgsound src='<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/media/message.wav' loop='1'>
<%}%>
<LINK type="text/css" rel="stylesheet" href="../../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../../zrsysmanage/script/Public.js"></SCRIPT>

</HEAD>
<BODY class="PageStyle">
<FORM method="post" name="recordfrm" action="">
<DIV style='padding-left:0;padding-top:0;width:100%;height:100%;overflow:no'>
<TABLE border="0" width="100%" cellspacing="0" cellpadding="0">
       <%
        String strPath= "";
        String strName= "";
        String strCAID= "";
        String strSendUserName= "";
        String strTime = "";
        String strMessage = "";
        String strRID = "";
        int itemNum=8;

        //流程发送人对照表1
        //Hashtable SendHashtable1 = new Hashtable();
        //SendHashtable1 =fm.GetSendUserHashtable1(user.getUserID());
        //流程发送人对照表2
        //Hashtable SendHashtable2 = new Hashtable();
        //SendHashtable2 =fm.GetSendUserHashtable2(user.getUserID());

        if (flow!=null && flow.length>0){
          if(itemNum>flow.length)
          {
            itemNum=flow.length;
          }
           for(int i=0;i<itemNum;i++){
             strPath=flow[i].getFLOWPATH().toString();
             strName=flow[i].getNAME().toString();
             strCAID= flow[i].getCURRACTIVITY().toString();
             strRID= flow[i].getRID().toString();


             if (strRID.equals("send"))//是分送的情况
             {
             %>
        <tr>
            <td class="Main_page" align="center"><img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/file_ico.gif" border="0" align="absmiddle"></td>
            <td class="Main_page"><a href="#" onclick=OpenUrl("../../..<%=strPath%>","1") title=""><%=strName.replaceAll("→分送","→阅")%></a></td>
        </tr>
       <%
             }else
             {
             strSendUserName = "";
             /*
             try {
               strSendUserName = (String) SendHashtable1.get(flow[i].getID()+strCAID);
               if (strSendUserName==null)
               {strSendUserName = (String) SendHashtable2.get(flow[i].getID()+strCAID);}
               }
             catch (Exception ex1) {

             }*/
             strTime = String.valueOf(flow[i].getACCEPTDATE());
             if (strTime.length()>10)
             {strTime = strTime.substring(0,10);}

          %>
        <tr>
            <td class="Main_page" align="center"><img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/file_ico.gif" border="0" align="absmiddle"></td>
            <td class="Main_page"><a href="#" onclick=OpenUrl("../../..<%=strPath%>","1") title="">[<%=strName%>][<%=strTime%>]</a></td>
        </tr>
       <%}}}%>
</TABLE>
</DIV>
</FORM>
</BODY>
</HTML>
<%
//清空相关对象(强制让java释放资源)
user = null;
userUI = null;
flow = null;
fm= null;
%>
