Avatar billede wall Nybegynder
09. juni 2000 - 20:48 Der er 8 kommentarer og
1 løsning

Heeeeeeeeelp me :)

Hey alle!

Den er et forum jeg har downloadet fra http://forum.snitz.com med siden er død :(

Jeg har denne her dumme fejl:

Der opstod en Microsoft VBScript-kompileringsfejl fejl '800a03ea'

Der er en syntaksfejl

/forum/post.asp, linje 509

if rs("F_UserList") <> &quot;&quot; Then Response.Write server.HTMLEncode(rs(&quot;F_UserList&quot;))%&gt;&quot;&gt;
-----------------------^

Her er min post.asp

<%
'#################################################################################
'## Copyright (C) 2000  Michael Anderson
'##
'## 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.
'##
'## 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.
'##
'## Corespondence and Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
if Request.QueryString("method") = "EditForum" then
    if mLev <> 4 then
%>
<html>

<head>
<title></title>
</head>

<body>

<p>ERROR: Only administrators can edit forums</p>
<!--#INCLUDE FILE="inc_footer.asp"-->
<%
        Response.End
    end if
end if

Msg = ""

select case Request.QueryString("method")
    case "Reply"
        if strNoCookies = 1 then
            Msg = Msg & "<b>Note:</b> You must be registered in order to post a topic or reply.<br>"
            Msg = Msg & "To register, <a href=""policy.asp"">click here</a>. Registration is FREE!<br>"
        end if
    case "ReplyQuote"
        if strNoCookies = 1 then
            Msg = Msg & "<b>Note:</b> You must be registered in order to post a topic or reply.<br>"
            Msg = Msg & "To register, <a href=""policy.asp"">click here</a>. Registration is FREE!<br>"
        end if
    case "Topic"
        if strNoCookies = 1 then
            Msg = Msg & "<b>Note:</b> You must be registered in order to post a topic or reply.<br>"
            Msg = Msg & "To register, <a href=""policy.asp"">click here</a>. Registration is FREE!<br>"
        end if
    case "TopicQuote"
        if strNoCookies = 1 then
            Msg = Msg & "<b>Note:</b> You must be registered in order to post a topic or reply.<br>"
            Msg = Msg & "To register, <a href=""policy.asp"">click here</a>. Registration is FREE!<br>"
        end if
    case "Forum"
        Msg = Msg & "<b>Note:</b> You must be an administrator to create a new forum.<br>"
    case "URL"
        Msg = Msg & "<b>Note:</b> You must be an administrator to create a new web link.<br>"
    case "Edit"
        Msg = Msg & "<b>Note:</b> Only the poster of this message, and the Moderator can edit the message."
    case "EditTopic"
        Msg = Msg & "<b>Note:</b> Only the poster of this message, and the Moderator can edit the message."
    case "EditForum"
        Msg = Msg & "<b>Note:</b> Only the Moderator can edit the message."
    case "EditCategory"
        Msg = Msg & "Note: Only an administrator can edit the subject."
end select

if Request.QueryString("method") = "Edit" or _
Request.Querystring("method") = "ReplyQuote" then
'    on error resume next
   
    '## Forum_SQL
    strSql = "SELECT * "
    strSql = strSql & " FROM " & strTablePrefix & "REPLY "
    strSql = strSql & " WHERE " & strTablePrefix & "REPLY.REPLY_ID = " & Request.QueryString("REPLY_ID")

    set rs = my_Conn.Execute (strSql)

    if Request.QueryString("method") = "Edit" then
        TxtMsg = rs("R_MESSAGE")
    else
        if Request.Querystring("method") = "ReplyQuote" then
            TxtMsg = "[quote]" & vbCrLf
            TxtMsg = TxtMsg & rs("R_MESSAGE") & vbCrLf
            TxtMsg = TxtMsg & "[/quote]"
        end if
    end if
    boolReply = rs("R_MAIL")
end if

if Request.QueryString("method") = "EditTopic" or _
Request.Querystring("method") = "TopicQuote" then

    '## Forum_SQL
    strSql = "SELECT " & strTablePrefix & "TOPICS.CAT_ID, " & strTablePrefix & "TOPICS.FORUM_ID, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_MESSAGE "
    strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
    strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID")

    set rs = my_Conn.Execute (strSql)

    TxtSub = rs("T_SUBJECT")

    if Request.QueryString("method") = "EditTopic" then
        TxtMsg = rs("T_MESSAGE")
    else
        if Request.Querystring("method") = "TopicQuote" then
            TxtMsg = "[quote]" & vbCrLf
            TxtMsg = TxtMsg & rs("T_MESSAGE") & vbCrLf
            TxtMsg = TxtMsg & "[/quote]"
        end if
    end if
end if

if Request.QueryString("method") = "EditForum" or _
Request.QueryString("method") = "EditURL" then

    '## Forum_SQL
    strSql = "SELECT " & strTablePrefix & "Forum.F_SUBJECT, " & strTablePrefix & "Forum.F_URL, " & strTablePrefix & "Forum.F_DESCRIPTION, " & strTablePrefix & "Forum.F_PRIVATEFORUMS, " & strTablePrefix & "Forum.F_PASSWORD, " & strTablePrefix & "Forum.F_USERLIST "
    strSql = strSql & " FROM " & strTablePrefix & "Forum "
    strSql = strSql & " WHERE " & strTablePrefix & "Forum.FORUM_ID = " & Request.QueryString("Forum_ID")

    set rs = my_Conn.Execute (strSql)

    if Request.QueryString("method") = "EditURL" then
        TxtUrl = rs("F_URL")
    end if

    if Request.QueryString("method") = "EditForum" or _
    Request.QueryString("method") = "EditURL" then
        TxtSub = rs("F_SUBJECT")
        TxtMsg = rs("F_DESCRIPTION")
    end if
end if

if Request.QueryString("method") = "EditCategory" then

    '## Forum_SQL
    strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_NAME "
    strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
    strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Request.QueryString("CAT_ID")

    set rs = my_Conn.Execute (strSql)

    if Request.QueryString("method") = "EditCategory" then
        TxtSub = rs("CAT_NAME")
    end if
end if

select case Request.QueryString("method")

    case "Category"
        btn = "Post New Category"
    case "Edit"
        btn = "Post Changes"
    case "EditCategory"
        btn = "Post Changes"
    case "EditForum"
        btn = "Post Changes"
    case "EditTopic"
        btn = "Post Changes"
    case "EditURL"
        btn = "Post Changes"
    case "Forum"
        btn = "Post New Forum"
    case "Reply"
        btn = "Post New Reply"
    case "ReplyQuote"
        btn = "Post New Reply"
    case "TopicQuote"
        btn = "Post New Reply"
    case "Topic"
        btn = "Post New Topic"
    case "URL"
        btn = "Post New URL"
    case else
        btn = "Post"

end select
%>

<table border="0" width="100%" align="center">
  <tr>
    <td width="33%" align="left"><font face="<% =strDefaultFontFace %>"
    size="<% =strDefaultFontSize %>"><img src="icon_folder_open.gif" border="0" WIDTH="15"
    HEIGHT="15">&nbsp;<a href="default.asp">All Forums</a><br>
<% if Request.QueryString("method") = "EditCategory" then %>    <img src="icon_bar.gif" border="0" WIDTH="15" HEIGHT="15"><img src="icon_folder_open.gif"
    border="0" WIDTH="15" HEIGHT="15">&nbsp;<% =Request.QueryString("Cat_Title")%><br>
<% else %><%    if Request.QueryString("method") = "Edit" or _
    Request.QueryString("method") = "EditTopic" or _
    Request.QueryString("method") = "Reply" or _
    Request.QueryString("method") = "ReplyQuote" or _
    Request.QueryString("method") = "Topic" or _
    Request.QueryString("method") = "TopicQuote" then %>    <img src="icon_bar.gif" border="0" WIDTH="15" HEIGHT="15"><img src="icon_folder_open.gif"
    border="0" WIDTH="15" HEIGHT="15">&nbsp;<a
    href="forum.asp?CAT_ID=<% =Request.QueryString("CAT_ID") %>&amp;FORUM_ID=<% =Request.QueryString("Forum_ID") %>&amp;Forum_Title=<% =Server.Urlencode(Request.QueryString("Forum_Title"))%>"><% =Request.QueryString("Forum_Title")%></a><br>
<%    end if %><% end if %><% if Request.QueryString("method") = "Edit" or _
Request.QueryString("method") = "EditTopic" or _
Request.QueryString("method") = "Reply" or _
Request.QueryString("method") = "ReplyQuote" or _
Request.QueryString("method") = "TopicQuote" then %>    <img src="icon_blank.gif" border="0" WIDTH="15" HEIGHT="15"><img src="icon_bar.gif"
    border="0" WIDTH="15" HEIGHT="15"><img src="icon_folder_open_topic.gif" border="0"
    WIDTH="15" HEIGHT="15">&nbsp;<a href="<% =Request.ServerVariables("HTTP_REFERER") %>"><% =Request.QueryString("Topic_Title")%></a>
<% end if %>    </font></td>
  </tr>
</table>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =Msg %>
</font></p>

<form action="post_info.asp" method="post" name="PostTopic">
  <input type="hidden" name="Method_Type" value="<% =Request.QueryString("method") %>"><input
  type="hidden" name="Type" value="<% =Request.QueryString("type") %>"><input type="hidden"
  name="REPLY_ID" value="<% =Request.QueryString("REPLY_ID") %>"><input type="hidden"
  name="TOPIC_ID" value="<% =Request.QueryString("TOPIC_ID") %>"><input type="hidden"
  name="Forum_ID" value="<% =Request.QueryString("Forum_ID") %>"><input type="hidden"
  name="CAT_ID" value="<% =Request.QueryString("CAT_ID") %>"><input type="hidden"
  name="Author" value="<% =Request.QueryString("auth") %>"><input type="hidden"
  name="Mod_ID" value="<% =Request.QueryString("mod") %>"><input type="hidden"
  name="Cat_Title" value="<% =Request.QueryString("Cat_Title") %>"><input type="hidden"
  name="Forum_Title" value="<% =Request.QueryString("FORUM_Title") %>"><input type="hidden"
  name="Topic_Title" value="<% =Request.QueryString("TOPIC_Title") %>"><input type="hidden"
  name="M" value="<% =Request.QueryString("M") %>"><input type="hidden" name="Refer"
  value="<% =Request.ServerVariables("HTTP_REFERER") %>"><input type="hidden" name="cookies"
  value="yes"><input type="hidden" name="UserName"
  value="<% =Request.Cookies("User")("Name")%>"><input type="hidden" name="Password"
  value="<% =Request.Cookies("User")("Pword")%>"><div align="center"><div align="center"><center><table
  border="0" align="center">
<% if mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1 then %>
<% else %>
<%    if lcase(strNoCookies) = "1" then %>
    <tr>
      <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
      size="<% =strDefaultFontSize %>"><b>UserName:</b></font></td>
      <td width="100%"><input name="UserName" maxLength="25" size="25" type="text" value></td>
    </tr>
    <tr>
      <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
      size="<% =strDefaultFontSize %>"><b>Password:</b></font></td>
      <td width="100%" valign="top"><input name="Password" maxLength="13" size="13"
      type="password" value></td>
    </tr>
<%    end if %>
<% end if %>
<% if Request.QueryString("method") = "Forum" or _
Request.QueryString("method") = "URL" or _
Request.QueryString("method") = "EditURL" or _
Request.QueryString("method") = "EditForum" then %>
    <tr>
      <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
      size="<% =strDefaultFontSize %>"><b>Category:</b></font></td>
      <td width="100%"><select name="Category" size="1">
<%

'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_ID, " & strTablePrefix & "CATEGORY.CAT_NAME "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
if mlev = 3 then
    strSql = strSql & " WHERE CAT_ID = " & Request.QueryString("CAT_ID")
end if
strSql = strSql & " ORDER BY " & strTablePrefix & "CATEGORY.CAT_NAME ASC;"

set rsCat = my_Conn.execute (strSql)

On Error Resume Next
do until rsCat.eof
    Response.Write "      <option value=""" & rsCat("CAT_ID") & """"
    if cint(Request.QueryString("CAT_ID")) = rsCat("CAT_ID") then
        Response.Write " selected"
    end if
    Response.Write ">" & rsCat("CAT_NAME") & "</option>" & vbCrLf
    rsCat.movenext
loop
set rsCat = nothing
%>      </select> </td>
    </tr>
<% end if %>
<% if (Request.QueryString("method") = "EditTopic") then %>
    <tr>
      <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
      size="<% =strDefaultFontSize %>"><b>Forum:</b></font></td>
      <td width="100%"><%    if (mlev = 3 or mlev = 4) then %>
<p><select name="Forum" size="1">
<%    end if %><%

    '## Forum_SQL
    strSql = "SELECT " & strTablePrefix & "FORUM.CAT_ID, " & strTablePrefix & "FORUM.FORUM_ID, " & strTablePrefix & "FORUM.F_SUBJECT, " & strTablePrefix & "FORUM.F_TYPE "
    strSql = strSql & " FROM " & strTablePrefix & "FORUM "
    strSql = strSql & " WHERE F_TYPE = 0 "
    if mLev = 4 then
        '## Do Nothing
    else
        if mLev = 3 and strMoveTopicMode = "1" then
            '## Remove F_MODERATOR
'            strSql = strSql & " AND  F_MODERATOR = " & GetUserNumber(Request.Cookies("User")("Name"))
        else
            if (mLev < 3) then
                strSql = strSql & " AND  FORUM_ID = " & rs("FORUM_ID")
            end if
        end if
    end if
    strSql = strSql & " ORDER BY " & strTablePrefix & "FORUM.F_SUBJECT ASC;"

    set rsForum = my_Conn.execute (strSql)

    if (mlev = 3 or mlev = 4) then
        on error resume next
        do until rsForum.eof
            Response.Write "      <option value='" & rsForum("CAT_ID") & "|" & rsForum("FORUM_ID") & "'"
            if cint(Request.QueryString("FORUM_ID")) = rsForum("FORUM_ID") then
                Response.Write " selected"
            end if
            Response.Write ">" & rsForum("F_SUBJECT") & "</option>" & vbCrLf
            rsForum.movenext
        loop
    else
        Response.Write "<font face='" & strDefaultFontFace & "' size=" & strDefaultFontSize & ">" & rsForum("F_SUBJECT") & "</font>"
        Response.Write "<input type='hidden' name='Forum' value='" & rsForum("CAT_ID") & "|" & rsForum("FORUM_ID") & "'>"
    end if
       
    set rsForum = nothing
%><%    if (mlev = 3 or mlev = 4) then %>      </select> <%    end if %> <% end if %> <% if Request.QueryString("method") = "Category" or _
Request.QueryString("method") = "EditCategory" or _
Request.QueryString("method") = "URL" or _
Request.QueryString("method") = "EditURL" or _
Request.QueryString("method") = "Forum" or _
Request.QueryString("method") = "EditForum" or _
Request.QueryString("method") = "EditTopic" or _
Request.QueryString("method") = "Topic" then %> </td>
    </tr>
    <tr>
      <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
      size="<% =strDefaultFontSize %>"><b>Subject:</b></font></td>
      <td width="100%"><input maxLength="50" name="Subject" value="<% =TxtSub %>" size="40"></td>
    </tr>
<% end if %>
<% if Request.QueryString("method") = "URL" or _
Request.QueryString("method") = "EditURL" then %>
    <tr>
      <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
      size="<% =strDefaultFontSize %>"><b>Address:</b></font></td>
      <td width="100%"><input maxLength="150" name="Address"
      value="<% if (TxtURL <> "") then Response.Write(TxtURL) else Response.Write("http://") %>"
      size="40"></td>
    </tr>
<% end if %>
<% if Request.QueryString("method") = "Edit" or _
Request.QueryString("method") = "URL" or _
Request.QueryString("method") = "EditURL" or _
Request.QueryString("method") = "Forum" or _
Request.QueryString("method") = "EditForum" or _
Request.QueryString("method") = "EditTopic" or _
Request.QueryString("method") = "Reply" or _
Request.QueryString("method") = "ReplyQuote" or _
Request.QueryString("method") = "Topic" or _
Request.QueryString("method") = "TopicQuote" then %>
    <tr>
      <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
      size="<% =strDefaultFontSize %>"><b>Message:</b><br>
      <br>
      <table border="0" width="100%">
        <tr>
          <td align="left" nowrap><font face="<% =strDefaultFontFace %>"
          size="<% =strDefaultFontSize %>"><% if strAllowHTML <> "0" then %> * HTML is ON<br>
<% else %>          * HTML is OFF<br>
<% end if %><% if strAllowForumCode <> "0" then %>          * Forum Code is ON<br>
<% else %>          * Forum Code is OFF<br>
<% end if %>          </font></font></td>
        </tr>
      </table>
      </td>
      <td width="100%"><textarea cols="45" name="Message" rows="6" wrap="VIRTUAL"><% =trim(cleancode(TxtMsg))%></textarea></td>
    </tr>
<% end if %>
    <tr>
      <td></td>
      <td><% if Request.QueryString("method") = "Edit" or _
Request.QueryString("method") = "URL" or _
Request.QueryString("method") = "EditURL" or _
Request.QueryString("method") = "EditForum" or _
Request.QueryString("method") = "EditTopic" or _
Request.QueryString("method") = "Forum" or _
Request.QueryString("method") = "Reply" or _
Request.QueryString("method") = "ReplyQuote" or _
Request.QueryString("method") = "Topic" or _
Request.QueryString("method") = "TopicQuote" then %>
<table border="0">
        <tr>
<%    if lcase(strIcons) = "1" then %>
          <td></td>
        </tr>
      </table>
      </td>
    </tr>
  </table>
  </center></div>
  <li><a href="java script:openWindow2('pop_icon_legend.asp')">Icon Legend</a></li>
  <div align="center"><center><p>&nbsp;&nbsp; &nbsp;&nbsp; <%    end if %> <font
  face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"></p>
  </center></div>
  <li><a href="java script:openWindow('pop_url_code.asp')">Add URLs</a></li>
  <div align="center"><center><p>&nbsp;&nbsp; &nbsp;&nbsp; </p>
  </center></div>
  <li><a href="java script:openWindow3('pop_forum_code.asp')">Forum Code</a></li>
  </font><% end if %>
<% if Request.QueryString("method") = "Edit" or _
Request.QueryString("method") = "EditTopic" or _
Request.QueryString("method") = "Reply" or _
Request.QueryString("method") = "ReplyQuote" or _
Request.QueryString("method") = "Topic" or _
Request.QueryString("method") = "TopicQuote" then %>
<%    if Request.QueryString("method") = "Reply" or _
    Request.QueryString("method") = "ReplyQuote" or _
    Request.QueryString("method") = "Topic" or _
    Request.QueryString("method") = "TopicQuote" then %>
<%'        if rsMember("M_SIG") <> "" then %>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
  <dd align="center"><input name="Sig" type="checkbox" value="yes"
    checked<% =Chked(Request.Cookies("User")("sig"))%>>Check here to include your profile
    signature.<br>
    </font><img src="FrontPage:vbscript_bitmap"> <img src="FrontPage:vbscript_bitmap"> <img
    src="FrontPage:vbscript_bitmap"> <img src="FrontPage:vbscript_bitmap"> <font
    face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input name="rmail"
    type="checkbox" value="1">Check here to be notified by email whenever someone replies to
    your topic.<br>
    </font><img src="FrontPage:vbscript_bitmap"> <img src="FrontPage:vbscript_bitmap"> <font
    face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input name="rmail"
    type="checkbox" value="1" <%=Chked(boolReply)%>>Check here to be notified by email
    whenever anyone replies to this topic.<br>
    </font><img src="FrontPage:vbscript_bitmap"> <img src="FrontPage:vbscript_bitmap"> <img
    src="FrontPage:vbscript_bitmap"> <img src="FrontPage:vbscript_bitmap"> <table>
      <tr>
        <td></td>
        <td><input name="Submit" type="submit" value="<% =btn %>">&nbsp;<input name="Reset"
        type="reset" value="Clear Fields"></td>
      </tr>
<% if strPrivateForums <> "0" then %>
<%    if Request.QueryString("method") = "Forum" or _
    Request.QueryString("method") = "URL" or _
    Request.QueryString("method") = "EditURL" or _
    Request.QueryString("method") = "EditForum" then %>
      <tr>
        <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
        size="<% =strDefaultFontSize %>"><b>Auth Type:</b></font></td>
        <td width="100%"><select readonly name="AuthType" size="1">
          <option value="0" <% If rs("F_PRIVATEFORUMS") = "0" Then Response.Write(" selected") %>>All Visitors</option>
          <option value="4" <% If rs("F_PRIVATEFORUMS") = "4" Then Response.Write(" selected") %>>Members Only</option>
<%    if Request.QueryString("method") = "Forum" or _
Request.QueryString("method") = "EditForum" then %>          <option value="3" <% If rs("F_PRIVATEFORUMS") = "3" Then Response.Write(" selected") %>>Password &amp; Member List</option>
          <option value="2" <% If rs("F_PRIVATEFORUMS") = "2" Then Response.Write(" selected") %>>Password Protected</option>
<%    end if %>          <option value="1" <% If rs("F_PRIVATEFORUMS") = "1" Then Response.Write(" selected") %>>Allowed Member List</option>
        </select> <%    if Request.QueryString("method") = "Forum" or _
            Request.QueryString("method") = "EditForum" then %> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Password:</b></font>
        <input maxLength="20" type="text" name="AuthPassword" size="10"
        value="<%If rs("F_Password") <> "" Then Response.Write server.HTMLEncode(rs("F_Password"))%>">
<%    end if %>        </td>
      </tr>
      <tr>
        <td noWrap vAlign="top" align="right"><font face="<% =strDefaultFontFace %>"
        size="<% =strDefaultFontSize %>"><b>Member List:</b></font></td>
        <td width="100%"><select readonly name="AuthUsers" size="40" multiple>
<%

'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME ASC;"

set rsMember = my_Conn.execute (strSql)

On Error Resume Next
do until rsMember.eof
    Response.Write "      <option value=""" & rsMember("MEMBER_ID") & """>" & rsMember("M_NAME") & "</option>" & vbCrLf
    rsMember.movenext
loop
set rsMember = nothing
%>        </select><value="<%if rs("F_UserList") <>&quot;&quot; Then Response.Write
        server.HTMLEncode(rs(&quot;F_UserList&quot;))%&gt;&quot;&gt; </td>
      </tr>
      <tr>
        <td></td>
        <td><input name="Submit" type="submit" value="<% =btn %>">&nbsp;<input name="Reset"
        type="reset" value="Clear Fields"></td>
      </tr>
<%    end if %>
<% end if %>
    </table>
  </dd>
  </div>
</form>
<%
If Request.QueryString("Method") = "Reply" or _
Request.QueryString("Method") = "TopicQuote" or _
Request.QueryString("Method") = "ReplyQuote" then
    '## Display header TOPIC REVIEW
%>
<div align="center"><center>

<table border="0" width="95%" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td bgcolor="<% =strTableBorderColor %>"><table border="0" width="100%" cellspacing="1"
    cellpadding="4">
      <tr>
        <td bgcolor="<% =strHeadCellColor %>" align="center"><b><font <% =strDefaultFontFace %>
        size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">T O P I C
        &nbsp;&nbsp;&nbsp; R E V I E W</font></b></td>
      </tr>
<%
    '## Forum_SQL
    strSql = "SELECT " & strTablePrefix & "TOPICS.T_MESSAGE, " & strMemberTablePrefix & "MEMBERS.M_NAME "
    strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "TOPICS "
    strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR AND "
    strSql = strSql & "      " & strTablePrefix & "TOPICS.TOPIC_ID = " &  Request.QueryString("TOPIC_ID")

    set rs = my_Conn.Execute (strSql)

    '## Display Main Topic
    Response.Write "      <tr>" & vbCrLf
    Response.Write "        <td bgcolor='" & strForumFirstCellColor & "' valign=top width='" & strTopicWidthLeft & "'"
    if lcase(strTopicNoWrapLeft) = "1" then
        Response.Write " nowrap"
    end if
    Response.Write "><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'><b>" & rs("M_NAME") & "</b></font></td>" & vbCrLf
    Response.Write "        <td bgcolor='" & strForumCellColor & "' valign='top' width='" & strTopicWidthRight & "'"
    if lcase(strTopicNoWrapRight) = "1" then
        Response.Write " nowrap"
    end if
    Response.Write "><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & formatStr(rs("T_MESSAGE")) & "</font></td>" & vbCrLf
    Response.Write "      </tr>" & vbCrLf

    '## Forum_SQL - Get all replies to Topic from the DB
    strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "REPLY.R_MESSAGE "
    strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY "
    strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR "
    strSql = strSql & " AND  TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
    strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE"

    set rs = Server.CreateObject("ADODB.Recordset")

'    rs.cachesize=15
    rs.open  strSql, my_Conn, 3

    '## List replies and alternate background color
    i = 0
    If rs.EOF or rs.BOF then  '## No categories found in DB
        Response.Write ""
    Else
        rs.movefirst
        Do Until rs.EOF
            If i = 0 then
                CColor = strAltForumCellColor
            Else
                CColor = strForumCellColor
            end if
            '## Display Replies to topic
            Response.Write "      <TR>" & vbCrLf
            Response.Write "        <TD bgcolor='" & CColor & "' valign='top'"
            if lcase(strTopicNoWrapLeft) = "1" then
                Response.Write " nowrap"
            end if
            Response.Write "><b><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" &  rs("M_NAME") & "</font></b></td>" & vbCrLf
            Response.Write "        <TD bgcolor='" & CColor & "' valign='top'"
            if lcase(strTopicNoWrapRight) = "1" then
                Response.Write " nowrap"
            end if
            Response.Write "><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & formatStr(rs("R_MESSAGE")) & "</font></td>" & vbCrLf
            Response.Write "      </TR>" & vbCrLf
            rs.MoveNext
            i = i + 1
            If i = 2 then i = 0
        Loop
    end if

    '## Close Table
    Response.Write "    </TABLE>" & vbCrLf
    Response.Write "    </td>" & vbCrLf
    Response.Write "  </tr>" & vbCrLf
    Response.Write "</table>" & vbCrLf
    Response.Write "</FONT>" & vbCrLf
end if
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
    </table>
    </td>
  </tr>
</table>
</center></div>
</body>
</html>

Avatar billede lange Nybegynder
09. juni 2000 - 21:09 #1
Den linie burde vist være

if rs("F_UserList") <> "" Then Response.Write server.HTMLEncode(rs("F_UserList"))%>">
Avatar billede wall Nybegynder
09. juni 2000 - 21:15 #2
Det giver den samme fejl :((((
Avatar billede lange Nybegynder
09. juni 2000 - 21:30 #3
Og din linie 509 ser sådan ud:

<value="<%if rs("F_UserList")<>"" Then Response.Write
server.HTMLEncode(rs("F_UserList"))%>">

?

Gider du ikke paste lige det område omkring linie 509 - 5-10 linier på hver side...
Avatar billede wall Nybegynder
09. juni 2000 - 21:55 #4
Den ser sådan ud indtil man gemmer det så laver den det om til det der pis :((

<%

'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME ASC;"

set rsMember = my_Conn.execute (strSql)

On Error Resume Next
do until rsMember.eof
    Response.Write "      <option value=""" & rsMember("MEMBER_ID") & """>" & rsMember("M_NAME") & "</option>" & vbCrLf
    rsMember.movenext
loop
set rsMember = nothing
%>        </select><value="<%if rs("F_UserList")<>&quot;&quot; Then Response.Write
        server.HTMLEncode(rs(&quot;F_UserList&quot;))%&gt;&quot;&gt; </td>
      </tr>
      <tr>
        <td></td>
        <td><input name="Submit" type="submit" value="<% =btn %>">&nbsp;<input name="Reset"
        type="reset" value="Clear Fields"></td>
      </tr>
<%    end if %>
<% end if %>
    </table>
  </dd>
  </div>
</form>
<%


Avatar billede lange Nybegynder
09. juni 2000 - 22:25 #5
Ooh... hvad skriver du dit ASP i? Det kunne tyde på, at din editor fejlagtigt tror at det er HTML, hvorfor den erstatter specialtegn med deres HTML-værdier.
Avatar billede wall Nybegynder
09. juni 2000 - 22:49 #6
Jeg bruger Microsoft Visual Studio 6.0 PRO

Det er kun i denne her side den laver det i :((

<% Wall %>
Avatar billede Slettet bruger
09. juni 2000 - 22:58 #7
Wall... Download det Nye DreamWeaver UltraDev, eller brug notepad til at redigere det asp document...
Det som sker der gør den også hvis du f.eks. bruger frontpage..!
Avatar billede pfm Nybegynder
08. september 2000 - 13:27 #8

Hej wall
Har du fået det løst ?
Jeg er ½-år asp-begynder, men en ting der ser forkert ud i mine øjne er din html-kode:
%>        </select><value=\"<%if rs(\"F_UserList\")<>&quot;&quot; Then Response.Write
        server.HTMLEncode(rs(&quot;F_UserList&quot;))%&gt;&quot;&gt;

..... Value for hvad ?????
     
Avatar billede wall Nybegynder
11. oktober 2000 - 14:35 #9
Sorry alle...Har fået den løst..den var en fejl i den version jeg havet D/L :)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester