desktop_old2.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:12k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import = "java.util.*"%>
  3. <%@ page import = "com.redmoon.oa.person.*"%>
  4. <%@ page import = "com.redmoon.oa.task.*"%>
  5. <%@ page import = "com.redmoon.oa.message.*"%>
  6. <%@ page import = "com.redmoon.oa.flow.*"%>
  7. <%@ page import = "cn.js.fan.db.*"%>
  8. <%@ page import = "cn.js.fan.util.*"%>
  9. <%@ include file="inc/inc.jsp"%>
  10. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  11. <html>
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <title>我的办公桌</title>
  15. <link href="common.css" rel="stylesheet" type="text/css">
  16. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  17. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  18. <jsp:useBean id="cfgparser" scope="page" class="cn.js.fan.util.CFGParser"/>
  19. <%
  20. String user = privilege.getUser(request);
  21. String pwd = privilege.getPwd(request);
  22. int i = 0;
  23. Calendar cal = Calendar.getInstance();
  24. int curday = cal.get(cal.DAY_OF_MONTH);
  25. int curmonth = cal.get(cal.MONTH)+1;
  26. int curyear = cal.get(cal.YEAR);
  27. String curdate = curyear+"-"+curmonth+"-"+curday;
  28. String myname = privilege.getUser(request);
  29. String fromwhom = "";
  30. %>
  31. <%@ include file="inc/nocache.jsp"%>
  32. <script language="JavaScript" type="text/JavaScript">
  33. <!--
  34. function MM_preloadImages() { //v3.0
  35.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  36.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  37.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  38. }
  39. //-->
  40. </script>
  41. <script language=javascript>
  42. <!--
  43. function openWin(url,width,height)
  44. {
  45.   var newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=50,left=120,width="+width+",height="+height);
  46. }
  47. //--------------展开任务----------------------------
  48. function loadThreadFollow(b_id,t_id,getstr){
  49. var targetImg2 =eval("document.all.followImg" + t_id);
  50. var targetTR2 =eval("document.all.follow" + t_id);
  51. if (targetImg2.src.indexOf("nofollow")!=-1){return false;}
  52. if ("object"==typeof(targetImg2)){
  53. if (targetTR2.style.display!="")
  54. {
  55. targetTR2.style.display="";
  56. targetImg2.src="sq/forum/images/minus.gif";
  57. if (targetImg2.loaded=="no"){
  58. document.frames["hiddenframe"].location.replace("task_tree.jsp?id="+b_id+getstr);
  59. }
  60. }else{
  61. targetTR2.style.display="none";
  62. targetImg2.src="sq/forum/images/plus.gif";
  63. }
  64. }
  65. }
  66. //-->
  67. </script>
  68. <style type="text/css">
  69. <!--
  70. .style1 {color: #FFFFFF}
  71. -->
  72. </style>
  73. </head>
  74. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  75. <iframe width=0 height=0 src="" id="hiddenframe"></iframe>
  76. <%
  77. if (!privilege.isUserLogin(request))
  78. {
  79. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  80. return;
  81. }
  82. %>
  83. <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  84.   <tr>
  85. <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  86.       <tr>
  87.         <td width="69%" height="27" background="images/top-left.gif">&nbsp;<img src="images/i_sound.gif" width="21" height="16" align="absmiddle"><strong> 公共通知</strong></td>
  88.         <td width="31%" height="21" background="images/top-right.gif">&nbsp;<img src="images/icon.gif" width="10" height="10">&nbsp;<span class="style1"><a href="doc_list_notice.jsp?dir_code=notice" class="desktopwhite">全部通知</a></span></td>
  89.       </tr>
  90.       <tr bgcolor="#FFFFFF">
  91.         <td colspan="2"><table width=100% height="28" border=0 align="center" cellpadding="0" cellspacing="1" class="p9">
  92.           <%@ taglib uri="/WEB-INF/tlds/DocListTag.tld" prefix="dl" %>
  93.           <dl:DocListTag action="list" query="" dirCode="notice" start="0" end="5">
  94.             <dl:DocListItemTag field="title" mode="detail">
  95.               <tr>
  96.                 <td width="82%" height=22 align="left">&nbsp;&nbsp;<a href="doc_show_notice.jsp?id=$id">$title</a></td>
  97.                 <td width="18%" align="left">$modifiedDate</td>
  98.                 </tr>
  99.             </dl:DocListItemTag>
  100.           </dl:DocListTag>
  101.         </table></td>
  102.       </tr>
  103.     </table>
  104.       
  105.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  106.         <tr>
  107.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<img src="images/i_sound.gif" width="21" height="16" align="absmiddle"><strong>工作流</strong></td>
  108.           <td width="31%" height="21" background="images/top-right.gif">&nbsp;<img src="images/icon.gif" width="10" height="10">&nbsp;<span class="style1"><a href="flow_list_doingorreturn.jsp" class="desktopwhite">待办工作</a></span></td>
  109.         </tr>
  110.         <tr bgcolor="#FFFFFF">
  111.           <td colspan="2"><table style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" cellSpacing="0" cellPadding="3" width="100%" align="center">
  112.             <tbody>
  113. <%
  114. String sql = "select id from flow_my_action where (user_name=" + StrUtil.sqlstr(myname) + " or proxy=" + StrUtil.sqlstr(myname) + ") and is_checked=0 order by receive_date desc";
  115. MyActionDb mad = new MyActionDb();
  116. ListResult wflr = mad.listResult(sql, 1, 10);
  117. Iterator wfir = wflr.getResult().iterator();
  118. Leaf ft = new Leaf();
  119. WorkflowDb wfd = null;
  120. WorkflowMgr wfm = new WorkflowMgr();
  121. while (wfir.hasNext()) {
  122.   mad = (MyActionDb)wfir.next(); 
  123. WorkflowActionDb wad = new WorkflowActionDb();
  124. wad = wad.getWorkflowActionDb((int)mad.getActionId());
  125. wfd = wfm.getWorkflowDb(wad.getFlowId());
  126. %>
  127.               <tr class="row" style="BACKGROUND-COLOR: #ffffff">
  128.                 <td width="82%" height="22">&nbsp;<a href="flow_dispose.jsp?myActionId=<%=mad.getId()%>"><%=wfd.getTitle()%></a></td>
  129.                 <td width="18%"><%=DateUtil.format(wfd.getMydate(), "yy-MM-dd HH:mm")%> </td>
  130.                 </tr>
  131.               <%}%>
  132.             </tbody>
  133.           </table></td>
  134.         </tr>
  135.       </table>
  136.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  137.         <tr>
  138.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<img src="images/i_sound.gif" width="21" height="16" align="absmiddle"><strong> 新闻</strong></td>
  139.           <td width="31%" height="21" background="images/top-right.gif">&nbsp;<img src="images/icon.gif" width="10" height="10">&nbsp;<span class="style1"><a href="doc_list.jsp?dir_code=news" class="desktopwhite">全部新闻</a></span></td>
  140.         </tr>
  141.         <tr bgcolor="#FFFFFF">
  142.           <td colspan="2"><table width=100% height="28" border=0 align="center" cellpadding="0" cellspacing="1" class="p9">
  143.               <%@ taglib uri="/WEB-INF/tlds/DocListTag.tld" prefix="dl" %>
  144.               <dl:DocListTag action="list" query="" dirCode="news" start="0" end="5">
  145.                 <dl:DocListItemTag field="title" mode="detail">
  146.                   <tr>
  147.                     <td width="82%" height=22 align="left">&nbsp;&nbsp;<a href="doc_show.jsp?id=$id">$title</a></td>
  148.                     <td width="18%" align="left">$modifiedDate</td>
  149.                   </tr>
  150.                 </dl:DocListItemTag>
  151.               </dl:DocListTag>
  152.           </table></td>
  153.         </tr>
  154.       </table></td>
  155. <td width="10"></td>
  156.     <td width="290" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  157.         <tr>
  158.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<img src="images/dot_10.gif" width="19" height="21" align="absmiddle"><strong> 日程安排</strong></td>
  159.           <td width="31%" height="21" background="images/top-right.gif">&nbsp;<img src="images/icon.gif" width="10" height="10">&nbsp;<span class="style1"><a href="plan.jsp" class="desktopwhite">全部日程</a></span></td>
  160.         </tr>
  161.         <tr bgcolor="#FFFFFF">
  162.           <td colspan="2">
  163.   <%
  164. // sql = "select id from user_plan where userName="+fchar.sqlstr(myname)+" and TO_DAYS(mydate)=TO_DAYS(NOW())";
  165. sql = "select id from user_plan where userName="+fchar.sqlstr(myname)+" order by mydate desc";
  166. PlanDb pd = new PlanDb();
  167. ListResult lr = pd.listResult(sql, 1, 5);
  168. Iterator ir = lr.getResult().iterator();
  169. while (ir.hasNext()) {
  170. pd = (PlanDb)ir.next();
  171. String mydate = DateUtil.format(pd.getMyDate(), "yy-MM-dd HH:mm");
  172. %>
  173.   <table width="100%" border="0" cellpadding="0" cellspacing="0">
  174.     <tr><td width="69%" height="22">&nbsp;<a href=plan_show.jsp?id=<%=pd.getId()%>><%=pd.getTitle()%></a></td>
  175.       <td width="31%"><%=mydate%></td>
  176.     </tr></table>
  177.   <%}%>
  178.   </td>
  179.         </tr>
  180.       </table>
  181.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  182.         <tr>
  183.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<strong><img src="images/icn_news.gif" align="absmiddle">任务督办</strong></td>
  184.           <td width="31%" height="21" background="images/top-right.gif">&nbsp;<img src="images/icon.gif" width="10" height="10">&nbsp;<span class="style1"><a href="task.jsp" class="desktopwhite">全部任务</a></span></td>
  185.         </tr>
  186.         <tr bgcolor="#FFFFFF">
  187.           <td colspan="2">
  188. <%
  189. TaskMgr tm = new TaskMgr();
  190. Vector tasks = tm.getUserNotFinishedTask(myname);
  191. if (tasks.size()==0) {
  192. // out.print(fchar.p_center("您目前没有参与到任何任务中!"));
  193. }
  194. Iterator taskir = tasks.iterator();
  195. int id = 0;
  196. String title = "",initiator="",mydate="";
  197. int expression=0;
  198. int type=0,recount=0,isfinish=0;
  199. i = 0;
  200. while (taskir.hasNext())
  201. {
  202.   i++;
  203.   TaskDb td = (TaskDb)taskir.next();
  204.   id = td.getId();
  205.   title = td.getTitle();
  206.   initiator = td.getInitiator();
  207.   mydate = DateUtil.format(td.getMyDate(), "yy-MM-dd HH:mm");
  208.   expression = td.getExpression();
  209.   type = td.getType();
  210.   recount = td.getReCount();
  211.   isfinish = td.getStatus();
  212. %>
  213.   <table cellspacing=0 cellpadding=0 width="100%" align=center>
  214.     <tbody>
  215.       <tr> 
  216.         <td width="197" height="22" align=left bgcolor=#f8f8f8>&nbsp;<a href="task_show.jsp?showid=<%=id%>&rootid=<%=id%>"><%=StrUtil.getLeft(title, 30)%></a> </td>
  217.         <td align=left width=89 bgcolor=#f8f8f8> 
  218.           <table cellspacing=0 cellpadding=2 width="100%" align=center border=0>
  219.             <tbody>
  220.               <tr> 
  221.                 <td><%=mydate%></td>
  222.                 </tr>
  223.             </tbody>
  224.         </table></td>
  225.       </tr>
  226.     </tbody>
  227.   </table>
  228. <%}%>
  229.   </td>
  230.         </tr>
  231.       </table>
  232.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  233.       <tr>
  234.         <td width="69%" height="27" background="images/top-left.gif">&nbsp;<strong><img src="images/icn_news.gif" align="absmiddle">短消息</strong></td>
  235.         <td width="31%" height="21" background="images/top-right.gif">&nbsp;<img src="images/icon.gif" width="10" height="10">&nbsp;<span class="style1"><a href="message_oa/message.jsp" class="desktopwhite">全部消息</a></span></td>
  236.       </tr>
  237.       <tr bgcolor="#FFFFFF">
  238.         <td colspan="2">
  239.           <%
  240. MessageDb md = new MessageDb();
  241. sql = "select id from oa_message where receiver="+StrUtil.sqlstr(myname)+" and isDraft=0 order by isreaded asc,rq desc";
  242. String sender="",receiver="",rq="";
  243. boolean isreaded = true;
  244. Iterator msgir = md.list(sql, 0, 9).iterator();
  245. while (msgir.hasNext()) {
  246.         md = (MessageDb)msgir.next(); 
  247.   i++;
  248.   id = md.getId();
  249.   title = md.getTitle();
  250.   sender = md.getSender();
  251.   receiver = md.getReceiver();
  252.   rq = md.getRq();
  253.   type = md.getType();
  254.   isreaded = md.isReaded();
  255.  %>
  256.           <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" class="p9">
  257.             <tr>
  258.               <td width="70%"><a href="message_oa/showmsg.jsp?id=<%=id%>" class="9black2">
  259.                 <%if (isreaded) {%>
  260.                 <%=StrUtil.getLeft(title, 22)%>
  261.                 <%}else{%>
  262.                 <b><%=StrUtil.getLeft(title, 20)%></b>
  263.                 <%}%>
  264.                 </a> <font color="#666666"> [<%=sender%>]
  265.                   <!-- <%=rq%>]-->
  266.               </font></td>
  267.               <td width="30%" >
  268.                   <%=rq%>
  269.               </td>
  270.             </tr>
  271.           </table>
  272.           <%}%></td>
  273.       </tr>
  274.     </table></td></tr>
  275. </table>
  276. </body>
  277. </html>