This code doesn't work yet... but I'm posting it so that I can pick up where i left off when I get home tonight.
This is going to go into the post.asp (will still have to work the logic in for post_info.asp
<%
'#################################################################################
'## Moderator Admin - listbox Code
'#################################################################################
if strRqMethod = "Forum" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "EditForum" then
if strRqMethod = "EditForum" or _
strRqMethod = "EditURL" then
ForumAuthType = rs("F_PRIVATEFORUMS")
else
ForumAuthType = 0
end if
%>
<tr>
<td bgColor="<% =strPopUpTableColor %>" noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Moderator List:</b></font></td>
<%
' '## Forum_SQL - select all members from the Database
' strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME "
' strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
' strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME ASC;"
'## Forum_SQL - select all members from the Database
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_LEVEL > 1 "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME ASC;"
on error resume next
set rsModeratorList = my_Conn.Execute(strSql)
' '## Forum_SQL - Pull Partial List of only allowed members from Database
' strSql = "SELECT " & strTablePrefix & "ALLOWED_MEMBERS.MEMBER_ID "
' strSql = strSql & " FROM " & strTablePrefix & "ALLOWED_MEMBERS "
' strSql = strSql & " WHERE " & strTablePrefix & "ALLOWED_MEMBERS.FORUM_ID = " & strRqForumID
'## Forum_SQL - Pull List of existing Moderators from the Database
strSql = "SELECT " & strTablePrefix & "MODERATOR.FORUM_ID, " & strTablePrefix & "MODERATOR.MEMBER_ID, " & strTablePrefix & "MODERATOR.MOD_TYPE, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM " & strTablePrefix & "MODERATOR, " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strTablePrefix & "MODERATOR.MEMBER_ID = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID"
strSql = strSql & " AND " & strTablePrefix & "MODERATOR.FORUM_ID = " & strRqForumId
set rsActualModerator = my_Conn.Execute(strSql)
tmpStrUserList = ""
if strRqMethod = "EditForum" or strRqMethod = "EditURL" then
do while not (rsActualModerator.EOF or rsActualModerator.BOF)
if tmpStrUserList = "" then
tmpStrUserList = rsActualModerator("MEMBER_ID")
else
tmpStrUserList = tmpStrUserList & "," & rsActualModerator("MEMBER_ID")
end if
rsActualModerator.movenext
loop
end if
SelectSize = 10
%>
<td bgColor="<% =strPopUpTableColor %>">
<table>
<tr>
<td>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Forum Moderators:</b></font><br>
<select name="AuthUsersCombo" size="<%=SelectSize %>" multiple >
<%
'## Pick from list
rsModeratorList.movefirst
do until rsModeratorList.eof
if not(Instr("," & tmpStrUserList & "," , "," & rsModeratorList("MEMBER_ID") & ",",1) > 0) then
Response.Write " <option value=""" & rsModeratorList("MEMBER_ID") & """" & isSel & ">" & ChkString(rsModeratorList("M_NAME"),"display") & "</option>" & vbCrLf
end if
rsModeratorList.movenext
loop
%>
<option value="<% if tmpStrUserList <> "" then Response.Write tmpStrUserList end if %>"></option>
</select>
</td>
<td width="15" align="center" valign="middle">
<a href="javascript:MoveWholeList('Del')"><img src="icon_Private_remall.gif" width="23" height="22" border="0" alt=""></a>
<a href="javascript:InsertSelection('Del')"><img src="icon_Private_remove.gif" width="23" height="22" border="0" alt=""></a>
<a href="javascript:InsertSelection('Add')"><img src="icon_Private_add.gif" width="23" height="22" border="0" alt=""></a>
<a href="javascript:MoveWholeList('Add')"><img src="icon_Private_addall.gif" width="23" height="22" border="0" alt=""></a>
</td>
<td>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Select Members:</b></font><br>
<select name="AuthUsers" size="<%=SelectSize %>" multiple >
<%
'## Selected List
rsActualModerator.movefirst
if strRqMethod = "EditForum" or strRqMethod = "EditURL" then
do until rsActualModerator.EOF
Response.Write " <option value=""" & rsActualModerator("MEMBER_ID") & """>" & ChkString(getMemberName(rsActualModerator("MEMBER_ID")),"display") & "</option>" & vbCrLf
rsActualModerator.movenext
loop
end if
set rsActualModerator = nothing
%>
<option value="<% if tmpStrUserList <> "" then Response.Write tmpStrUserList end if %>"></option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<%
end if
'#################################################################################
'## Moderator Admin - End of listbox code
'#################################################################################
%>
Reinsnitz (Mike)
><)))'> Need a Mod?
"Therefore go and make disciples of all nations,..." Matthew 28:19a