<%PageName="search"%>
<%on error resume next%>
<!--#include file="Conn1.Asp"-->
<!--#include file="Function.asp"-->
<!--#include file="Star.INC"-->
<%set rs=conn.execute("select * from [ylmv_home]")%>
<html>
<head>
<title>搜索频道 - <%=rs("homes")%> - <%=rs("url")%> --- 最新流行歌曲在线试听 免费听歌 免费在线听歌 mp3免费下载 零距离音乐无线 让您的心重新获得释放 ::...</title>
<meta name="keywords" content="<%=rs("homes")%>, wma, WMA, wma下载, wma试听, WMA下载, Mp3, MP3, mp3下载, MP3下载, mtv, MTV, flash, FLASH, 免费音乐下载, 免费音乐试听, 在线视听, 流行歌曲, 经典老歌, DJ舞曲, dj舞曲, 免费电影, 电影下载, 服务器租用"/>
<meta name="description" content="<%=rs("homes")%>,六万首音乐在线试听，百万网友喜爱的音乐网站"/>
<meta http-equiv=content-type content='text/html; charset=gb2312'>  
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<link href="css/css.css" rel="stylesheet" type="text/css" />
<SCRIPT language=javaScript src="images/Js.js"></SCRIPT>
<SCRIPT src="js/Top.Js"></SCRIPT>
</head>
<!--分类栏目开始-->
  <table cellSpacing=0 cellPadding=0 width=970 border=0>
    <tr>
      <td width=12><IMG height=40 src="images/skin2/top/p1.gif" width=12></td>
      <SCRIPT language=jscript.encode src="Js/Class.js"></SCRIPT> 
      <td width=12><IMG height=40 src="images/skin2/top/p2.gif" width=12></td>
    </tr>
  </table>
<!--分类栏目结束-->
<iframe scrolling="no" topmargin="0" width="970" height="40" marginwidth="0" marginheight="0" frameborder="0" align="center" src="indexlogin.asp"></iframe>
<TABLE cellSpacing=0 cellPadding=0 width=970 align=center border=0>
  <TBODY>
    <TR>
      <TD><IMG height=7 src="images/skin1/menu_bg2.gif" width=970></TD>
    </TR>
    <TR>
      <TD background=images/skin1/addr.jpg><TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
          <TBODY>
            <TR>
              <TD align=middle width="5%"><IMG height=17 src="images/skin1/arrows2.gif" 
            width=16></TD>
              
              <TD width="95%">您现在的位置：<a href='./'><font color=#000000><%=rs("homes")%></font></a> <font color=#000000>>></font> <font color=#000000> 歌曲搜索</font>&nbsp;&nbsp;&nbsp;<marquee scrolldelay="2" scrollamount="2"width="530"><script src="jstopgd.asp"  ></script>
                    </marquee></TD>
            </TR>
          </TBODY>
      </TABLE></TD>
    </TR>
    <TR>
      <TD background=images/skin1/addr_line.jpg height=4></TD>
    </TR>
  </TBODY>
<TABLE cellSpacing=0 cellPadding=0 width=970 align=center border=0>
  <TBODY>
    <TR>
      <TD bgColor=#ffffff height=5></TD>
    </TR>
  </TBODY>
</TABLE>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="970" align=center height="1">
    <tr>
      <td width="970" height="1" valign="top">
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
        <tr>
          <td width="100%" bgcolor="#FFFFFF">
<%
keyword=trim(request("keyword")) 
keyword=replace(keyword,"'","''") 
stype=request("stype")
if keyword="" then
errmsg=errmsg+"您要找什么？？您没有输入任何字符，请输入要查找的字符"
call error()
Response.End 
end if
%>
<%
Set rs= Server.CreateObject("ADODB.Recordset")
if stype="Singer" then
sql="select * from ylmv_Nclass"
elseif stype="Music" then
sql="select * from ylmv_MusicList" 
elseif stype="Special" then
sql="select * from ylmv_Special"
else
end if
rs.open sql,conn,1,1
if stype="Singer" then
 rs.filter = "Nclass Like '%"& keyword &"%'"
end if
if stype="Music" then
 rs.filter = "MusicName like '%"&keyword&"%'"
end if
if stype="Special" then
 rs.filter = "Name Like '%"& keyword &"%'"
end if
if stype="Flash" then
 rs.filter = "Flash Like '%"& keyword &"%'"
end if

if not isempty(request.QueryString("page")) then
currentPage=cint(request.QueryString("page"))
else
currentPage=1
end if
if rs.eof and rs.bof then
if stype="Singer" then
response.write "<p align='center'><br><br><img src='Images/Singer_err.gif' width='548' height='203'><br><br><br><br></p>"
elseif stype="Music" then 
response.write "<p align='center'><br><br><img src='Images/Music_err.gif' width='548' height='203'><br><br><br><br></p>"
elseif stype="Special" then
response.write "<p align='center'><br><br><img src='Images/Special_err.gif' width='548' height='203'><br><br><br><br></p>"
end if
else
totalPut=rs.recordcount
MaxPerPage=30
PageUrl="Search.asp"
if currentpage<1 then currentpage=1
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
search
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
search
else
currentPage=1
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
search
end if
end if
rs.close
end if

sub showContent 
i=0 
%>
                  <table border="0" width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>
                      <div align="center">
                        <!-----------------------搜索歌手----------------------->
                        <%if stype="Singer" then%>
                        <table border="1" width="547" align=center cellspacing="0" cellpadding="3" class="TableLine" bordercolor="#A1C9E3" style="border-collapse: collapse">
                          <tr>
                            <td width="369" height="22" align="center" bgcolor="#E1F0FB">
                            歌手</td>
                            <td width="76" height="22" align="center" bgcolor="#E1F0FB">
                            歌曲数量</td>
                            <td width="76" height="22" align="center" bgcolor="#E1F0FB">
                            专辑数量</td>
                          </tr>
                          <%
	Set Trs= Server.CreateObject("ADODB.Recordset")
	do while not rs.eof
		i=i+1
		Tsql="SELECT * FROM ylmv_MusicList where Nclassid="+cstr(rs("Nclassid"))
		Trs.open Tsql,conn,1,1
		TotalMNum=Trs.recordcount
		Trs.close
		Tsql="SELECT * FROM ylmv_Special where Nclassid="+cstr(rs("Nclassid"))
		Trs.open Tsql,conn,1,1
		TotalSNum=Trs.recordcount
		Trs.close
		Tsql="SELECT * FROM ylmv_Nclass where Nclassid="+cstr(rs("Nclassid"))
		Trs.open Tsql,conn,1,1
		Trs.close
%>
                          <form>
                            <tr>
                              <td width="369"><%=i%>.
                              <a href="Special/ylmv_<%=rs("NClassid")%>.html"><%=rs("Nclass")%></a></td>
                              <td align="center" width="76"><%=TotalMNum%>　</td>
                              <td align="center" width="76"><%=TotalSNum%>　</td>
                            </tr>
                          </form>
                          <%
		if i>=MaxPerPage then exit do
	rs.movenext
	loop
	set Trs=nothing
%>
                        </table>
                        <!-----------------------搜索歌曲----------------------->
                        <%elseif stype="Music" then%>
                        <table border="1" width="96%" align=center cellspacing="0" cellpadding="3" class="TableLine" bordercolor="#A1C9E3" style="border-collapse: collapse">
                          <tr>
                            <td width="40%" height="22" align="center" bgcolor="#E1F0FB">
                            歌曲名字</td>
                            <td width="17%" height="22" align="center" bgcolor="#E1F0FB">
                            所属歌手</td>
                            <td width="7%" height="22" align="center" bgcolor="#E1F0FB">
                            试听</td>
                            <td width="6%" height="22" align="center" bgcolor="#E1F0FB">
                            收藏</td>
                          </tr>
                          <%do while not rs.eof%>
                          <tr>
                            <td width="40%"><%=(i+1)%>.<a href=MusicPlay/<%=rs("Nclassid")%>/ylmv_<%=rs("id")%>.html target="Ylmv"><%=rs("MusicName")%></a></td>
                            <td width="17%" align="center">
                            <a href="Special/ylmv_<%=rs("NClassid")%>.html"><%=rs("singer")%></a>　</td>
                            <td width="7%" align="center">
                            <a href=MusicPlay/<%=rs("Nclassid")%>/ylmv_<%=rs("id")%>.html target="Ylmv">
                            <img src="images/test.gif" width="26" height="12" border="0" align="absmiddle"></a></td>
                            <td width="6%" align="center">
                            <a href='musicbox.asp?action=add&id=<%=rs("id")%>' target='_blank'>
                            <img border="0" src="Images/Fav.gif"></a></td>
                          </tr>
                          <%
	i=i+1
	if i>=MaxPerPage then exit do
rs.movenext
loop
%>
                        </table>
                        <!-----------------------搜索Flash----------------------->
                        <%elseif stype="Flash" then%>
                        <table border="1" width="96%" align=center cellspacing="0" cellpadding="3" class="TableLine" bordercolor="#A1C9E3" style="border-collapse: collapse">
                          <tr>
                            <td width="40%" height="22" align="center" bgcolor="#E1F0FB">
                            歌曲名字</td>
                            <td width="17%" height="22" align="center" bgcolor="#E1F0FB">
                            所属歌手</td>
                            <td width="7%" height="22" align="center" bgcolor="#E1F0FB">
                            歌词</td>
                            <td width="6%" height="22" align="center" bgcolor="#E1F0FB">
                            收藏</td>
                          </tr>
                          <%do while not rs.eof%>
                          <tr>
                            <td width="40%"><%=(i+1)%>.<a href=yxplay.asp?id=<%=rs("id")%> target="Ylmv"><%=rs("MINGCHENG")%></a></td>
                            <td width="17%" align="center">
                            <%=rs("FENLEI1")%>　</td>
                            <td width="7%" align="center">
                            <a href=yxplay.asp?id=<%=rs("id")%> target="Ylmv">
                            <img src="images/test.gif" width="26" height="12" border="0" align="absmiddle"></a></td>
                            <td width="6%" align="center">
                            <a href='musicbox.asp?action=add&id=<%=rs("id")%>' target='_blank'>
                            <img border="0" src="Images/Fav.gif"></a></td>
                          </tr>
                          <%
	i=i+1
	if i>=MaxPerPage then exit do
rs.movenext
loop
%>
                        </table>
                        <!-----------------------搜索专辑----------------------->
                        <%elseif stype="Special" then%>
                        <table border="1" width="96%" align=center cellspacing="0" cellpadding="3" class="TableLine" bordercolor="#A1C9E3" style="border-collapse: collapse">
                          <tr>
                            <td width="38%" height="22" align="center" bgcolor="#E1F0FB">
                            专辑名称</td>
                            <td width="7%" height="22" align="center" bgcolor="#E1F0FB">
                            所属歌手</td>
                            <td width="4%" height="22" align="center" bgcolor="#E1F0FB">
                            查看</td>
                            <td width="4%" height="22" align="center" bgcolor="#E1F0FB">
                            收藏</td>
                          </tr>
                          <%
Set Trs= Server.CreateObject("ADODB.Recordset")
do while not rs.eof
	i=i+1
	Tsql="SELECT * FROM ylmv_MusicList where Specialid="+cstr(rs("Specialid"))
	Trs.open Tsql,conn,1,1
	TotalMNum=Trs.recordcount
	Trs.close
%>
                          <tr>
                            <td width="38%"><%=i%>.<a href="Musiclist/ylmv_<%=rs("Specialid")%>.html"><%=rs("Name")%></a></td>
                            <td width="7%" align="center">
                            <a href="Special/ylmv_<%=rs("NClassid")%>.Shtml"><%=rs("Nclass")%></a>　</td>
                            <td width="4%" align="center">
                            <a href="Musiclist/ylmv_<%=rs("Specialid")%>.html">
                            <img src="images/test.gif" width="26" height="12" border="0" align="absmiddle"></a></td>
                            <td width="4%" align="center">
                            <a href="Albubox.asp?action=add&id=<%=rs("Specialid")%>">
                            <img border="0" src="Images/Fav.gif"></a></td>
                          </tr>
                          <%
	if i>=MaxPerPage then exit do
rs.movenext
loop
Set Trs=nothing
%>
                        </table>
                        <%
else
end if
%> <%
end sub 

function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
%>
                        <div align="center">
                          <center>
                          <table border="0" width="100%" cellpadding="6" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="1">
                            <tr>
                              <form method="Post" action="<%=filename%>?classid=<%=classid%>&Nclassid=<%=Nclassid%>">
                                <td bgcolor="#ffffff" align="center" height="1">
                                <%=Nclass%><span style="font-size: 9pt"><font color="#FF9933"><b>&nbsp; 
                                共找到<%=totalnumber%>个结果&nbsp; 分<%=n%>页显示&nbsp; 当前第<%=CurrentPage%>页 
                                <a href="<%=filename%>?page=1&keyword=<%=keyword%>&stype=<%=stype%>">
                                首页</a> <%if CurrentPage<2 then%>上一页&nbsp; <%else%>
                                </b></font><b>
                                <a href="<%=filename%>?page=<%=CurrentPage-1%>&keyword=<%=keyword%>&stype=<%=stype%>">
                                <font color="#FF9933">上一页</font></a><font color="#FF9933">&nbsp;
                                <%
end if
if n-currentpage<1 then
%> 下一页 末页 <%else%> </font><a href="<%=filename%>?page=<%=CurrentPage+1%>&keyword=<%=keyword%>&stype=<%=stype%>">
                                <font color="#FF9933">下一页</font></a></b><font color="#FF9933"><b>
                                <a href="<%=filename%>?page=<%=n%>&keyword=<%=keyword%>&stype=<%=stype%>">
                                末页</a> <%end if%>&nbsp; </b></font></span></td>
                              </form>
                            </tr>
                          </table>
                          </center>
                        </div>
                        <%        
end function

function Search
%></td>
                    </tr>
            </table>          </td>
        </tr>
        </table>
                        </center>
    
                      <%end function%><%
set rs=nothing
conn.close
set conn=nothing
%> 
</table>
</body>
</html>
<SCRIPT src="js/bottom.Js"></SCRIPT>