Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 HuwR - your members.asp replacement
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

TheMarkel
Starting Member

USA
14 Posts

Posted - 09 July 2001 :  10:57:50  Show Profile  Visit TheMarkel's Homepage  Send TheMarkel an AOL message  Send TheMarkel an ICQ Message
I'm getting the following error on running it:

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/elfwoodforum/members.asp, line 227


Is there anything I needed to have done other than just replace my existing members.asp file? I'm unclear as to what is causing this.

Thx in advance.



'move every 'sig.''


--markel

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 09 July 2001 :  12:21:33  Show Profile  Visit HuwR's Homepage
if you mail me your file I will check, what mods do you have installed?

Go to Top of Page

trakfast11
Starting Member

32 Posts

Posted - 09 July 2001 :  21:03:57  Show Profile
on your new members.asp page there is a link to add and delete moderators for admins. I like this new option, but i can't use it right now. Could you tell me what files i need in order to be able to add and delete moderators from the members page? Thanks a lot HuwR

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 July 2001 :  11:44:49  Show Profile
I also want to know the changes to be made for this function to work

gauravbhabu

There is only one miracle...That is LIFE!
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 July 2001 :  15:50:15  Show Profile
Okay I got it.

gauravbhabu

There is only one miracle...That is LIFE!
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 12 July 2001 :  14:18:01  Show Profile
quote:

on your new members.asp page there is a link to add and delete moderators for admins. I like this new option, but i can't use it right now. Could you tell me what files i need in order to be able to add and delete moderators from the members page? Thanks a lot HuwR





This is how i did it. There is some extra code which needs to be removed. Also "M_Status" check can be added to make sure the member is active when making the moderator. you also need the new members.asp which displays the Make/Remove Moderator icons.


find this in pop_profile.asp



end select

on error resume next
rs.close
set rs=nothing
if not(strUseExtendedProfile) then
%>
<!--#INCLUDE FILE="include/inc_footer_short.asp" -->
<% else %>
<!--#INCLUDE FILE="include/inc_footer.asp" -->
<% end if %>





Replace this with the following:



 
pop_profile.asp

Case "Moderator"
%>
<center><br>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Make/Remove Moderator</font></p>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><font color="red">NOTE:</font></b> Only Administrators can Make/Remove Moderators.</font></p>
<center>
<form action="pop_profile.asp?mode=goModerator" method="post" id="Form1" name="Form1">
<input type="hidden" name="Method_Type" value="<% =Request.QueryString("mode") %>">
<input type="hidden" name="MEMBER_ID" value="<% =Request.QueryString("ID") %>">
<input type="hidden" name="Name" value="<% =Request.QueryString("name") %>">
<input type="hidden" name="Action" value="<% =Request.QueryString("action") %>">
<input name="Refer" type="hidden" value="<% =Request.ServerVariables("HTTP_REFERER") %>">
<table border="0" width="75%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="<% =strPopUpBorderColor %>">
<table border="0" width="100%" cellspacing="1" cellpadding="1">
<% if strAuthType="db" then %>
<tr>
<td bgColor="<% =strPopUpTableColor %>" align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">User Name:</font></b></td>
<td bgColor="<% =strPopUpTableColor %>"><input type="text" name="User" value="<% =Request.Cookies(strUniqueID & "User")("Name")%>" size="20"></td>
</tr>
<tr>
<td bgColor="<% =strPopUpTableColor %>" align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Password:</font></b></td>
<td bgColor="<% =strPopUpTableColor %>"><input type="Password" name="Pass" value="<% =Request.Cookies(strUniqueID & "User")("Pword")%>" size="20"></td>
</tr>
<% elseif strAuthType="nt" then %>
<tr>
<td bgcolor="<% =strPopUpTableColor %>" align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">NT Account:</font></b></td>
<td bgcolor="<% =strPopUpTableColor %>"><font face="<%=strDefaultFontFace %>" size="<% =strDefaultFontSize%>"><%=Session(strCookieURL & "userid")%></font></td>
</tr>
<% end if %>
<tr>
<td bgColor="<% =strPopUpTableColor %>" colspan="2" align="center"><input type="Submit" value="Send" id="Submit1" name="Submit1"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<%

Case "goModerator"
mLev = cint(ChkUser2(STRdbntUserName, Request.Form("Pass")))
if mLev > 0 then '## is Member
if mLev = 4 then
strSql = "SELECT " & strMemberTablePrefix & "MODERATOR.MEMBER_ID"
strSql = strSql & " FROM " & strMemberTablePrefix & "MODERATOR"
strSql = strSql & " WHERE MEMBER_ID = " & Request.Form("MEMBER_ID")
set rsMod = my_Conn.Execute(strSql)

'## Forum_SQL
strSql = SelectFields()
'we only need "M_Level" and "Member_ID" fields so this may be modified.
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " WHERE MEMBER_ID = " & Request.Form("MEMBER_ID")
set rs = my_Conn.Execute(strSql)
%>
<center><br>
<% if Request.Form("Action") = "add" then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Make Moderator</font></p>
<% else
if Request.Form("Action") = "del" then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Remove Moderator</font></p>
<%end if
end if
%> <p align="center"><form action="pop_profile.asp?mode=ModerateIt&id=<% =Request.Form("MEMBER_ID")%>" method="Post" id="Form1" name="Form1">
</center>
<%
if rsMod.BOF and rsMod.EOF then
Response.Write "<center>"
if Request.Form("Action") = "add" then
Response.write "<p align=""center"">Add " & rs("M_NAME") & " to the Moderator List</p>"
%><p align="center"><input type="hidden" name="ModExists" value="N"></P><%
else
if Request.Form("Action") = "del" then
Response.write "<p align=""center"">" & rs("M_NAME") & " is not a Moderator</p>"
%><p align="center"><input type="hidden" name="ModExists" value="N"></P><%
end if
end if
else
if Request.Form("Action") = "add" then
Response.write rs("M_NAME") & " is already a Moderator</p>"
%><p align="center"><input type="hidden" name="ModExists" value="Y"></P><%
else
if Request.Form("Action") = "del" then
Response.write "<p align=""center"">Remove " & rs("M_NAME") & " from Moderator List</p>"
%><p align="center"><input type="hidden" name="ModExists" value="Y"></P><%
end if
end if
Response.Write "</center>"
end if
set rsMod = nothing

'## Display Edit Profile Page
%>

<input type="hidden" name="User" value="<% =Request.Form("User") %>">
<input type="hidden" name="Pass" value="<% =Request.Form("Pass") %>">
<input name="Refer" type="hidden" value="<% =Request.Form("Refer") %>">
<INPUT type="hidden" name="Action" value="<% =Request.Form("Action") %>">
<INPUT type="hidden" name="Level" value="<% =rs("M_LEVEL") %>">
<INPUT type="hidden" name="MEMBER_ID" value="<% =Request.Form("MEMBER_ID") %>">
<p align="center"><INPUT type="submit" value="Submit" name=Submit1></p>
<%' <!-- #include file="include/inc_profile.asp" -->%>
</form></p>
<% else %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>"><b>Only Administrators Can Make Moderators</b></font><br>
<br>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript: onClick= history.go(-1)">Go Back to Re-Authenticate</a></font></p>
<%if strUseExtendedProfile then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("members.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Members Page</a></font></p>
<%
end if
end if
else 'Not logged on or no member
%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>"><b>Only Administrators Can Make Moderators</b></font><br>
<br>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript: onClick= history.go(-1)">Go Back to Re-Authenticate</a></font></p>
<% if strUseExtendedProfile then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("members.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Members Page</a></font></p>
<%
end if
end if

Case "ModerateIt"
mLev = cint(ChkUser2(STRdbntUserName, Request.Form("Pass")))
if mLev > 0 then '## is Member
if mLev = 4 then '## is Admin
Err_Msg = ""
'## Forum_SQL
strSql = "SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME = '" & Trim(Request.Form("Name")) &"' "
strSql = strSql & " AND MEMBER_ID <> " & Trim(Request.Form("Member_ID")) &" "
set rs = my_Conn.Execute (strSql)
if rs.BOF and rs.EOF then
'## Do Nothing - proceed
else
'Err_Msg = Err_Msg & "<li>UserName is already in use, <br>Please Choose Another</li>"
end if
rs.close
set rs = nothing
Select case Request.Form("Action")
Case "add"
if ChkString(Request.Form("Level"),"") = "1" then
if Request.Form("ModExists") = "N" then
'insert into moderators table
strSql = "INSERT INTO " & strTablePrefix & "MODERATOR "
strSql = strSql & "(MEMBER_ID"
strSql = strSql & ") VALUES ("
strSql = strSql & Request.Form("MEMBER_ID")
strSql = strSql & ")"
my_Conn.Execute strSql
end if
' Update members table
strSql = ""
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_LEVEL = 2 "
strSql = strSql & " WHERE MEMBER_ID = " & Request.Form("MEMBER_ID")
my_Conn.Execute(strSql)
else
Response.Write chkString(Request.Form("Level"),"")
Err_Msg = Err_Msg & "<li>Errors occurred Member could not be made moderator</li>"
end if
Case "del"
if ChkString(Request.Form("Level"),"") = "2" then
if Request.Form("ModExists") = "Y" then
'## Forum_SQL - Remove the member from the moderator table
strSql = "DELETE FROM " & strTablePrefix & "MODERATOR "
strSql = strSql & " WHERE " & strTablePrefix & "MODERATOR.MEMBER_ID = " & Request.Form("MEMBER_ID")
my_Conn.Execute (strSql)
' Update members table
end if
strSql = ""
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_LEVEL = 1 "
strSql = strSql & " WHERE MEMBER_ID = " & Request.Form("MEMBER_ID")
my_Conn.Execute(strSql)
else
Err_Msg = Err_Msg & "<li>Member could not be deleted as moderator</li>"
end if
Case ""
Response.Write "Action could not be determined"
end select
if Err_Msg = "" then%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Profile Updated.</font></p>
<%if (strUseExtendedProfile) then%>
<meta http-equiv="Refresh" content="2; URL=<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("members.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Members Page</a></font></p>
<%end if
else %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There Was A Problem With The Details</font></p>
<table align="center">
<tr>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><center>
<ul>
<% =Err_Msg %>
</ul>
</center></font>
</td>
</tr>
</table>
<p align="center"><font size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Go Back To Enter Data</a></font></p>
<% if strUseExtendedProfile then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("members.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Members Page</a></font></p>
<%
end if
end if
else 'Member but no Admin
%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>"><b>No Permissions to Modify a Member</b></font><br>
<br>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript: onClick= history.go(-1)">Go Back to Re-Authenticate</a></font></p>
<%if strUseExtendedProfile then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Forum</a></font></p>
<%
end if
end if
else 'Not logged on or no member
%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>"><b>No Permissions to Modify a Member</b></font><br>
<br>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript: onClick= history.go(-1)">Go Back to Re-Authenticate</a></font></p>
<%if strUseExtendedProfile then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Forum</a></font></p>
<%
end if
end if
end select

on error resume next
rs.close
set rs=nothing
if not(strUseExtendedProfile) then
%>
<!--#INCLUDE FILE="include/inc_footer_short.asp" -->
<% else %>
<!--#INCLUDE FILE="include/inc_footer.asp" -->
<% end if %>


<%
function SelectFields ()
'## Forum_SQL
strSql = ""
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_NAME"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_USERNAME"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_EMAIL"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_FIRSTNAME"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_LASTNAME"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LEVEL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_TITLE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_PASSWORD"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_ICQ"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_YAHOO"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AIM"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_COUNTRY"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_POSTS"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_CITY"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_STATE"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HIDE_EMAIL"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_DATE"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_LINK1"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_LINK2"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AGE"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_MARSTATUS"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG"
SelectFields = strSql
end function
%>





gauravbhabu

There is only one miracle...That is LIFE!

Edited by - GauravBhabu on 12 July 2001 14:25:31
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 July 2001 :  08:21:33  Show Profile  Visit HuwR's Homepage
The code I use is much simpler.

At the top of pop_profile.asp, after the
include statements, insert this code

<% '############################# moderator bits ###############
if Request.QueryString("mode") = "Moderator" then
select case Request.QueryString("action")
case "del"
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_LEVEL = 1 "
strSql = strSql & " WHERE MEMBER_ID = " & Request.QueryString("ID")
my_Conn.Execute(strsql)
strSQL = "DELETE FROM " & strTablePrefix & "MODERATOR WHERE MEMBER_ID = " & Request.Querystring("ID")
my_Conn.Execute(strSQL)
case "add"
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_LEVEL = 2 "
strSql = strSql & " WHERE MEMBER_ID = " & Request.QueryString("ID")
my_Conn.Execute(strsql)
end select
Response.write "<meta http-equiv='Refresh' content='2; URL=members.asp'>"
end if
'############################# moderator bits ############### %>


Go to Top of Page

trakfast11
Starting Member

32 Posts

Posted - 13 July 2001 :  11:36:29  Show Profile
Yeah!! thanks GauravBhabu & HuwR

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 13 July 2001 :  17:22:47  Show Profile
It is time to put my solution under the wraps. Yours is simpler

gauravbhabu

There is only one miracle...That is LIFE!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07