<!--#include file="config.asp" -->
<head>
<LINK href="css.css" type=text/css rel=stylesheet>
<title><%=homepage%>--<%=webname%>--<%=request("key")%></title>
<script src="images/site_js.js"></script>
<script>
function killErrors()
{
return true
}
window.onerror = killErrors
</script>
</head>
<body leftmargin="0"><!--#include file="top.asp" -->
<table width="766" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<form action="music.asp" method="get">
<td noWrap width="16%">请输入关键词</td>
<td noWrap width="21%">
<input class="input" maxLength="150" size="18" name="key" value="<%=Request("Key")%>"></td>
<td vAlign="center" width="63%">
<input id="fmp3" type="checkbox" value="1" name="fmp3" <%if Request("fmp3")="1" then Response.Write("checked")%>> MP3 
<input id="frm" type="checkbox" value="1" name="frm" <%if Request("frm")="1" then Response.Write("checked")%>> RM 
<input id="fwma" type="checkbox" value="1" name="fwma" <%if Request("fwma")="1" then Response.Write("checked")%>> WMA 
<input id="fasf" type="checkbox" value="1" name="fasf" <%if Request("fasf")="1" then Response.Write("checked")%>> ASF 
<input id="fexe" type="checkbox" value="1" name="fexe" <%if Request("fexe")="1" then Response.Write("checked")%>> exe
<input id="fzip" type="checkbox" value="1" name="fzip" <%if Request("fzip")="1" then Response.Write("checked")%>> zip
<input id="frar" type="checkbox" value="1" name="frar" <%if Request("frar")="1" then Response.Write("checked")%>> rar
<input type="image" src="gotosearch.gif" border="0" name="I2" cachename="go" width="37" height="21" title=搜索>&nbsp;<a onclick="window.open(this.href,'','location=no,menu=no,scrollbars=yes,resizable=no,top=0,left=0,width=600,height=350');return false;" href="help.htm" target="_blank"><font color="#cc0000">搜索技巧？</font></a>
</td>  
</form>
</tr>
<tr>
<td noWrap width="100%" colspan="3" bgColor=#a7c8ff height=2></td>
</tr>
<tr>
<td noWrap width="100%" colspan="3" height=25>您的位置： <a href="<%=homeurl%>">首页</a> >> <a href="<%=weburl%>"><%=webname%></a> >> 搜索关键字“<font color=red><%=request("key")%></font>”</td>
</tr>
</table>
<div align="center"><center>
<table width="766" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr><td width="100%">
<% 
on error resume next
																
Const adTypeBinary = 1
Const adTypeText = 2
Function Bytes2bStr(vin)
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
With BytesStream
.Type = adTypeText
.Open
.WriteText vin

.Position = 0
.Charset = "GB2312"
.Position = 2
StringReturn = .ReadText
.close
End With
Set BytesStream = Nothing

Bytes2bStr = StringReturn

End Function

if Request("page")="" then
page=1
else
page=Request("page")
end if

if Request("fmp3")="" then fmp3=0 else fmp3=1
if Request("frm")="" then frm=0 else frm=1
if Request("fwma")="" then fwma=0 else fwma=1
if Request("fasf")="" then fasf=0 else fasf=1
if Request("fexe")="" then fexe=0 else fexe=1
if Request("fzip")="" then fzip=0 else fzip=1
if Request("frar")="" then frar=0 else frar=1
F="&fmp3="&fmp3&"&frm="&frm&"&fwma="&fwma&"&fasf="&fasf&"&fexe="&fexe&"&fzip="&fzip&"&frar="&frar
Url = "http://search.sogua.com/search/search.asp?key='"&Request("key")&"'&page="&page&F

set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false) 
oSend.send()
if err.number<>0 then
Response.write err.description
Response.End()
end if  

SourceCode = bytes2BSTR(oSend.responseBody)

web_start=inStr(SourceCode,"共找到")
url_start=inStr(web_start,SourceCode,"<font color=#FF7100>")
url_end=inStr(url_start,SourceCode,"</font></b> <font")
numm=mid(SourceCode,url_start+20,url_end-url_start-20)

betw=instr(SourceCode,"<tr height=16  align=center>")-instr(SourceCode,"<td width="&Chr(34)&"753"&chr(34)&" align="&chr(34)&"center"&chr(34)&" colspan=9 height="&chr(34)&"19"&chr(34)&"") 
first=instr(SourceCode,"<tr height=16  align=center>") 
SourceCode1 = Mid(SourceCode,first,abs(betw))

tt1=split(SourceCode1,"<a href=")

num1=ubound(tt1)
if num1<>0 then
Response.Write("<table align=center width=778 bgcolor=#ffffff><tr><td>歌 曲 名 称</td><td><center>歌  手</center></td><td><center>大小</center></td><td><center>格式</center></td><td><center>协议</center></td><td><center>连通率</center></td><td><center>试听</center></td><td><center>下载</center></td><td><center>歌词</center></td><td><center>铃声</center></td></tr>"&chr(10))
Response.write"<tr height=1 bgcolor=#EEEEEE><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"&chr(10)
for i =1 to Cint(num1) step 2
hao1=split(tt1(i)," onClick")
Turl=Replace(hao1(0),chr(34),"")
Mm1=split(hao1(1),"target=_blank>")
if fexe=1 or frar=1 or fzip=1 then
Mm211=split(Mm1(1),"</a>")
else
Mm21=split(Mm1(1)," - ")
Mm22=split(Mm21(1),"</a>")
end if
Mm3=split(Mm1(1),"</td>")
if mid(Mm3(4),36,4)="0%" then
mmsd="images/img/s1.gif"
elseif mid(Mm3(4),36,4)="10%" then
mmsd="images/img/s2.gif"
elseif mid(Mm3(4),36,4)="20%" then
mmsd="images/img/s3.gif"
elseif mid(Mm3(4),36,4)="30%" then
mmsd="images/img/s4.gif"
elseif mid(Mm3(4),36,4)="40%" then
mmsd="images/img/s5.gif"
elseif mid(Mm3(4),36,4)="50%" then
mmsd="images/img/s6.gif"
elseif mid(Mm3(4),36,4)="60%" then
mmsd="images/img/s7.gif"
elseif mid(Mm3(4),36,4)="70%" then
mmsd="images/img/s8.gif"
elseif mid(Mm3(4),36,4)="80%" then
mmsd="images/img/s9.gif"
elseif mid(Mm3(4),36,4)="90%" then
mmsd="images/img/s10.gif"
elseif mid(Mm3(4),36,4)="100%" then
mmsd="images/img/s11.gif"
end if

Url="http://search.sogua.com/search/"&Turl
TDurl=Replace(Url,"http://search.sogua.com/search/view.asp?","http://search.sogua.com/search/view.asp?action=like_search&")
if fexe=1 or frar=1 or fzip=1 then
MusicName=Replace(Mm211(0),"<","&#8249;")
MusicName=Replace(MusicName,">","&#8250;")
else
singer=Replace(Mm21(0),"<","&#8249;")                
singer=Replace(singer,">","&#8250;")
MusicName=Replace(Mm22(0),"<","&#8249;")
MusicName=Replace(MusicName,">","&#8250;")
end if
             
Response.Write "<tr><td><a title='"&MusicName&"' style='cursor:hand' onClick="&chr(34)&"javascript:window.open('disp.asp?url="&TDurl&"&singer="&singer&"&id="&MusicName&"&size="&mid(Mm3(1),36,15)&"&gs="&mid(Mm3(2),36,15)&"&xy="&mid(Mm3(3),36,15)&"&sd="&mid(Mm3(4),36,4)&"', 'newwindow', 'height=180, width=470, top=120, left=120, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')"&chr(34)&"> → "&MusicName&"</a></td><td><center>"
if singer<>"" then
Response.Write "<a title='搜索 "&singer&" 的歌曲' style='cursor:hand' href='music.asp?key="&singer&"' target=_blank>"&singer&"</a></td><td><center>"
else
Response.Write "未知</td><td><center>"
end if
Response.Write mid(Mm3(1),36,15)+"</center></Td><Td><center>" &chr(10)
Response.Write(mid(Mm3(2),36,15))+"</center></TD><Td><center>"  &chr(10)
Response.Write(mid(Mm3(3),36,15))+"</center></TD><td><center>"  &chr(10)
Response.Write"<img src="&mmsd&" border=0 title="&mid(Mm3(4),36,4)&"></center></TD><td>" &chr(10)
Response.Write("<a style='cursor:hand' onClick="&chr(34)&"javascript:window.open('disp.asp?url="&TDurl&"&singer="&singer&"&id="&MusicName&"&size="&mid(Mm3(1),36,15)&"&gs="&mid(Mm3(2),36,15)&"&xy="&mid(Mm3(3),36,15)&"&sd="&mid(Mm3(4),36,4)&"', 'newwindow', 'height=180, width=470, top=120, left=120, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')"&chr(34)&"><center><img src=images/real.gif border=0 title=试听></center></a></TD>"&chr(10))
Response.Write("<td><a style='cursor:hand' onClick="&chr(34)&"javascript:window.open('download.asp?url="&TDurl&"&singer="&singer&"&id="&MusicName&"&size="&mid(Mm3(1),36,15)&"&gs="&mid(Mm3(2),36,15)&"&xy="&mid(Mm3(3),36,15)&"&sd="&mid(Mm3(4),36,4)&"', 'newwindow', 'height=200, width=470, top=120, left=120, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')"&chr(34)&"><center><img src=images/download.gif border=0 title=下载></center></a></TD>"&chr(10))
Response.write"<td><center><a style='cursor:hand' onClick="&chr(34)&"javascript:window.open('lyric.asp?key="&MusicName&"', 'geci', 'height=420, width=420, top=0, left=0, toolbar=no, menubar=no, scrollbars=yes,resizable=no,location=no, status=no')"&chr(34)&"><img src=images/book.gif border=0 title=歌词></a></center></td>"&chr(10)
Response.write"<td><center><a style='cursor:hand' href='http://sms2.ctn.com.cn/smslist/smsearch.php?user_id=34217&keyword="&request("key")&"&inc=3' target=_blank><img src=images/sms.gif border=0 title=铃声></a></center></td></tr>"&chr(10)
Response.write"<tr height=1 bgcolor=#EEEEEE><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"&chr(10)
next

Response.Write("</Table>")
else
Response.Write("<table align=center width=778  bgcolor=#ffffff border=0 cellspacing=0 cellpadding=0><tr><td>")
Response.Write("<br /><br /><br /><center>"&chr(10))
Response.Write("对不起，没有您要查询的歌曲！请更换关键字尝试！")
Response.Write("<br /><br /><br /></center>"&chr(10))
Response.write "</td></tr></Table>"
end if
Pbetw=Abs(int(instr(SourceCode,"<td width="&Chr(34)&"753"&chr(34)&" align="&chr(34)&"center"&chr(34)&" colspan=9 height="&chr(34)&"19"&chr(34)&"")-instr(SourceCode,"搜索负荷<font color=#5896F3>")))
Pfirst=instr(SourceCode,"<td width="&Chr(34)&"753"&chr(34)&" align="&chr(34)&"center"&chr(34)&" colspan=9 height="&chr(34)&"19"&chr(34)&"") 
Num=Mid(SourceCode,Pfirst,Pbetw)
Response.Write("<table align=center width=778  border=0 cellspacing=0 cellpadding=0><tr bgcolor=#ffffff>")
Response.Write(Replace(Replace(Num,"'",""),"search.asp","music.asp"))
Response.write "共找到 <font color=red>"&numm&"</font> 个结果&nbsp;&nbsp;最后检测日期："&(Date()-1)&"&nbsp;&nbsp;版权所有：<a href="&homeurl&" target=_blank>"&homepage&"</a>&nbsp;&nbsp;程序开发："&author&"</td>"
Response.write "<img src=http://un.baidu.com/images/st.gif?tn=zhao width=0 height=0></tr>"
%>
</td></tr></table></center></div>