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

数据库编程

开发平台:

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. <%
  9. Dim GroupRs,GroupID,GroupName,CroupContent,InfoType,ClassType,AddTime,GroupCreater,GroupManager,isSys,hits,GroupMembers,GroupMembersArray,TempRs,HotGroupNumber,ForwardNumber,ForIndex,GroupManagerArray
  10. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,i
  11. '---------------------------------分页定义
  12. int_RPP=8'设置每页显示数目
  13. int_showNumberLink_=8 '数字导航显示数目
  14. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  15. str_nonLinkColor_="#999999" '非热链接颜色
  16. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  17. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  18. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  19. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  20. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  21. toL_="<font face=webdings title=""最后一页"">:</font>" '尾页
  22. '--------------------------------------------------
  23. Set GroupRs=Server.CreateObject(G_FS_RS)
  24. GroupRs.open "select gdID,title,content,InfoType,ClassType,AddTime,UserNumber,AdminName,ClassMember,isSys,hits from FS_ME_GroupDebateManage",User_Conn,1,1
  25. %>
  26. <html xmlns="http://www.w3.org/1999/xhtml">
  27. <title>User Manage Center-网站内容管理系统</title>
  28. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  29. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  30. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  31. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  32. <head></head>
  33. <body> 
  34. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table"> 
  35.   <tr> 
  36.     <td> <!--#include file="top.asp" --> </td> 
  37.   </tr> 
  38. </table> 
  39. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table"> 
  40.   <tr class="back"> 
  41.     <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td> 
  42.   </tr> 
  43.   <tr class="back"> 
  44.     <td width="18%" valign="top" class="hback"> <div align="left"> 
  45.         <!--#include file="menu.asp" --> 
  46.       </div></td> 
  47.     <td width="82%" valign="top" class="hback"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> 
  48.         <tr> 
  49.           <td width="72%"  valign="top"> <table width="98%" height="112" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> 
  50.               <tr class="hback_1"> 
  51.                 <td height="26"><a href="GroupClass.asp?Act=Add">创建社群</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='MyGroup.asp?userNumber=<%=session("FS_UserNumber")%>'>我的社群</a></td> 
  52.               </tr>
  53.               <%
  54. If Not GroupRs.eof then
  55. '分页使用-----------------------------------
  56. GroupRs.PageSize=int_RPP
  57. cPageNo=NoSqlHack(Request.QueryString("page"))
  58. If cPageNo="" Then cPageNo = 1
  59. If not isnumeric(cPageNo) Then cPageNo = 1
  60. cPageNo = Clng(cPageNo)
  61. If cPageNo>GroupRs.PageCount Then cPageNo=GroupRs.PageCount 
  62. If cPageNo<=0 Then cPageNo=1
  63. GroupRs.AbsolutePage=cPageNo
  64. End if
  65. for i=0 to int_RPP
  66. if GroupRs.eof then exit for
  67. '-------------------------------------
  68. GroupID=GroupRs("gdID")
  69. GroupName=GroupRs("title")
  70. CroupContent=GroupRs("content")
  71. InfoType=GroupRs("InfoType")
  72. ClassType=GroupRs("ClassType")
  73. AddTime=GroupRs("AddTime")
  74. GroupCreater=GroupRs("UserNumber")
  75. GroupManager=GroupRs("AdminName")
  76. isSys=GroupRs("isSys")
  77. hits=GroupRs("hits")
  78. GroupMembers=GroupRs("ClassMember")
  79. '----------------------获得管理员------------------
  80. GroupManagerArray=split(GroupManager,",")
  81. GroupManager=""
  82. for ForIndex=0 to ubound(GroupManagerArray)
  83. Set TempRs=User_Conn.execute("Select UserName from FS_ME_Users where UserNumber='"&GroupManagerArray(ForIndex)&"'")
  84. if not TempRs.eof then
  85. GroupManager=GroupManager&","&TempRs("UserName")
  86. end if
  87. next
  88. GroupManager=DelHeadAndEndDot(GroupManager)
  89. '-------------获得创建人-------------------------------
  90. if isSys=1 then
  91. GroupCreater="管理员"
  92. else
  93. Set TempRs=User_Conn.execute("Select UserName from FS_ME_Users where UserNumber='"&GroupCreater&"'")
  94. if not TempRs.eof then
  95. GroupCreater=TempRs("UserName")
  96. end if
  97. end if
  98. '-----------------获得社群所属行业----------------------
  99. Set TempRs=User_Conn.execute("select vClassName from FS_ME_VocationClass where vcid="&ClassType)
  100. if not TempRs.eof then
  101. ClassType=TempRs("vClassName")
  102. else
  103. ClassType="其他"
  104. end if
  105. '-----------------获得社群成员数----------------------
  106. if GroupMembers<>"" then
  107. GroupMembersArray=split(GroupMembers,",")
  108. end if
  109. '------------------------------------------
  110. Response.Write("<tr><td>")
  111. Response.Write("<table width='100%' height='60' border='0' cellpadding='1' cellspacing='1' class='table'>"&vbcrlf)
  112. Response.Write("<tr class='xingmu'><td colspan=10><a href='Group_unit.asp?GDID="&GroupID&"' class=""Top_Navi""><img src=""images/GroupUser.gif"" border=""0""/><strong>"&GroupName&"</strong></a></td></tr>"&vbcrlf)
  113. Response.Write("<tr height='20'>"&vbcrlf)
  114. Response.Write("<td align='center' class='hback'>现有成员</td>"&vbcrlf)
  115. Response.Write("<td class='hback' align='center' width='20%'>创建时间</td>"&vbcrlf)
  116. Response.Write("<td class='hback' align='center' width='12%'>创建人</td>"&vbcrlf)
  117. Response.Write("<td class='hback' align='center'>管理员</td>"&vbcrlf)
  118. Response.Write("<td class='hback' align='center'>所属行业</td>"&vbcrlf)
  119. Response.Write("</tr>"&vbcrlf)
  120. Response.Write("<tr>"&vbcrlf)
  121. if instr(GroupMembers,",")>0 then
  122. Response.Write("<td align='center' class='hback'>"&Ubound(GroupMembersArray)+1&"人</td>"&vbcrlf)
  123. else
  124. Response.Write("<td align='center' class='hback'>0人</td>"&vbcrlf)
  125. end if
  126. Response.Write("<td class='hback' align='center' width='20%'>"&Datevalue(AddTime)&"</td>"&vbcrlf)
  127. Response.Write("<td class='hback' align='center' width='12%'>"&GroupCreater&"</td>"&vbcrlf)
  128. Response.Write("<td class='hback' align='center'>"&GroupManager&"</td>"&vbcrlf)
  129. Response.Write("<td class='hback' align='center'>"&ClassType&"</td>"&vbcrlf)
  130. Response.Write("</tr>"&vbcrlf)
  131. Response.Write("<tr height='40'>"&vbcrlf)
  132. Response.Write("<td class='hback' colspan=5><img src=""images/GroupNews.gif""/>:"&CroupContent&"</td>"&vbcrlf)
  133. Response.Write("</tr>"&vbcrlf)
  134. Response.Write("</table>")
  135. Response.Write("</td></tr>")
  136. GroupRs.movenext
  137. next
  138.   %>
  139.   <%
  140. Response.Write("<tr>"&vbcrlf)
  141. Response.Write("<td align='right' colspan='5'  class=""hback"">"&fPageCount(GroupRs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)&"</td>"&vbcrlf)
  142. Response.Write("</tr>"&vbcrlf)
  143. %>
  144.             </table></td> 
  145.           <td width="32%" valign="top"> <table width="98%"  border="0" align="center" cellpadding="1" cellspacing="1" class="table"> 
  146.               <tr> 
  147.                 <td height="27" class="xingmu"><span class="bigtitle"><strong>·热门社群</strong></span></td> 
  148.               </tr> 
  149. <%
  150. HotGroupNumber=5
  151. Set TempRs=User_Conn.execute("Select gdID,title from FS_ME_GroupDebateManage order by hits desc")
  152. for ForIndex=0 to HotGroupNumber
  153. if TempRs.eof then exit for
  154. Response.Write("<tr class='hback'>"&vbcrlf)
  155. Response.Write("<td  valign='top' align='left' height='20'>&nbsp;"&ForIndex+1&".<a href='Group_unit.asp?GDID="&TempRs("gdID")&"'>"&TempRs("title")&"</a></td>"&vbcrlf)
  156. Response.Write("</tr>"&vbcrlf)
  157. TempRs.movenext
  158. next
  159. %>
  160.             </table> 
  161.             <table width="98%"  border="0" align="center" cellpadding="3" cellspacing="1" class="table"> 
  162.               <tr> 
  163.                 <td width="50%" height="27"  class="xingmu"><span class="bigtitle"><strong>·社群排行</strong></span></td> 
  164.               </tr> 
  165.   <%
  166. ForwardNumber=5
  167. Set TempRs=User_Conn.execute("Select gdID,title from FS_ME_GroupDebateManage order by ClassMemberNum desc")
  168. for ForIndex=0 to ForwardNumber
  169. if TempRs.eof then exit for
  170. Response.Write("<tr class='hback'>"&vbcrlf)
  171. Response.Write("<td  valign='top' align='left' height='20'>&nbsp;"&ForIndex+1&".<a href='Group_unit.asp?GDID="&TempRs("gdID")&"'>"&TempRs("title")&"</a></td>"&vbcrlf)
  172. Response.Write("</tr>"&vbcrlf)
  173. TempRs.movenext
  174. next
  175.   %>
  176.             </table> 
  177.             <table width="98%" height="124" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> 
  178.               <tr> 
  179.                 <td width="50%" height="27"  class="xingmu"><span class="bigtitle"><strong>·社群分类</strong></span></td> 
  180.               </tr> 
  181.               <tr> 
  182.                 <td height="94" valign="top" class="hback">新闻,下载,商品,房产,供求,求职,招聘,其它 </td> 
  183.               </tr> 
  184.             </table></td> 
  185.         </tr> 
  186.       </table></td> 
  187.   </tr> 
  188.   <tr class="back"> 
  189.     <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  190.         <!--#include file="Copyright.asp" --> 
  191.       </div></td> 
  192.   </tr> 
  193. </table> 
  194. </body>
  195. </html>
  196. <%
  197. Set GroupRs=nothing
  198. Set User_Conn=nothing
  199. Set TempRs=nothing
  200. Set Fs_User = Nothing
  201. %>
  202. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->