<!--#include file="../../Conn.asp" -->
<!--#include file="../YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<%
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.Charset="GB2312"
Server.ScriptTimeOut=999999999
Dim Conn
Dim ParentId,Str_Sql,Rs_Class,Str_ClassInfo
ParentId = NoSqlHack(Trim(Request.QueryString("ParentId")))
If ParentId = "" Then
	ParentId = 0
End If
On Error Resume Next
Str_Sql = "Select ID,ClassID,ClassName,(Select Count(id) from YWNT_TMS_MovieClass where ClassID=a.ID) as HasSub from YWNT_TMS_MovieClass a where ClassID="&ParentId&" order by ClassWith asc,id asc"
Set Rs_Class = Conn.Execute(Str_Sql)
Str_ClassInfo=""
While Not Rs_Class.Eof
	If Rs_Class("HasSub")>0 Then
		Str_ClassInfo=Str_ClassInfo&"<div><img src=""../images/+.gif"" alt=""点击展开子栏目"" width=""15"" height=""15"" border=""0"" class=""LableItem"" onClick=""javascript:SwitchImg(this,'"&Rs_Class("ID")&"');"" /><span id="""&Rs_Class("ID")&""" onDblClick=""SubmitLable(this);"" class=""LableItem"" onClick=""SelectLable(this)"">"&Rs_Class("ClassName")&"</span>"&VbNewLine&_
			"<div id=""Parent"&Rs_Class("ID")&""" class=""SubItem"" HasSub=""True"" style=""display:none;""></div>"&VbNewLine&_
		"</div>"&VbNewLine
	Else
		Str_ClassInfo=Str_ClassInfo&"<div><img src=""../images/-.gif"" alt=""没有子栏目"" width=""15"" height=""15"" border=""0"" class=""LableItem"" /><span id="""&Rs_Class("ID")&""" onDblClick=""SubmitLable(this);"" class=""LableItem"" onClick=""SelectLable(this)"">"&Rs_Class("ClassName")&"</span>"&VbNewLine&_
		"</div>"&VbNewLine
	End If
Rs_Class.MoveNext
Wend
If Err Then
	Str_ClassInfo="Fail|||"&ParentId&"|||"
Else
	Str_ClassInfo="Succee|||"&ParentId&"|||"&Str_ClassInfo
End If
Response.Write(Str_ClassInfo)
%>