<!--#include file="mdb.asp"-->
<!--#Include File="Check_hx.asp"-->
<!--#include file="dj_path.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/md5.asp"-->
<%
if request.cookies(""&request("checked")&"")="" then response.end
   response.cookies(""&request("checked")&"")=""
userip=Request.ServerVariables("REMOTE_ADDR")
mmm=md5(replace(date(),"-","")&userip)
From_url = Cstr(Request.ServerVariables("HTTP_REFERER"))
Serv_url = Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(From_url,8,len(Serv_url)) <> Serv_url then
response.write "非法链接！" '防止盗链
response.end
end if
dim UserAgent
UserAgent=Trim(lcase(Request.Servervariables("HTTP_USER_AGENT")))
If Instr(UserAgent,"teleport")>0 or Instr(UserAgent,"netant")>0 or Instr(UserAgent,"flashget")>0 or Instr(UserAgent,"webzip")>0 or Instr(UserAgent,"offline")>0 or Instr(UserAgent,"googlebot")>0 or Instr(UserAgent,"frontpage")>0 Then
response.redirect "index.asp"
response.end
end if
if mmm=request("md5") then
Response.Write "START();" & vbCrLf
Response.ContentType = "application/x-javascript"  
Response.Expires = 0  
Response.Expiresabsolute = Now() - 1  
Response.AddHeader "pragma","no-cache"  
Response.AddHeader "cache-control","private"  
Response.CacheControl = "no-cache"  

Function CheckStr(Str)
	If Trim(Str)="" Or IsNull(str) Then Exit Function
	Checkstr=Replace(Trim(Str),"'","''")
End Function

Dim MusicID,MusicArray,MusicNum,djpath,djurl,dj_name
MusicID=CheckStr(request.QueryString("checked"))
'创建连播排列顺序
MusicArray=Split(MusicID, ",")
MusicNum = UBound(MusicArray)
if MusicID<>"" then
set rs=server.createobject("adodb.recordset")
For i=0 To MusicNum
	sql="select * from dj where dj_id="&MusicArray(i)
	rs.open sql,conn,1,3
	If not rs.eof Then
        rs("dj_count")=rs("dj_count")+1
        rs.Update
        djpath=rs("path")
If djpath=0 Then
   djurl=rs("dj_url")
   dj_name=rs("dj_name")
else
   If djpath="" or IsNull(djpath) Then
    djpath=1
   End If
    Select Case djpath
        Case 1
	        dj_path=weburl&d_path1
	Case 2
		dj_path=d_path2
	Case 3
		dj_path=d_path3
	Case 4
		dj_path=d_path4
	Case 5
		dj_path=d_path5
	Case else
		dj_path=d_path1
    End Select
djurl=dj_path&rs("dj_url")
dj_name=rs("dj_name")
End If
Response.Write "DATA("""&dj_name&""","""&djurl&""");" & vbCrLf
End If
rs.close
Next	
end if
set rs=nothing
conn.close
set conn=nothing
Response.Write "END();" & vbCrLf
else
   Response.write "错误，MD5加密验证失败！"
end if
%>

