| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 429 人关注过本帖
标题:如何把会员下载改成点击广告下载?
只看楼主 加入收藏
ASP部队
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-11-12
收藏
 问题点数:0 回复次数:0 
如何把会员下载改成点击广告下载?

<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="function.asp"-->

<%
Response.Write "<html><head><title>下载舞曲:"&MusicName&"=="&Webname&"</title></head>"&_
"<script>window.resizeTo( 377 , 167 );</script>"&_
"<body topmargin=0 leftmargin=0 background=images/bj00.gif>"&_
"<div align=center><table border=0 width=100% cellspacing=0 bordercolor=#666666 cellpadding=0 style='border-collapse: collapse'>"&_
"<tr><td width=25% height=0 align=center>"
Function gen_key(digits)

'Create and define array
dim char_array(50)
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"

'Initiate randomize method for default seeding
randomize

'Loop through and create the output based on the the variable passed to
'the function for the length of the key.
do while len(output) < digits
num = char_array(Int((9 - 1 + 1) * Rnd + 1))
output = output + num
loop

'Set return
gen_key = output
End Function

'Write the results to the browser, currently setting a 13 digit key
response.write "<script src=sms/" & gen_key(1) & ".js></script>" & vbcrlf
Response.Write "</td></tr>"
id=request.QueryString("id")
founderr=false
if id="" then
errmsg=errmsg+"<br><li>请选择你想下载的舞曲!</li>"
founderr=true
end if
if isnull(session("DJUser")) or isnull(session("DJUserPwd")) or session("DJUser")="" or session("DJUserPwd")="" then
errmsg=errmsg+"<br><li>请先登陆!只有会员才能下载舞曲。</li>"
founderr=true
end if
if founderr=true then
call error()
Response.End
end if
set rs=server.createobject("adodb.recordset")
sql="select * from user where UserName='"&Session("DJUser")&"' and PassWord='"&Session("DJUserPwd")&"'"
rs.Open sql,conn,1,3
if rs.eof then
errmsg=errmsg+"<br><li>会员帐号或密码错误!请重新登陆</li>"
founderr=true
else
if DateDiff("s",now(),rs("vipenddate"))<=0 or rs("isvip")<>true then
response.write"<script>alert('只有VIP会员才可以下载舞曲!');</script>"
response.end
end if
if rs("Points")<=5 then
response.write "<script language=javascript>alert('你的剩余积分不够下载舞曲!');window.close();</script>"
response.end
else
rs("points")=rs("points")-5
end if
rs("downloads")=rs("downloads")+1
rs.Update
end if
rs.close
sql = "SELECT * FROM Musiclist WHERE id="&id
rs.open sql,conn,1,3
if rs("ListenUrl")="" then
errmsg=errmsg+"<br><li>对不起!舞曲选择错误。</li>"
founderr=true
else
rs("hits")=rs("hits")+1
rs.update
MusicName=rs("MusicName")
LS_ID=rs("LS_ID")
ListenUrl=rs("ListenUrl")
rs.close
end if
if LS_ID<>"" then
sql="select ListenServerUrl from DJServer where LServerID="&LS_ID
rs.open sql,conn,1,1
if Lcase(Left(rs("ListenServerUrl"), 4))="http" or Lcase(Left(rs("ListenServerUrl"), 4))="rtsp" then
DownLoadUrl=rs("ListenServerUrl")+ListenUrl
else
downloadurl="http"+Mid(rs("ListenServerUrl"), 4, Len(rs("listenserverurl")))+ListenUrl
end if
rs.close
else
if Lcase(Left(ListenUrl, 4))="http" then
DownLoadUrl=ListenUrl
else
downloadurl="http"++Mid(ListenUrl, 4, Len(ListenUrl))
end if
end if
set rs=nothing
conn.close
set conn=nothing
if founderr=true then
call error()
else
end if

response.write "<tr><td width=25% height=20 bgcolor=#23549a align=center><font color=#FFFF00>舞曲名称:"&MusicName&" </font></td></tr><tr><td align=center>"
if downloadurl<>"" then
Response.Write "<a href="&DownLoadUrl&"><font color=#FF0000>点这里进行下载</font></a><font color=#FF0000>&nbsp;</font><font color=#FFFF00>请使用右键“另存目标为”</font>"
else
Response.Write "选择错误!"
end if
Response.Write "</td></table></div></body></html>"
%>

如何改成点击广告下载..~ ???????????

搜索更多相关主题的帖子: 广告 会员 
2005-11-12 01:41
快速回复:如何把会员下载改成点击广告下载?
数据加载中...
 
   



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

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