|
在下载中心内容页面中点击下载地址后,在新窗口中打开页面,然后再从这个页面跳转到真实地址进行下载。 这样一来,就会出现一个空白页面,感觉不是很好。而且看到其他很多的下载中心都能够在点击下载地址后再出现一个新的页面,真实的下载地址在这个页面上,同时也可以在这个页面做一些广告宣传^_^
早把这个改好了,现在发现有很多朋友在找这个东东,就发出来了。
修改方法:
一、修改soft/ShowSoftDown.asp文件,请先作好备份。
二、查找:
以下是引用片段: <!--#include file="CommonCode.asp"--> | 在下面添加样式链接:
以下是引用片段: <link href="../Skin/DefaultSkin.css" rel="stylesheet" type="text/css"> | 这个大家都清楚吧。就不多说了。
三、查找代码:
以下是引用片段: If InStr(DownloadUrl, "://") <= 0 Then DownloadUrl = "http://" & Trim(Request.ServerVariables("HTTP_HOST")) & DownloadUrl End If | 在下面添加代码:
以下是引用片段: '点击南开-获取软件名称和ID Dim rs, SoftID, SoftName SoftID = Trim(request("SoftID")) Call openconn Set rs = Conn.Execute("select SoftName from PE_Soft where SoftID = " & SoftID & " ") SoftName = rs("SoftName") Set rs = Nothing Call closeconn '点击南开-获取软件名称和ID | 四、查找代码:
以下是引用片段: '方法二可以使用“目标另存为”,但会有中文乱码问题 Response.Redirect DownloadUrl |
改为:
以下是引用片段: '方法二可以使用“目标另存为”,但会有中文乱码问题 'Response.Redirect DownloadUrl | 并在下面添加代码(这里的代码就是前台显示的,可自己修改):
以下是引用片段: %> <div> <table height=80 cellSpacing=0 cellPadding=0 width=500 align=center border=0> <tr> <td></td> </tr> </table> <table class=Guest_border cellSpacing=1 cellPadding=0 width=500 align=center border=0> <tr> <td vAlign=top align=middle> <table class=Guest_title cellSpacing=0 cellPadding=0 width="100%" border=0> <tr> <TH><%=SiteName%>—友情提示!</TH> </tr> </table> </td> </tr> <tr> <td class=Guest_tdbg vAlign=top align=middle> <table height=15 cellSpacing=0 cellPadding=0 width="80%" border=0> <tr> <td></td> </tr> </table> <table height="100%" cellSpacing=0 cellPadding=0 width="80%" border=0> <tr> <td class=TableRow1 vAlign=center height=25> <LI>软件名称 -- <font color=#990000><%=SoftName%></font></LI></td> </tr> <tr> <td class=TableRow1 vAlign=center height=25> <LI>我要报错 -- 如果您发现该软件不能下载,请点击【<A href="DownError.asp?SoftID=<%=SoftID%>"><FONT color=red><B>报错</B></FONT></A>】,谢谢!</LI></td> </tr> <tr> <td class=TableRow1 vAlign=center height=25> <LI><A href="<%=DownloadUrl%>"><FONT color=blue>立即下载</FONT> -- <%=SoftName%></A></LI></td> </tr> </table> <table height=15 cellSpacing=0 cellPadding=0 width="80%" border=0> <tr> <td></td> </tr> </table> </td> </tr> <tr> <td class=Guest_tdbg vAlign=top align=middle> <table class=Guest_border2 style="TABLE-LAYOUT: fixed" cellSpacing=0 cellPadding=0 width="100%" border=0> <tr> <td class=TableRow2 align=middle><A href="<%=SiteUrl%>">返回首页</A> | <A href="javascript:window.close()">关闭窗口</A></td> </tr> </table> </td> </tr> </table> </div> <% | 五、把这个文件再上传上去,前台随便点一个软件进行下载,看看效果。^_^,搞定就这么简单。 |