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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=gb2312"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "com.redmoon.oa.db.PageQuery"%>
  4. <%@ page import = "com.redmoon.oa.db.Conn"%>
  5. <%@ include file="inc/inc.jsp"%>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  10. <title>我的办公桌</title>
  11. <link href="common.css" rel="stylesheet" type="text/css">
  12. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  13. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  14. <jsp:useBean id="cfgparser" scope="page" class="fan.util.CFGParser"/>
  15. <%
  16. String user = privilege.getUser(request);
  17. String pwd = privilege.getPwd(request);
  18. int i = 0;
  19. cfgparser.parse("config.xml");
  20. Properties props = cfgparser.getProps();
  21. String serveraddr = props.getProperty("serveraddr");
  22. String serverport = props.getProperty("serverport");
  23. String virtualpath = props.getProperty("virtualpath");
  24. Calendar cal = Calendar.getInstance();
  25. int curday = cal.get(cal.DAY_OF_MONTH);
  26. int curmonth = cal.get(cal.MONTH)+1;
  27. int curyear = cal.get(cal.YEAR);
  28. String curdate = curyear+"-"+curmonth+"-"+curday;
  29. String myname = privilege.getUser(request);
  30. String fromwhom = "";
  31. %>
  32. <%@ include file="inc/nocache.jsp"%>
  33. <script language="JavaScript" type="text/JavaScript">
  34. <!--
  35. function MM_preloadImages() { //v3.0
  36.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  37.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  38.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  39. }
  40. //-->
  41. </script>
  42. <script language=javascript>
  43. <!--
  44. function openWin(url,width,height)
  45. {
  46.   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);
  47. }
  48. var filename1,document_id1;//全局变量,用于记录编辑中的文件名和文件id
  49. function editdoc(filename,document_id)
  50. {
  51. var user = "<%=user%>"
  52. var pwd = "<%=pwd%>"
  53. filename1 = filename;
  54. document_id1 = document_id;
  55. useword.OpenWordDoc("http://<%=serveraddr%>:<%=serverport%>/<%=virtualpath%>/getdoctomodify.jsp?user="+user+"&pwd="+pwd+"&filename="+filename+"&document_id="+document_id);
  56. }
  57. function uploaddoc() {
  58.     var document_id = document_id1;
  59. var filename = filename1;
  60. var user = "<%=user%>"
  61. var pwd = "<%=pwd%>"
  62. var fieldstr = "rn--AaB03xrnContent-Disposition: form-data; name="filename"rnrn"+filename+"rn--AaB03x--";
  63. fieldstr += "rn--AaB03xrnContent-Disposition: form-data; name="user"rnrn"+user+"rn--AaB03x--";
  64. fieldstr += "rn--AaB03xrnContent-Disposition: form-data; name="pwd"rnrn"+pwd+"rn--AaB03x--";
  65. fieldstr += "rn--AaB03xrnContent-Disposition: form-data; name="document_id"rnrn"+document_id+"rn--AaB03x--";
  66. useword.UploadDoc(fieldstr);
  67. }
  68. //--------------展开任务----------------------------
  69. function loadThreadFollow(b_id,t_id,getstr){
  70. var targetImg2 =eval("document.all.followImg" + t_id);
  71. var targetTR2 =eval("document.all.follow" + t_id);
  72. if (targetImg2.src.indexOf("nofollow")!=-1){return false;}
  73. if ("object"==typeof(targetImg2)){
  74. if (targetTR2.style.display!="")
  75. {
  76. targetTR2.style.display="";
  77. targetImg2.src="sq/forum/images/minus.gif";
  78. if (targetImg2.loaded=="no"){
  79. document.frames["hiddenframe"].location.replace("task_tree.jsp?id="+b_id+getstr);
  80. }
  81. }else{
  82. targetTR2.style.display="none";
  83. targetImg2.src="sq/forum/images/plus.gif";
  84. }
  85. }
  86. }
  87. //-->
  88. </script>
  89. <style type="text/css">
  90. <!--
  91. .style1 {color: #FFFFFF}
  92. -->
  93. </style>
  94. </head>
  95. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  96. <iframe width=0 height=0 src="" id="hiddenframe"></iframe>
  97. <%
  98. String priv="read";
  99. if (!privilege.isUserPrivValid(request,priv))
  100. {
  101. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  102. return;
  103. }
  104. //String sql = "select id,title,mydate from notice where DATEDIFF(day, mydate, getdate())<=3 and opengroup like '%|public|%' order by mydate desc";
  105. String sql = "select top 5 id,title,mydate from notice where opengroup like '%|public|%' order by mydate desc";
  106. String id="",title="",mydate="",filename="",extname="",content="";
  107. Conn conn = new Conn("ttoa");
  108. ResultSet rs = null;
  109. %>
  110. <table width="570" border="0" cellspacing="0" cellpadding="0" align="center">
  111.   <tr>
  112. <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  113.       <tr>
  114.         <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>
  115.         <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="notice.jsp" class="desktopwhite">全部通知</a></span></td>
  116.       </tr>
  117.       <tr bgcolor="#FFFFFF">
  118.         <td colspan="2">
  119. <%
  120. rs = conn.executeQuery(sql);
  121. if (rs!=null && rs.next()) {
  122. do
  123. {
  124. id = rs.getString("id");
  125. title = rs.getString("title");
  126. mydate = rs.getString("mydate").substring(0,10);
  127. %>
  128. <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  129.   <tr>
  130.     <td width="70%" height="20">&nbsp;<img src="images/Bullet12.gif">
  131.       <%if (curdate.equals(mydate)) { %>
  132. <B><a href="notice.jsp?#<%=id%>" title="<%=title%>"><%=fchar.truncate(title, 14)%></a></B>
  133.   <%}else{%>
  134. <a href="notice.jsp?#<%=id%>" title="<%=title%>"><%=fchar.truncate(title, 14)%></a>
  135.   <%}%>
  136. </td>
  137.     <td width="30%">[<%=mydate%>]</td>
  138.   </tr>
  139. </table>
  140. <%  }while (rs.next());
  141. }
  142. else
  143. out.print("&nbsp;");
  144. if (rs!=null) {
  145. rs.close(); rs = null;
  146. }
  147. %> </td>
  148.       </tr>
  149.     </table>
  150.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  151.         <tr>
  152.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<img src="images/sign_icon1.gif" align="absmiddle"><strong>&nbsp;部门通知</strong></td>
  153.           <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="notice_depart.jsp" class="desktopwhite">全部通知</a></span></td>
  154.         </tr>
  155.         <tr bgcolor="#FFFFFF">
  156.           <td colspan="2">
  157.             <%
  158. String department_id = privilege.getDepartmentID(request);
  159. //sql = "select id,title,mydate from notice where DATEDIFF(day, mydate, getdate())<=3 and opengroup like "+fchar.sqlstr("%|"+department_id+"|%")+" order by mydate desc";
  160. sql = "select top 5 id,title,mydate from notice where opengroup like "+fchar.sqlstr("%|"+department_id+"|%")+" order by mydate desc";
  161. rs = conn.executeQuery(sql); 
  162. if (rs!=null && rs.next()) {
  163. do
  164. {
  165. id = rs.getString("id");
  166. title = rs.getString("title");
  167. mydate = rs.getString("mydate").substring(0,10);
  168. %>
  169.             <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  170.               <tr>
  171.                 <td width="70%" height="20">&nbsp;<img src="images/Bullet12.gif">
  172.                     <%if (curdate.equals(mydate)) { %>
  173.                     <a href="notice_depart.jsp?#<%=id%>" title="<%=title%>"><%=fchar.truncate(title, 14)%></a>
  174.                     <%}else{%>
  175.                     <a href="notice_depart.jsp?#<%=id%>" title="<%=title%>"><%=fchar.truncate(title, 14)%></a>
  176.                     <%}%>
  177.                 </td>
  178.                 <td width="30%">[<%=mydate%>]</td>
  179.               </tr>
  180.             </table>
  181.             <% }while (rs.next());
  182. }
  183. else
  184. out.print("&nbsp;");
  185. if (rs!=null) {
  186. rs.close(); rs = null;
  187. }
  188. %>
  189.           </td>
  190.         </tr>
  191.       </table>      
  192.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  193.         <tr>
  194.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<strong><img src="images/icn_news.gif" align="absmiddle">会议通知</strong></td>
  195.           <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="notice_meeting.jsp" class="desktopwhite">全部通知</a></span></td>
  196.         </tr>
  197.         <tr bgcolor="#FFFFFF">
  198.           <td colspan="2">
  199.             <%
  200. sql = "select id,title,applydate from meeting where state = '1' and person like "+fchar.sqlstr("%|"+myname+"|%");
  201. rs = conn.executeQuery(sql) ; 
  202. i = 0;
  203. String applydate = "";
  204. if (rs!=null && rs.next()) {
  205. do
  206. {
  207. i++;
  208. id = rs.getString("id");
  209. title = rs.getString("title");
  210. applydate = rs.getString("applydate").substring(0,10);
  211. %>
  212.             <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  213.               <tr>
  214.                 <td width="70%" height="20">&nbsp;<img src="images/Bullet12.gif">&nbsp;<a href="notice_meeting.jsp?id=<%=id%>" title="<%=title+" 来:"+fromwhom%>"><%=fchar.truncate(title, 14)%></a>&nbsp;</td>
  215.                 <td width="30%">[<%=applydate%>]</td>
  216.               </tr>
  217.             </table>
  218.             <% } while (rs.next());
  219. }
  220. else
  221. out.println("&nbsp;");
  222. if (rs!=null) {
  223. rs.close(); rs = null;
  224. }
  225. %>
  226.           </td>
  227.         </tr>
  228.       </table>      
  229.     <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  230.       <tr>
  231.         <td width="69%" height="27" background="images/top-left.gif">&nbsp;<strong><img src="images/icn_news.gif" align="absmiddle">短消息</strong></td>
  232.         <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="msg.jsp" class="desktopwhite">全部消息</a></span></td>
  233.       </tr>
  234.       <tr bgcolor="#FFFFFF">
  235.         <td colspan="2"><%
  236. i = 0;
  237. //三天内发来的邮件
  238. //sql = "select id,title,fromwhom,mydate from email where DATEDIFF(day, mydate, getdate())<=3 and isdel=0 and towhom="+fchar.sqlstr(privilege.getUser(request));
  239. sql = "select top 5 id,title,fromwhom,mydate from email where isdel=0 and towhom="+fchar.sqlstr(privilege.getUser(request))+" order by mydate desc";
  240. rs = conn.executeQuery(sql);
  241. if (rs!=null && rs.next()) {
  242. do
  243. {
  244. i++;
  245. id = rs.getString("id");
  246. title = rs.getString("title");
  247. fromwhom = rs.getString("fromwhom");
  248. mydate = rs.getString("mydate").substring(0,10);
  249. %>
  250.             <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  251.               <tr>
  252.                 <td width="70%" height="20">&nbsp;<img src="images/Bullet12.gif">&nbsp;<a href="msg_show.jsp?id=<%=id%>" title="<%=title+" 来:"+fromwhom%>"><%=fchar.truncate(title, 14)%></a>&nbsp;</td>
  253.                 <td width="30%">[<%=mydate%>]</td>
  254.               </tr>
  255.             </table>
  256.             <% } while (rs.next());
  257. }
  258. else
  259. out.println("&nbsp;");
  260. if (rs!=null) {
  261. rs.close(); rs = null;
  262. }
  263. %>
  264.         </td>
  265.       </tr>
  266.     </table>
  267. </td>
  268. <td width="10"></td>
  269.     <td width="290" valign="top">      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  270.       <tr>
  271.         <td width="69%" height="27" background="images/top-left.gif">&nbsp;<img src="images/write.gif" width="16" height="14" align="absmiddle"><strong> 审批文件</strong></td>
  272.         <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="listmeflowdoc.jsp" class="desktopwhite">全部文件</a></span></td>
  273.       </tr>
  274.       <tr bgcolor="#FFFFFF">
  275.         <td colspan="2">
  276.           <%
  277. int ischecked=0, ischecking=0;
  278. sql = "select d.id,d.filename,d.title,d.extname,d.opengroup,d.uploaddate,d.username,f.document_id,f.color,f.ischecked,f.ischecking,f.sort,f.status,f.reason,d.filename,d.extname from document as d,doc_flow as f where d.id=f.document_id and f.person="+fchar.sqlstr(myname)+" and ischecking=1 order by uploaddate desc,checkdate desc";
  279. rs = conn.executeQuery(sql) ; 
  280. i = 0;
  281. String uploaddate="",color="";
  282. int sort = -1,status=0;
  283. String username = "", document_id="", reason="";
  284. if (rs!=null && rs.next()) {
  285. do
  286. {
  287. i++;
  288. id = rs.getString("id");
  289. title = rs.getString("title");
  290. username = rs.getString("username");
  291. uploaddate = rs.getString("uploaddate").substring(0,19);
  292. extname = rs.getString("extname");
  293. filename = rs.getString("filename");
  294. color = rs.getString("color");
  295. ischecked = rs.getInt("ischecked");
  296. ischecking = rs.getInt("ischecking");
  297. sort = rs.getInt("sort");
  298. status = rs.getInt("status");
  299. reason = fchar.getNullString(rs.getString("reason"));
  300. %>
  301.           <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  302.             <tr>
  303.               <td width="70%" height="20">&nbsp;<img src="images/Bullet12.gif">
  304.                   <%if (sort==-1) {
  305.    if ( status==1) {%>
  306.                   <a title="被打回原因:<%=reason%>" href="checkdoc_report.jsp?document_id=<%=id%>&reason=<%=URLEncoder.encode(reason, "GBK")%>"><%=fchar.truncate(title, 10)%></a><font color=red>(被打回)</font>
  307.                   <%}
  308.   }else {
  309. if (ischecking==1) {
  310. if (status==1) {%>
  311.                   <a href="checkdoc.jsp?filename=<%=URLEncoder.encode(filename+"."+extname,"GBK")%>&document_id=<%=id%>&title=<%=URLEncoder.encode(title,"GBK")%>&uploaddate=<%=uploaddate%>&color=<%=color%>&username=<%=URLEncoder.encode(username,"GBK")%>&sort=<%=sort%>"><%=fchar.truncate(title, 10)%></a><font color=red>(重批)</font>
  312.                   <% }else{
  313.    %>
  314.                   <a href="checkdoc.jsp?filename=<%=URLEncoder.encode(filename+"."+extname,"GBK")%>&document_id=<%=id%>&title=<%=URLEncoder.encode(title,"GBK")%>&uploaddate=<%=uploaddate%>&color=<%=color%>&username=<%=URLEncoder.encode(username,"GBK")%>&sort=<%=sort%>"><%=fchar.truncate(title, 10)%></a><font color=red>(请审批)</font>
  315.                   <% }
  316. }
  317.   }%>
  318.               </td>
  319.               <td width="30%">[<%=uploaddate.substring(0,10)%>]</td>
  320.             </tr>
  321.           </table>
  322.           <% } while (rs.next());
  323. }
  324. else
  325. out.println("&nbsp;");
  326. if (rs!=null) {
  327. rs.close(); rs = null;
  328. }
  329. %>
  330.         </td>
  331.       </tr>
  332.     </table>
  333.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  334.         <tr>
  335.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<strong><img src="images/icn_news.gif" align="absmiddle">请假审批</strong></td>
  336.           <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="listleave_checkup.jsp" class="desktopwhite">全部请假</a></span></td>
  337.         </tr>
  338.         <tr bgcolor="#FFFFFF">
  339.           <td colspan="2"><%
  340. sql = "select id,name,begindate,days,reason,type,mydate from leave where checkman="+fchar.sqlstr(myname)+" and checkupstate = '0'";
  341. int pagesize = 10;
  342. rs = conn.executeQuery(sql); 
  343. i = 0;
  344. String name = "",begindate ="",days = "",stype = "";
  345. if (rs!=null && rs.next()) {
  346. do
  347. {
  348. i++;
  349. id = rs.getString("id");
  350. name = rs.getString("name");
  351. begindate = rs.getString("begindate").substring(0,10);
  352. days = rs.getString("days");
  353. reason = rs.getString("reason");
  354. stype = rs.getString("type");
  355. if (stype.equals("evection"))
  356. stype = "出差";
  357. else
  358. stype = "其他";
  359. mydate = rs.getString("mydate");
  360. %>
  361.               <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  362.                 <tr>
  363.                   <td width="70%" height="20">&nbsp;<a href="leave_checkup.jsp?id=<%=id%>&checkupstate=0" title="<%=name%>请假"><%=fchar.truncate(reason,14)%></a></td>
  364.                   <td width="30%">[<%=begindate%>]</td>
  365.                 </tr>
  366.               </table>
  367.               <% } while (rs.next());
  368. }
  369. else
  370. out.println("&nbsp;");
  371. if (rs!=null) {
  372. rs.close(); rs = null;
  373. }
  374. %>
  375.           </td>
  376.         </tr>
  377.       </table>
  378.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  379.         <tr>
  380.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<strong><img src="images/icn_news.gif" align="absmiddle">会议审批</strong></td>
  381.           <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="listmeeting_checkup.jsp" class="desktopwhite">全部会议</a></span></td>
  382.         </tr>
  383.         <tr bgcolor="#FFFFFF">
  384.           <td colspan="2">
  385.             <%
  386. sql = "select id,title,applydate from meeting where state = '0' and checkperson = "+fchar.sqlstr(myname);
  387. rs = conn.executeQuery(sql) ; 
  388. i = 0;
  389. applydate = "";
  390. if (rs!=null && rs.next()) {
  391. do
  392. {
  393. i++;
  394. id = rs.getString("id");
  395. title = rs.getString("title");
  396. applydate = rs.getString("applydate").substring(0,10);
  397.      %>
  398.             <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  399.               <tr>
  400.                 <td width="70%" height="20">&nbsp;<img src="images/Bullet12.gif">&nbsp;<a href="notice_meeting.jsp?id=<%=id%>" title="<%=title+" 来:"+fromwhom%>"><%=fchar.truncate(title, 14)%></a>&nbsp;</td>
  401.                 <td width="30%">[<%=applydate%>]</td>
  402.               </tr>
  403.             </table>
  404.             <% } while (rs.next());
  405. }
  406. else
  407. out.println("&nbsp;暂无");
  408. if (rs!=null) {
  409. rs.close(); rs = null;
  410. }%>
  411.           </td>
  412.         </tr>
  413.       </table>
  414.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  415.         <tr>
  416.           <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>
  417.           <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_list.jsp" class="desktopwhite">全部日程</a></span></td>
  418.         </tr>
  419.         <tr bgcolor="#FFFFFF">
  420.           <td colspan="2"><%
  421. sql = "select top 5 id,username,title,mydate,zdrq from user_plan where username="+fchar.sqlstr(privilege.getUser(request))+" and DATEDIFF(day, mydate, getdate())=0";
  422. //sql = "select top 5 id,username,title,mydate,zdrq from user_plan where username="+fchar.sqlstr(privilege.getUser(request))+" order by mydate desc";
  423. rs = conn.executeQuery(sql);
  424. String zdrq="";
  425. if (rs!=null && rs.next()) {
  426. do
  427. {
  428. i++;
  429. id = rs.getString(1);
  430. username = rs.getString(2);
  431. title = rs.getString(3);
  432. mydate = rs.getString(4).substring(0,10);
  433. zdrq = rs.getString(5).substring(0,10);
  434. %>
  435.               <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  436.                 <tr>
  437.                   <td width="70%" height="20">&nbsp;<img src="images/Bullet12.gif">&nbsp;<a href="plan_show.jsp?id=<%=id%>" title="<%=title+" 制定日期:"+zdrq%>"><%=fchar.truncate(title,14)%></a>&nbsp;</td>
  438.                   <td width="30%">[<%=mydate%>]</td>
  439.                 </tr>
  440.               </table>
  441.               <% } while (rs.next());
  442. }
  443. else
  444. out.println("&nbsp;暂无");
  445. if (rs!=null) {
  446. rs.close(); rs = null;
  447. }
  448. %>
  449.           </td>
  450.         </tr>
  451.       </table>
  452.       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableframe">
  453.         <tr>
  454.           <td width="69%" height="27" background="images/top-left.gif">&nbsp;<strong><img src="images/icn_news.gif" align="absmiddle">任务督办</strong></td>
  455.           <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>
  456.         </tr>
  457.         <tr bgcolor="#FFFFFF">
  458.           <td colspan="2">
  459.         <jsp:useBean id="task" scope="page" class="com.redmoon.oa.task.Task"/>
  460.        <%
  461. String roottask = fchar.getNullStr(task.getTaskNotFinishedOfPerson(myname));
  462. task.clear();
  463. if (roottask.equals(""))
  464. {
  465. out.print(fchar.p_center("您目前没有任务!"));
  466. return;
  467. }
  468. String showisfinish = "0";
  469. sql = "select id,title,initiator,mydate,expression,type,recount,isfinish from task where id in ("+roottask+") ORDER BY mydate desc";
  470. rs=conn.executeQuery(sql); 
  471. String initiator="";
  472. int expression=0;
  473. int recount=0,isfinish=0,type=0;
  474. if (rs!=null && rs.next()) {
  475. do
  476. {
  477.   id = rs.getString("id");
  478.   title = rs.getString("title");
  479.   initiator = rs.getString("initiator");
  480.   mydate = rs.getString("mydate").substring(0,10);
  481.   expression = rs.getInt("expression");
  482.   type = rs.getInt("type");
  483.   recount = rs.getInt("recount");
  484.   isfinish = rs.getInt("isfinish");
  485.   %>
  486.               <table width="100%"  border="0" cellspacing="1" cellpadding="0">
  487.                 <tr>
  488.                   <td width="70%" height="20"><%if (isfinish==1) {%>
  489.                     <img src="images/task/icon-yes.gif" align="absmiddle">
  490.                     <%}else if (isfinish==0){%>
  491.                     <img src="images/task/icon-notyet.gif" align="absmiddle">
  492.                     <%}else {%>
  493.                     <img src="images/task/icon-no.gif" align="absmiddle">
  494.                   <%}%>                  &nbsp;<a title="发起人:<%=initiator%>" href="task_show.jsp?showid=<%=id%>&rootid=<%=id%>"><%=fchar.truncate(title, 14)%></a></a>&nbsp;</td>
  495.                   <td width="30%">[<%=mydate%>]</td>
  496.                 </tr>
  497.               </table>
  498.               <% } while (rs.next());
  499. }
  500. else
  501. out.println("&nbsp;暂无");
  502. if (rs!=null) {
  503. rs.close(); rs = null;
  504. }
  505. %>
  506.           </td>
  507.         </tr>
  508.       </table>
  509.       <%
  510. if (conn!=null) {
  511. conn.close();
  512. conn = null;
  513. }
  514. %>    <br>    </td></tr>
  515. </table>
  516. </body>
  517. </html>