<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V2.0》，简称“AsaiMHV2”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

dim diskRs,diskSql,c_id,classname,s_id,SClassname,n_id,nid,nclassname,rs2,sql2,rs3,sql3,Tsql,Trs,Tn_id,Td_id,diskName,d_id
dim Tc_id,Ts_id,Sex,Photo,Intro,character,IsGood,SClassRs,SClassSql,NClassRs,NClassSql,types,ListenUrl,MusicName,songwords,singer,pcom,ptim,lang,Comp,Logo,pic,name
Dim ClassParentStr,Music
types=Request.QueryString ("types")
id=Request.QueryString ("id")
n_id=Request.QueryString ("n_id")
d_id=trim(request.form ("d_id"))
if d_id="" then d_id=Request.QueryString ("d_id")
classname=trim(request.form("Class"))
sclassname=trim(request.form("sClass"))
nclassname=trim(request.form("nClass"))
if types="input" then
  page=trim(request.form("page"))
else
  Page=Request.QueryString ("page")
end if
if page<>"" then
keyword=request.QueryString("keyword")
keyword=replace(keyword,"'","''")
else
keyword=trim(request.form("keyword"))
keyword=replace(keyword,"'","''")
end if

'-----------------------------------栏目选择------------------------------------
function sel_s_id(Url,oChannelIDs,oClassDepth,oClassID)
dim sTmp,Music_id,chi
sTmp=sTmp&vbcrlf&"<select class=input name=ClassID size=1 onchange=""window.open('"&Url&"&ClassID='+this.options[this.selectedIndex].value+'&n_id="&n_id&"','_self')"">"&_
	      vbcrlf&"<option class=red>选择栏目</option>"
	sql3="Select C_ID,ClassName,ClassParent,ClassParentStr,ClassDepth,ClassChild,ClassID from AsaiMHClass Where ChannelIDs="&oChannelIDs&" And ClassDepth<"&oClassDepth&" Order By ClassID,ClassOrder,ClassDepth"
	Set Rs3=Cls.Exec(sql3,1)
	Do While Not Rs3.Eof
		Music_id=Int(Rs3(0))
		If Int(Rs3(5)<>0) then  Music_id=-1
		If Int(Rs3(2))=0 Then
			sTmp=sTmp&"<option value='"&Music_id&"' class=bg_2"
			If oClassID=Music_id Then sTmp=sTmp&" selected"
			sTmp=sTmp&">"&rs3(1)&"</option>"
		Else
			sTmp=sTmp&"<option value='"&Music_id&"'"
			If (oClassID=Music_id and Music_id > 0) Then sTmp=sTmp&" selected"
			sTmp=sTmp&">"
			For chi=1 To Int(rs3(4))-1
				sTmp=sTmp&"│"
			Next
			sTmp=sTmp&"├"&rs3(1)&"</option>"
		End If
		Rs3.Movenext
	Loop
	Rs3.Close:Set Rs3=Nothing
	sTmp=sTmp&"</select>"
	sel_s_id=sTmp
end function

'-----------------------------------歌手选择------------------------------------
function sel_n_id(url)
Dim sTmp
sTmp=sTmp&vbcrlf&"<select class=input name=n_id size=1 onchange=""window.open('"&url&"&ClassID="&ClassID&"&n_id='+this.options[this.selectedIndex].value,'_self')"">"&_
          vbcrlf&"<option class=red>歌手专集</option>"
if ClassID<>"" then
sql="select * from AsaiMHMusicSinger where ClassID="&ClassID
set rs=Cls.exec(sql,1)
Do while not rs.eof
sTmp=sTmp&"<option value="&CStr(rs("id"))&" class=bg_2"
if n_id=cstr(rs("id")) and n_id<>"" then sTmp=sTmp&" selected" 
sTmp=sTmp&">"&rs("name")&"</option>"
rs.MoveNext
Loop
rs.close
end if
sTmp=sTmp&"</select>"
sel_n_id=sTmp
end function

'-----------------------------------专辑选择------------------------------------

function sel_d_id(url)
Dim sTmp
sTmp=sTmp&vbcrlf&"<select class=input name=d_id size=1>"&_
          vbcrlf&"<option class=red>选择专集</option>"
if n_id="" then exit function
sql="select * from AsaiMHMusicDisk where n_id="&n_id
set rs=Cls.exec(sql,1)
Do while not rs.eof
sTmp=sTmp&" <option value="&CStr(rs("id"))&" class=bg_2"
 if d_id=cstr(rs("id")) and d_id<>"" then sTmp=sTmp&" selected" 
 sTmp=sTmp&">"&rs("name")&"</option>"
 rs.MoveNext
Loop
rs.close
sTmp=sTmp&"</select>"
sel_d_id=sTmp
end function
%>
