📄 members.asp
字号:
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.05
'#################################################################################
'## Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%
if strDBNTUserName = "" then
Err_Msg = "<li>You must be logged in to view the Members List</li>"
Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>You must be logged in to view this page</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
" <br />" & vbNewLine
WriteFooter
Response.End
end if
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" function ChangePage(fnum){" & vbNewLine & _
" if (fnum == 1) {" & vbNewLine & _
" document.PageNum1.submit();" & vbNewLine & _
" }" & vbNewLine & _
" else {" & vbNewLine & _
" document.PageNum2.submit();" & vbNewLine & _
" }" & vbNewLine & _
" }" & vbNewLine & _
" </script>" & vbNewLine
if trim(chkString(Request("method"),"SQLString")) <> "" then
SortMethod = trim(chkString(Request("method"),"SQLString"))
strSortMethod = "&method=" & SortMethod
strSortMethod2 = "?method=" & SortMethod
end if
if trim(chkString(Request("mode"),"SQLString")) <> "" then
strMode = trim(chkString(Request("mode"),"SQLString"))
if strMode <> "search" then strMode = ""
end if
SearchName = trim(chkString(Request("M_NAME"),"SQLString"))
if SearchName = "" then
SearchName = trim(chkString(Request.Form("M_NAME"),"SQLString"))
end if
if Request("UserName") <> "" then
if IsNumeric(Request("UserName")) = True then srchUName = cLng(Request("UserName")) else srchUName = "1"
end if
if Request("FirstName") <> "" then
if IsNumeric(Request("FirstName")) = True then srchFName = cLng(Request("FirstName")) else srchFName = "0"
end if
if Request("LastName") <> "" then
if IsNumeric(Request("LastName")) = True then srchLName = cLng(Request("LastName")) else srchLName = "0"
end if
if Request("INITIAL") <> "" then
if IsNumeric(Request("INITIAL")) = True then srchInitial = cLng(Request("INITIAL")) else srchInitial = "0"
end if
mypage = trim(chkString(request("whichpage"),"SQLString"))
if ((mypage = "") or (IsNumeric(mypage) = FALSE)) then mypage = 1
mypage = cLng(mypage)
'New Search Code
If strMode = "search" and (srchUName = "1" or srchFName = "1" or srchLName = "1" or srchInitial = "1" ) then
strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_LEVEL, M_EMAIL, M_COUNTRY, M_HOMEPAGE, "
strSql = strSql & "M_AIM, M_ICQ, M_MSN, M_YAHOO, M_TITLE, M_POSTS, M_LASTPOSTDATE, M_LASTHEREDATE, M_DATE "
strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS "
' if Request.querystring("link") <> "sort" then
whereSql = " WHERE ("
tmpSql = ""
if srchUName = "1" then
tmpSql = tmpSql & "M_NAME LIKE '%" & SearchName & "%' OR "
tmpSql = tmpSql & "M_USERNAME LIKE '%" & SearchName & "%'"
end if
if srchFName = "1" then
if srchUName = "1" then
tmpSql = tmpSql & " OR "
end if
tmpSql = tmpSql & "M_FIRSTNAME LIKE '%" & SearchName & "%'"
end if
if srchLName = "1" then
if srchFName = "1" or srchUName = "1" then
tmpSql = tmpSql & " OR "
end if
tmpSql = tmpSql & "M_LASTNAME LIKE '%" & SearchName & "%' "
end if
if srchInitial = "1" then
tmpSQL = "M_NAME 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
strSQL3 = whereSql
else
'## Forum_SQL - Get all members
strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_LEVEL, M_EMAIL, M_COUNTRY, M_HOMEPAGE, "
strSql = strSql & "M_AIM, M_ICQ, M_MSN, M_YAHOO, M_TITLE, M_POSTS, M_LASTPOSTDATE, M_LASTHEREDATE, M_DATE "
strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS "
if mlev = 4 then
strSql3 = " WHERE M_NAME <> 'n/a' "
else
strSql3 = " WHERE M_STATUS = " & 1
end if
end if
select case SortMethod
case "nameasc"
strSql4 = " ORDER BY M_NAME ASC"
case "namedesc"
strSql4 = " ORDER BY M_NAME DESC"
case "levelasc"
strSql4 = " ORDER BY M_TITLE ASC, M_NAME ASC"
case "leveldesc"
strSql4 = " ORDER BY M_TITLE DESC, M_NAME ASC"
case "lastpostdateasc"
strSql4 = " ORDER BY M_LASTPOSTDATE ASC, M_NAME ASC"
case "lastpostdatedesc"
strSql4 = " ORDER BY M_LASTPOSTDATE DESC, M_NAME ASC"
case "lastheredateasc"
strSql4 = " ORDER BY M_LASTHEREDATE ASC, M_NAME ASC"
case "lastheredatedesc"
strSql4 = " ORDER BY M_LASTHEREDATE DESC, M_NAME ASC"
case "dateasc"
strSql4 = " ORDER BY M_DATE ASC, M_NAME ASC"
case "datedesc"
strSql4 = " ORDER BY M_DATE DESC, M_NAME ASC"
case "countryasc"
strSql4 = " ORDER BY M_COUNTRY ASC, M_NAME ASC"
case "countrydesc"
strSql4 = " ORDER BY M_COUNTRY DESC, M_NAME ASC"
case "postsasc"
strSql4 = " ORDER BY M_POSTS ASC, M_NAME ASC"
case else
strSql4 = " ORDER BY M_POSTS DESC, M_NAME ASC"
end select
if strDBType = "mysql" then 'MySql specific code
if mypage > 1 then
OffSet = cLng((mypage - 1) * strPageSize)
strSql5 = " LIMIT " & OffSet & ", " & strPageSize & " "
end if
'## Forum_SQL - Get the total pagecount
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -