ShowBBS.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:8k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin1.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int intBBSID = m_request.GetInt("ID");
  7. int intUserID = m_session.GetInt("UserID");
  8. int iSysDirID = m_request.GetInt("SysDirID");
  9. Vector vt = BBSManager.getRecordByID(intBBSID);
  10. if(vt.size()==1)
  11. {
  12. if(((Vector)vt.get(0)).get(7).toString().equalsIgnoreCase(iSysDirID+""))
  13. {
  14. BBSManager.UpdateReocordView(intBBSID);
  15. vt = BBSManager.getRecordByID(intBBSID);
  16. %>
  17. <html>
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  20. <title><%=((Vector)vt.get(0)).get(1).toString()%>-- GForce OA 2.0</title>
  21. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  22. <script language="JavaScript" type="text/javascript">
  23. function checkAddBBS()
  24. {
  25.     if(document.AddBBS.Title.value=="")
  26.     {
  27.         alert("请输入文章主题!");
  28.         document.AddBBS.Title.focus();
  29.         return false;
  30.     }
  31.     if(document.AddBBS.Anonymity.checked)
  32. {
  33.  document.AddBBS.PublishUserID.value = <%=SystemParament.GetAnonymity()%>;
  34. }
  35. }
  36. window.opener.location="BBSManage.jsp?SysDirID=<%=iSysDirID%>";
  37. </script>
  38. <style type="text/css">
  39. <!--
  40. .imgtd {
  41.     border: 1px solid #0A0A0A;
  42. }
  43. .unnamed1 {
  44.   border: 1pt solid #3366CC;
  45. }
  46. -->
  47. </style>
  48. </head>
  49. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  50. <table width="90%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  51.   <tr>
  52.     <td colspan="4" align="right"> <input type="button" value="关闭窗口" onclick="window.close()"> </p>
  53.     </td>
  54.   </tr>
  55.   <tr>
  56.     <td width="68" height="32" align="center" valign="middle" class="unnamed1"><strong>主题</strong></td>
  57.     <td colspan="3" align="center" class="unnamed1"><strong><%=((Vector)vt.get(0)).get(1).toString()%></strong>&nbsp;</td>
  58.   </tr>
  59.   <tr>
  60.     <td width="68" height="25" align="center" valign="middle" class="unnamed1"><strong>文章信息</strong></td>
  61.     <td width="771" height="25" align="left" valign="bottom" class="unnamed1"><img src="/images/BBS/face<%=((Vector)vt.get(0)).get(4).toString()%>.gif">
  62.       <%
  63. //**************判断是否匿名用户
  64. if (((Vector)vt.get(0)).get(3).toString().equalsIgnoreCase(SystemParament.GetAnonymity()))
  65. out.println("作者:匿名");
  66. else
  67. {
  68. if(((Vector)vt.get(0)).get(2).toString().length()>1)
  69. out.println("作者:" + UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vt.get(0)).get(3).toString())) + "");
  70. }
  71. //**************判断是否匿名用户完
  72. out.println("&nbsp;&nbsp;&nbsp;发布时间:" + StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"MM月dd日 HH点mm分") + "");
  73. out.println("&nbsp;&nbsp;&nbsp;浏览次数:" + ((Vector)vt.get(0)).get(8).toString() + "&nbsp;");
  74. %> </td>
  75.     <td width="36" align="center" valign="bottom" class="unnamed1"><strong><a href="EditShowBBS.jsp?SysDirID=<%=iSysDirID%>&ID=<%=intBBSID%>">修改</a></strong></td>
  76.     <td width="33" align="center" valign="bottom" class="unnamed1"><strong><a href="DelShowBBS.jsp?SysDirID=<%=iSysDirID%>&ID=<%=intBBSID%>" onclick="return confirm('您确实要删除该文章吗?');">删除</a></strong></td>
  77.   </tr>
  78.   <tr>
  79.     <td width="68" align="center" valign="middle" class="unnamed1"><strong>内容</strong></td>
  80.     <td colspan="3" align="left" valign="top" class="unnamed1"><p><%=((Vector)vt.get(0)).get(5).toString()%>&nbsp;</p>
  81.       &nbsp;<strong> </strong></td>
  82.   </tr>
  83.   <tr class="cgal">
  84.     <td align="center" valign="middle" class="unnamed1"><strong>相关文章</strong></td>
  85.     <td colspan="3" class="unnamed1"> <strong>
  86.       <%
  87. Vector vtr = BBSManager.getBBSRevertRecord(((Vector)vt.get(0)).get(6).toString()+((Vector)vt.get(0)).get(0).toString()+"_");
  88. if(vtr.size() >0)
  89. {
  90.   for (int i=0;i<vtr.size();i++)
  91.   {
  92.       String strID = ((Vector)vtr.get(i)).get(0).toString();
  93.       out.println("&nbsp;&nbsp;<img src="/images/BBS/face"+((Vector)vt.get(0)).get(4).toString()+".gif">&nbsp;<a href="ShowBBS.jsp?SysDirID="+iSysDirID+"&ID="+((Vector)vtr.get(i)).get(0).toString()+"">"+((Vector)vtr.get(i)).get(1).toString()+"</a><br><br>");
  94.   }
  95. }
  96. %>
  97.       </strong>&nbsp;&nbsp; </td>
  98.   </tr>
  99.   <form name="AddBBS" action="AddBBSRevertAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkAddBBS();">
  100.     <tr>
  101.       <td width="68" height="36" align="center" valign="middle" class="unnamed1"><strong>回复主题</strong></td>
  102.       <td colspan="3" align="left" valign="middle" class="unnamed1"> <input name="Title" type="text" maxlength="60" size="90" value="回复:<%=((Vector)vt.get(0)).get(1).toString()%>">
  103.       </td>
  104.     </tr>
  105.     <tr>
  106.       <td width="68" height="30" align="center" valign="middle" class="unnamed1"><strong>表情</strong></td>
  107.       <td height="30" colspan="3" align="left" valign="top" class="unnamed1">
  108.         <input name="FaceID" type="radio" value="1"> <img src="/images/BBS/face1.gif">
  109.         <input name="FaceID" type="radio" value="2"> <img src="/images/BBS/face2.gif">
  110.         <input name="FaceID" type="radio" value="3"> <img src="/images/BBS/face3.gif">
  111.         <input name="FaceID" type="radio" value="4"> <img src="/images/BBS/face4.gif">
  112.         <input name="FaceID" type="radio" value="5"> <img src="/images/BBS/face5.gif">
  113.         <input name="FaceID" type="radio" value="6"> <img src="/images/BBS/face6.gif">
  114.         <input name="FaceID" type="radio" value="7"> <img src="/images/BBS/face7.gif">
  115.         <input name="FaceID" type="radio" value="8"> <img src="/images/BBS/face8.gif">
  116.         <input name="FaceID" type="radio" value="9"> <img src="/images/BBS/face9.gif"><br>
  117.         <input name="FaceID" type="radio" value="10"> <img src="/images/BBS/face10.gif">
  118.         <input name="FaceID" type="radio" value="11"> <img src="/images/BBS/face11.gif">
  119.         <input name="FaceID" type="radio" value="12"> <img src="/images/BBS/face12.gif">
  120.         <input name="FaceID" type="radio" value="13"> <img src="/images/BBS/face13.gif">
  121.         <input name="FaceID" type="radio" value="14"> <img src="/images/BBS/face14.gif">
  122.         <input name="FaceID" type="radio" value="15"> <img src="/images/BBS/face15.gif">
  123.         <input name="FaceID" type="radio" value="16"> <img src="/images/BBS/face16.gif">
  124.         <input name="FaceID" type="radio" value="17"> <img src="/images/BBS/face17.gif">
  125.         <input name="FaceID" type="radio" value="18"> <img src="/images/BBS/face18.gif"></td>
  126.     </tr>
  127.     <tr>
  128.       <td width="68" align="center" valign="middle" class="unnamed1"><strong>内容</strong></td>
  129.       <td height="55" colspan="3" align="left" valign="top" class="unnamed1">
  130.         <textarea name="Content" cols="90" rows="5"></textarea>
  131.         <%java.util.Date t_Date = new java.util.Date();%> <input name="PublishTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  132.         <input name="PublishUserID" type="hidden" Value="<%=intUserID%>"> <input name="Station" type="hidden" Value="<%=((Vector)vt.get(0)).get(6).toString()%><%=((Vector)vt.get(0)).get(0).toString()%>_">
  133.         <input name="SysDirID" type="hidden" Value="<%=iSysDirID%>"> <input name="ViewTimes" type="hidden" Value="0">
  134.       </td>
  135.     </tr>
  136.     <tr>
  137.             <td align="right" valign="middle"> </td>
  138.             <td colspan="3" align="left" valign="middle" nowrap>
  139.             <input name="Anonymity" type="checkbox">匿名发布
  140.            </td>
  141.     </tr>
  142.     <tr>
  143.       <td colspan="4" align="right"> </td>
  144.     </tr>
  145.     <tr>
  146.       <td colspan="7" align="right" valign="middle" nowrap> <input name="submit" type="submit" value="确定">
  147.         &nbsp;&nbsp;&nbsp; <input name="reset" type="reset" value="重填"> &nbsp;
  148.         <input name="button" type="button" onClick="window.close()" value="关闭窗口">
  149.     </tr>
  150.     <tr>
  151.       <td colspan="7" nowrap> <strong> </strong> </tr>
  152.   </form>
  153. </table>
  154. </body>
  155. </html>
  156. <%
  157. }
  158. else
  159. {
  160. %>
  161. <script language="JavaScript" type="text/JavaScript">
  162. alert("您没有权限查看此记录,请与管理员联系!");
  163. window.close();
  164. </script>
  165. <%
  166. }
  167. }
  168. else
  169. {
  170. %>
  171. <script language="JavaScript" type="text/JavaScript">
  172. alert("此记录已被删除,请与管理员联系!");
  173. window.close();
  174. </script>
  175. <%
  176. }
  177. %>