Originally posted by modifichicci
Good work, I see. I haven't tryed it, but I'll do soon. Only a question about the dbs:
these lines
[UPDATE] AVATAR
(AC_ID)#('1')
[END] AC_ID isn't in AVATAR, is it right? What update do they?
it is Avatar Category ID determining Avatar to be in which category and it is in AVATAR table.This is the dbs file, but I don't see the command to create AC_ID in AVATAR, it is create in AVATARS_CATS. Where I am wrong?
Microsoft VBScript compilation error- Error '800a0409'
Unterminated string constant
/inc_avatar.asp, line 159
Response.Write "')"">
---------------------^<br>
<%
else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>You must register first, login and then edit profile to select avatar.</font></p>" & vbNewline
end if
Response.Write "<br><p>" & vbNewLine & _
      "<input value=""Galeri"" name=""gallery"" type=""button"" onclick=""openWindow3('pop_avatar_gallery.asp?mode=" & Request.Querystring("mode") & ""
      if Request.Querystring("mode") <> "Register" then
         Response.Write "&member=" & rs("Member_ID") & "&avatar=" & rs("M_AVATAR_URL") & "#" & rs("M_AVATAR_URL")
      end if
Response.Write "')"">
%>
<!--#INCLUDE file="inc_footer_short.asp" -->Response.Write "')">"Microsoft VBScript runtime error- Error '800a000d'
Type mismatch: 'rs'
/inc_avatar.asp, line 157 Originally posted by Carefree
Yes - line 159 needs a closing quotation mark, move the greater than symbol one space to the left like this:Code:Response.Write "')">"
Originally posted by Carefree
Post a link to your "inc_avatar.asp" file in .txt format; I'll solve it for you.
<%
'#################################################################################
'## 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
'#################################################################################
'##  Part of the Avatar Mod by: Richard Kinser                                  ##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE file="inc_header_short.asp" -->
<%
'###### Avatar addon #####
if strDBNTUserName <> "" then
'###### Avatar addon #####
%>
<script language="JavaScript">
function retinfo(V2,width,height)
{
    window.opener.document.forms['Form1'].<%= Request.QueryString("box")%>.value=V2;
    window.opener.document.forms['Form1'].AvatarW.value=width;
    window.opener.document.forms['Form1'].AvatarH.value=height;
    self.close();
}
</script>
<%
'###### Avatar addon #####
dim jj, bb
bb = 0
jj = Request.QueryString("mmmid")
if jj = "" then jj = 0
'###### Avatar addon #####
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="top">
  <tr>
    <td bgcolor="<% =strTableBorderColor %>">
    <table width="100%" align="center" border="0" cellspacing="1" cellpadding="4">
      <tr>
        <td align="left" bgcolor="<% =strHeadCellColor %>" colspan="2"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Our Avatars</font></b></td>
      </tr>
      <tr>
        <td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Preview</font></b></td>
        <td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Select This Avatar</font></b></td>
      </tr>
<% 
   '## Forum_SQL - Get Avatar Settings from DB
   strSql = "SELECT " & strTablePrefix & "AVATAR2.A_HSIZE"
   strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_WSIZE"
   strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
   strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"
   set rsav = my_Conn.Execute (strSql)
   '## Forum_SQL - Get Avatars from DB
   strSql = "SELECT " & strTablePrefix & "AVATAR.A_ID" 
   strSql = strSql & ", " & strTablePrefix & "AVATAR.A_URL"
   strSql = strSql & ", " & strTablePrefix & "AVATAR.A_NAME"
   strSql = strSql & ", " & strTablePrefix & "AVATAR.A_WIDTH"
   strSql = strSql & ", " & strTablePrefix & "AVATAR.A_HEIGHT"
   strSql = strSql & ", " & strTablePrefix & "AVATAR.A_MEMBER_ID"
   strSql = strSql & " FROM " & strTablePrefix & "AVATAR "
   '###### Avatar addon #####
   strSql = strSql & " WHERE " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &jj
   strSql = strSql & " OR " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &bb
   strSql = strSql & " ORDER BY " & strTablePrefix & "AVATAR.A_ID ASC;"
   '###### Avatar addon #####
   set rs = Server.CreateObject("ADODB.Recordset")
   rs.cachesize = 20
   rs.open  strSql, my_Conn, 3
   if rs.EOF or rs.BOF then  '## No replies found in DB
%>
      <tr>
        <td bgcolor="<% =strForumFirstCellColor %>" colspan="2"><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>" valign="top"><b>No Avatars Found</b></font></td>
      </tr>
<%
   else
      rs.movefirst
      rs.pagesize = strPageSize
      maxpages = cint(rs.pagecount)
      intI = 0 
      howmanyrecs = 0
      rec = 1
      do until rs.EOF '**
         if intI = 0 then
            CColor = strForumFirstCellColor
         else
            CColor = strAltForumCellColor
         end if
 %>
      <tr>
        <td bgcolor="<% =CColor %>" valign="center" align="center" nowrap><img src="<% =rs("A_URL") %>" width=<% =rs("A_WIDTH") %> height=<% =rs("A_HEIGHT") %> border=<% =rsav("A_BORDER") %> hspace=0 alt="<% =rs("A_NAME") %>"></td>
        <td bgcolor="<% =CColor %>" valign="center" align="center"><p><form>
         <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input class=buttons type="button" onClick="JavaScript:retinfo('<% =rs("A_URL") %>','<% =rs("A_WIDTH") %>','<% =rs("A_HEIGHT") %>')" value="Use This Avatar"></font></form></p>
         <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Avatar Name:</b><br><% =rs("A_NAME") %></font></td>
      </tr>
<%
          rs.MoveNext
          intI  = intI + 1
          if intI = 2 then
            intI = 0
         end if
          rec = rec + 1
      loop
   end if
   rs.close
   set rs = nothing
   set rsav = nothing
 %>
    </table></td>
  </tr>
</table>
<br>
<%
else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>You must register first, login and then edit profile to select avatar.</font></p>" & vbNewline
end if
Response.Write "<br><p>" & vbNewLine & _
      "<input value=""Gallery"" name=""gallery"" type=""button"" onclick=""openWindow3('pop_avatar_gallery.asp?mode=" & Request.Querystring("mode") & ""
      if Request.Querystring("mode") <> "Register" then
         Response.Write "&member=" & rs("Member_ID") & "&avatar=" & rs("M_AVATAR_URL") & "#" & rs("M_AVATAR_URL")
      end if
Response.Write "')">""
%>
<!--#INCLUDE file="inc_footer_short.asp" -->
<%
'###############################################################################
'##
'##	              Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'##	          Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  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 an 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:
'##
'##	          Free Software Foundation, Inc.
'##	          59 Temple Place, Suite 330
'##	          Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##	            http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##	             manderson@snitz.com
'##
'###############################################################################
'##  Part of the Avatar Mod by: Richard Kinser                                ##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE file="inc_header_short.asp" -->
<%
If strDBNTUserName <> "" Then
	%>
	<script language="JavaScript">
		function retinfo(V2,width,height){
			window.opener.document.forms['Form1'].<%= Request.QueryString("box")%>.value=V2;
			window.opener.document.forms['Form1'].AvatarW.value=width;
			window.opener.document.forms['Form1'].AvatarH.value=height;
			self.close();
		}
	</script>
	<%
	dim jj, bb
	bb = 0
	jj = Request.QueryString("mmmid")
	If jj = "" Then jj = 0
	%>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="top">
		<tr>
			<td bgcolor="<% =strTableBorderColor %>">
				<table width="100%" align="center" border="0" cellspacing="1" cellpadding="4">
					<tr>
						<td align="left" bgcolor="<% =strHeadCellColor %>" colspan="2"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Our Avatars</font></b></td>
					</tr>
					<tr>
						<td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Preview</font></b></td>
						<td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Select This Avatar</font></b></td>
					</tr>
					<%
					strSql = "SELECT " & strTablePrefix & "AVATAR2.A_HSIZE"
					strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_WSIZE"
					strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
					strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"
					Set rsAv = my_Conn.Execute(strSql)
					If not rsAv.EOF Then
						intHS=rsAv("AVATAR2.A_HSIZE")
						intWS=rsAv("AVATAR2.A_WSIZE")
						intAB=rsAv("AVATAR2.A_BORDER")
						rsAv.Close
					End If
					Set rsAv=Nothing
					strSql = "SELECT " & strTablePrefix & "AVATAR.A_ID"
					strSql = strSql & ", " & strTablePrefix & "AVATAR.A_URL"
					strSql = strSql & ", " & strTablePrefix & "AVATAR.A_NAME"
					strSql = strSql & ", " & strTablePrefix & "AVATAR.A_WIDTH"
					strSql = strSql & ", " & strTablePrefix & "AVATAR.A_HEIGHT"
					strSql = strSql & ", " & strTablePrefix & "AVATAR.A_MEMBER_ID"
					strSql = strSql & " FROM " & strTablePrefix & "AVATAR "
					strSql = strSql & " WHERE " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &jj
					strSql = strSql & " OR " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &bb
					strSql = strSql & " ORDER BY " & strTablePrefix & "AVATAR.A_ID ASC"
					Set rs = Server.CreateObject("ADODB.Recordset")
					rs.cachesize = 20
					rs.Open(strSql, my_Conn, 3)
					If rs.EOF or rs.BOF Then
						%>
						<tr>
							<td bgcolor="<% =strForumFirstCellColor %>" colspan="2"><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>" valign="top"><b>No Avatars Found</b></font></td>
						</tr>
						<%
					Else
						rs.MoveFirst
						rs.pagesize = strPageSize
						maxpages = cInt(rs.pagecount)
						intI = 0
						howmanyrecs = 0
						rec = 1
						Do until rs.EOF
							If intI = 0 Then
								CColor = strForumFirstCellColor
							Else
								CColor = strAltForumCellColor
							End If
							intRSID=rs("MEMBER_ID")
							strAvatar=rs("M_AVATAR_url")
 							%>
							<tr>
								<td bgcolor="<% =CColor %>" valign="center" align="center" nowrap><img src="<% =rs("A_URL") %>" width=<% =rs("A_WIDTH") %> height=<% =rs("A_HEIGHT") %> border=<% =rsAv("A_BORDER") %> hspace=0 alt="<% =rs("A_NAME") %>"></td>
								<td bgcolor="<% =CColor %>" valign="center" align="center"><p><form>
								<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input class=buttons type="button" onClick="JavaScript:retinfo('<% =rs("A_URL") %>','<% =rs("A_WIDTH") %>','<% =rs("A_HEIGHT") %>')" value="Use This Avatar"></font></form></p>
								<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Avatar Name:</b><br><% =rs("A_NAME") %></font></td>
							</tr>
							<%
							rs.MoveNext
							intI = 1 - intI
							rec = rec + 1
						Loop
						rs.Close
					End If
					Set rs = Nothing
					%>
				</table>
			</td>
		</tr>
	</table><br />
	<%
Else
	Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>You must register first, login and Then edit profile to select avatar.</font></p>" & vbNewline
End If
Response.Write "<br><p>" & vbNewLine & _
	"<input value=""Gallery"" name=""gallery"" type=""button"" onclick=""openWindow3('pop_avatar_gallery.asp?mode=" & Request.Querystring("mode") & ""
If Request.QueryString("mode") <> "Register" Then
	Response.Write "&member=" & intRSID & "&avatar=" & strAvatar & "#" & strAvatar
End If
Response.Write "')">"
WriteFooterShort
%>