<!--#include file="conn.asp"-->
<!--#include file="../path.asp"-->
<%
Function CheckStr(Str)
	If Trim(Str)="" Or IsNull(str) Then Exit Function
	Checkstr=Replace(Trim(Str),"'","''")
End Function
Dim MusicID,MusicArray,MusicNum,songpath,music_path
MusicID=CheckStr(request.QueryString("id"))
MusicArray=Split(MusicID,",")
MusicNum = UBound(MusicArray)
if MusicID<>"" then
set rs=server.createobject("adodb.recordset")
For i=0 To MusicNum
	sql="select * from MusicList where id="&MusicArray(i)
	rs.open sql,conn,1,3
	If not rs.eof Then
        rs("hits")=rs("hits")+1
        rs.Update
        songpath=rs("song_path")
        If songpath="" or IsNull(songpath) Then
           songpath=1
        End If
        Select Case songpath
           Case 1
	        music_path=song_path1
	   Case 2
		music_path=song_path2
	   Case 3
		music_path=song_path3
	   Case 4
		music_path=song_path4
	   Case 5
		music_path=song_path5
	   Case else
		music_path=song_path1
        End Select
%>
mkList("<%=music_path%><%=rs("wma")%>","<%=rs("musicname")%>-<%=rs("singer")%>");
<%
End If
rs.close
Next
end if
set rs=nothing
conn.close
set conn=nothing
%>