这个是显示歌曲列表的函数
也就是显示数据库记录的刚没发完整的
<% sub musiclaist() %>
<center>
<table width="77%" border="0" cellSpacing=0 cellPadding=0 bgcolor="#b4deef8" >
<tr>
<td width="19%" height="16" align="left" valign="middle"><font color="#000000" STYLE="Text-Decoration:none" size="2" face="??ì?">您现在的位置是>></font></td>
<td width="10%" align="left" valign="middle"><a href="index1.asp"><font STYLE="Text-Decoration:none" size="2" face="??ì?">音网首页</font></a></td>
<%
if request("nclassid")<>"" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from nclass where nclassid="&request("nclassid")
rs.open sql,conn,1,3
nclass=rs("nclass")
%>
<td width="71%" align="left" valign="middle">>><a href="musiclist.asp?nclassid=<%=request("nclassid")%>"><font style="Text-Decoration:none" size="2" face="??ì?"><%=nclass%></font></a></td>
<%
end if
%>
</tr>
</table></center>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<%
if request("nclassid")<> "" then
sql="select * from musiclist where nclassid="&request("nclassid")
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.Write"<script>alert('未收录歌曲。');window.location.href='index.asp';</script>"
else
%>
</center>
<center>
<table width="77%" border="0" style=" BORDER-top: #000000 1px solid">
<tr>
<td width="7%" align="center" valign="middle" backround= "/image/ll.gif">
<font size="2" face="宋体">选择</font></td>
<td width="42%" background="/image/ll.gif" ><font size="2" face="宋体">歌曲</font></td>
<td width="29%" background="/image/ll.gif" ><font size="2" face="宋体">歌手</font></td>
<td width="22%" background="/image/ll.gif" ><font size="2" face="宋体">试听</font></td>
</tr>
<%
set trs=server.CreateObject("adodb.recordset")
i=0
do while not rs.eof
i=i+1
tsql="select * from musiclist where nclassid="+cstr(rs("nclassid"))
trs.open tsql,conn,1,1
totalmnumber=trs.recordcount
trs.close
%>
<tr>
<td align="right" valign="middle" bgColor=#e7e3e7><font size="2" face="宋体">
<%=i%>.</font>
</td>
<td style="BORDER-RIGHT : #000000 1px solid ;BORDER-TOP : #000000 1px solid">
<a href="#" onclick="MM_openBrWindow('paly.asp?id=<%=rs("id")%>','','width=400,height=150')">
<font color="#000000" size="2" face="宋体" STYLE="Text-Decoration:none">
<%=rs("musicname")%></font>
</a>
</td>
<td style="BORDER-RIGHT : #000000 1px solid ;BORDER-TOP : #000000 1px solid">
<a href="musiclist.asp?nclassid=<%=request("nclassid")%>">
<font color="#000000" size="2" face="宋体" STYLE="Text-Decoration:none">
<%=rs("singer")%></font>
</a>
</td>
<td style="BORDER-ROGHT : #000000 1px solid;BORDER-TOP : #000000 1px solid">
<%if rs("wma")<>"" then%>
<a href="#" onclick="MM_openBrWindow('paly.asp?id=<%=rs("id")%>','','width=400,height=150')">
<img src="image/21.gif" width="33" height="13" border="0">
</a>
<%else
response.Write"<script>alert('未收录歌曲。');window.location.href='reg1.asp';</script>"
end if%></td>
</tr>
<%
if i>=maxperpage then exit do
rs.movenext
loop
end if
rs.close
else
response.Write"<script>alert('未收录歌曲。');window.location.href='index.asp';</script>"
end if
%>
</table>
</center>
<% end sub%>