Hello, newbie here. I obtained a website with a previous version (06?) of Snitz and I'm trying to modify the avatar script to where it has a text box field for AvatarMemberID instead of a dropdown menu with all members. There are many members so it takes a while for the page to load because of populating the members dropdown list. I tried searching for a converted mod but could not find any. I did the following modifications in red below but still getting errors:
If Request.Form("Mode") = "Confirm_Avatar" then
Err_Msg = ""
avatarURL = ChkString(Request.Form("AvatarURL"),"url")
avatarName = ChkString(Request.Form("AvatarName"),"")
avatarMemberID = ChkString(Request.Form("AvatarMemberID"),"")
if avatarURL = " " then
Err_Msg = Err_Msg & "<li>You must enter a URL for this Avatar.</li>"
end if
if avatarName = " " then
Err_Msg = Err_Msg & "<li>You must enter a Name for this Avatar.</li>"
end if
if avatarMemberID = " " then
Err_Msg = Err_Msg & "<li>You must enter a Username or type 0 for all.</li>"
end if
If Err_Msg <> "" then
response.write"<p align=""center"" class=""text"">There was a problem with the submission.</p>" & vbnewLine & _
"<table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td class=""text""><ul>" & vbNewLine & _
Err_Msg & vbNewLine & _
" </ul></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<p align=center class=""text""><a href=""JavaScript:history.go(-1)"">Go Back to Enter Data</a></p>"
else
'#### Inster into database
strSql = "INSERT INTO " & strTablePrefix & "AVATAR ("
strSql = strSql & "A_URL"
strSql = strSql & ", A_NAME"
strSql = strSql & ", A_MEMBER_ID"
strSql = strSql & ") VALUES ("
strSql = strSql & "'" & avatarURL & "'"
strSql = strSql & ", '" & avatarName & "'"
strSql = strSql & ", '" & avatarMemberID & "'"
strSql = strSql & ")"
my_Conn.Execute (strSql)
response.write"<p align=""center"" class=""text"">Avatar " & avatarName & " Added!</p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=admin_avatar_home.asp"">" & vbNewLine & _
"<p align=""center"" class=""text"">Congratulations!</p>" & vbNewLine & _
"<p align=""center"" class=""text""><a href=""admin_avatar_home.asp"">Back to Avatar Setup</a></p><br />"
end if
else
Response.Write "<table border=""0"" cellpadding=""0"" cellspacing=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
"<form action=""admin_add_avatar.asp"" method=""post"">" & vbNewLine & _
"<input type=""hidden"" name=""Mode"" value=""Confirm_Avatar"">" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center"" class=""textb""> Add New Avatar </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" class=""textb""> Avatar URL: </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """><input maxLength=""255"" name=""AvatarURL"" value=""" & Trim(ChkString(avatarUrl,"display")) & """ size=""40""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" class=""textb""> Avatar Display Name: </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""AvatarName"" value=""" & Trim(ChkString(avatarName,"display")) & """ size=""40""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" class=""textb""> Reserve for Member: </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""AvatarMemberID"" value=""" & Trim(ChkString(avatarMemberID,"display")) & """ size=""40"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr align=""center"">" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ colspan=""2""><input type=""submit"" value=""Submit Avatar"" id=""submit1"" name=""submit1""> <input type=""reset"" value=""Reset Old Values"" id=""reset1"" name=""reset1""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
"</form></table><br />" & vbNewLine
end if