<!--#include file="config.asp" -->
<%
server.scripttimeout=600
if indata="1" then
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&dataurl&"")
conn.Open connstr
end if
%>
<%
response.buffer=true
%>
<%
'=================================
'
'     欢迎访问  www.zhaozhao.com（我为你狂 找找电影）
'               mp3.httpcn.com（找找音乐网）
'     技术支持专页：http://web.zhaozhao.com/music_tech.htm
'     程序名称: 音乐数据获取者
'     版 本 号: V3.2+完美版
'     程序制作: 随缘苏迪
'     QQ:3065643 (加我必须说明是 音乐数据获取者 用户)
'     电子邮件: sd988@163.com
'     如果您使用本程序，并自愿在贵站做上 找找电影站 的链接，程序有问题可随时与我联系，我免费提供补丁。
'
'     请保留以上信息，否则将不可能提供任何技术支持 ：）
'
'=================================
%>
<%
'on error resume next
Private Function bytes2BSTR(vIn)
  Dim i, ThischrCode, NextchrCode
  strReturn = ""
For i = 1 To LenB(vIn)
   ThischrCode = AscB(MidB(vIn, i, 1))
  If ThischrCode < &H80 Then
     strReturn = strReturn & Chr(ThischrCode)
  Else
    NextchrCode = AscB(MidB(vIn, i + 1, 1))
    strReturn = strReturn & Chr(CLng(ThischrCode) * &H100 + CInt(NextchrCode))
     i = i + 1
  End If
Next
    bytes2BSTR = strReturn
End Function


Function GetURL(url)
    Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
          With Retrieval
          .Open "GET", url, False, "", ""
          .Send
          GetURL = .ResponseText
		  GetURL = bytes2BSTR(.Responsebody)
          End With
    Set Retrieval = Nothing
End Function

singer=Request("singer")
id=Request("id")
key=Request("key")
no=Request("no")
size=Request("size")
gs=Request("gs")
xy=Request("xy")
sd=Request("sd")
Url=url&"&no="&Request("no")&"&key="&Request("key")
wzdir="http://search.sogua.com/search/"
basefilename="view.asp?action=like_search&no="&no&"&key="&key&"&id="&id

response.flush
if Not Response.isClientConnected then
	response.end
end if
	fname=wzdir&basefilename&i
			alltext=getURL(fname)
			web_start=inStr(1,alltext,"../images/view/top.gif")
			url_start=inStr(web_start,alltext,"><a href=")
			url_end=inStr(web_start,alltext,"><b><font")
			url_url=mid(alltext,url_start+10,url_end-url_start-11)
			
			Sourcecode=url_url

			response.flush

if indata="1" then
Set rsd = Conn.Execute("select * from music where music_url = '"&Sourcecode&"'")
if rsd.eof then										
set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM music"
rs.open sql,conn,1,3

rs.addnew()
rs("singer")=singer
rs("music_name")=id
rs("music_url")=Sourcecode
rs("music_type")=gs
rs("music_agreement")=xy
rs("music_size")=size
rs("music_sd")=sd
rs("add_date")=now()
rs.update
response.flush
end if
end if
%>
<head>
<meta http-equiv=Content-Type content=text/html; charset=gb2312 charset=gb2312> 
<LINK href="css.css" type=text/css rel=stylesheet>
<title><%=homepage%>--<%=webname%>--在线试听--<%=id%></title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  background="images/bg1.gif">
<TABLE height=99 cellSpacing=0 cellPadding=0 width=358 align=center background="images/downbgnew2.gif" border=0>
<TBODY><TR align="center"><TD vAlign=top width="100%" height="99"> 
<%if gs="rm" or gs="ram" then%>
<object id=video1 classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height=65 width=470> 
<param name="_ExtentX" value="12435">
<param name="_ExtentY" value="1720">
<param name="AUTOSTART" value="-1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="0">
<param name="SRC" value="<%=sourcecode%>">
<param name="CONTROLS" value="StatusBar,ControlPanel">
<param name="CONSOLE" value="Clip1">
<param name="LOOP" value="0">
<param name="NUMLOOP" value="0">
<param name="CENTER" value="0">
<param name="MAINTAINASPECT" value="0">
<param name="BACKGROUNDCOLOR" value="#000000"><embed src="<%=sourcecode%>" type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ControlPanel,StatusBar" height="65" width="470" autostart="true"></object><img src=http://un.baidu.com/images/st.gif?tn=zhao width=0 height=0>
<%elseif gs="exe" or gs="rar" or gs="zip" then%>
<br><br><p center>对不起，本文件格式 <font color=red><%=gs%></font> 不允许在线试听，请下载！</p>
<%else%>
<object id="NSPlay" width=470 height=65 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" align="center" hspace="5">
  ASX File Name<param name="AutoRewind" value=1><param name="FileName" value="<%=sourcecode%>"><param name="ShowControls" value="1"><param name="loop" value="-1"><param name="ShowPositionControls" value="0"><param name="ShowAudioControls" value="1"><param name="ShowTracker" value="1"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="1"><param name="ShowGotoBar" value="0"><param name="ShowCaptioning" value="0"><param name="AutoStart" value=1><param name="Volume" value="-1"><param name="AnimationAtStart" value="0"><param name="TransparentAtStart" value="0"><param name="AllowChangeDisplaySize" value="0"><param name="AllowScan" value="0"><param name="EnableContextMenu" value="0"><param name="ClickToPlay" value="0"></object><img src=http://un.baidu.com/images/st.gif?tn=zhao width=0 height=0>
<% end if%>
</TD></TR>
<tr><TD vAlign=top width="100%" height="25">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%" id="AutoNumber1">
    <tr>
      <td width="100%" height="20">&nbsp;您正在试听的歌曲是：<%=id%></td>
    </tr>
    <tr>
      <td width="100%" height="20">&nbsp;演唱者：<%if singer<>"" then%><%=singer%><%else%>未知<%end if%></td>
    </tr>
    <tr>
      <td width="100%" height="20">&nbsp;资源路径：<a href="<%=sourcecode%>" target="_blank"><%=sourcecode%></a></td>
    </tr>
  </table>
  <br></TD></tr>
</TBODY></TABLE><p align=center><a href="javascript:window.close()">[关闭窗口]</a></p>
</body>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>