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

数据库编程

开发平台:

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. <%
  6. 'on error resume next
  7. Dim Conn,User_Conn,DebateRs,listnum,page,j,i,nn,n,pagename,DebateID
  8. MF_Default_Conn
  9. MF_User_Conn
  10. MF_Session_TF
  11. Set DebateRs=Server.CreateObject(G_FS_RS)
  12. DebateID=Request("DebateID")
  13. if DebateID<>"" then
  14. DebateRs.open "select DebateID,title,addtime,ParentID,classid,AddTime,isLock from FS_ME_GroupDebate where parentID="&DebateID,User_Conn,1,1
  15. else
  16. DebateRs.open "select DebateID,title,addtime,ParentID,classid,AddTime,isLock from FS_ME_GroupDebate where parentID=0",User_Conn,1,1
  17. end if
  18. pagename="GroupDebate.asp?"
  19. if DebateRs.eof and DebateRs.bof Then
  20. else
  21. listnum=20
  22. DebateRs.pagesize=listnum
  23. page=Request("page")
  24. if (page-DebateRs.pagecount) > 0 then
  25. page=DebateRs.pagecount
  26. elseif page = "" or page < 1 then
  27. page = 1
  28. end if
  29. DebateRs.absolutepage=page
  30. '编号的实现
  31. j=DebateRs.recordcount
  32. j=j-(page-1)*listnum
  33. i=0
  34. nn=request("page")
  35. if nn="" then
  36. n=0
  37. else
  38. nn=nn-1
  39. n=listnum*nn
  40. end if
  41. end if
  42. %>
  43. <html xmlns="http://www.w3.org/1999/xhtml">
  44. <HEAD>
  45. <TITLE>FoosunCMS</TITLE>
  46. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  47. <script language="JavaScript" type="text/JavaScript">
  48. <!--
  49. function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  50.   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
  51.     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  52.   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
  53. }
  54. MM_reloadPage(true);
  55. //-->
  56. var request=true;
  57. var result;
  58. try
  59. {
  60. request=new XMLHttpRequest();
  61. }catch(trymicrosoft)
  62. {
  63. try
  64. {
  65. request=new ActiveXObject("Msxml2.XMLHTTP")
  66. }catch(othermicrosoft)
  67. {
  68. try
  69. {
  70. request=new ActiveXObject("Microsoft.XMLHTTP")
  71. }catch(filed)
  72. {
  73. request=false;
  74. }
  75. }
  76. }
  77. if(!request) alert("Error initializing XMLHttpRequest!");
  78. function changeLock(Obj1,Obj2)
  79. {
  80. var url="GroupDebateAction.asp?DebateID="+Obj1+"&value="+Obj2+"&r="+Math.random();//构造url
  81. request.open("GET",url,true);//建立连接
  82. request.onreadystatechange = getResult;
  83. request.send(null);//传送数据,因为数据通过url传递了,所以这里传递的是null
  84. }
  85. function getResult()//当服务器响应的时候就使用这个方法
  86. {
  87. if(request.readyState ==4)//根据HTTP 就绪状态判断响应是否完成
  88. {
  89. if(request.status == 200)//判断请求是否成功
  90. {
  91. result=request.responseText;//获得响应的结果,也就是新的<select>
  92. alert("修改成功")
  93. }
  94. }
  95. }
  96. function AddGroupDebateSubmit()
  97. {
  98. location='AddEditDebate.asp?Act=add'
  99. }
  100. function MyBack(TF)
  101. {
  102. if(TF==1)
  103. location="GroupDebate.asp"
  104. else
  105. history.back()
  106. }
  107. </script>
  108. </HEAD>
  109. <script language="JavaScript" src="../../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
  110. <script language="JavaScript" src="UserJS.js" type="text/JavaScript"></script>
  111. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  112. <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scroll=yes  oncontextmenu="return false;"> 
  113. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> 
  114.   <form name="GroupDebate" id="GroupDebate" method="post" action="GroupDebateAction.asp?act=Del">
  115.   <tr class="hback"> 
  116. <tr class="xingmu"> 
  117. <td width="30%" align="center"><div align="left">社群管理</div></td> 
  118. <td width="20%" align="center">&nbsp;</td>
  119. <td width="15%" align="center">&nbsp;</td>
  120. <td width="15%" align="center">&nbsp;</td> 
  121. <td>&nbsp;</td> 
  122.     <td width="10%" align="center">&nbsp;</td>
  123.     <td width="10%" align="center"><input type="Button" name="AddNewsSubmit" value="新建社群" onClick="AddGroupDebateSubmit()"></td>
  124.   </tr>
  125.         <tr class="xingmu"> 
  126.           <td width="30%" align="center">标题</td> 
  127.           <td width="20%" align="center">建立时间</td>
  128.   <td width="20%" align="center">所属主题</td>
  129.           <td width="15%" align="center">允许查看组</td>
  130.           <td >锁定</td> 
  131.           <td align="center">操作</td>
  132.           <td width="10%" align="center"><input type="checkbox" name="checkAll"></td>
  133.         </tr>
  134. <%
  135. do while not DebateRs.eof and i<listnum
  136. n=n+1
  137. Response.Write("<tr class='hback'>")
  138. Response.Write("<td align='center'><a href='GroupDebate.asp?DebateID="&DebateRs("DebateID")&"'>"&DebateRs("title")&"</a></td>"&Chr(10)&Chr(13))
  139. Response.Write("<td align='center'>"&DebateRs("addtime")&"</td>"&Chr(10)&Chr(13))
  140. Response.Write("<td align='center'>"&DebateRs("ParentID")&"</td>"&Chr(10)&Chr(13))
  141. Response.Write("<td align='center'>"&DebateRs("classid")&"</td>"&Chr(10)&Chr(13))
  142. Response.Write("<td align='center'>")
  143. if DebateRs("isLock")=1 then
  144. Response.Write("<input type='Radio' name='"&DebateRs("DebateID")&"' value=1 onclick='changeLock(this.name,this.value)'checked>是&nbsp;&nbsp;&nbsp;&nbsp;"&Chr(10)&Chr(13))
  145. Response.Write("<input type='Radio' name='"&DebateRs("DebateID")&"' value=0 onclick='changeLock(this.name,this.value)'>否"&Chr(10)&Chr(13))
  146. elseif DebateRs("isLock")=0 then
  147. Response.Write("<input type='Radio' name='"&DebateRs("DebateID")&"' value=1 onclick='changeLock(this.name,this.value)')>是&nbsp;&nbsp;&nbsp;&nbsp;"&Chr(10)&Chr(13))
  148. Response.Write("<input type='Radio' name='"&DebateRs("DebateID")&"' value=0 onclick='changeLock(this.name,this.value)' checked>否"&Chr(10)&Chr(13))
  149. end if
  150. Response.Write("</td>")
  151. Response.Write("<td align='center'><a href='AddEditDebate.asp?act=edit&DebateID="&DebateRs("DebateID")&"'>设置<a></td>"&Chr(10)&Chr(13))
  152. Response.Write("<td align='center'><input type='checkbox' name='Debatecheck' value='"&DebateRs("DebateID")&"'></td>"&Chr(10)&Chr(13))
  153. Response.Write("</tr>")
  154. DebateRs.movenext 
  155. i=i+1 
  156. j=j-1
  157. loop
  158. %>
  159. <tr class="xingmu"> 
  160. <td width="30%" align="center"></td> 
  161. <td width="20%" align="center"></td>
  162. <td width="20%" align="center"></td>
  163. <td width="15%" align="center"></td>
  164. <td><input name="backTop" type="button" id="backTop" value="返回第一级" onClick="MyBack(1)"></td> 
  165. <td align="center">
  166. <%
  167. if Request("Debate")<>"" then
  168. End if
  169. %>
  170. </td>
  171. <td width="10%" align="center"><input type="submit" name="Submit" value="删除"></td>
  172. </tr>
  173. <tr>
  174. <td align="right" colspan="7">
  175. <%=DebateRs.recordcount%> 条消息&nbsp;&nbsp;<%=listnum%> 条消息/页&nbsp;&nbsp;共 <%=DebateRs.pagecount%> 页 
  176. <% if page=1 then %>
  177. <%else%>
  178. <a href=<%=pagename%>><strong>|<<</strong></a>&nbsp; 
  179. <a href=<%=pagename%>page=<%=page-1%>><strong><<</strong></a>&nbsp; 
  180. <a href=<%=pagename%>page=<%=page-1%>><b>[<%=page-1%>]</b></a>&nbsp; 
  181. <%end if%>
  182. <% if DebateRs.pagecount=1 then %>
  183. <%else%>
  184. <b>[<%=page%>]</b>
  185. <%end if%>
  186. <% if DebateRs.pagecount-page <> 0 then %>
  187. <a href=<%=pagename%>page=<%=page+1%>><b>[<%=page+1%>]</b></a>&nbsp; 
  188. <a href=<%=pagename%>page=<%=page+1%>><strong>>></strong></a>&nbsp; 
  189. <a href=<%=pagename%>page=<%=DebateRs.pagecount%>><strong>>>|</strong></a>&nbsp; 
  190. <%end if%> 
  191. </td>
  192. </tr>
  193. </form> 
  194. </table> 
  195. </body>
  196. <%
  197. if Request("Act")="addGroup" then
  198. AddGroupRs.close
  199. set AddGroupRs=nothing
  200. Conn.close
  201. Set Conn=nothing
  202. User_Conn.close
  203. Set User_Conn=nothing
  204. end if
  205. %>
  206. </html>