<!--#include file="../../../conn/conn4.asp" -->
<!--#include file="../../../conn/function.asp" -->
<%
server_v40=Request.ServerVariables("QUERY_STRING")
num=instr(server_v40,".") 
S_id=left(server_v40,num-1)
%>
<?xml version="1.0" encoding="utf-8"?>
<featureset>
<%
D_domain=split(split("http://"&Request.ServerVariables("HTTP_HOST")&Request.ServerVariables("URL"),"http://")(1),"/module")(0)
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from Msort where S_sub="&S_id&" order by S_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof

response.Write "<album author='"&rs("S_title")&"' name='"&rs("S_title")&"' imageUrl='"&rs("S_pic")&"' download='true'>"

Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from music where M_sort="&rs("S_id")&" order by M_order"
rs2.open sql2,conn,1,1
if not rs2.eof then
Do while Not rs2.eof

if instr(rs2("M_link"),"http")>0 then
M_path=rs2("M_link")
else
M_path="http://"&D_domain&"/media/"&rs2("M_link")
end if

response.Write "<song name='"&rs2("M_title")&"' >"&M_path&"</song>"
rs2.movenext
		loop
	end if
rs2.close
set rs2=nothing

response.Write "</album>"
rs.movenext
		loop
	end if
rs.close
set rs=nothing
%>
</featureset>
