标签:{=GetDownAddress(模型ID,信息ID)}代码修改:\KS_Cls\Kesion.Label.CommonCls.asp ParseEqual函数
select语句加一个对该标签的解析- case "getdownaddress" '得到指定信息的下载地址 Dim DownURLs,DUrlArr,DI,DN,DTotalNum, DAUrl DownURLs=LFCls.GetSingleFieldValue("Select Downurls From " & KS.C_S(KS.ChkClng(Param(0)),2) & " Where ID = " & KS.ChkClng(Param(1))) If KS.IsNul(DownURLs) Then echo "" Else DUrlArr = Split(DownURLs,"|||") DTotalNum = UBound(DUrlArr) For DI = 0 To DTotalNum DN=DN+1: DAUrl = Split(DUrlArr(DI),"|") If DAUrl(0)=0 Then echo "<img src="""& DomainStr & "Images/Default/down.gif"" border=""0"" alt="""" align=""absmiddle"" /><a href=""" & DomainStr & "item/downLoad.asp?m=" & Param(0) & "&id=" & Param(1) & "&downid=" & DN & """ target=""_blank"">" & DAUrl(1) & "</a>" If DI<>DTotalNum Then echo " " Else Dim RS_DS:Set RS_DS=Conn.Execute("Select DownloadName,IsDisp,DownloadPath,DownID,SelFont From KS_DownSer Where ParentID=" & DAUrl(0)) If RS_DS.Eof Then If DTotalNum=0 Then echo " 暂不提供下载地址 " Else DO While Not RS_DS.Eof IF RS_DS(1)=1 Then echo "<img src="""& DomainStr & "Images/Default/down.gif"" border=""0"" align=""absmiddle""><a href=""" & RS_DS(2) & DAurl(2) & """ " & RS_DS(4)&" target=""_blank"">" & RS_DS(0) & "</a>" Else echo "<img src="""& DomainStr & "Images/Default/down.gif"" border=""0"" align=""absmiddle""><a href=""" & DomainStr & "item/DownLoad.asp?m=" & Param(0) & "&id=" & Param(1) & "&DownID=" & DN & "&Sid=" & RS_DS(3) & """ " & RS_DS(4)&" target=""_blank"">" & RS_DS(0) & "</a>" End If RS_DS.MoveNext IF Not RS_DS.Eof Or DI<>DTotalNum Then echo " " Loop End If Set RS_DS=Nothing End If Next End if
测试环境X1GBK栏目页调用下载地址请看此帖:
http://bbs.kesion.com/forumthread-1231472.html