<!--#include file="conn.asp"-->
<!--#include file="Top.asp"-->
<%
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
if request("Name")<>"" then
classid=request("Name")
else
classid=""
end if
if request("ID")<>"" then
Sclassid=request("ID")
else
Sclassid=""
end if
if request("ArtID")<>"" then
Nclassid=request("ArtID")
else
Nclassid=""
end if
if request("AlbumID")<>"" then
Specialid=request("AlbumID")
else
Specialid=""
end if
%>
<%
set rs=server.createobject("adodb.recordset")
if classid<>"" then
if Specialid<>"" then
sql="select * from MusicList where Specialid="+cstr(Specialid)+" and Nclassid="+cstr(Nclassid)+" and sclassid="+cstr(sclassid)+" and classid="+cstr(classid)+" order by id desc" 
elseif Nclassid<>"" then
sql="select * from MusicList where Nclassid="+cstr(Nclassid)+" and sclassid="+cstr(sclassid)+" and classid="+cstr(classid)+" order by id desc" 
elseif SClassid<>"" then
sql="select * from MusicList where SClassID="+cstr(SClassID)+" and ClassID="+cstr(Classid)+" order by id desc" 
else
sql="select * from MusicList where classid="+cstr(classid)+" order by id desc" 
end if
else
sql="select * from MusicList order by id desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then 
response.write "<p align='center'><b>暂时没有收集任何歌曲<br><br><a href='javascript:history.go(-1)'>...::: 点 此 返 回 :::...</a></b></p>" 
showList
else 
%>
<table width="773" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr bgcolor="#FFFFFF"> 
    <td width="186" rowspan="2" valign="top" bgcolor="#eeeeee"><b> 
      <!--#include file="left.asp"-->
      </b></td>
    <td width="584" height="23" bgcolor="#b5df42"> <font size="2"><font color="#FFFFFF"><strong>&nbsp;</font><font color="#000000"><a href="/">返回首页</a> 
      <font size="2">&gt; </font><a href="Albumlist.asp?Name=51y&ID=<%=rs("SClassid")%>&ArtID=<%=rs("NClassid")%>"><%=rs("Singer")%></a> 
      <font size="2">&gt; </font><a href="Albumlist.asp?Name=51y&ID=<%=rs("SClassid")%>&ArtID=<%=rs("NClassid")%>"><%=rs("Singer")%>专辑列表</a> 
      &gt; 歌曲列表 </font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td valign="top"><table border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="236"></td>
        </tr>
        <tr > 
          <td> 
            <%
MaxPerPage=31
totalPut=rs.recordcount 
if currentpage<1 then currentpage=1
if (currentpage-1)*MaxPerPage>totalput then 
if (totalPut mod MaxPerPage)=1 then 
currentpage= totalPut \ MaxPerPage 
else 
currentpage= totalPut \ MaxPerPage + 1 
end if 
end if 
if currentPage=1 then 
showpage totalput,MaxPerPage,"songlist.asp" 
showContent 
showpage totalput,MaxPerPage,"songlist.asp" 
else 
if (currentPage-1)*MaxPerPage<totalPut then 
rs.move (currentPage-1)*MaxPerPage 
dim bookmark 
bookmark=rs.bookmark 
showpage totalput,MaxPerPage,"songlist.asp" 
showContent 
showpage totalput,MaxPerPage,"songlist.asp" 
else 
currentPage=1 
showpage totalput,MaxPerPage,"songlist.asp" 
showContent 
showpage totalput,MaxPerPage,"songlist.asp" 
showList
end if 
end if 
rs.close 
end if 

sub showContent 
dim i 
i=1 
%>
            <div align="center"> 
              <center>
                <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolordark="#FFFFFF" bgcolor="#c0c0c0">
                  <tr bgcolor="#cbe97c"> 
                    <form name="form" onsubmit="javascript:return ting2008();" target="ting2008" action="playsong.asp">
                      <td width="4%" align=center>选择</td>
                      <td width="35%" align=center>歌曲名字</td>
                      <td width="6%" align=center>点击</td>
                      <td width="6%" height=21 align=center>WMA试听</td>
                      <td width="10%" align=center>下载</td>
                      <td width="5%" align=center>点歌</td>
                      <td width="6%" align=center>音乐盒</td>
                      <%do while not rs.eof%>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="25" align=center><input type="checkbox" name="checked" value="<%=rs("id")%>"></td>
                        <td height="25"> <%=i%>.<a href="#" onClick="window.open('Yxplay.asp?id=<%=rs("id")%>','ting2008','scrollbars=no,resizable=no,width=471,height=272,menubar=no,top=250,left=250');"><%=rs("MusicName")%></a></td>
                        <td height="25" align=center><%=rs("hits")%></td>
                        <td height="25" align=center><%if rs("Wma")<>"" then%><a href="#" onClick="window.open('Yxplay.asp?id=<%=rs("id")%>','ting2008','scrollbars=no,resizable=no,width=471,height=272,menubar=no,top=250,left=250');">试听</a><%else%>暂无<%end if%></td>
                          <td height="25" align=center><a href="#" onClick="window.open('Yxdown.asp?id=<%=rs("id")%>','','scrollbars=no,resizable=no,width=600,height=300,menubar=no,top=98,left=68')">免费下载</a></td>
                        <td height="25" align=center><a href="#" onClick="window.open('mailsong.asp?id=<%=rs("id")%>','','scrollbars=no,resizable=no,width=419,height=155,menubar=no,top=250,left=250')">点歌</a></td>
                        <td height="25" align=center><a href="Box.asp?action=add&id=<%=rs("id")%>" target="_blank" title="会员才能使用音乐盒">放入</a></td>
                      </tr>
                      <%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
                      <tr bgcolor="#FFFFFF"> 
                        <td height="22" colspan="7" align="center"> <input type="button" name="chkall" value="全选" onclick="CheckAll(this.form)" title="选择显示的所有歌曲"> 
                          &nbsp; <input type="button" name="chkOthers" value="反选" onclick="CheckOthers(this.form)" title="反向选择歌曲"> 
                          &nbsp; <input type="submit" name="B1" value="播放" title="请先选择你想听的歌曲后再点击播放"> 
                        </td>
                      </tr>
                    </form>
                </table>
              </center>
            </div>
            <%
end sub 
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=1 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
            <div align="center"> 
              <center>
                <table border="0" cellpadding="0" cellspacing="0" width="593">
                  <form method=Post action="<%=filename%>?classid=<%=classid%>&Sclassid=<%=Sclassid%>&Nclassid=<%=Nclassid%>">
                    <tr> 
                      <td height="10"></td>
                    </tr>
                    <tr> 
                      <td width="100%"> <center>共<font color="#ff0000"><b><%=totalnumber%></b></font>首歌曲 
                        <%if CurrentPage<2 then%>
                        &nbsp;首页 &nbsp;上一页&nbsp; 
                        <%else%>
                        &nbsp<a href="<%=filename%>?page=1&Name=<%=classid%>&ID=<%=Sclassid%>&ArtID=<%=Nclassid%>">首页</a>&nbsp; 
                        <a href="<%=filename%>?page=<%=CurrentPage-1%>&Name=<%=classid%>&ID=<%=Sclassid%>&ArtID=<%=Nclassid%>">上一页</a>&nbsp; 
                        <%
end if
if n-currentpage<1 then
%>
                        下一页 &nbsp;末页 
                        <%else%>
                        <a href="<%=filename%>?page=<%=CurrentPage+1%>&Name=<%=classid%>&ID=<%=Sclassid%>&ArtID=<%=Nclassid%>">下一页</a>&nbsp; 
                        <a href="<%=filename%>?page=<%=n%>&Name=<%=classid%>&ID=<%=Sclassid%>&ArtID=<%=Nclassid%>">末页</a>&nbsp; 
                        <%end if%>
                        &nbsp;页次:<strong><font color="#ff0000"><%=CurrentPage%>/<%=n%></font></strong>页 
                      </td>
                    </tr>
                    <tr> 
                      <td height="10"></td>
                    </tr>
                  </form>
                </table>
              </center>
            </div>
            <% 
end function
%>
          </td>
        </tr>
        <tr> 
          <td width="236" height="2"></td>
        </tr>
      </table></td>
  </tr>
</table>
<div align="center"> 
  <center>
  </center>
</div>
<div align="center"> 
  <center>
  </center>
</div>
<%
set rs=nothing
conn.close
set conn=nothing
%>
<!--#include file="Bottom.asp"--> 