ShowOnBBS.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="BBSOnManage.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="200" 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="200" height="25" align="center" valign="middle" class="unnamed1"><strong>文章信息</strong></td>
  61.     <td width="656" 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. %>
  75.     </td>
  76. <%
  77. if (intUserID == Integer.parseInt(((Vector)vt.get(0)).get(3).toString()))
  78. {
  79. %>
  80.     <td width="28" height="25" align="center" valign="bottom" class="unnamed1"><strong><a href="EditShowOnBBS.jsp?SysDirID=<%=iSysDirID%>&ID=<%=intBBSID%>">修改</a></strong></td>
  81. <%--
  82.     <td width="32" align="center" valign="bottom" class="unnamed1"><strong><a href="DelShowOnBBS.jsp?SysDirID=<%=iSysDirID%>&ID=<%=intBBSID%>" onclick="return confirm('您确实要删除该文章吗?');">删除</a></strong></td>
  83. --%>
  84. <%
  85. }
  86. %>
  87.   </tr>
  88.   <tr>
  89.     <td width="200" align="center" valign="middle" class="unnamed1"><strong>内容</strong></td>
  90.     <td colspan="3" align="left" valign="top" class="unnamed1"><p><%=((Vector)vt.get(0)).get(5).toString()%>&nbsp;</p>
  91.       &nbsp;</td>
  92.   </tr>
  93.   <tr class="cgal">
  94.     <td width="200" align="center" valign="middle" class="unnamed1"><strong>相关文章</strong></td>
  95.     <td colspan="3" class="unnamed1"> <strong>
  96.       <%
  97. Vector vtr = BBSManager.getBBSRevertRecord(((Vector)vt.get(0)).get(6).toString()+((Vector)vt.get(0)).get(0).toString()+"_");
  98. if(vtr.size() >0)
  99. {
  100.   for (int i=0;i<vtr.size();i++)
  101.   {
  102.       String strID = ((Vector)vtr.get(i)).get(0).toString();
  103.       out.println("&nbsp;&nbsp;<img src="/images/BBS/face"+((Vector)vt.get(0)).get(4).toString()+".gif">&nbsp;<a href="ShowOnBBS.jsp?SysDirID="+iSysDirID+"&ID="+((Vector)vtr.get(i)).get(0).toString()+"">"+((Vector)vtr.get(i)).get(1).toString()+"</a><br><br>");
  104.   }
  105. }
  106. %>
  107.       </strong>&nbsp;&nbsp; </td>
  108.   </tr>
  109.   <form name="AddBBS" action="AddOnBBSRevertAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkAddBBS();">
  110.     <tr>
  111.       <td width="200" height="36" align="center" valign="middle" class="unnamed1"><strong>回复主题</strong></td>
  112.       <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()%>">
  113.       </td>
  114.     </tr>
  115.     <tr>
  116.       <td width="200" height="30" align="center" valign="middle" class="unnamed1"><strong>表情</strong></td>
  117.       <td height="30" colspan="3" align="left" valign="top" class="unnamed1">
  118.         <input name="FaceID" type="radio" value="1"> <img src="/images/BBS/face1.gif">
  119.         <input name="FaceID" type="radio" value="2"> <img src="/images/BBS/face2.gif">
  120.         <input name="FaceID" type="radio" value="3"> <img src="/images/BBS/face3.gif">
  121.         <input name="FaceID" type="radio" value="4"> <img src="/images/BBS/face4.gif">
  122.         <input name="FaceID" type="radio" value="5"> <img src="/images/BBS/face5.gif">
  123.         <input name="FaceID" type="radio" value="6"> <img src="/images/BBS/face6.gif">
  124.         <input name="FaceID" type="radio" value="7"> <img src="/images/BBS/face7.gif">
  125.         <input name="FaceID" type="radio" value="8"> <img src="/images/BBS/face8.gif">
  126.         <input name="FaceID" type="radio" value="9"> <img src="/images/BBS/face9.gif"><br>
  127.         <input name="FaceID" type="radio" value="10"> <img src="/images/BBS/face10.gif">
  128.         <input name="FaceID" type="radio" value="11"> <img src="/images/BBS/face11.gif">
  129.         <input name="FaceID" type="radio" value="12"> <img src="/images/BBS/face12.gif">
  130.         <input name="FaceID" type="radio" value="13"> <img src="/images/BBS/face13.gif">
  131.         <input name="FaceID" type="radio" value="14"> <img src="/images/BBS/face14.gif">
  132.         <input name="FaceID" type="radio" value="15"> <img src="/images/BBS/face15.gif">
  133.         <input name="FaceID" type="radio" value="16"> <img src="/images/BBS/face16.gif">
  134.         <input name="FaceID" type="radio" value="17"> <img src="/images/BBS/face17.gif">
  135.         <input name="FaceID" type="radio" value="18"> <img src="/images/BBS/face18.gif"></td>
  136.     </tr>
  137.     <tr>
  138.       <td width="200" align="center" valign="middle" class="unnamed1"><strong>内容</strong></td>
  139.       <td height="55" colspan="3" align="left" valign="top" class="unnamed1">
  140.         <textarea name="Content" cols="90" rows="5"></textarea>
  141.         <%java.util.Date t_Date = new java.util.Date();%>
  142.         <input name="PublishTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  143.         <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()%>_">
  144.         <input name="SysDirID" type="hidden" Value="<%=iSysDirID%>"> <input name="ViewTimes" type="hidden" Value="0">
  145.       </td>
  146.     </tr>
  147.     <tr>
  148.             <td align="right" valign="middle"> </td>
  149.             <td colspan="3" align="left" valign="middle" nowrap>
  150.             <input name="Anonymity" type="checkbox">匿名发布
  151.            </td>
  152.     </tr>
  153.     <tr>
  154.      <td colspan="4" align="right">
  155.      </td>
  156.     </tr>
  157.     <tr>
  158.       <td colspan="7" align="right" valign="middle" nowrap> <input name="submit" type="submit" value="确定">
  159.         &nbsp;&nbsp;&nbsp; <input name="reset" type="reset" value="重填"> &nbsp;
  160.         <input name="button" type="button" onClick="window.close()" value="关闭窗口">
  161.     </tr>
  162.     <tr>
  163.       <td colspan="7" nowrap> <strong> </strong> </tr>
  164.   </form>
  165. </table>
  166. </body>
  167. </html>
  168. <%
  169. }
  170. else
  171. {
  172. %>
  173. <script language="JavaScript" type="text/JavaScript">
  174. alert("您没有权限查看此记录,请与管理员联系!");
  175. window.close();
  176. </script>
  177. <%
  178. }
  179. }
  180. else
  181. {
  182. %>
  183. <script language="JavaScript" type="text/JavaScript">
  184. alert("此记录已被删除,请与管理员联系!");
  185. window.close();
  186. </script>
  187. <%
  188. }
  189. %>