⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 members.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	      http://www.ChinaXP.Net/bbs/    中国在线--极酷论坛
'#
'#############################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<script language="JavaScript">
function ChangePage(){
	document.PageNum.submit();
}
</script>
<%
Dim	srchUName
Dim	srchFName
Dim	srchLName
Dim	srchState
Dim srchInitial


Function sGetColspan(lIN, lOUT)	
if (strShowModerators = "1") Then lOut = lOut + 1	
If (mlev = "4" or mlev = "3") then lOut = lOut + 1		
If lOut > lIn then
	sGetColspan = lIN
Else
	sGetColspan = lOUT	
End If
End Function

if Request.QueryString("method") <> "" then
	SortMethod = Request.QueryString("method")
end if

SearchName = Request("M_NAME")
if SearchName = "" then
	SearchName = Request.Form("M_NAME")
end if


	srchUName = Request("UserName")
	srchFName = Request("FirstName")
	srchLName = Request("LastName")
	srchInitial = Request("INITIAL")
	if Request("State") <> "" then
		srchState = Request("State")
	end if

If Request("mode") = "" then
	Method = "search"
Else
	Method = trim(Request("mode"))
End If

If Request.QueryString("whichpage") = "" or Request.QueryString("whichpage") <= 0 then
	mypage = 1
Else
	mypage = CINT(Request.QueryString("whichpage"))
End If

mySQL = request("strSql")
if mySQL = "" then
	mySQL = SQLtemp
end if
'New Search Code
If Method = "search"  and (srchUNAME = "1" or srchFNAme = "1" or srchLName = "1" or srchState = "1" or srchInitial = "1" ) then

	strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_STATUS, " & strMemberTablePrefix & "MEMBERS.M_NAME, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_LEVEL, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strMemberTablePrefix & "MEMBERS.M_COUNTRY, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " & strMemberTablePrefix & "MEMBERS.M_ICQ, " & strMemberTablePrefix & "MEMBERS.M_YAHOO, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_AIM, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_POSTS, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE, " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " & strMemberTablePrefix & "MEMBERS.M_DATE, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_PMRECEIVE, " & strMemberTablePrefix & "MEMBERS.M_STATE "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
if Request.querystring("link") <> "sort" then
	whereSql = " WHERE ("
	tmpSql = ""
	if srchState <> "1" then
		if srchUName = "1" then
			tmpSql = tmpSql & strMemberTablePrefix & "MEMBERS.M_NAME LIKE '%" & SearchName & "%' OR "
			tmpSql = tmpSql & strMemberTablePrefix & "MEMBERS.M_USERNAME LIKE '%" & SearchName & "%'"
		end if
		if srchFName = "1" then
			if srchUName = "1" then
					tmpSql = tmpSql & " OR "
			end if
			tmpSql = tmpSql & strMemberTablePrefix & "MEMBERS.M_FIRSTNAME LIKE '%" & SearchName & "%'"
		end if
		if srchLName = "1" then
			if srchFName = "1" or srchUName = "1" then
				tmpSql = tmpSql & " OR "
			end if
			tmpSql = tmpSql & strMemberTablePrefix & "MEMBERS.M_LASTNAME LIKE '%" & SearchName & "%' "
		end if
		if srchInitial = "1" then
			tmpSQL = strMemberTablePrefix & "MEMBERS.M_NAME LIKE '" & SearchName & "%'"
		end if
	else
		tmpSql = tmpSql & strMemberTablePrefix & "MEMBERS.M_STATE LIKE '%" & SearchName & "%'"
	end if
	whereSql = whereSql & tmpSql &")"
	Session(strCookieURL & "where_Sql") = whereSql
end if	

	if Session(strCookieURL & "where_Sql") <> "" then
		whereSql = Session(strCookieURL & "where_Sql")
	else
		whereSql = ""
	end if
	strSQL = strSql & whereSql
else
	'## Forum_SQL - Get all active topics from last visit
	strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_STATUS, " & strMemberTablePrefix & "MEMBERS.M_NAME, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_LEVEL, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strMemberTablePrefix & "MEMBERS.M_COUNTRY, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " & strMemberTablePrefix & "MEMBERS.M_ICQ, " & strMemberTablePrefix & "MEMBERS.M_YAHOO, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_AIM, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_POSTS, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE, " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " & strMemberTablePrefix & "MEMBERS.M_DATE, "
	strSql = strSql & strMemberTablePrefix & "MEMBERS.M_PMRECEIVE "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
    if Method<>"Admin" then
	if mlev = 4 then
		strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME <> 'n/a' "
	else
		strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
	end if
    else
		strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_LEVEL >= 2 "
		strSql = strSql & "AND " & strMemberTablePrefix & "MEMBERS.M_NAME <> 'Admin' "
    end if
end if
select case SortMethod
	case "nameasc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "namedesc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME DESC"
	case "levelasc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_TITLE ASC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "leveldesc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_TITLE DESC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "lastpostdateasc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE ASC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "lastpostdatedesc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE DESC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "lastheredateasc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE ASC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "lastheredatedesc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE DESC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "dateasc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_DATE ASC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "datedesc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_DATE DESC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "countryasc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_COUNTRY ASC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "countrydesc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_COUNTRY DESC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case "postsasc"
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_POSTS ASC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
	case else
		strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_POSTS DESC, " & strMemberTablePrefix & "MEMBERS.M_NAME ASC"
end select
if strDBType = "mysql" then 'MySql specific code
	if mypage > 1 then
		OffSet = CInt((mypage - 1) * strPageSize)
		strSql = strSql & " LIMIT " & OffSet & ", " & strPageSize & " "
	end if

	'## Forum_SQL - Get the total pagecount
	strSql2 = "SELECT COUNT(" & strMemberTablePrefix & "MEMBERS.MEMBER_ID) AS PAGECOUNT "
	strSql2 = strSql2 & " FROM " & strMemberTablePrefix & "MEMBERS "
	if mlev = 4 then
		strSql2 = strSql2 & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME <> 'n/a' "
	else
		strSql2 = strSql2 & " WHERE " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
	end if


	set rsCount = my_Conn.Execute(strSql2)
	if not rsCount.eof then
		maxpages = (rsCount("PAGECOUNT")  \ strPageSize )
			if rsCount("PAGECOUNT") mod strPageSize <> 0 then
				maxpages = maxpages + 1
			end if
		maxRecs = cint(strPageSize) * maxPages
	else
		maxpages = 0
	end if

	rsCount.close
	
	set rs = Server.CreateObject("ADODB.Recordset")

	rs.open  strSql, my_Conn, 3
	
	if not (rs.EOF or rs.BOF) then
		rs.movefirst
	end if

else 'end MySql specific code

	Set rs = Server.CreateObject("ADODB.RecordSet")
	rs.cachesize=20

	rs.open  strSql, my_conn, 3

	if not (rs.EOF or rs.BOF) then  '## No members found in DB
		RS.movefirst
		RS.PageSize = strPageSize
		RS.CacheSize = RS.PageSize
		maxPages = cint(RS.PageCount)
		maxRecs = cint(RS.PageSize)
		If myPage > RS.PageCount Then
			myPage = RS.PageCount
		end if
		RS.AbsolutePage = myPage

		StartPageNum=1
		do while StartPageNum+10<=myPage
			StartPageNum = StartPageNum+10
		Loop
		EndPageNum = StartPageNum+9
		If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount
	end if
end if
%>

<% '################################## %>
	<TD width="70%" align="left" valign="top">
<TABLE border="0" width="85%" align=center>
  <TR>
    <TD width="33%" align="left" nowrap><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><a href="default.asp"><img src="<% =strImageURL %>icon_folder_open.gif" alt="返回论坛首页" border="0">&nbsp;<% =strForumTitle %></a>
<BR><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% =strImageURL %>icon_folder_open_topic.gif" border="0">&nbsp;论坛会员列表
</FONT></TD>
  </TR>
</TABLE>
</TD>
</TR>
</TABLE>
<% '################################## %>

<table width="<% Response.Write strTableWidth %>" align="center" border="0">
  <tr>
    <td></td>
    <td align="right">
<% if maxpages > 1 then %>
    <table border=0 align="right">
      <tr>
        <td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>指定页数:</b></font></td>
        <td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% Call Paging2() %></font></td>
      </tr>
    </table>
<% else %>
&nbsp;
<% end if %>
    </td>
  </tr>
</table>
<br>
<table border="0" width="80%" cellspacing="1" cellpadding="4" align="center" bgcolor="<% =strTableBorderColor %>">
 <tr>
 <form action="members.asp?method=<%=SortMethod %>" method="post" name="SearchMembers">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -