<%@ include file="/html/portlet/ext/jsp_portlet/init.jsp"%>
<%@ page import="com.liferay.portal.kernel.dao.jdbc.DataAccess"%>
<%@ page import="com.liferay.portal.kernel.language.LanguageUtil" %>
<%@ page import="java.sql.*"%>
<%@ page import="java.io.File"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String title = LanguageUtil.get(pageContext, "mydocument.head.title");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName();
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<%
dim conn
dim connstr
dim db
on error resume next
connstr="Provider=SQLOLEDB;Server=192.6.200.4;User ID=sa;Password=Whp12345;Database=whphr;"
set conn=server.createobject("ADODB.CONNECTION")
if err then
err.clear
else
conn.open connstr
end if
sub CloseConn()
conn.close
set conn=nothing
end sub
dim KeyStr
sql=" exec SOALogin '" & request("username") & "'"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
KeyStr =""
else
KeyStr= rs(0)
rs.close
CloseConn()
end if
%>
<table width="100%">
<%
try
{
System.out.println("++++++++++++++++++++++++++File.separator"+File.separator);
String userid = String.valueOf(session.getAttribute("USER_ID"));
String sql ="select saip_org_util.SetClientInfo(221,"+userid+",1) from dual ";
String sql_v="select v.catalogname, v.operatorname, v.processinstname, to_char(v.starttime,'mm-dd,hh24:mi') starttime,v.workitemid,v.CREATOR,substr(v.processinstdesc,1,50) processinstdesc from saip_wf_todo_list_v v where rownum<=30 order by v.PROCESSDEFID,v.starttime desc ";
//System.out.println(sql+"\n"+sql_v);
Connection conn = DataAccess.getConnection();
PreparedStatement ps1 = conn.prepareStatement(sql);
ResultSet rs1=ps1.executeQuery();
PreparedStatement ps2 = conn.prepareStatement(sql_v);
ResultSet rs2 = ps2.executeQuery();
int i = 0;
int lineCount = 0 ;
while (rs2.next() )
{
i++;
String bgcolor = "";
if(i%2==0)
bgcolor="white";
else
bgcolor="#F0F5F8";
lineCount ++ ;
//String url = basePath+":8083/logicaldoc/download?docId="+rs.getInt(5);
//String ca = rs.getTimestamp(4)+""; timeStr = timeStr.length()>16?timeStr.substring(0,16):"";
if(i==1){
%>
<!--
<tr bgcolor="#747B81" height="20">
<td> <strong style="color: white"><liferay-ui:message key="category.form" /></strong></td>
<td> <strong style="color: white"><liferay-ui:message key="submit" /><strong style="color: white"><liferay-ui:message key="person" /></strong></td>
<td> <strong style="color: white"><liferay-ui:message key="time" /></strong></td>
<td> <strong style="color: white"><liferay-ui:message key="content" /></strong></td>
</tr>
-->
<%}%>
<tr bgcolor="<%=bgcolor%>" height="25">
<td><%= lineCount %>, <a style="color:#333366;text-decoration:none" href="https://cms.whirlpool-china.com:7021/cms-sso/proxy.jsp?service=https://cms.whirlpool-china.com:7021/prod-cms/com.saip.sdpWorkFlow.sdpWorkFlow.flow?moduleUrl=sieBpmApproval/com/sie/bpm/task/taskManagerSimple.swf%26type=workItemID=<%=rs2.getString(5)%>&muo=true" target="_blank"><%=rs2.getString(3)%>: <%=rs2.getString(7)%> ... <%=rs2.getString(2)%> / <%=rs2.getString(4) %></a></td>
</tr>
<%
}//end while
%>
<tr><td align="right"><div width="100%" style="border-top:1px dashed #747B81;"> <img src="/html/themes/classic/images/sanyo/next.gif" align=absmiddle> </img>
<a href="https://cms.whirlpool-china.com:7021/cms-sso/proxy.jsp?service=https://cms.whirlpool-china.com:7021/prod-cms/com.saip.sdpWorkFlow.sdpWorkFlow.flow?moduleUrl=sieBpmApproval/com/sie/bpm/task/taskManager.swf&muo=true"
target="_blank" style="color:#333366"> 更多进入审批中心 </a>
<a href='http://192.6.200.4/hr/Login.aspx?Func_Code=1000&SOA=<%=KeyStr%>' target='_blank'>进入人力资源软件</a></div></td>
</tr>
<%
rs2.close();
ps2.close();
rs1.close();
ps1.close();
conn.close();
}
catch (Exception e)
{
e.printStackTrace();
}
%>
</table>
下面这个是加IFRAME显示HR待办事项
<iframe height='320' width='450' name='ifrm_HrFlow' src='http://192.6.200.4/hr/Login.aspx?Func_Code=00100201&SOA=<%=KeyStr%>' frameborder=1></iframe>