标题:求助ASP高手,网页老提示“未结束的字符串”,如何修改?
只看楼主
lyyxg9000
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-12-17
 问题点数:0 回复次数:0 
求助ASP高手,网页老提示“未结束的字符串”,如何修改?
我想做一个ASP网站,但本人不太懂ASP。从网上下了一个ASP网站模板,到能用,但当点击其中的图片观看时,总弹出提示框:其中显示”未结束的字符串“,还有一堆英文,指出是某文件在326行有错,但打开文件,这一行上我看不出错误,希望得到ASP高手的指点,或帮我查一下到底是什么问题。有愿意帮忙的请留QQ,我的QQ:71628455,QQ上详谈,代码太长,无法贴完
<%@language=vbscript codepage=936 %>
<%
option explicit
'强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!--#include file="conn.asp"-->
<!--#include file="Conn_User.asp"-->
<!--#include file="ubbcode.asp"-->
<!--#include file="function.asp"-->
<!--#include file="admin_code_Photo.asp"-->
<!--#include file="sms_function.asp"-->
<%
nt2003.GetSite_Setting()
dim strChannel,sqlChannel,rsChannel,ChannelUrl,ChannelName
dim PhotoID,PhotoTitle
dim FileName,strFileName,MaxPerPage,ShowSmallClassType
dim totalPut,CurrentPage,TotalPages
dim BeginTime,EndTime
dim founderr, errmsg
dim ClassID,SpecialID,keyword,strField,SpecialName
dim rs,sql,sqlPhoto,rsPhoto,sqlSearch,rsSearch,rsPic,sqlSpecial,rsSpecial,sqlUser,rsUser
dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,SkinID,LayoutID,LayoutFileName,ChildID,tID,tChild
dim tSpecial
dim strPic,AnnounceCount
dim PageTitle,strPath,strPageTitle
dim strClassTree

BeginTime=Timer
PhotoID=trim(request("PhotoID"))
ClassID=trim(request("ClassID"))
SpecialID=trim(request("SpecialID"))
strField=trim(request("Field"))
keyword=trim(request("keyword"))
UserLogined=CheckUserLogined()

if PhotoId="" then
    PhotoID=0
else
    PhotoID=Clng(PhotoID)
end if
if ClassID<>"" then
    ClassID=CLng(ClassID)
else
    ClassID=0
end if
if SpecialID="" then
    SpecialID=0
else
    SpecialID=CLng(SpecialID)
end if
if UserLevel="" then
    UserLevel=5000
else
    UserLevel=Cint(UserLevel)
end if

'nt2003.GetSite_Setting()
strPath= "&nbsp;当前位置:"
'&nbsp;<a href='" & nt2003.Site_Info(4) & "'>" & nt2003.Site_Info(0) & "</a>"
'strPageTitle= nt2003.Site_Info(0)
if nt2003.site_setting(2)=1 then
    strChannel= "|&nbsp;"
    set rsChannel=nt2003.execute("select * from Channel order by OrderID")
    do while not rsChannel.eof
        if rsChannel("ChannelID")=ChannelID then
            ChannelUrl=rsChannel("LinkUrl")
            ChannelName=rsChannel("ChannelName")
            strChannel=strChannel & "<a href='" & ChannelUrl & "'><font color=red>" & ChannelName & "</font></a>&nbsp;|&nbsp;"
        else
            strChannel=strChannel & "<a href='" & rsChannel("LinkUrl") & "' target='_self'>" & rsChannel("ChannelName") & "</a>&nbsp;|&nbsp;"
        end if
        rsChannel.movenext
    loop
    rsChannel.close
    set rsChannel=nothing
    strPath=strPath & "&nbsp;<a href='" & ChannelUrl & "'>" & ChannelName & "</a>"
    strPageTitle=strPageTitle & " >> " & ChannelName
end if

if PhotoID>0 then
    sql="select * from Photo where PhotoID=" & PhotoID & ""
    Set rs= Server.CreateObject("ADODB.Recordset")
    rs.open sql,conn,1,3
    if rs.bof and rs.eof then
        FoundErr=True
        ErrMsg=ErrMsg & "<br><li>你要找的图片不存在,或者已经被管理员删除!</li>"
    else   
        ClassID=rs("ClassID")
        'SpecialID=rs("SpecialID")
        'SkinID=rs("SkinID")
        'LayoutID=rs("LayoutID")
        PhotoTitle=rs("PhotoName")
    end if
end if

if ClassID>0 then
    sql="select C.ClassName,C.RootID,C.ParentID,C.Depth,C.ParentPath,C.Child,C.SkinID,L.LayoutID,L.LayoutFileName,C.BrowsePurview From PhotoClass C"
    sql=sql & " inner join Layout L on C.LayoutID=L.LayoutID where C.ClassID=" & ClassID
    set tClass=conn.execute(sql)
    if tClass.bof and tClass.eof then
        FoundErr=True
        ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
        Call WriteErrMsg()
        response.end
    else
        if tClass(9)<UserLevel then
            FoundErr=True
            ErrMsg=ErrMsg & "<br><li>对不起,你没有浏览本栏目的权限!</li>"
            ErrMsg=ErrMsg & "你不是" & CheckLevel(tClass(9)) & "!"
            Call WriteErrMsg()
            response.end
        else
            ClassName=tClass(0)
            RootID=tClass(1)
            ParentID=tClass(2)
            Depth=tClass(3)
            ParentPath=tClass(4)
            Child=tClass(5)
            if PhotoID<=0 then
                SkinID=tClass(6)
                LayoutID=tClass(7)
            end if
            LayoutFileName=tClass(8)

            strPath=strPath & "&nbsp;&gt;&gt;&nbsp;"
            strPageTitle=strPageTitle & " >> "
            if ParentID>0 then
                dim sqlPath,rsPath
                sqlPath="select PhotoClass.ClassID,PhotoClass.ClassName,Layout.LayoutFileName,Layout.LayoutID From PhotoClass"
                sqlPath= sqlPath & " inner join Layout on PhotoClass.LayoutID=Layout.LayoutID where PhotoClass.ClassID in (" & ParentPath & ") order by PhotoClass.Depth"
                set rsPath=server.createobject("adodb.recordset")
                rsPath.open sqlPath,conn,1,1
                do while not rsPath.eof
                    strPath=strPath & "<a href='" & rsPath(2) & "?ClassID=" & rsPath(0) & "&LayoutID=" & rsPath(3) & "'>" & rsPath(1) & "</a>&nbsp;&gt;&gt;&nbsp;"
                    strPageTitle=strPageTitle & rsPath(1) & " >> "
                    rsPath.movenext
                loop
                rsPath.close
                set rsPath=nothing
            end if
            strPath=strPath & "<a href='" & LayoutFileName & "?ClassID=" & ClassID & "'>" & ClassName & "</a>"
            strPageTitle=strPageTitle & ClassName
        end if   
    end if
end if
if SpecialID>0 then
    sql="select S.SpecialID,S.SpecialName,S.SkinID,S.LayoutID,L.LayoutFileName,S.BrowsePurview from Special S inner join Layout L on L.LayoutID=S.LayoutID where S.SpecialID=" & SpecialID
    set tSpecial=conn.execute(sql)
    if tSpecial.bof and tSpecial.eof then
        founderr=True
        ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
        Call WriteErrMsg()
        response.end
    else
        if tSpecial(5)<UserLevel then
            FoundErr=True
            ErrMsg=ErrMsg & "<br><li>对不起,你没有浏览本专题的权限!</li>"
            ErrMsg=ErrMsg & "你不是" & CheckLevel(tSpecial(5)) & "!"
            Call WriteErrMsg()
            response.end
        else
            SpecialName=tSpecial(1)
            if PhotoID<=0 then
                SkinID=tSpecial(2)
                LayoutID=tSpecial(3)
            end if
            LayoutFilename=tSpecial(4)
            
            strPath=strPath & "&nbsp;&gt;&gt;&nbsp;<font color=blue>[专题]</font><a href='" & tSpecial(4) & "?SpecialID=" & tSpecial(0) & "'>" & SpecialName & "</a>"
            strPageTitle=strPageTitle & " >> [专题]" & SpecialName
        end if
    end if
end if
   
if keyword<>"" then
    keyword=ReplaceBadChar(keyword)
end if

if request("page")<>"" then
    currentPage=cint(request("page"))
else
    currentPage=1
end if

'=================================================
'过程名:ShowRootClass
'作  用:显示一级栏目(无特殊效果)
'参  数:无
'=================================================
sub ShowRootClass()
    dim sqlRoot,rsRoot
    sqlRoot="select C.ClassID,C.ClassName,C.RootID,L.LayoutFileName,C.LinkUrl From PhotoClass C"
    sqlRoot= sqlRoot & " inner join Layout L on C.LayoutID=L.LayoutID where C.ParentID=0 and C.ShowOnTop=True order by C.RootID"
    Set rsRoot= Server.CreateObject("ADODB.Recordset")
    rsRoot.open sqlRoot,conn,1,1
    if rsRoot.bof and rsRoot.eof then
        response.Write("还没有任何栏目,请首先添加栏目。")
    else
        if ClassID>0 then
            response.write "|<a href='" & ChannelUrl & "'>&nbsp;"&ChannelName&"首页&nbsp;</a>|"
        else
            response.write "|<a href='" & ChannelUrl & "'><font color=red>&nbsp;"&ChannelName&"首页&nbsp;</font></a>|"
        end if
        do while not rsRoot.eof
            if rsRoot(4)<>"" then
                response.write "<a href='" & rsRoot(4) & "' target='_blank'>&nbsp;" & rsRoot(1) & "&nbsp;</a>|"
            else
                if rsRoot(2)=RootID then
                    response.Write "<a href='" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "'><font color=red>&nbsp;" & rsRoot(1) & "</font>&nbsp;</a>|"
                else
                    response.Write "<a href='" & rsRoot(3) & "?ClassID=" & rsRoot(0) & "'>&nbsp;" & rsRoot(1) & "&nbsp;</a>|"
                end if
            end if
            rsRoot.movenext
        loop
    end if
    rsRoot.close
    set rsRoot=nothing
    if nt2003.site_setting(3)=1 then
        response.write "<a href='#' onMouseOver='ShowMenu(menu_skin,100)'>&nbsp;自选风格&nbsp;</a>|"
    end if
end sub

syscode_Photo.zip (8.88 KB)


[ 本帖最后由 lyyxg9000 于 2012-12-17 17:24 编辑 ]
搜索更多相关主题的帖子: ASP网站 下载页面 option 
2012-12-17 15:07



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-391632-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.111869 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved