整合型工作平臺-內容串接

 <%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="com.dalux.bean.bdm.*" %>
<%@ page import="com.dalux.util.*" %>
<%@ page import="com.dalux.bean.job.*" %>
<%@ page import="com.dalux.bean.mana_platform.*" %>

<%@ page import="com.cps.util.*" %>
<%@ page import="com.cps.df2.*" %>
<jsp:useBean id="session_modular_plugin"   scope="session"  class="com.cps.modular.plugin.ModularPlugIn"     />
<jsp:useBean id="session_employee"      scope="session" class="com.dalux.bean.bdm.AddressBook" />
<jsp:useBean id="session_df2_tmp"              scope="session" class="com.cps.df2.Df2"                />
<jsp:useBean id="session_df2_daemon"           scope="session" class="com.cps.df2.Df2Daemon"      />
<jsp:useBean id="session_modular_customer_print"      scope="session"  class="com.cps.modular.ModularCustomerPrint"     />
<jsp:useBean id="session_df2_daemon_report"           scope="session" class="com.cps.df2.Df2DaemonReport"          />
<jsp:useBean id="session_df2_daemon_report_receiver_list"  scope="session" class="com.cps.df2.Df2DaemonReportReceiver"  />
<jsp:useBean id="report_receiver_list"                 scope="session" class="com.cps.df2.Df2DaemonReportReceiver"  /> 
<jsp:useBean id="session_df2_daemon_report_receiver"  scope="session" class="com.cps.df2.Df2DaemonReportReceiver"  />
<jsp:useBean id="session_mjob_et_attach"       scope="session" class="com.cps.mjob.MJobEtAttach"      />
<jsp:useBean id="session_flow_owner"       scope="session" class="com.cps.mjob.MJobFlowOwner"      />

<jsp:useBean id="session_mjob_param"        scope="session" class="com.cps.mjob.MJobParam"             />
<jsp:useBean id="session_job_field"         scope="session" class="com.dalux.bean.job.JobField"         />
<jsp:useBean id="session_job_et_field"      scope="session" class="com.dalux.bean.job.JobEtField"       />

<jsp:useBean id="df2_data"      scope="session" class="com.plugin.df2.Df2Data"       />
<jsp:useBean id="df2_data_et"      scope="session" class="com.plugin.df2.Df2Data"       /> 
<jsp:useBean id="df2_data_list"      scope="session" class="com.plugin.df2.Df2Data"       />
 <jsp:useBean id="page_df2_data"      scope="page" class="com.plugin.df2.Df2Data"       />
<%@ include file="../../../MyUtility/login_data.jsp" %>

<% System.out.println(" ----- /PlugIn/modular/job_content/yuanliao_df2_into_et.jsp" + " -----"); %>
 <%
 /******************************************************
 ** 與日期相關的處理類
 *********************************************************/
 class Proc_Date{
    /*判斷兩個日期的大小*/
    public String return_color(String date1,String date2){
      String  re_date = "";
      DateFormat df = new SimpleDateFormat("yyyy-MM-dd");   
      try{
        java.util.Date dt1=df.parse(date1.replaceAll("/","-"));
        java.util.Date dt2=df.parse(date2.replaceAll("/","-"));
        if((dt1.getTime()-dt2.getTime())/(3600*1000*24)==-1) re_date="blue";
        if((dt1.getTime()-dt2.getTime())/(3600*1000*24)>=1) re_date="red";
      }
      catch(Exception e){
       System.out.println("Exception#Date===>"+e);
      }
      return re_date;
    }
 }
 %>
 
<%
 /********************************************************************************************
  * 工作單內容取得
  ********************************************************************************************/
  String domian_name = getServletContext().getInitParameter("DomainName");
  String sqljob=" select * from job where job_no='"+session_mjob_param.job_no+"'";
  String jobStatus=page_df2_data.getOneFieldData(sqljob,"status");
  Proc_Date proc_date = new Proc_Date();

  String sql_str2="SELECT * FROM MJOB_FLOW_OWNER WHERE job_no='"+session_mjob_param.job_no+"' AND process_status='"+jobStatus+"'";
  String owner_str=page_df2_data.getOneFieldData(sql_str2,"owner");

 session_job_field.getDataFromJobNo(session_mjob_param.job_no);   
 session_job_et_field.getDataFromJobNo(session_mjob_param.job_no);
 
 df2_data.clearData();
 String sql11=" select * from T025F040 where field35='20' ";
        sql11+= " and status=0 and  field27 like'%";
        sql11+=session_job_field.field11+"%' ";
      
       
 ResultSet rs2=df2_data.executeQueryDb(sql11);
 
 //表單歸檔后內容不變
 int intJobStatus=Integer.parseInt(jobStatus);
 if(intJobStatus<3)
 {
    while(rs2.next())
   {
      String childJObNo=CorePress.nullEmpty(rs2.getString("field21"));
      String mainPerson=CorePress.nullEmpty(rs2.getString("field27"));
      String shixiang=I18N.trans(CorePress.nullEmpty(rs2.getString("field26")));
      String parentJobNo=CorePress.nullEmpty(rs2.getString("field40"));
      String finishStatus=CorePress.nullEmpty(rs2.getString("field35"));
       String auditStatus=CorePress.nullEmpty(rs2.getString("field23"));
       if(finishStatus.equals("20"))
       {
       //  System.out.println("===auditStatus:finishStatus:childJObNo========="+auditStatus+":"+finishStatus+":"+childJObNo);
         if(!parentJobNo.equals(""))
         {
            String[] parentJobNos=parentJobNo.split(";");
            int num=0;
            for(int j=0;j<parentJobNos.length;j++)
            {
               if(parentJobNos[j].equals(session_mjob_param.job_no))
               {
                 num++;
               }
            }
            if(num==0)
            {
              if(mainPerson.indexOf(session_job_field.field11)>=0)
              {
              
                parentJobNo+=session_mjob_param.job_no+";";
              }
            }
           
         }
        else
         {
          if(mainPerson.indexOf(session_job_field.field11)>=0)
              {
             
              parentJobNo+=session_mjob_param.job_no+";";
             }
         }
       
       
         String sql5="update T025F040 set field40='"+parentJobNo+"'";
                sql5+=" where field21='"+childJObNo+"' and ( field35='20') ";
                sql5+=" and field26='"+shixiang+"'";
                page_df2_data.executeUpdate(sql5);
        }
  
   }
    
 }
  df2_data.closeDb();

 
%>
<script>
function MultiSelect(form,bol)
 { 
  var obj=form.checkboxid;
   for(var i=0;i<obj.length;i++)
   {
     if(obj[i].disabled==false)
     {
      obj[i].checked=bol;
     }
   }   
 }
</script>
<style>
 .style1
 {
  font-size:12px;
 }
</style>
<html>
 <head>
</head>
 <script type="text/javascript" src="jquery-1[1].2.6.js"></script>
<body>
<form action=""  name="myform" method="post">
<br>
<table width="98%" align="center" cellspacing="0" cellpadding="0">
 <tr>
 <td  align="left" ><span style="font-size:12px"><font color="blue" ><b>未完成工作列表</b></font></span></td> </tr>
  
   <td align="left" >
     <input type="radio" name="select" onClick="MultiSelect(this.form,true)"/><font style="font-size:12px;" >全選</font>&nbsp;&nbsp;
     <input type="radio" name="select" onClick="MultiSelect(this.form,false)"/><font style="font-size:12px;">重置</font>&nbsp;&nbsp;
   </td>
   <td align="right">
    <%
     String urlpage="../../../PlugIn/modular/job_content/product_analysis_operator.jsp";
    %>
    <!--<span style="font-size:12px; width:100px;"><input type="button" onClick="window.open('<%=urlpage%>?type=new','_blank','top=200,left=200,width=400,height=250, resizable=0,scrollbars=auto')" disabled value="新增" />&nbsp;</span>-->
    <span style="font-size:12px"><input type="button"  name="modifyBtn" onClick="modifyfun(this.form,'<%=session_job_field.job_no%>')" <%=(jobStatus.equals("2")||jobStatus.equals("3"))&&session_flow_owner.isDocumentOwner(session_mjob_param.job_no,jobStatus,login_id) ? "":"disabled"%> value='<%=jobStatus.equals("2") ? "&nbsp;寫報告&nbsp;":(jobStatus.equals("3") ? "&nbsp;主管批示&nbsp;":"&nbsp;&nbsp;修改&nbsp;&nbsp;")%>'  />&nbsp;</span>
    <!--<span style="font-size:12px"><input type="button" onClick="deletefun(this.form)" disabled  value="刪除" />&nbsp;</span>-->
    <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   </td>
 </tr>
</table>
    <table width="98%" border="1" align="center" cellspacing="0" cellpadding="0" >
   <tr bgcolor="#ECE8D8">
  <td width="2%"  align="center"><span style="font-size:12px">&nbsp;</span></td>
  <td width="8%"  align="center"><span style="font-size:12px">工作屬性</span></td>
  <td width="20%" align="center"><span style="font-size:12px">交辦事項</span></td>
  <td width="8%"  align="center"><span style="font-size:12px">預定完成</span></td>
   <td width="20%" align="center"><span style="font-size:12px">進度報告</span></td>
   <td width="8%"  align="center"><span style="font-size:12px">實際完成</span></td>
 
   <td width="15%" align="center"><span style="font-size:12px">主管批示</span></td> 
   <td width="5%"  align="center"><span style="font-size:12px">結案</span></td>
   <td width="8%"  align="center"><span style="font-size:12px">單號</span></td>
    <td width="5%"  align="center"><span style="font-size:12px">附件</span></td>  
 </tr>
 <input type="hidden" name="checkboxid" value="1" />
 <%

 if(intJobStatus<1)
 {
 

 df2_data.clearData();
 String sql=" select * from T025F040 where (field35='20' ";
        sql+= " ) and status=0 and  field27 like'%";
        sql+=session_job_field.field11+"%'";
    
 ResultSet rs=df2_data.executeQueryDb(sql);
 while(rs.next())
 {

   String jobNo=CorePress.nullEmpty(rs.getString("field21"));
  
   String mysql="select * from job where job_no='";
          mysql+=jobNo+"'";
         
          df2_data.clearData();
          String job_status=df2_data.getOneFieldData(mysql,"status"); 
          String currentDate=TimeTool.getCurrentDate();
          TimeTool.parseDateTimeTo2(rs.getString("field10"));
          String date_str = TimeTool.parse_date;
 %>
 
 <tr>
  
  <%
    df2_data.clearData();
    df2_data.tbl_name="T007F020";
    df2_data.where_sql=" where field13='";
    df2_data.where_sql+=rs.getString("field34")+"'";   
  %>
   <td   align="center"><span style="font-size:12px" ><font color="<%=proc_date.return_color(currentDate,date_str)%>"><%=df2_data.getOneFieldData("field14")%>&nbsp;</span></td>
   <td   align="left"><span style="font-size:12px"  ><font color="<%=proc_date.return_color(currentDate,date_str)%>"><%=rs.getString("field26")%>&nbsp;</span></td>
   <td   align="center"><span style="font-size:12px" ><font color="<%=proc_date.return_color(currentDate,date_str)%>"><%=rs.getString("field10").substring(0,10)%>&nbsp;</span></td>

    <%
   String pr=CorePress.nullEmpty(rs.getString("field39"));
   String nowdate=TimeTool.getCurrentDate();
  
   String todayRemark="";
   String historyRemark="";
   if(pr.indexOf(nowdate)!=-1)
   {
    todayRemark= pr.substring(pr.indexOf(nowdate)+1,pr.length());
    historyRemark=pr.substring(0,pr.indexOf(nowdate));
   }
  else
   {
    todayRemark="今日無報告";
    historyRemark=pr;
   }
  %>
  
   <td   align="left"><span style="font-size:12px" ><%=todayRemark%>&nbsp;<br/>
    <%
    if(!historyRemark.equals(""))
    {
    %>
    <img src="../../../img/arrow_r_r_small.gif" width="9" height="9">
    <a href="javascript:void(0)"  onclick = "show('fd',this,'<%=historyRemark%>');return false;">查看歷史報告</a>
    <%}%>
   </span></td>
   <%
    String show_str = CorePress.nullEmpty(rs.getString("field11").substring(0,10));
    if(show_str.equals("1900-01-01")) show_str="";
   %>
   <td   align="center"><span style="font-size:12px" ><%=show_str%>&nbsp;</span></td>

 <%
    pr=CorePress.nullEmpty(rs.getString("field30"));
      
   if(pr.indexOf(nowdate)!=-1)
   {
    todayRemark= pr.substring(pr.indexOf(nowdate)+1,pr.length());
    historyRemark=pr.substring(0,pr.indexOf(nowdate));
   }
  else
   {
    todayRemark="今日無批示";
    historyRemark=pr;
   }
 %>
   <td   align="left"><span style="font-size:12px" >
    <%=todayRemark%>&nbsp;<br/>
    <%
    if(!historyRemark.equals(""))
    {
    %>
     <img src="../../../img/arrow_r_r_small.gif" width="9" height="9">
    <a href="javascript:void(0)"  onclick = "show('fd',this,'<%=historyRemark%>');return false;">查看歷史批示</a>
    </span>
    <%}%>
   </td>
      <%
    df2_data.clearData();
    df2_data.tbl_name="T008F020";
    df2_data.where_sql=" where field13='";
    df2_data.where_sql+=rs.getString("field35")+"'";
      
    %>
   <td   align="center"><span style="font-size:12px" ><%=df2_data.getOneFieldData("field14")%>&nbsp;</span></td>
 

   
   
   <%
     String pageUrl="../../../Modular/Job/print/print_job_work_report.jsp?job_no=";
     pageUrl+=rs.getString("field21")+"&&first_enter=1";
   %>
   <td   align="left" "><span style="font-size:12px" ><font color="<%=proc_date.return_color(currentDate,date_str)%>"><a href="<%=pageUrl%>" target="_blank"><%=CorePress.nullEmpty(rs.getString("field21"))%>&nbsp;</a></span></td>
   
   <%
    df2_data.clearData();
   
    String attach="select * from job_et_field where job_no='";
           attach+=CorePress.nullEmpty(rs.getString("field21"))+"' and ";
           attach+=" field1='"+I18N.trans(rs.getString("field26"))+"'";
    String job_et_id=df2_data.getOneFieldData(attach,"id");    
    String attachUrl="../../../PlugIn/modular/job_content/product_analysis_attach.jsp?first_enter=1&operator_from=et_maintain&job_et_id="+job_et_id;
   %>
   <td   align="center"><span style="font-size:12px" ><a href="<%=attachUrl%>" target="_self"><font ><img src="../../../img/cps2004/attach(blue).gif"  width="20" height="20" alt="上傳附件" /></font></a></span></td>
  </tr>
 <%

     
 }df2_data.closeDb();
 }
else
 {
 
  
  String sql10="select * from T025F040 where status=0";
  ResultSet rs5=df2_data.executeQueryDb(sql10);
 while(rs5!=null&&rs5.next())
 {
    
    String parentJobNo=CorePress.nullEmpty(rs5.getString("field40"));
     int num=0;
   
    if(!parentJobNo.equals(""))
    {
       String[] parentJobNos=parentJobNo.split(";");
     
       for(int j=0;j<parentJobNos.length;j++)
       {
          if(parentJobNos[j].equals(session_mjob_param.job_no))
          {
            num++;
          }
       }
      if(num>0)
      {
       
         String currentDate1=TimeTool.getCurrentDate();
         TimeTool.parseDateTimeTo2(rs5.getString("field10"));
         String date_str1 = TimeTool.parse_date;
          %>
   <tr>
  <td align="center"><span style="font-size:12px"><input type="checkbox" name="checkboxid" <%=intJobStatus<3 ? "":(rs5.getString("field34").equals("30")) ? "":(session_flow_owner.isDocumentOwner(session_mjob_param.job_no,intJobStatus+"",login_id) ? "":"disabled")%> value="<%=rs5.getInt("id")%>" />
   
<% 
df2_data_et.clearData();
df2_data_et.tbl_name = " JOB_ET_FIELD";
df2_data_et.where_sql = " WHERE field5='"+rs5.getString("field33")+"' AND job_no='"+rs5.getString("field21")+"'";
String job_et_id_str =df2_data_et.getOneFieldData("id");

session_mjob_et_attach.getDataFromJobEtId(job_et_id_str);

if (session_mjob_et_attach.getSize() > 0)
out.print("<img src='" + domian_name+ "img/cps2004/attach.gif' width='14' height='14'>");
%>
   </span></td>
  <%
    df2_data.clearData();
    df2_data.tbl_name="T007F020";
    df2_data.where_sql=" where field13='";
    df2_data.where_sql+=rs5.getString("field34")+"'";   
  %>
   <td   align="center"><span style="font-size:12px" ><font color="<%=proc_date.return_color(currentDate1,date_str1)%>"><%=df2_data.getOneFieldData("field14")%>&nbsp;</span></td>
   <td   align="left"><span style="font-size:12px" ><font color="<%=proc_date.return_color(currentDate1,date_str1)%>"><%=rs5.getString("field26")%>&nbsp;</span></td>
   <td   align="center"><span style="font-size:12px" ><font color="<%=proc_date.return_color(currentDate1,date_str1)%>"><%=rs5.getString("field10").substring(0,10)%>&nbsp;</span></td>
  <%
   String pr=CorePress.nullEmpty(rs5.getString("field39"));
   String nowdate=TimeTool.getCurrentDate();
  
   String todayRemark="";
   String historyRemark="";
   if(pr.indexOf(nowdate)!=-1)
   {
    todayRemark= pr.substring(pr.indexOf(nowdate)+1,pr.length());
    historyRemark=pr.substring(0,pr.indexOf(nowdate));
   }
  else
   {
    todayRemark="今日無報告";
    historyRemark=pr;
   }
  %>
  
   <td   align="left"><span style="font-size:12px" ><%=todayRemark%>&nbsp;<br/>
    <%
    if(!historyRemark.equals(""))
    {
    %>
    <img src="../../../img/arrow_r_r_small.gif" width="9" height="9">
    <a href="javascript:void(0)"  onclick = "show('fd',this,'<%=historyRemark%>');return false;">查看歷史報告</a>
   <%}%>
   </span></td>
<%
    String show_str1 = CorePress.nullEmpty(rs5.getString("field11").substring(0,10));
    if(show_str1.equals("1900-01-01")) show_str1="";
%>   
   <td   align="center"><span style="font-size:12px" ><%=show_str1%>&nbsp;</span></td>
 <%
    pr=CorePress.nullEmpty(rs5.getString("field30"));
      
   if(pr.indexOf(nowdate)!=-1)
   {
    todayRemark= pr.substring(pr.indexOf(nowdate)+1,pr.length());
    historyRemark=pr.substring(0,pr.indexOf(nowdate));
   }
  else
   {
    todayRemark="今日無批示";
    historyRemark=pr;
   }
 %>
   <td   align="left"><span style="font-size:12px" >
    <%=todayRemark%>&nbsp;<br/>
    <%
    if(!historyRemark.equals(""))
    {
    %>
     <img src="../../../img/arrow_r_r_small.gif" width="9" height="9">
    <a href="javascript:void(0)"  onclick = "show('fd',this,'<%=historyRemark%>');return false;">查看歷史批示</a>
   <%}%>
    </span>
   </td>
 
 
  <%
    df2_data.clearData();
    df2_data.tbl_name="T008F020";
    df2_data.where_sql=" where field13='";
    df2_data.where_sql+=rs5.getString("field35")+"'";
      
    %>
   <td   align="center"><span style="font-size:12px"><%=df2_data.getOneFieldData("field14")%>&nbsp;</span></td>
   
   <%
    String pageUrl="../../../Modular/Job/print/print_job_work_report.jsp?job_no=";
     pageUrl+=rs5.getString("field21")+"&&first_enter=1";
   %>
   <td   align="center"><span style="font-size:12px" ><a href="<%=pageUrl%>"     target="_blank"><%=CorePress.nullEmpty(rs5.getString("field21"))%>&nbsp;</a></span></td>
   
    <%
    df2_data.clearData();
   
    String attach="select * from job_et_field where job_no='";
           attach+=CorePress.nullEmpty(rs5.getString("field21"))+"' and ";
           attach+=" field1='"+I18N.trans(rs5.getString("field26"))+"'";
    String job_et_id=df2_data.getOneFieldData(attach,"id");    
    String attachUrl="../../../PlugIn/modular/job_content/product_analysis_attach.jsp?first_enter=1&operator_from=et_maintain&job_et_id="+job_et_id;
   %>
   <td   align="center"><span style="font-size:12px"><a href="<%=attachUrl%>" target="_self"><font><img src="../../../img/cps2004/attach(blue).gif"  width="20" height="20" alt="上傳附件" /></font></a></span></td>
  </tr>
 

 
 <%
    }
    }
   }
   df2_data.closeDb();
 }
 %>
 
</table>
</form>
</body>
</html>

<script>

function modifyfun(form,jobNo)
 {
    var obj=form.checkboxid;
   var sum=0;
   var myarray=new Array();
  
  
   for(var i=1;i<obj.length;i++)
   { 
     if(obj[i].checked==true)  
     {
      sum=sum+1;
      myarray.push(obj[i].value);
      myarray.join();     
     }
   }  
   
   if(sum==0)
   {  
     alert("請選擇要修改的資料!!");  
     return   ;  
   } 
   
   var urlAction="../../../PlugIn/modular/job_content/product_analysis_operator.jsp?type=modify";
       urlAction+="&checkboxid="+myarray;
       urlAction+="&jobNo="+jobNo;
   
   window.open(urlAction,'_blank','');
   //top=200,left=200,width=400,height=250, resizable=0,scrollbars=auto
 }

 function deletefun(form)
 {
    var obj=form.checkboxid;
   var sum=0;
   var myarray=new Array();
  
  
   for(var i=0;i<obj.length;i++)
   { 
     if(obj[i].checked==true)  
     {
      sum=sum+1;
      myarray.push(obj[i].value);
      myarray.join();
      
     }
   }  
   
   if(sum==0)
   {  
     alert("請選擇要修改的資料!!");  
     return   ;  
   } 
   
    CheckAcount(myarray);
   
}

 


var Check = createAjaxObj();//新建XmlHttpRequest對象

function createAjaxObj(){
     var httprequest=false
      if(window.XMLHttpRequest){
          httprequest= new XMLHttpRequest()
      if(httprequest.overrideMimeType)
          httprequest.overrideMimeType('text/xml')
      }
      else if(window.ActiveXObject){
               try{
                     httprequest= new ActiveXObject("Msxml2.XMLHTTP");
               }
                catch(e){
                     try{
                        httprequest=new ActiveXObject("Microsoft.XMLHTTP");
                     }
                     catch(e){           
                     }
           }
       
     }
  return httprequest
}

 

function CheckAcount(myarray){    
    if(Check.readyState==4||Check.readyState==0){
         var urlAction="../../../PlugIn/modular/job_content/product_analysis_operator_new.jsp?command=delete";
       urlAction+="&checkboxid="+myarray;
         
         Check.open("get",urlAction);//發送請求
         Check.onreadystatechange=handleCheck;    
         Check.send(null);
       }  
}


function handleCheck(){
    if(Check.readyState==4){
    var s=Check.responseText;  
      if(s.trim()=='success'){
          
          window.location.reload();
      }
      else 
       {
         alert("刪除失敗");
       }
    
    }
}

  String.prototype.trim = function()  
  {            
      return   this.replace(/(^/s*)|(/s*$)/g,"");  
  }  
 


</script>

<table width="98%" align="center" cellspacing="0" cellpadding="0">
 <tr>
 <td  align="left" > <span style="font-size:12px"><font color="blue" > <b>相關預警資料</b></font></span></td> </tr>
  </tr>
</table> 
<%

session_df2_daemon_report_receiver_list.getDataFromReceiver(login_id, DFII.NO);

%>
<table width="98%" align="center" cellspacing="0" border="1" cellpadding="0">
 <tr bgcolor="#ECE8D8">
  <td align="center">項次</td>  
  <td align="center">報表單號</td>
  <td align="center">報表名稱</td>
  <td align="center">數據來源</td>
  <td align="center">收件日期</td>
 </tr>

    
     
<%
for(int m=0;m<session_df2_daemon_report_receiver_list.getSize();m++ ){
String receiver_id =session_df2_daemon_report_receiver_list.getId(m);
session_df2_daemon_report_receiver.getDataFromId(receiver_id);
session_df2_daemon_report.getDataFromId(session_df2_daemon_report_receiver.report_id);

%>
 <tr >
  <td align="center"><%=m+1%></td>  
     <td align="center"><SPAN>

      <%
      
      
       String query_url = domian_name+"Modular/df2/job/job_work_report.jsp?first_enter=1&come_from=job_list&list_id=" + receiver_id; %>
   <a href="<%=query_url%>" target="_blank"><%=session_df2_daemon_report.job_no%></a>
   </SPAN></td>
   <td align="center"><%=session_df2_daemon.getNameFromId(session_df2_daemon_report.df2_daemon_id)%></td>
  <td align="center"><%=session_df2_tmp.getNameFromId(session_df2_daemon_report.df2_id)%></td>
  <td align="center"><%=session_df2_daemon_report_receiver.record_time%></td>
 </tr>

<%
}
 %>
</table> 

 

<style type="text/css">
div{font-size:12px;line-height:1.5em;}

a.od{
 width:80px;
 height:25px;
 line-height:25px;
 text-align:center;
 font-weight:bold;
 border: 2px solid #849BCA;
 display:block;
 color:#547BC9;
 float:left;
 text-decoration:none;
 margin-top:2px;
}
a.od:link{
 background:#EEF1F8;
}
a.od:visited{
 background:#EEF1F8;
}
a.od:hover{
 background:#EEE;
}
a.od:active{
 background:#EEE;
}
#fd{
 width:500px;
 height:200px;
 background:#EDF1F8;
 border: 2px solid #849BCA;
 margin-top:2px;
 margin-left:2px;
 float:left;
 overflow:hidden;
 position:absolute;
 left:0px;
 top:0px;
 cursor:move;
 float:left;
 filter:alpha(opacity=50);
 
}
.content{
 padding:8px;
 background-color:#aabbcc;
 margin:0px;

}
</style>

<div id="fd" style="display:none;filter:alpha(opacity=100);opacity:1;" >
  <div class="content">  
  <img src="../../../img/arrow_r_r_small.gif" width="9" height="9">
  <a href="#"  onclick = "closeed('fd');return false;" style="text-decoration:none;">關閉歷史報告</a>
  </div>
 <div id="hr" height="auto"></div>

</div>
 
<script type="text/javascript">
 var prox;
 var proy;
 var proxc;
 var proyc;
 function show(id,obj,str){
  clearInterval(prox);
  clearInterval(proy);
  clearInterval(proxc);
  clearInterval(proyc);

 
  var xy=getAbsPosition(obj);
 
  var o = document.getElementById(id);
  o.style.display = "block";
  o.style.width = "1px";
  o.style.height = "1px";
  document.getElementById("hr").innerHTML=str;
  prox = setInterval(function(){openx(o,200,xy)},10);
 }
 function openx(o,x,xy){

  var cx = parseInt(o.style.width);
 
  if(cx < x)
  {
   o.style.width = (cx + Math.ceil((x-cx)/5)) +"px";
   o.style.left=xy.x+"px";
  }
  else
  {
   clearInterval(prox);
   var div=document.getElementById("hr");
   proy = setInterval(function(){openy(o,div.offsetHeight+60,xy)},10);
  }
 }
 function openy(o,y,xy){
  var cy = parseInt(o.style.height);
  if(cy < y)
  {
   o.style.height = (cy + Math.ceil((y-cy)/5)) +"px";
   o.style.top=xy.y+"px";
  }
  else
  {
   clearInterval(proy);  
  }
 }
 function closeed(id){
  clearInterval(prox);
  clearInterval(proy);
  clearInterval(proxc);
  clearInterval(proyc); 
  var o = document.getElementById(id);
  if(o.style.display == "block")
  {
   proyc = setInterval(function(){closey(o)},10);  
  } 
 }
 function closey(o){
  var cy = parseInt(o.style.height);
  if(cy > 0)
  {
   o.style.height = (cy - Math.ceil(cy/5)) +"px";
  }
  else
  {
   clearInterval(proyc);   
   proxc = setInterval(function(){closex(o)},10);
  }
 }
 function closex(o){
  var cx = parseInt(o.style.width);
  if(cx > 0)
  {
   o.style.width = (cx - Math.ceil(cx/5)) +"px";
  }
  else
  {
   clearInterval(proxc);
   o.style.display = "none";
  }
 }
 
 
 
 var od = document.getElementById("fd");
 var dx,dy,mx,my,mouseD;
 var odrag;
 var isIE = document.all ? true : false;
 document.onmousedown = function(e){
  var e = e ? e : event;
  if(e.button == (document.all ? 1 : 0))
  {
   mouseD = true;  
  }
 }
 document.onmouseup = function(){
  mouseD = false;
  odrag = "";
  if(isIE)
  {
   od.releaseCapture();
   od.filters.alpha.opacity = 100;
  }
  else
  {
   window.releaseEvents(od.MOUSEMOVE);
   od.style.opacity = 1;
  } 
 }
 od.onmousedown = function(e){
  odrag = this;
  var e = e ? e : event;
  if(e.button == (document.all ? 1 : 0))
  {
   mx = e.clientX;
   my = e.clientY;
   od.style.left = od.offsetLeft + "px";
   od.style.top = od.offsetTop + "px";
   if(isIE)
   {
    od.setCapture();   
    od.filters.alpha.opacity = 50;   
   }
   else
   {
    window.captureEvents(Event.MOUSEMOVE);
    od.style.opacity = 0.5;
   }
  
  }
 }
 document.onmousemove = function(e){
  var e = e ? e : event;

  if(mouseD==true  &&  odrag)
  { 
   var mrx = e.clientX - mx;
   var mry = e.clientY - my;
   od.style.left = parseInt(od.style.left) +mrx + "px";
   od.style.top = parseInt(od.style.top) + mry + "px";  
   mx = e.clientX;
   my = e.clientY;
  
  }
 }
 
 
  function   getAbsPosition(obj)  
  {  
  var   abs={x:0,y:0}  
  while(obj!=document.body){  
  abs.x+=obj.offsetLeft;  
  abs.y+=obj.offsetTop;  
  obj=obj.offsetParent;  
  }  
  return   abs;  
  }

</script>

你可能感兴趣的:(sql,Date,工作,String,function,session)