Debate_unit.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:13k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="../FS_Inc/Func_Page.asp"-->
  6. <!--#include file="lib/strlib.asp" -->
  7. <!--#include file="lib/UserCheck.asp" -->
  8. <%'Copyright (c) 2006 Foosun Inc. Code by Einstein.liu
  9. Dim DebateRs,GroupRs,DebateSubRs,DebateID,GroupID,UserRs,CroupContent,InfoType,ClassType,AddTime,PerPageNum,GroupCreater,GroupManager,isSys,hits,GroupMembers,GroupMembersArray,TempRs,HotGroupNumber,ForwardNumber,ForIndex,GroupManagerArray,AppointUserNumber,AppointUserGroup
  10. 'lz_usernumber 楼主用户编号,
  11. Dim lz_usernumber,creator,admin
  12. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,i
  13. '---------------------------------分页定义
  14. int_RPP=15 '设置每页显示数目
  15. int_showNumberLink_=8 '数字导航显示数目
  16. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  17. str_nonLinkColor_="#999999" '非热链接颜色
  18. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  19. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  20. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  21. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  22. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  23. toL_="<font face=webdings title=""最后一页"">:</font>" '尾页
  24. '--------------------------------------------------
  25. DebateID=NoSqlHack(Request.QueryString("DebateID"))
  26. GroupID=NoSqlHack(Request.QueryString("gdID"))
  27. Set GroupRs=Server.CreateObject(G_FS_RS)
  28. Set DebateRs=Server.CreateObject(G_FS_RS)
  29. Set DebateSubRs=Server.CreateObject(G_FS_RS)
  30. Set UserRs=Server.CreateObject(G_FS_RS)
  31. GroupRs.open "select UserNumber,AdminName from FS_ME_GroupDebateManage where gdID="&GroupID,User_Conn,1,3
  32. if not GroupRs.eof then
  33. creator=GroupRs("UserNumber")
  34. admin=GroupRs("AdminName")
  35. End if
  36. DebateRs.open "select DebateID,title,content,ParentID,ClassID,UserNumber,AddTime,AppointUserNumber,AppointUserGroup,AddIP,AccessFile from FS_ME_GroupDebate  where DebateID="&DebateID,User_Conn,1,1
  37. DebateSubRs.open "select DebateID,title,content,ParentID,ClassID,UserNumber,AddTime,AppointUserNumber,AppointUserGroup,AddIP,AccessFile from FS_ME_GroupDebate  where ParentID="&DebateID,User_Conn,1,1
  38. Dim UserNumber,author,sHeadPic,HeadPicSize
  39. UserRs.open "Select UserNumber,UserName,HeadPic,HeadPicSize from FS_ME_Users where UserNumber='"&DebateRs("UserNumber")&"'",User_Conn,1,1
  40. author=""
  41. UserNumber=""
  42. sHeadPic=""
  43. HeadPicSize=""
  44. If Not UserRs.eof Then
  45. author=UserRs("UserName")
  46. UserNumber=UserRs("UserNumber")
  47. sHeadPic=UserRs("HeadPic")
  48. HeadPicSize=UserRs("HeadPicSize")
  49. End If
  50. If Trim(sHeadPic)="" Or IsNull(sHeadPic) Then
  51. sHeadPic="images/noHeadpic.gif"
  52. End If
  53. %>
  54. <html xmlns="http://www.w3.org/1999/xhtml">
  55. <head>
  56. <title>User Manage Center-网站内容管理系统</title>
  57. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  58. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  59. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  60. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  61. <link rel="stylesheet" href="lib/css/lightbox.css" type="text/css" media="screen" />
  62. <script type="text/javascript" src="../FS_INC/prototype.js"></script>
  63. <script type="text/javascript" src="lib/js/scriptaculous.js?load=effects"></script>
  64. <script type="text/javascript" src="lib/js/lightbox.js"></script>
  65. </head>
  66. <body onLoad="initLightbox()"> 
  67. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table"> 
  68.   <tr> 
  69.     <td> <!--#include file="top.asp" --> </td> 
  70.   </tr> 
  71. </table> 
  72. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table"> 
  73.   <tr class="back"> 
  74.     <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td> 
  75.   </tr> 
  76.   <tr class="back"> 
  77.     <td width="18%" valign="top" class="hback"> <div align="left"> 
  78.         <!--#include file="menu.asp" --> 
  79.       </div></td> 
  80.     <td width="82%" valign="top" class="hback"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> 
  81.         <tr> 
  82.           <td width="72%"  valign="top"> <table width="98%" height="112" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> 
  83. <tr class="xingmu"> 
  84.                 <td height="33">&nbsp;&nbsp;&nbsp;
  85. <a href='GroupClass.asp?Act=Add'>创建社群</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  86. <a href='myGroup.asp?userNumber=<%=session("FS_UserNumber")%>'>我的社群</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  87. <a href='Group.asp'>社群首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  88. <a href='#'>社群帮助</a>
  89. </td> 
  90.               </tr>
  91.               <tr class="xingmu"> 
  92.                 <td height="33"><img src="images/GroupUser.gif"/><a href='Group_unit.asp?GDID=<%=DebateRs("classID")%>'><%=User_Conn.execute("select Title from FS_ME_GroupDebateManage where GDID="&DebateRs("classID"))(0)%></a></td> 
  93.               </tr>
  94.               <%
  95. '-------------------------------------------------社群讨论贴
  96. Response.Write("<tr class='xingmu'><td>"&Chr(10)&chr(13))
  97. Response.Write("<table width='100%' height='60' border='0' cellpadding='1' cellspacing='1' class='table'>"&Chr(10)&chr(13))
  98. Response.Write("<tr class='hback'><td align='left' colspan='7'>&nbsp;社群讨论</td><td align='center'><a href='Debate_Add.asp?act=new&ClassID="&DebateRs("classID")&"'><img src=""images/newDebate.gif"" border=""0""/>发表主题</a></td></tr>"&Chr(10)&chr(13))
  99. Response.Write("<tr height='20' class='hback'>"&Chr(10)&chr(13))
  100. Response.Write("<td width='3%'><img src=""images/GroupTopic.gif""></td>")
  101. Response.Write("<td align='left'><strong>"&DebateRs("title")&"</strong></td>"&Chr(10)&chr(13))
  102. Response.Write("<td align='right'>发表人:</td><td align='left'>"&author&"</td>")
  103. Response.Write("<td align='right'>发布时间:</td><td align='left'>"&DebateRs("AddTime")&"</td>")
  104. Response.Write("<td align=""center"">")
  105. lz_usernumber=DebateRs("UserNumber")
  106. if lz_usernumber=session("FS_UserNumber") then
  107. Response.Write("<a href='Debate_Add.asp?act=edit&classID="&DebateRs("ClassID")&"&DebateID="&DebateRs("DebateID")&"'>编辑</a>")
  108. end if
  109. if creator=session("FS_UserNumber") or instr(admin,session("FS_UserNumber"))>0 then
  110. Response.Write("&nbsp;|&nbsp;<a href=""#"" onClick=""if(confirm('确认进行删除操作')){location.href='Debate_action.asp?act=delete&classID="&DebateRs("ClassID")&"&DebateID="&DebateRs("DebateID")&"'}"">删除</a>")
  111. end if
  112. Response.Write("</td>")
  113. Response.Write("<td align=""center""><a href='Debate_Add.asp?act=revert&title="&DebateRs("title")&"&classID="&DebateRs("ClassID")&"&DebateID="&DebateRs("DebateID")&"'>参与讨论</a></td>")
  114. Response.Write("</tr>"&Chr(10)&chr(13))
  115. Response.Write("<tr height='30'><td colspan=8>"&Chr(10)&chr(13))
  116. Response.Write("<table width='100%' height='100' border='0' cellpadding='1' cellspacing='1' class='table'>"&Chr(10)&chr(13))
  117. Response.Write("<tr><td width=""80"" class=""hback""><img src="""&sHeadPic&""" width=""80"" height=""80""></td>")
  118. Response.Write("<td class='hback' align='left'><div>"&Encode(DebateRs("content"))&"</div>")
  119. If DebateRs("AccessFile")<>"" Then
  120. Response.write("<div><br><a href='"&DebateRs("AccessFile")&"' rel=""lightbox"" title="""&DebateRs("title")&"""><img src='"&DebateRs("AccessFile")&"' width='80' height='80' border=0/></a></div></td></tr>"&Chr(10)&chr(13))
  121. Else
  122. Response.write("</td></tr>"&Chr(10)&chr(13))
  123. End if
  124. Response.Write("</table>")
  125. Response.Write("</td></tr>")
  126. UserRs.close
  127. If Not DebateSubRs.eof then
  128. '分页使用-----------------------------------
  129. DebateSubRs.PageSize=int_RPP
  130. cPageNo=NoSqlHack(Request.QueryString("page"))
  131. If cPageNo="" Then cPageNo = 1
  132. If not isnumeric(cPageNo) Then cPageNo = 1
  133. cPageNo = Clng(cPageNo)
  134. If cPageNo>DebateSubRs.PageCount Then cPageNo=DebateSubRs.PageCount 
  135. If cPageNo<=0 Then cPageNo=1
  136. DebateSubRs.AbsolutePage=cPageNo
  137. End if
  138. for i=0 to int_RPP
  139. if DebateSubRs.eof then exit For
  140. if not DebateSubRs.eof then 
  141. Set UserRs=User_Conn.execute("Select UserNumber,UserName,HeadPic,HeadPicSize from FS_ME_Users where UserNumber='"&DebateSubRs("UserNumber")&"'")
  142. end If
  143. If Not UserRs.eof Then
  144. author=UserRs("UserName")
  145. UserNumber=UserRs("UserNumber")
  146. sHeadPic=UserRs("HeadPic")
  147. HeadPicSize=UserRs("HeadPicSize")
  148. End If
  149. AppointUserNumber=DebateSubRs("AppointUserNumber")
  150. AppointUserGroup=DebateSubRs("AppointUserGroup")
  151. Response.Write("<tr height='20' class='hback'>"&Chr(10)&chr(13))
  152. Response.Write("<td width='3%'><img src=""images/Groupreplay.gif""></td>")
  153. Response.Write("<td align='left'><strong>"&DebateSubRs("title")&"</strong></td>"&Chr(10)&chr(13))
  154. Response.Write("<td align='right'>发表人:</td><td lign='left'>"&author&"</td>")
  155. Response.Write("<td align='right'>发布时间:</td><td lign='left'>"&DebateSubRs("AddTime")&"</td>")
  156. Response.Write("<td align=""center"">")
  157. if DebateSubRs("UserNumber")=session("FS_UserNumber") then
  158. Response.Write("<a href='Debate_Add.asp?act=edit&classID="&DebateSubRs("ClassID")&"&DebateID="&DebateSubRs("DebateID")&"'>编辑</a>")
  159. end if
  160. if creator=session("FS_UserNumber") or instr(admin,session("FS_UserNumber"))>0 then
  161. Response.Write("&nbsp;|&nbsp;<a href=""#"" onClick=""if(confirm('确认进行删除操作')){location.href='Debate_action.asp?act=delete&classID="&DebateSubRs("ClassID")&"&DebateID="&DebateSubRs("DebateID")&"'}"">删除</a>")
  162. end if
  163. Response.Write("</td>")
  164. Response.Write("<td>&nbsp;</td>")
  165. Response.Write("</tr>")
  166. Response.Write("<tr height='30'><td  colspan=8>"&Chr(10)&chr(13))
  167. Response.Write("<table width='100%' height='100' border='0' cellpadding='1' cellspacing='1' class='table'>"&Chr(10)&chr(13))
  168. Response.Write("<tr><td width='80' class='hback' aling='center' valign='middle'><img src='"&sHeadPic&"' width='80' height='80'></td>")
  169. if AppointUserNumber<>"" then
  170. if instr(AppointUserNumber,Session("FS_UserNumber"))=0 then
  171. Response.Write("<td class='hback'>该贴已被作者隐藏</td></tr>"&Chr(10)&chr(13))
  172. else
  173. Response.Write("<td class='hback'><div>"&Encode(DebateSubRs("content"))&"</div>")
  174. If DebateSubRs("AccessFile")<>"" Then
  175. Response.write("<div><br><a href='"&DebateSubRs("AccessFile")&"' rel=""lightbox"" title="""&DebateSubRs("title")&"""><img src='"&DebateSubRs("AccessFile")&"' width='80' height='80' border='0'/></a></div></td></tr>"&Chr(10)&chr(13))
  176. Else
  177. Response.write("</td></tr>"&Chr(10)&chr(13))
  178. End If
  179. End if
  180. elseif AppointUserGroup<>"" Then
  181. if instr(AppointUserGroup,Session("FS_Group"))=0 then
  182. Response.Write("<td class='hback'>该贴已被作者隐藏</td></tr>"&Chr(10)&chr(13))
  183. else
  184. Response.Write("<td class='hback'><div>"&Encode(DebateSubRs("content"))&"</div>")
  185. If DebateSubRs("AccessFile")<>"" Then
  186. Response.write("<div><br><a href='"&DebateSubRs("AccessFile")&"' rel=""lightbox"" title="""&DebateSubRs("title")&"""><img src='"&DebateSubRs("AccessFile")&"' width='80' height='80' border='0'/></a></div></td></tr>"&Chr(10)&chr(13))
  187. Else
  188. Response.write("</td></tr>"&Chr(10)&chr(13))
  189. End If
  190. End if
  191. else
  192. Response.Write("<td class='hback'><div>"&Encode(DebateSubRs("content"))&"</div>")
  193. If DebateSubRs("AccessFile")<>"" Then
  194. Response.write("<div><br><a href="""&DebateSubRs("AccessFile")&""" rel=""lightbox"" title="""&DebateSubRs("title")&"""><img src='"&DebateSubRs("AccessFile")&"' width='80' height='80' border='0'/></a></div></td></tr>"&Chr(10)&chr(13))
  195. Else
  196. Response.write("</td></tr>"&Chr(10)&chr(13))
  197. End if
  198. end if
  199. Response.Write("</table>")
  200. Response.Write("</td></tr>")
  201. DebateSubRs.movenext
  202. next
  203. Response.Write("</table>"&Chr(10)&chr(13))
  204. Response.Write("</td></tr>"&Chr(10)&chr(13))
  205.   %>
  206. <%
  207. Response.Write("<tr>"&vbcrlf)
  208. Response.Write("<td align='right' colspan='5'  class=""hback"">"&fPageCount(DebateSubRs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)&"</td>"&vbcrlf)
  209. Response.Write("</tr>"&vbcrlf)
  210. %>
  211.           </table></td> 
  212.         </tr> 
  213.       </table></td> 
  214.   </tr> 
  215.   <tr class="back"> 
  216.     <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  217.         <!--#include file="Copyright.asp" --> 
  218.       </div></td> 
  219.   </tr> 
  220. </table> 
  221. </body>
  222. </html>
  223. <%
  224. Set UserRs=nothing
  225. Set DebateRs=nothing
  226. Set DebateSubRs=nothing
  227. Set User_Conn=nothing
  228. Set Fs_User = Nothing
  229. %>
  230. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->