|
有个问题小请教一下
论坛调用到主页上。调用路径<****** src=bbs/1call_topic.asp?zt=0&boardid=0&jh=0&postnum=8&titlelen=30&isusername=0&isdate=1&Order=1&hotdate=7&IsBoardName=0&IsFtbq=1&isabout=1&iscolor=1></******>
1call_topic.asp是我新建的文件。
在点击主页上的帖子,出现以下路径 http://127.0.0.1/fangyuan/bbs2007-5/21/193659281428.html
应该是http://127.0.0.1/fangyuan/bbs/2007-5/21/193659281428.html这样才对,少了一个/啊
我在那里加,是否在call_topic.asp里,在什么位置
<!--#include file="conn.asp"--> <!--#include file="fun.asp"--> <%
Dim BoardID,jh,zt,PostNum,TitleLen,rs,sql,nlstring,aRS,PageTitleNum,TitleName,BoardData,isusername,isdate,disusername,disdate,nl,TitleNamew,path,Order,OrderString,hotdate,BoardName,IsBoardName,titlelenx,IsFtbq,isabout,aboutstring,iscolor
zt=Cint(Request.QueryString("zt")) '专题帖调用,如果zt大于0,后面的其它帖子调用都效无效,将按此专题号来调用专题帖,如果zt=0,那么调用其它版块或内容 BoardID=Cint(Request.QueryString("BoardID")) 'BoardID是调用的版块ID号,如果为0,那么是所有的版块 jh=Cint(Request.QueryString("jh")) '精华帖或普通帖调用的参数 0为普通,1为精华,2为热门帖,3为公告帖 PostNum=Cint(Request.QueryString("PostNum")) '调用多少数目的帖子数 TitleLen=Cint(Request.QueryString("TitleLen")) '帖子显示标题的长度 isusername=Cint(Request.QueryString("isusername")) '是否显示用户名 显示1,不显示0 isdate=Cint(Request.QueryString("isdate")) '是否显示日期,显示1,不显示0 Order=Cint(Request.QueryString("Order")) '帖子排序为0按最新发主题排序,1为最后回复时间排序 hotdate=Cint(Request.QueryString("hotdate")) '热门帖调用的,最近几天内的热门帖 IsBoardName=Cint(Request.QueryString("IsBoardName")) '前面是否显示版面名称,1显示,0不显示 IsFtbq=Cint(Request.QueryString("IsFtbq")) '如果此参数等于1为显示发帖表情,0为不显示 IsAbout=Cint(Request.QueryString("IsAbout")) '打开帖子是否弹出新窗口,1为弹出,0为不弹出 Iscolor=Cint(Request.QueryString("Iscolor")) '如果帖子有颜色0为不显示颜色1为显示颜色 if not IsObject(conn) then LinkData end if call sysinfo If Order=0 Then OrderString="ID desc" Else OrderString="LastPostTime desc" End if 'Response.End If zt=0 Then If BoardID>0 Then '具体版块 sql="Select * From Lxtel_board where Fboardid="&BoardID&" " Set rs=Conn.Execute(sql) If rs.BOF and rs.EOF then BoardIDStr="BoardID="&BoardID else BoardIDStr="" BoardIDStr=SortID(BoardID) BoardIDStr="("&left(BoardIDStr,Len(BoardIDStr)-3)&")" end if rs.Close select case jh case 1 '精华 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where "&BoardIDStr&" and IsBest=1 and IsDel=0 and postsh=0 order by "&OrderString&" " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where "&BoardIDStr&" and IsBest=true and IsDel=false and postsh=false order by "&OrderString&" " end if case 0 '普通 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where "&BoardIDStr&" and IsDel=0 and postsh=0 order by "&OrderString&" " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where "&BoardIDStr&" and IsDel=false and postsh=false order by "&OrderString&" " end if case 2 '热门 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where "&BoardIDStr&" and IsDel=0 and postsh=0 and datediff(""d"",PostTime,'"&date()&"')<"&hotdate&" order by Hits desc " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where "&BoardIDStr&" and IsDel=false and postsh=false and datediff(""d"",PostTime,'"&date()&"')<"&hotdate&" order by Hits desc " end if case 3 '公告 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,GG,postsh from LxTel_Topic where "&BoardIDStr&" and GG=1 and IsDel=0 and postsh=0 order by "&OrderString&" " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,GG,postsh from LxTel_Topic where "&BoardIDStr&" and GG=true and IsDel=false and postsh=false order by "&OrderString&" " end if end select else '所有帖子 select case jh case 1 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where IsBest=1 and IsDel=0 and postsh=0 order by "&OrderString&" " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where IsBest=true and IsDel=false and postsh=false order by "&OrderString&" " end if case 0 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where IsDel=0 and postsh=0 order by "&OrderString&" " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where IsDel=false and postsh=false order by "&OrderString&" " end if case 2 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where datediff(""d"",PostTime,'"&date()&"')<"&hotdate&" and IsDel=0 and postsh=0 order by Hits desc " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,postsh from LxTel_Topic where datediff(""d"",PostTime,'"&date()&"')<"&hotdate&" and IsDel=false and postsh=false order by Hits desc " end if case 3 '公告 If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,GG,postsh from LxTel_Topic where GG=1 order by "&OrderString&" " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,GG,postsh from LxTel_Topic where GG=true order by "&OrderString&" " end if end select end if else If DataType=1 then sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,zt,postsh from LxTel_Topic where zt="&zt&" and IsDel=0 and postsh=0 order by "&OrderString&" " else sql="select Top "&PostNum&" ID,BoardID,Ftbq,TitleColor,Subject,PostUser,PostTime,RePostNum,Hits,LastPostTime,LastPostUser,IsTop,IsBest,CreateHtml,FileName,IsDel,zt,postsh from LxTel_Topic where zt="&zt&" and IsDel=false and postsh=false order by "&OrderString&" " end if end if Set rs = Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 if rs.BOF and rs.EOF then nl="没有找到帖子" else titlelenx=TitleLen aRS=rs.GetRows(-1) If IsAbout=1 Then aboutstring="target=_blank" End iF For PageTitleNum=0 To UBound(aRS,2) TitleNamew=aRS(4,PageTitleNum) BoardID=aRS(1,PageTitleNum) BoardData=BoardInfo(BoardID) TitleLen=titlelenx If IsBoardName=1 Then TitleLen=TitleLen-CheckStringLength("["&BoardData(2,0)&"]") End IF If CheckStringLength(aRS(4,PageTitleNum))>TitleLen Then TitleName=InterceptString(aRS(4,PageTitleNum),TitleLen)+"..." else TitleName=aRS(4,PageTitleNum) End If If aRS(3,PageTitleNum)<>"" and IsColor=1 Then TitleName="<font color="&aRS(3,PageTitleNum)&">"&TitleName&"</font>" End If if BoardData(13,0)=0 then If aRS(13,PageTitleNum)=true then Path=GetFolderPath(Application(BBSInfo&"sysinfo")(95,0),aRS(6,PageTitleNum)) '取路径 If aRS(2,PageTitleNum)<>"" and IsFtbq=1 Then TitleName="<table border=0 cellpadding=0 cellspacing=0><tr><td><img src=bbs/images/sys/ftbq/"&aRS(2,PageTitleNum)&"></td><td><a href="&Application(BBSInfo&"sysinfo")(98,0)&Path&"/"&aRS(14,PageTitleNum)&" title="&RemoveHTML(TitleNamew)&" "&aboutstring&">"&TitleName&"</a></td></tr></table>" else TitleName="<a href="&Application(BBSInfo&"sysinfo")(98,0)&Path&"/"&aRS(14,PageTitleNum)&" title="&RemoveHTML(TitleNamew)&" "&aboutstring&">"&TitleName&"</a>" End If else If aRS(2,PageTitleNum)<>"" and IsFtbq=1 Then TitleName="<table border=0 cellpadding=0 cellspacing=0><tr><td><img src=images/sys/ftbq/"&aRS(2,PageTitleNum)&"></td><td><a href="&Application(BBSInfo&"sysinfo")(98,0)&"dispost.asp?BoardID="&BoardID&"&PostID="&aRS(0,PageTitleNum)&" title="&RemoveHTML(TitleNamew)&" "&aboutstring&">"&TitleName&"</a></td></tr></table>" else TitleName="<a href="&Application(BBSInfo&"sysinfo")(98,0)&"dispost.asp?BoardID="&BoardID&"&PostID="&aRS(0,PageTitleNum)&" title="&RemoveHTML(TitleNamew)&" "&aboutstring&">"&TitleName&"</a>" End If End If else If aRS(2,PageTitleNum)<>"" and IsFtbq=1 Then TitleName="<table border=0 cellpadding=0 cellspacing=0><tr><td><img src=images/sys/ftbq/"&aRS(2,PageTitleNum)&"></td><td><a href="&Application(BBSInfo&"sysinfo")(98,0)&"dispost.asp?BoardID="&BoardID&"&PostID="&aRS(0,PageTitleNum)&" title="&RemoveHTML(TitleNamew)&" "&aboutstring&">"&TitleName&"</a></td></tr></table>" else TitleName="<a href="&Application(BBSInfo&"sysinfo")(98,0)&"dispost.asp?BoardID="&BoardID&"&PostID="&aRS(0,PageTitleNum)&" title="&RemoveHTML(TitleNamew)&" "&aboutstring&">"&TitleName&"</a>" End If end if If isusername=1 then disusername="<td width=80><a href="&Application(BBSInfo&"sysinfo")(98,0)&"userinfo.asp?username="&aRS(5,PageTitleNum)&">"&aRS(5,PageTitleNum)&"</a></td>" End If If isdate=1 then If instr(1,aRS(6,PageTitleNum)," ")>0 then disdate="<td width=80>"&Left(aRS(6,PageTitleNum),instr(1,aRS(6,PageTitleNum)," ")-1)&"</td>" else disdate="<td width=80>"&trim(aRS(6,PageTitleNum))&"</td>" end if End If If IsBoardName=1 Then BoardName="[<a href="&Application(BBSInfo&"sysinfo")(98,0)&"dislist.asp?BoardID="&aRS(1,PageTitleNum)&">"&BoardData(2,0)&"</a>]" Else BoardName="" End IF nlstring=nlstring+"<tr><td width=5 valign=top>·</td><td>"&BoardName+TitleName&" </td>"&disusername&disdate&"</tr>" if PageTitleNum>=PostNum-1 Then Exit For End IF Next nl="<table width=100% border=0 cellpadding=0 cellspacing=5>"+nlstring+"</table>" end if rs.Close set rs=nothing closedata nl = Replace(nl, "'", "'") Response.Write "document.write('"+nl+"');" %>
|