<% '################################################################################# '## Copyright (C) 2000 Michael Anderson and Pierre Gorissen '## '## 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 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 support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# %> <% Dim srchUName Dim srchFName Dim srchLName Dim srchState Dim srchInitial if trim(chkString(Request.QueryString("method"),"SQLString")) <> "" then SortMethod = trim(chkString(Request.QueryString("method"),"SQLString")) end if SearchName = trim(chkString(Request("M_NAME"),"SQLString")) if SearchName = "" then SearchName = trim(chkString(Request.Form("M_NAME"),"SQLString")) end if srchUName = trim(chkString(Request("UserName"),"SQLString")) srchFName = trim(chkString(Request("FirstName"),"SQLString")) srchLName = trim(chkString(Request("LastName"),"SQLString")) srchInitial = trim(chkString(Request("INITIAL"),"SQLString")) if IsNumeric(srchUName) <> True then srchUName = "1" if IsNumeric(srchFName) <> True then srchFName = "0" if IsNumeric(srchLName) <> True then srchLName = "0" if IsNumeric(srchInitial) <> True then srchInitial = "0" mypage = trim(chkString(request("whichpage"),"SQLString")) if mypage = "" then mypage = 1 end if mySQL = request("strSql") if mySQL = "" then mySQL = SQLtemp end if 'New Search Code If Request("mode") = "search" and (srchUName = "1" or srchFName = "1" or srchLName = "1" or srchInitial = "1" ) then strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " &_ strMemberTablePrefix & "MEMBERS.M_STATUS, " &_ strMemberTablePrefix & "MEMBERS.M_NAME, " &_ strMemberTablePrefix & "MEMBERS.M_LEVEL, " &_ strMemberTablePrefix & "MEMBERS.M_EMAIL, " &_ strMemberTablePrefix & "MEMBERS.M_COUNTRY, " &_ strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " &_ strMemberTablePrefix & "MEMBERS.M_ICQ, " &_ strMemberTablePrefix & "MEMBERS.M_YAHOO, " &_ strMemberTablePrefix & "MEMBERS.M_AIM, " &_ strMemberTablePrefix & "MEMBERS.M_TITLE, " &_ strMemberTablePrefix & "MEMBERS.M_POSTS, " &_ strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE, " &_ strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " &_ strMemberTablePrefix & "MEMBERS.M_DATE, " &_ strMemberTablePrefix & "MEMBERS.M_STATE " &_ " FROM " & strMemberTablePrefix & "MEMBERS " ' if Request.querystring("link") <> "sort" then whereSql = " WHERE (" tmpSql = "" 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 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 members strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " &_ strMemberTablePrefix & "MEMBERS.M_STATUS, " &_ strMemberTablePrefix & "MEMBERS.M_NAME, " &_ strMemberTablePrefix & "MEMBERS.M_LEVEL, " &_ strMemberTablePrefix & "MEMBERS.M_EMAIL, " &_ strMemberTablePrefix & "MEMBERS.M_COUNTRY, " &_ strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " &_ strMemberTablePrefix & "MEMBERS.M_ICQ, " &_ strMemberTablePrefix & "MEMBERS.M_YAHOO, " &_ strMemberTablePrefix & "MEMBERS.M_AIM, " &_ strMemberTablePrefix & "MEMBERS.M_TITLE, " &_ strMemberTablePrefix & "MEMBERS.M_POSTS, " &_ strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE, " &_ strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " &_ strMemberTablePrefix & "MEMBERS.M_DATE " &_ " FROM " & strMemberTablePrefix & "MEMBERS " if mlev = 4 then strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME <> 'n/a' " else strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 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 = strPageSize rs.open strSql, my_conn, 3 if not (rs.EOF or rs.BOF) then '## No members found in DB rs.movefirst rs.pagesize = strPageSize maxPages = cint(rs.pageCount) maxRecs = cint(rs.pageSize) rs.absolutePage = myPage maxpages = cint(rs.pagecount) end if end if %>
 All Forums
 Member Information
<% if maxpages > 1 then %>
Go to Page:    <% Call Paging2(1) %>
<% else %>   <% end if %>
Search: 
"") or (srchUName = "" and srchFName = "" and srchLName = "") ) then response.write "checked" %> >User Names    "" then response.write "checked" %> >First Name    "" then response.write "checked" %>>Last Name
For: 
button_go.gif alt="Quick Search" type="image" value="search" id=submit1 name=submit1 border=0 width="40" height="25">
All A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

<% strNames = "UserName=" & srchUName &_ "&FirstName=" & srchFName &_ "&LastName=" & srchLName &_ "&INITIAL=" &srchInitial & "&" %> <% if mlev = 4 or mlev = 3 then %> <% end if %> <% if mlev = 4 then %> <% end if %> <% if rs.EOF or rs.BOF then '## No Members Found in DB %> <% else %> <% currMember = 0 %> <% i = 0 howManyRecs = 0 rec = 1 do until rs.Eof or rec = (strPageSize + 1) if i = 1 then CColor = strAltForumCellColor else CColor = strForumCellColor end if %> <% if IsNull(rs("M_LASTPOSTDATE")) or Trim(rs("M_LASTPOSTDATE")) = "" then%> <% else %> <% end if %> <% if mlev = 4 or mlev = 3 then %> <% end if %> <% if mlev = 4 then %> <% end if %> <% currMember = rs("MEMBER_ID") rs.MoveNext i = i + 1 if i = 2 then i = 0 rec = rec + 1 loop end if %>
   ">Member Name ">Title ">Posts ">Last Post ">Member Since ">Country">Last Visit 
No Members Found
<% if strUseExtendedProfile then %> "> <% else %> ')"> <% end if %> <% if rs("M_STATUS") = 0 then %>View Member's Profile<% else %>View Member's Profile<% end if %> <% if strICQ = "1" and Trim(rs("M_ICQ")) <> "" then %> &M_NAME=<% =ChkString(rs("M_NAME"),"display") %>')">&img=5" height=15 width=15 alt="Send <% =ChkString(rs("M_NAME"),"display") %> an ICQ Message" border="0" align="absmiddle" hspace="0"> <% end if %> <% if strYAHOO = "1" and Trim(rs("M_YAHOO")) <> "" then %> &.src=pg')">Send <% =ChkString(rs( a Yahoo! Message" border="0" align="absmiddle" hspace="0"> <% end if %> <% if strAIM = "1" and Trim(rs("M_AIM")) <> "" then %> &M_NAME=<% =ChkString(rs("M_NAME"),"JSurlpath") %>')">Send <% =ChkString(rs( an instant message" border="0" align="absmiddle" hspace="0"> <% end if %> <% if strUseExtendedProfile then %> "> <% else %> ')"> <% end if %> <% =ChkString(rs("M_NAME"),"display") %> <% =ChkString(getMember_Level(rs("M_TITLE"), rs("M_LEVEL"), rs("M_POSTS")),"display") %> <% if IsNull(rs("M_POSTS")) then Response.Write("-") else Response.Write(rs("M_POSTS")) if strShowRank = 2 or strShowRank = 3 then Response.Write("
" & getStar_Level(rs("M_LEVEL"), rs("M_POSTS")) & "" ) end if end if %>
-<% =ChkDate(rs("M_LASTPOSTDATE")) %><% =ChkDate(rs("M_DATE")) %> <% =rs("M_COUNTRY") %> <% =ChkDate(rs("M_LASTHEREDATE")) %> <% if rs("MEMBER_ID") <> 1 then %> <% if rs("M_STATUS") <> 0 then %> ')">Lock Member <% else %> ')">Un-Lock Member <% end if %> <% end if if strUseExtendedProfile then %> &name=<% =ChkString(rs("M_NAME"),"urlpath") %>">Edit Member <% else %> &name=<% =ChkString(rs("M_NAME"),"urlpath") %>')">Edit Member <% end if if rs("MEMBER_ID") = 1 then %> <% '## Do Nothing %> <% else %> ')">Delete Member <% end if %>
<% if maxpages > 1 then %>
Members are <% =maxpages %> Pages Long:    <% Call Paging2(2) %>
<% else %>   <% end if %>
<% sub Paging2(int) if maxpages > 1 then if Request.QueryString("whichpage") = "" then sPageNumber = 1 else sPageNumber = Request.QueryString("whichpage") end if if Request.QueryString("method") = "" then sMethod = "postsdesc" else sMethod = Request.QueryString("method") end if sScriptName = Request.ServerVariables("script_name") Response.Write("
") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
") end if end sub sub Paging() if maxpages > 1 then if Request.QueryString("whichpage") = "" then sPageNumber = 1 else sPageNumber = Request.QueryString("whichpage") end if if Request.QueryString("method") = "" then sMethod = "postsdesc" else sMethod = Request.QueryString("method") end if sScriptName = Request.ServerVariables("script_name") Response.Write("") for counter = 1 to maxpages if counter <> cint(sPageNumber) then sNum = "" Response.Write sNum else Response.Write("") end if if counter mod strPageNumberSize = 0 then Response.Write("") end if next Response.Write("
" & " " & widenum(counter) & "" & counter & "" & " " & widenum(counter) & "" & counter & "
") end if end sub 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 %>