<% Dim strSQL, criteria, searchTerm, orderSC, currpage, searchTop, perPage, totalMem, pages, innerOrder Dim totalQualifiedMem, restrictedWhere dim objRS, arrMemList, iMem, maxShortMsg, criteriaSQL, outerorder, allforum,view,gid,showGroupInfo, showGroupMember Dim allmoderators:allmoderators = "" if not isGuest then criteria = request.queryString("criteria") searchTerm = SQLStrip(trim(request.queryString("searchTerm"))) orderSC = request.queryString("orderSC") currpage = request.queryString("currpage") view = lcase(request.querystring("view")&"") gid = request.querystring("gid")&"" showGroupInfo = false showGroupMember = false if view = "group" then if len(gid)<>0 and isNumeric(gid) then showGroupMember = true end if elseif view="groupinfo" then showGroupInfo = true end if perPage = Application(dbName&"tpg") totalMem = Application(dbName&"totalmem") maxShortMsg = Application(dbName&"maxShortMsg") restrictedWhere = "" allforum = Application(dbName&"foruminfo") if isArray(allforum) then Dim moderatorArray:moderatorArray = ExtractOneDimension(allforum, 11) allmoderators = Join(moderatorArray,",") end if if not IsNumeric(currpage) then currpage = 1 else if cint(currpage)<1 then currpage = 1 else currpage = cint(currpage) end if SELECT Case criteria Case "1" criteriaSQL = "login" Case "2" criteriaSQL = "totalposts" restrictedWhere = "AND totalposts>0" Case "3" criteriaSQL = "datesignup" Case "4" criteriaSQL = "location" restrictedWhere = "AND location<>''" Case else criteriaSQL = "login" End SELECT if criteriaSQL = "login" and searchTerm<>"" then restrictedWhere = "AND login like '"&searchTerm&"%'" end if SELECT CASE orderSC Case "2" outerorder = "DESC" innerorder = "ASC" Case else outerorder = "ASC" innerorder = "DESC" End SELECT 'Get the group lists Dim arrGroups set objRS = server.createobject("adodb.recordset") with objRS .CacheSize = 150 .open dbOwnerPrefix&"spGetGroupListForMemberList("&memID&","&iff(isBMan or isUMan,"1","0")&")", datastore, , , adCmdStoredProc If not (.EOF or .BOF) then arrGroups = .getrows End if .close end with set objRS=nothing Dim allAvailableGroups:allAvailableGroups = iff(isArray(arrGroups),join(extractonedimension(arrGroups,0),","),"-4000") Dim sqlGroupWhere:sqlGroupWhere = "" Dim extraqString:extraqString = "" if showGroupMember then extraqString = "&view=group&gid="&gid Dim sameSQL sameSQL = " AND GM.GID = "&gid&" AND Exists(SELECT GID FROM pgd_usergroup UG with (nolock) WHERE UG.GID=GM.GID"&_ iff(isAdmin,""," AND UG.GID in ("&allAvailableGroups&")")&_ "))" sqlGroupWhere = " AND exists (SELECT mem FROM pgd_groupMember GM with (nolock) WHERE GM.mem = pgd_members.mem"&sameSQL end if ' End Get the group lists Dim strShowHiddenUsers:strShowHiddenUsers = "" if not (isAdmin or Application(dbName&"allowHideProfile") = 0) then strShowHiddenUsers = " and (hideprofile=0 or (hideprofile=1 and mem="&memID&")) " end if if not showGroupInfo then Set objRS = Server.CreateObject("adodb.recordset") with objRS .open "SELECT count(*) FROM pgd_members with (nolock) WHERE Mem>-1 and banned=0 and regstatus=0 "&strShowHiddenUsers&restrictedWhere&sqlGroupWhere, datastore, , , adCmdText totalQualifiedMem = .fields(0).value .close if (totalQualifiedMem mod perPage) <> 0 then pages = (totalQualifiedMem\perPage)+1 else pages = (totalQualifiedMem\perPage) if currpage>pages then currpage = pages if currpage*perPage > totalQualifiedMem then searchTop = totalQualifiedMem - (currpage-1)*perPage else searchTop = perPage end if if currpage < pages/2 then strSQL = "SELECT m.Mem, m.Login, m.dateSignUp, m.Email, m.Homepage, m.emailview, m.location, m.totalposts, m.AcceptShortMsg, m.ICQ, m.Yahoo, m.AOL, m.allowShortMsg, m.customTitle, m.score FROM pgd_members m with (nolock) "&_ "INNER JOIN "&_ "(SELECT TOP "&searchTop&" "&criteriaSQL&", Mem FROM "&_ " (SELECT TOP "&currpage*perPage&" "&criteriaSQL&", Mem FROM pgd_Members with (nolock) WHERE (Banned=0 AND regStatus=0 "&strShowHiddenUsers&restrictedWhere&sqlGroupWhere&") ORDER BY "&criteriaSQL&" "&outerorder&") j "&_ " ORDER BY j."&criteriaSQL&" "&innerOrder&_ ") t "&_ "ON m.Mem = t.Mem "&_ "WHERE (m.Mem>-1 ) "&_ "ORDER BY t."&criteriaSQL&" "&outerorder else Dim specialTop, lastPageNum lastPageNum = totalQualifiedMem - (currpage-1)*perPage if currpage = pages then specialTop = lastPageNum else specialTop = perPage strSQL = "SELECT TOP "&specialTop&" m.Mem, m.Login, m.dateSignUp, m.Email, m.Homepage, m.emailview, m.location, m.totalposts, m.AcceptShortMsg, m.ICQ, m.Yahoo, m.AOL, m.allowShortMsg, m.customTitle, m.score FROM pgd_members m with (nolock) "&_ "INNER JOIN "&_ "(SELECT TOP "&lastPageNum&" "&criteriaSQL&", Mem FROM pgd_Members with (nolock) "&_ " WHERE (Banned=0 AND regStatus=0 "&strShowHiddenUsers&restrictedWhere&sqlGroupWhere&") "&_ " ORDER BY "&criteriaSQL&" "&innerOrder&_ ") t "&_ "ON m.Mem = t.Mem "&_ "WHERE (m.Mem>-1 ) "&_ "ORDER BY t."&criteriaSQL&" "&outerorder end if ' response.write ("") ' response.end .cacheSize = perPage .open strSQL, datastore, , , adCmdText if not .eof or not .bof then _ arrMemList = .getrows .close end with set objRS = nothing end if end if function NullHandler(ByRef str) if isNull(str) or str="" then NullHandler = " " else NullHandler = str end function function underCriteria(criteria, searched, columnName) if lcase(searched)=lcase(criteria) then columnName = ""&columnName&"" underCriteria = columnName end function %> <%= Application(dbName&"forumtitle") %> <%= OutputCSS() %> > <% if isGuest then %> <% call headerHTML() %>
<%= RightViolationMessage %>


<% call footerHTML() %> <% response.end %> <% end if %> <% call headerHTML() %> <% if not showGroupInfo then %>
<%= allForumDesc %> >> <%= MemberListDesc %>
>
: : <%= memListQuick %> : :
<%= iff(view="group","","") %>
colspan="3" class="cat"> <% Dim iAscii %> <% for iAscii = 65 to 90 %> <% next %>
<% call memberListResult(1) %>
<% dim cellcolor:cellcolor = tablealt dim timeoffset:timeoffset = Application(dbName&"timeoffset") dim Mem, Login, dateSignUp, Email, Homepage, emailview, location, totalposts, acceptShortMsg, ICQ, Yahoo, AOL, allowShortMsg dim disEmail, disAcceptShortMsg, disHomepage, disICQ, disYahoo, disAOL, customTitle, score dim allowmail:allowmail = Application(dbName&"maildll") if isArray(arrMemList) then for iMem = 0 to ubound(arrMemList,2) '-----0-----1---------2--------3-------4---------5----------6-----------7-----------8 if cellcolor = tablealt then cellcolor = tableinside else cellcolor = tablealt Mem = arrMemList(0,iMem) Login = arrMemList(1,iMem) dateSignUp = arrMemList(2,iMem) Email = arrMemList(3,iMem) Homepage = HTMLEncode(""&arrMemList(4,iMem)) emailview = arrMemList(5,iMem) location = HTMLEncode(""&arrMemList(6,iMem)) totalposts = arrMemList(7,iMem) acceptShortMsg = arrMemList(8,iMem) ICQ = HTMLEncode(""&arrMemList(9,iMem)) Yahoo = HTMLEncode(""&arrMemList(10,iMem)) AOL = HTMLEncode(""&arrMemList(11,iMem)) allowShortMsg = arrMemList(12,iMem) customTitle = JSEncode(""&arrMemList(13,iMem)) score = arrMemList(14,iMem) disEmail = "" disAcceptShortMsg = "" disHomepage = "" disICQ = "" disYahoo = "" disAOL = "" if emailview = 0 and not isAdmin then disEmail = "" else if allowmail<>"NoMail" then disEmail = "" end if if NullHandler(ICQ)<>" " then _ disICQ = "" if NullHandler(yahoo)<>" " then _ disYahoo = "" if NullHandler(AOL)<>" " then _ disAOL = "" if maxShortMsg <> 0 then if (acceptShortMsg = 1 AND allowShortMsg =1) or isAdmin then _ disAcceptShortMsg = "" end if if len(""&score) = 0 then score = "0" if NullHandler(Homepage)<>" " then if left(homepage,4) = "http" then disHomepage = "" Else disHomepage = "" End If End if %> <% next %> <% else %> <% end if %>
<%= memListContact %> <%= underCriteria("login",criteriaSQL,tmName) %> <%= underCriteria("totalposts",criteriaSQL,memberTotalPostDesc) %> <%= underCriteria("dateSignUp",criteriaSQL,memberSinceDesc) %> <%= underCriteria("location",criteriaSQL,memberFromDesc) %>  
" else disEmail = "" end if disEmail = disEmail & ""&ICQ&""&yahoo&""&AOL&""&memListPM&""&Homepage&""&Homepage&"
> <%= disAcceptShortMsg %> <%= disEmail %> <%= disHomepage %> <%= disICQ %> <%= disYahoo %> <%= disAOL %>
><%= Login %> > ><%= totalposts %> ><%= SQLdate(dateSignUp, timeoffset, false) %> ><%= NullHandler(location) %> >
class="cat" colspan="7" align="right">
>
<%= srProNoFoundDesc %>

<% call memberListResult(2) %>
<% if currpage<>1 then %>   <% end if %> <% if currpage<>pages then %>   <% end if %>

<% if showGroupMember then Dim arrPending,i,isManager,objCom set objRS = server.createobject("adodb.recordset") objRS.CacheSize = 100 set objCom = server.createobject("adodb.command") With objCom .activeConnection = datastore .commandText = dbOwnerPrefix&"spGetPendingMember" .commandType = adCmdStoredProc .Parameters.Append .Createparameter("@RETURN_VALUE", adInteger, adParamReturnValue, 0 ) .Parameters.Append .Createparameter("@gid", adInteger, adParamInput, 0, gid) .Parameters.Append .Createparameter("@memId", adInteger, adParamInput, 0, memID) .Parameters.Append .Createparameter("@isManager", adUnsignedTinyInt, adParamOutput, 0) set objRS = .execute if not objRS.EOF then arrPending = objRS.getrows end if objRS.close set objRS=nothing isManager = .parameters("@isManager") End With set objCom = nothing Dim rowColor:rowColor = tablealt if isArray(arrPending) then %>
<% for i=0 to ubound(arrPending,2) if rowColor = tablealt then rowColor = tableinside else rowColor = tablealt %> > <% next %>
<%= memGroupPendingMember %> <%= memGroupPendingDate %> <%= memGroupGMHeader %>
<%= arrPending(1,i) %> <%= SQLDate(arrPending(2,i),timeoffset,true) %> <% if isManager = 0 then %> <%= memGroupPendingDesc %> <% Elseif isManager = 1 then %> <%= memGroupGMOption %> <% End If %>
<% End If %> <% End If %> <% Else Dim allGroups set objRS = server.createobject("adodb.recordset") with objRS .CacheSize = 150 .open dbownerprefix&"spGetGroupList("&memID&")", datastore, , , adCmdStoredProc If not (.EOF or .BOF) then allGroups = .getrows End if .close end with set objRS=nothing %>
<%= allForumDesc %> >> <%= MemberListDesc %> >> <%= memGroupViewDesc %>
<% If isArray(allGroups) Then %> <% Set fStr = new StringBuilder Dim yesgif, nogif yesgif = "" nogif = "" for iGType = 3 to iff(isBMan,1,2) step -1 fStr.Append (" ") fStr.Append ("") fStr.Append ("") isSub=false for iGrp = 0 to ubound(allGroups,2) if allGroups(3,iGrp) = iGType then Dim decideShowGroupOrNot:decideShowGroupOrNot = false 'admin can see all, show all public, hide private if can't join, show private is member Dim isAPossibleMember:isAPossibleMember = iff(iGType=3 or isBMan or isUMan,true,isThisMemberAModSomeWhere(allGroups(0,iGrp), allAvailableGroups)) if not isAPossibleMember then if allGroups(5,iGrp)=1 then decideShowGroupOrNot = true else decideShowGroupOrNot = true end if if decideShowGroupOrNot then fStr.Append (" ") fStr.Append ("") fStr.Append ("") fStr.Append ("") fStr.Append ("") fStr.Append ("") fStr.Append ("") isSub = true end if end if next if isSub then response.write (fStr.value) fStr.reset next %> <% else %> > <% end if %>
<%= memGroupNameDesc %> <%= memGroupDescDesc %> <%= memGroupManagerDesc %> <%= memGroupJoinDesc %>
" & memGroupDesc(iGType) & "
") fStr.Append (iff(allGroups(10,iGrp)=1,yesgif,nogif)) fStr.Append ("") if isAPossibleMember then fStr.Append ("") end if fStr.Append (iff((allGroups(4,iGrp)&""=memID) or isBMan or isUMan,"","")) fStr.Append ("" & HTMLEncode(""&allGroups(1,iGrp)) & " (" & allGroups(7,iGrp) & ")") fStr.Append ("") fStr.Append (HTMLEncode(""&allGroups(2,iGrp))) fStr.Append ("") fStr.Append (iff(isNull(allGroups(4,iGrp))," ",""&allGroups(6,iGrp)&" ")) fStr.Append (iff(isNull(allGroups(4,iGrp)) or not (maxshortMsg<>0 and ((allGroups(8,iGrp)=1 and allGroups(9,iGrp)=1) or isadmin)),""," ")) fStr.Append (iff(isNull(allGroups(4,iGrp)),""," ")) fStr.Append ("") if not (allGroups(5,iGrp)=0 or iGType=1) then if allGroups(10,iGrp)=0 and allGroups(11,iGrp)=0 then fStr.Append ("") elseif allGroups(10,iGrp)=0 and allGroups(11,iGrp)=1 then fStr.Append ("") else fStr.Append (" ") end if else fStr.Append (" ") end if fStr.Append ("
<%= memGroupNoGroupDesc %>


<%= yesgif %><%= memGroupIsMember %>
<%= nogif %><%= memGroupIsNotMember %>
<% End If %>

<% call footerHTML() %>