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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="cn.js.fan.util.*"%>
  3. <%@ page import="cn.js.fan.db.*"%>
  4. <%@ page import="cn.js.fan.web.*"%>
  5. <%@ page import="cn.js.fan.module.cms.*"%>
  6. <%@ page import="com.redmoon.oa.pvg.*"%>
  7. <html>
  8. <head>
  9. <title>管理登录</title>
  10. <link href="../common.css" rel="stylesheet" type="text/css">
  11. <link href="default.css" rel="stylesheet" type="text/css">
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <style type="text/css">
  14. <!--
  15. .style4 {
  16. color: #FFFFFF;
  17. font-weight: bold;
  18. }
  19. .style1 { font-size: 14px;
  20. font-weight: bold;
  21. }
  22. -->
  23. </style>
  24. </head>
  25. <body bgcolor="#FFFFFF" text="#000000">
  26. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  27. <%
  28. if (!privilege.isUserPrivValid(request, PrivDb.PRIV_ADMIN))
  29. {
  30. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  31. return;
  32. }
  33. String op = ParamUtil.get(request, "op");
  34. int doc_id = ParamUtil.getInt(request, "doc_id");
  35. Document doc = new Document();
  36. doc = doc.getDocument(doc_id);
  37. CommentMgr cm = new CommentMgr();
  38. if (op.equals("del")) {
  39. try {
  40. if (cm.del(request, privilege))
  41. out.print(StrUtil.Alert("删除成功!"));
  42. }
  43. catch (ErrMsgException e) {
  44. out.print(StrUtil.Alert(e.getMessage()));
  45. }
  46. }
  47. if (op.equals("delall")) {
  48. try {
  49. cm.delAll(request, privilege);
  50. out.print(StrUtil.Alert("删除成功!"));
  51. }
  52. catch (ErrMsgException e) {
  53. out.print(StrUtil.Alert(e.getMessage()));
  54. }
  55. }
  56. %>
  57. <table cellSpacing="0" cellPadding="0" width="100%">
  58.   <tbody>
  59.     <tr>
  60.       <td class="head">管理评论</td>
  61.     </tr>
  62.   </tbody>
  63. </table>
  64. <%
  65. java.util.Iterator ir = cm.getList(doc_id);
  66. %>
  67. <br>
  68. <br>
  69. <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="95%" align="center">
  70.   <tbody>
  71.     <tr>
  72.       <td width="82%" noWrap class="thead" style="PADDING-LEFT: 10px"><a href="../fwebedit.jsp?op=edit&id=<%=doc.getID()%>&dir_code=<%=StrUtil.UrlEncode(doc.getDirCode())%>"><%=doc.getTitle()%></a></td>
  73.       <td width="18%" noWrap class="thead"><img src="images/tl.gif" align="absMiddle" width="10" height="15">操作</td>
  74.     </tr>
  75. <%
  76. while (ir.hasNext()) {
  77.   Comment cmt = (Comment)ir.next();
  78. %>
  79.     <tr class="row" style="BACKGROUND-COLOR: #ffffff">
  80.       <td style="PADDING-LEFT: 10px">&nbsp;
  81.         <table width="98%" cellpadding="0" cellspacing="0" >
  82.           <tr>
  83.             <td height="43" align="center" class="tableframe_comment"><table width="99%" align="center" >
  84.                 <tr>
  85.                   <td height="22" bgcolor="#F2F2F2"><span class="style1"><a href="cmt.getLink()"><a href="cmt.getLink()"><img border=0 src="images/arrow.gif" align="absmiddle"><%=cmt.getNick()%></a>&nbsp;发表于&nbsp;<%=cmt.getAddDate()%> </span></td>
  86.                 </tr>
  87.                 <tr>
  88.                   <td><%=cmt.getContent()%></td>
  89.                 </tr>
  90.             </table></td>
  91.           </tr>
  92.         </table>        
  93.         <span class="tableframe_comment"> </span>        
  94.       <td height="43" colspan="3" align="center"><span>[ <a onClick="if (!confirm('您确定要删除吗?')) return false" href="comment_m.jsp?op=del&doc_id=<%=doc_id%>&id=<%=cmt.getId()%>">删除</a> ] </span></td>
  95.     </tr>
  96. <%}%>
  97.   </tbody>
  98. </table>
  99. <HR noShade SIZE=1>
  100. <table width="100%" >
  101.   <tr>
  102.     <td align="right"><a href="comment_m.jsp?op=delall&doc_id=<%=doc_id%>">删除所有评论</a></td>
  103.   </tr>
  104. </table>
  105. </body>
  106. </html>