<%
'=================================
'
'     欢迎访问  www.zhaozhao.com（我为你狂 找找电影）
'               mp3.httpcn.com（找找音乐网）
'     技术支持专页：http://web.zhaozhao.com/music_tech.htm
'     程序名称: 音乐数据获取者
'     版 本 号: V3.2+完美版
'     程序制作: 随缘苏迪
'     QQ:3065643 (加我必须说明是 音乐数据获取者 用户)
'     电子邮件: sd988@163.com
'     如果您使用本程序，并自愿在贵站做上 找找电影站 的链接，程序有问题可随时与我联系，我免费提供补丁。
'
'     请保留以上信息，否则将不可能提供任何技术支持 ：）
'
'=================================
%>
<%if request("word")="" or request("type")="" then%>
<script language="javascript">
alert("对不起，所有选项不能全为空！");
location.href="./"
</script>
<%end if%>
<!-- #include file="conn.asp" -->
<%
word=trim(request("word"))
type1=trim(request("type"))

if type1="0" then
    type1=""
end if
if type1="1" then
    type1="mp3"
end if
if type1="2" then
    type1="rm"
end if
if type1="3" then
    type1="wma"
end if
if type1="4" then
    type1="exe"
end if
if type1="5" then
    type1="asf"
end if
if type1="6" then
    type1="rar"
end if
if type1="7" then
    type1="zip"
end if
sql="select * from music where"
sql=sql&"  music_name like '%"&word&"%' and music_type like '%"&type1&"%' order by id desc"     
set rs=server.createObject("ADODB.recordset")
rs.open sql,conn,1,1
%> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="css.css" type=text/css rel=stylesheet>
<title>音乐搜索--<%=word%></title>
<script>
function valid_search2(){
if(  document.searchview.word.value=="")
{window.alert("对不起，关键字不能为空！");
document.searchview.word.focus();
return false;
} ;
}
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<script>
function killErrors()
{
return true
}
window.onerror = killErrors
</script>
</head>
<body>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <form method="post" action="search.asp" name="searchview" onsubmit="return valid_search2()">
    <tr>
      <td width="100%">
        <p align="center"><input class="formfont" size="35" name="word" value="<%=word%>"> 
        <input type="submit" value="音乐搜索"><br>    
        <input type="radio" CHECKED value="0" name="type"> 全部音乐 <input type="radio" value="1" name="type">     
        mp3 <input type="radio" value="2" name="type"> rm <input type="radio" value="3" name="type">     
        wma <input type="radio" value="4" name="type"> exe <input type="radio" value="5" name="type">     
        asf <input type="radio" value="6" name="type"> rar <input type="radio" value="7" name="type"> zip</td>    
    </tr></form>    
    <tr>    
      <td width="100%">    
        <div align="center">    
          <table border="0" cellpadding="0" cellspacing="0" width="100%">    
            <tr>    
                  <td width="100%">    
<div align="center"><br> <%if rs.eof then%>     
<br> <br> <br> <br> <br> <br> <font size="3" color="#FF0000"><b>抱歉！没有符合您查询条件的音乐。</b></font><br>     
<br> <br> <%else%>  
 <%         
if request("page")<>"" then         
curpage=cint(request("page"))         
else         
curpage=1         
end if         
num=20         
         
rs.pagesize=num         
rs.absolutepage=curpage%>     
<font color="#990000"><br> 查询结果：</font>共找到<FONT COLOR="#000000"><B><FONT COLOR="#FF0000"><%=rs.RecordCount%></FONT></B></FONT>个音乐，分为<font color="#FF0000"><%=rs.PageCount%></font>页，目前是第<font color="#FF0000"><%=curPage%></font>页&nbsp;&nbsp;&nbsp;     
<br> </div><table border=1 width="722" cellpadding="3" align="center" height="100">              
<tr> <td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" width="39" height="32" >              
<div align="center">序号</div></td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="224" height="32" >              
音乐资源名称</td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="45" height="32" >             
大小</td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="59" height="32" >             
格式</td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="65" height="32" >            
协议</td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="65" height="32" >           
连通率</td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="65" height="32" >           
试听</td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="66" height="32" >           
下载</td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff BGCOLOR="#C4EEEE" align="center" width="72" height="32" >           
更新日期</td></tr>  
<%for i=1 to rs.pagesize 
reno=(curPage-1)*rs.PageSize+i 
%><tr bgcolor=#FFFFFF>          
<td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="39" height="19" ><div align="center"><%=reno%></div></td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="224" height="25" >          
<a href="#1" onClick="MM_openBrWindow('play.asp?ID=<%=rs("ID")%>','tryplay','width=470,height=180')"><%=rs("singer")%> - <%=rs("music_Name")%></a></td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="45" height="19" >          
<div align="center"><font color="#333399"><%=rs("music_size")%></font></div></td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="59" height="19" >          
<div align="center"><font color="#333399"><%=rs("music_type")%></font></div></td><td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="65" height="19" align="center" >          
<%=rs("music_agreement")%></td> 
<td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="65" height="19" align="center">
<%=rs("music_sd")%>%</td> 
<td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="65" height="19" align="center"><a href="#2" onClick="MM_openBrWindow('play.asp?ID=<%=rs("ID")%>','tryplay','width=470,height=180')">试听</a></td> 
<td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="66" height="19" align="center"><a href="#3" onClick="MM_openBrWindow('down.asp?ID=<%=rs("ID")%>','tryplay','width=510,height=360')">下载</a></td> 
<td bordercolorlight=#c0c0c0 bordercolordark=#ffffff width="72" height="19" align="center"><font color="#505050"><%=rs("add_date")%></font></td></tr> 
<%                      
            rs.movenext                      
            if rs.eof then                      
            i=i+1                      
            exit for                      
            end if                      
            next                      
            %></table><div align="center"><br> <font color="#990000">查询结果：</font>共找到<FONT COLOR="#FF0000"><%=rs.RecordCount%></FONT>个音乐，分为<FONT COLOR="#FF0000"><%=rs.PageCount%></FONT>页，目前是第<FONT COLOR="#FF0000"><%=curPage%></FONT>页&nbsp;&nbsp;     
&nbsp;             
              <%if curpage<=1 then%>首页  上一页             
                <%else%><a href="search.asp?page=1&word=<%=trim(request("word"))%>&type=<%=request("type")%>">首页</a>  <a href="search.asp?page=<%=(curpage-1)%>&word=<%=trim(request("word"))%>&type=<%=request("type")%>">上一页</a>             
              <%end if%>             
              <%if curpage>=rs.pagecount then%>下一页  尾页             
                <%else%><a href="search.asp?page=<%=(curpage+1)%>&word=<%=trim(request("word"))%>&type=<%=request("type")%>">下一页</a>  <a href="search.asp?page=<%=rs.pagecount%>&word=<%=trim(request("word"))%>&type=<%=request("type")%>">尾页</a>             
              <%end if%>  
<br> <%end if%> </div></td>          
            </tr>    
          </table>    
        </div>    
      </td>    
    </tr>    
  </table>    
  </center>    
</div>    
</body>    
</html>    
<%rs.close           
set rs=nothing           
conn.close     
set conn=nothing            
%>