<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================

function LogoLeb(LogoWidth,LogoHeight)
		LogoLeb="<a href="""&GetConfig("Weburl")&""" title=""网站Logo""><img src="""&GetConfig("WebLogo")&""" width="""&LogoWidth&""" height="""&LogoHeight&""" border=""0""></a>"
end function

function typeLeb(typeid,containSubClass,Region,Style,Volume,TdVolume,Attribute,picwidth,picheight,ShowTitle,TitleVolume,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1 AND"
 		If typeid<>"" Then 
		If containSubClass<>"" Then
		typeidW=typeid&","&ClassIDIN(typeid)
		typeidW=left(typeidW,len(typeidW)-1)
		sql=sql&" TypeID in ("&typeidW&") AND"
		Else
		sql=sql&" TypeID = "&typeid&" AND"
		End If
		End If
 		If Region<>"" Then sql=sql&" MovieRegion="&Region&" AND"
 		IF Attribute<>"" Then
 		If Attribute=1 Then sql=sql&" MovieSuggest=1 AND"
 		If Attribute=2 Then sql=sql&" MovieHot=1 AND"
 		If Attribute=3 Then sql=sql&" MovieSerialization=1 AND"
		If Attribute=4 Then sql=sql&" MovieFree=1 AND"
 		End If
 		If right(sql,5)="WHERE" then sql=left(sql,clng(len(sql))-5) 
 		If right(sql,3)="AND" then sql=left(sql,clng(len(sql))-3) 
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		typeLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		typeLeb=typeLeb&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		i=i+1
		Select Case Style
		Case 1
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        typeLeb=typeLeb&"</tr>" &vbcrlf
       	typeLeb=typeLeb&"</table></td>" &vbcrlf
        typeLeb=typeLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		typeLeb=typeLeb&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        typeLeb=typeLeb&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        typeLeb=typeLeb&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        typeLeb=typeLeb&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        typeLeb=typeLeb&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		Case 2
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		typeLeb=typeLeb&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        typeLeb=typeLeb&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        typeLeb=typeLeb&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        typeLeb=typeLeb&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        typeLeb=typeLeb&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
		typeLeb=typeLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></td></a>" &vbcrlf
        typeLeb=typeLeb&"</tr>" &vbcrlf
       	typeLeb=typeLeb&"</table></td>" &vbcrlf
		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		Case 3
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        typeLeb=typeLeb&"</tr>" &vbcrlf
       	typeLeb=typeLeb&"</table></td>" &vbcrlf
		typeLeb=typeLeb&"</tr><tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center"" valign=""top"">"
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		typeLeb=typeLeb&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        typeLeb=typeLeb&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        typeLeb=typeLeb&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        typeLeb=typeLeb&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        typeLeb=typeLeb&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		Case 4
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
		if ShowRegion<>"" then
        typeLeb=typeLeb&"<td width=""70"" style=""line-height: 20px;"">["&RegionName(RS("MovieRegion"),OpenS)&"]</td>" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"<td width=""50"" style=""line-height: 20px;"">["&ClassName(RS("TypeID"),classurl,OpenS)&"]</td>" &vbcrlf
		end if
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<td><a href="""&movieurl&""" "&OpenS&"  class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"<td width=""70"">"&timedate(RS("MovieDate"))&"</td>" &vbcrlf
		end if
  		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		end Select
		if i mod TdVolume = 0 then typeLeb=typeLeb&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table>"
end function

function ListLeb(typeid,Volume,TdVolume,TitleVolume,picwidth,picheight,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i,int_RPP
		int_RPP=Volume
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1"
		typeidW=typeid&","&ClassIDIN(typeid)
		typeidW=left(typeidW,len(typeidW)-1)
 		sql=sql&" AND TypeID in ("&typeidW&")"
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		ListLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		ListLeb=ListLeb&"<tr>" &vbcrlf
		if not Rs.eof then
		Rs.PageSize=int_RPP
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo
		for i=1 to int_RPP
	 	if Rs.eof Then exit For
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		ListLeb=ListLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        ListLeb=ListLeb&"<tr>" &vbcrlf
        ListLeb=ListLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        ListLeb=ListLeb&"<tr>" &vbcrlf
        ListLeb=ListLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        ListLeb=ListLeb&"</tr>" &vbcrlf
       	ListLeb=ListLeb&"</table></td>" &vbcrlf
        ListLeb=ListLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		ListLeb=ListLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		if ShowActor<>"" then
		ListLeb=ListLeb&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        ListLeb=ListLeb&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        ListLeb=ListLeb&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        ListLeb=ListLeb&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        ListLeb=ListLeb&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        ListLeb=ListLeb&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        ListLeb=ListLeb&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		ListLeb=ListLeb&"</tr>" &vbcrlf
		ListLeb=ListLeb&"</table></td>" &vbcrlf
		if i mod TdVolume = 0 then ListLeb=ListLeb&"</tr><tr>" &vbcrlf
		RS.movenext
		next
		end if
		ListLeb=ListLeb&"</tr>" &vbcrlf
		ListLeb=ListLeb&"<tr align=""right"">" &vbcrlf
		ListLeb=ListLeb&"<td colspan="""&TdVolume&""">"&fPageCount(Rs,cPageNo)&"</td>" &vbcrlf
		ListLeb=ListLeb&"</tr>" &vbcrlf
		ListLeb=ListLeb&"</table>"
		RS.close
		Set RS = Nothing
end function

function SearchLeb(Searchtype,Keyword,Volume,TdVolume,TitleVolume,picwidth,picheight,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i,int_RPP
		int_RPP=Volume
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1"
		Select Case Searchtype
		Case 1
		sql=sql&" and MovieName Like '%"&Keyword&"%'"
		Case 2
		sql=sql&" and InStr(1,LCase(MovieActor),LCase('"&keyword&"'),0)<>0"
		Case 3
		sql=sql&" and (MovieName Like '%"&Keyword&"%' or InStr(1,LCase(MovieActor),LCase('"&keyword&"'),0)<>0 or InStr(1,LCase(MovieContent),LCase('"&keyword&"'),0)<>0)"
		Case 4
		sql=sql&" and MovieRegion="&Keyword&""
		end Select
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		SearchLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		SearchLeb=SearchLeb&"<tr>" &vbcrlf
		if Rs.eof then
	   	SearchLeb=SearchLeb&"<TD colspan="""&TdVolume&""">没有找到您要搜索的内容。</TD>"
		else
		Rs.PageSize=int_RPP
		cPageNo=Request.QueryString("Page")
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo
		for i=1 to int_RPP
	 	if Rs.eof Then exit For
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		SearchLeb=SearchLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        SearchLeb=SearchLeb&"<tr>" &vbcrlf
        SearchLeb=SearchLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        SearchLeb=SearchLeb&"<tr>" &vbcrlf
        SearchLeb=SearchLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        SearchLeb=SearchLeb&"</tr>" &vbcrlf
       	SearchLeb=SearchLeb&"</table></td>" &vbcrlf
        SearchLeb=SearchLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		SearchLeb=SearchLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		if ShowActor<>"" then
		SearchLeb=SearchLeb&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        SearchLeb=SearchLeb&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        SearchLeb=SearchLeb&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        SearchLeb=SearchLeb&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        SearchLeb=SearchLeb&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        SearchLeb=SearchLeb&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        SearchLeb=SearchLeb&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		SearchLeb=SearchLeb&"</tr>" &vbcrlf
		SearchLeb=SearchLeb&"</table></td>" &vbcrlf
		if i mod TdVolume = 0 then SearchLeb=SearchLeb&"</tr><tr>" &vbcrlf
		RS.movenext
		next
		end if
		SearchLeb=SearchLeb&"</tr>" &vbcrlf
		SearchLeb=SearchLeb&"<tr align=""right"">" &vbcrlf
		SearchLeb=SearchLeb&"<td colspan="""&TdVolume&""">"&fPageCount(Rs,cPageNo)&"</td>" &vbcrlf
		SearchLeb=SearchLeb&"</tr>" &vbcrlf
		SearchLeb=SearchLeb&"</table>"
		RS.close
		Set RS = Nothing
end function

function AllLeb(TdVolume,TitleVolume,TitleStyle,Sorting,OpenStyle)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select id,TypeID,MovieName,MovieDate from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1"
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		AllLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		AllLeb=AllLeb&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		i=i+1
		AllLeb=AllLeb&"<td><table width=""100%"" border=""0"" cellspacing=""2"" cellpadding=""0"">" &vbcrlf
        AllLeb=AllLeb&"<tr>" &vbcrlf
        AllLeb=AllLeb&"<td width=""70"" style=""line-height: 20px;"">["&ClassName(RS("TypeID"),classurl,OpenS)&"]</td>" &vbcrlf
		AllLeb=AllLeb&"<td><a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
        AllLeb=AllLeb&"<td width=""70"">"&timedate(RS("MovieDate"))&"</td>" &vbcrlf
  		AllLeb=AllLeb&"</tr>" &vbcrlf
		AllLeb=AllLeb&"</table></td>" &vbcrlf
		if i mod TdVolume = 0 then AllLeb=AllLeb&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		AllLeb=AllLeb&"</tr>" &vbcrlf
		AllLeb=AllLeb&"</table>"
end function

function WithLeb(typeid,containSubClass,Region,Sorting,Volume,TdVolume,TrHeight,TitleStyle,TitleVolume,ShowDate,OpenStyle,DhPhotoXz,DhPhoto,HjPhoto)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" ID,MovieName,MovieDate from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1 AND"
 		If typeid<>"" Then 
		If containSubClass<>"" Then
		typeidW=typeid&","&ClassIDIN(typeid)
		typeidW=left(typeidW,len(typeidW)-1)
		sql=sql&" TypeID in ("&typeidW&") AND"
		Else
		sql=sql&" TypeID = "&typeid&" AND"
		End If
		End If
 		If Region<>"" Then sql=sql&" MovieRegion="&Region&" AND"
 		If right(sql,5)="WHERE" then sql=left(sql,clng(len(sql))-5) 
 		If right(sql,3)="AND" then sql=left(sql,clng(len(sql))-3)
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		WithLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		WithLeb=WithLeb&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		movieurl="movie.asp?id="&RS("id")
		i=i+1
		WithLeb=WithLeb&"<td><table width=""100%"" height="""&TrHeight&""" border=""0"" cellspacing=""0"" cellpadding=""0"">" &vbcrlf
        WithLeb=WithLeb&"<tr>" &vbcrlf
		if DhPhotoXz=0 then
        WithLeb=WithLeb&"<td width=""30"">"&i&"</td>" &vbcrlf
		else
        WithLeb=WithLeb&"<td width=""30""><img src="""&Replace(DhPhoto,"[I]",i)&""" border=""0""></td>" &vbcrlf
		end if
		WithLeb=WithLeb&"<td><a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
		if ShowDate<>"" then
        WithLeb=WithLeb&"<td width=""70"">"&timedate(RS("MovieDate"))&"</td>" &vbcrlf
		Hjcolspan=3
		else
		Hjcolspan=2
		end if
  		WithLeb=WithLeb&"</tr>" &vbcrlf
		WithLeb=WithLeb&"<tr>" &vbcrlf
 		WithLeb=WithLeb&"<td colspan="""&Hjcolspan&""" height=""1"" background="""&HjPhoto&"""></td>" &vbcrlf
  		WithLeb=WithLeb&"</tr>" &vbcrlf
		WithLeb=WithLeb&"</table></td>" &vbcrlf
		if i mod TdVolume = 0 then WithLeb=WithLeb&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		WithLeb=WithLeb&"</tr>" &vbcrlf
		WithLeb=WithLeb&"</table>"
end function

function MovieLeb(movc,Content)
		classurl="class.asp?id="&movc(1,0)
		Content=Replace(Content, "{$GetTypeID}", ClassName(movc(1,0),classurl,1))
		Content=Replace(Content, "{$GetMovieName}", movc(2,0))
		Content=Replace(Content, "{$GetMovieActor}", Actor(movc(3,0),"",1))
		Content=Replace(Content, "{$GetMovieRegion}", RegionName(movc(4,0),1))
		Content=Replace(Content, "{$GetMovieCoin}", movc(6,0))
		Content=Replace(Content, "{$GetMovieContent}", movc(11,0))
		Content=Replace(Content, "{$GetMovieDate}", movc(12,0))
		if movc(13,0)=1 then
		Content=Replace(Content, "{$GetMovieGroup}", GetUserGroup(movc(14,0)))
		else
		Content=Replace(Content, "{$GetMovieGroup}", "所有会员")
		end if
		MovieLeb=Content
end function
function GetMovieClick()
		GetMovieClick=GetMovieClick&"<script language=""JavaScript"" src="""&GetConfig("WebiInstallDir")&GetConfig("AdminDir")&"YWNT_TMS_Inc/ajaxrequest.js""></script>"
		GetMovieClick=GetMovieClick&"<span id=""MovieClick""><img src="""&GetConfig("WebiInstallDir")&GetConfig("AdminDir")&"Images/wait.gif"" border=""0"">正在读取</span>" &vbcrlf
		GetMovieClick=GetMovieClick&"<Script language=""JavaScript"">" &vbcrlf
		GetMovieClick=GetMovieClick&"function mycallback(obj) {" &vbcrlf
		GetMovieClick=GetMovieClick&"document.getElementById(""MovieClick"").innerHTML=obj.responseText;" &vbcrlf
		GetMovieClick=GetMovieClick&"}" &vbcrlf
		GetMovieClick=GetMovieClick&"var ajax=new AJAXRequest({" &vbcrlf
		GetMovieClick=GetMovieClick&"url: """&GetConfig("WebiInstallDir")&"Function/MovieClick.asp?id="&movc(0,0)&"""," &vbcrlf
		GetMovieClick=GetMovieClick&"method: ""GET""," &vbcrlf
		GetMovieClick=GetMovieClick&"oncomplete: mycallback," &vbcrlf
		GetMovieClick=GetMovieClick&"charset: ""GB2312""" &vbcrlf
		GetMovieClick=GetMovieClick&"});" &vbcrlf
		GetMovieClick=GetMovieClick&"ajax.get();" &vbcrlf
        GetMovieClick=GetMovieClick&"</script>"
end function
function GetMoviePic(picwidth,picheight)
		GetMoviePic="<img src="""&movc(5,0)&""" width="""&picwidth&""" height="""&picheight&""">"
end function
function MovieErrors(ErrorsType,ErrorsStyle)
url="javascript:window.open('"&GetConfig("WebiInstallDir")&"Users/Users_MovieErrors.asp?ErrorsMovie="&movc(2,0)&"','Errors','scrollbars=0,resizable=0,width=500,height=320,menubar=0,top=168,left=168')"
Select Case ErrorsType
		Case 0
MovieErrors="<a class="""&ErrorsStyle&""" href=""#"" onclick="""&url&""">影片报错</a>"
		Case 1
MovieErrors="<input name=""submit"" type=""button"" onclick="""&url&""" class="""&ErrorsStyle&""" value=""影片报错"">"
		Case 2
MovieErrors="<input name=""Submit"" type=""image"" onclick="""&url&""" src="""&ErrorsStyle&""">"
end Select
end function
function MovieCollection(CollectionType,CollectionStyle)
url="javascript:window.open('"&GetConfig("WebiInstallDir")&"Users/Users_MovieCollection.asp?CollectionMoiveID="&movc(0,0)&"','MovieCollection','scrollbars=0,resizable=0,width=500,height=320,menubar=0,top=168,left=168')"
Select Case CollectionType
		Case 0
MovieCollection="<a class="""&CollectionStyle&""" href=""#"" onclick="""&url&""">收藏影片</a>"
		Case 1
MovieCollection="<input name=""submit"" type=""button"" onclick="""&url&""" class="""&CollectionStyle&""" value=""收藏影片"">"
		Case 2
MovieCollection="<input name=""Submit"" type=""image"" onclick="""&url&""" src="""&CollectionStyle&""">"
end Select
end function
function PromotionForm(textshow,textStyle,PromotionStyle)
PromotionForm=PromotionForm&"<script language=""javascript"">" &vbcrlf
PromotionForm=PromotionForm&"function MM_findObj(n, d) {" &vbcrlf
PromotionForm=PromotionForm&"var p,i,x; if(!d) d=document; if((p=n.indexOf(""?""))>0&&parent.frames.length) {" &vbcrlf
PromotionForm=PromotionForm&"d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}" &vbcrlf
PromotionForm=PromotionForm&"if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];" &vbcrlf
PromotionForm=PromotionForm&"for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);" &vbcrlf
PromotionForm=PromotionForm&"if(!x && document.getElementById) x=document.getElementById(n); return x;" &vbcrlf
PromotionForm=PromotionForm&"}" &vbcrlf
PromotionForm=PromotionForm&"function JM_cc(ob){" &vbcrlf
PromotionForm=PromotionForm&"var obj=MM_findObj(ob); if (obj) {" &vbcrlf
PromotionForm=PromotionForm&"obj.select();js=obj.createTextRange();js.execCommand(""Copy"");}" &vbcrlf
PromotionForm=PromotionForm&"alert(""复制成功！您可以将本片推荐给你QQ或者论坛上的朋友欣赏！"");" &vbcrlf
PromotionForm=PromotionForm&"}" &vbcrlf
PromotionForm=PromotionForm&"document.write('<input name=""page_url"" value=""'+location.href+'"" type="""&textshow&""" readonly class="""&TextStyle&""">"
PromotionForm=PromotionForm&"<input "
if IsPicTF(PromotionStyle)=True then 
PromotionForm=PromotionForm&"type=""image"" src="""&PromotionStyle&""" "
else 
PromotionForm=PromotionForm&"type=""button"" class="""&PromotionStyle&""" value=""复制"" "
end if
PromotionForm=PromotionForm&"onClick=JM_cc(""page_url"")>');" &vbcrlf
PromotionForm=PromotionForm&"</script>" &vbcrlf
end function
function MovieScore(ScoreType,BgColor)
		MovieScore="<iframe src="""&GetConfig("WebiInstallDir")&"function/pinfen.asp?pf_id="&movc(0,0)&"&Action="&ScoreType&"&BgColor="&Replace(BgColor,"#","")&""" frameborder=""0"" width=""100%"" height=""100%"" scrollong=""no"" marginheight=""0"" marginwidth=""0""></iframe>"
end function
function MovieRelated(Style,Volume,TdVolume,picwidth,picheight,ShowTitle,TitleVolume,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1 AND"
 		sql=sql&" TypeID="&movc(1,0)&" AND"
 		sql=sql&" ID<>"&movc(0,0)&""
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		MovieRelated="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		MovieRelated=MovieRelated&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")	
		i=i+1
		Select Case Style
		Case 1
		MovieRelated=MovieRelated&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        MovieRelated=MovieRelated&"</tr>" &vbcrlf
       	MovieRelated=MovieRelated&"</table></td>" &vbcrlf
        MovieRelated=MovieRelated&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		MovieRelated=MovieRelated&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        MovieRelated=MovieRelated&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        MovieRelated=MovieRelated&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        MovieRelated=MovieRelated&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        MovieRelated=MovieRelated&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        MovieRelated=MovieRelated&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		Case 2
		MovieRelated=MovieRelated&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		MovieRelated=MovieRelated&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        MovieRelated=MovieRelated&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        MovieRelated=MovieRelated&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        MovieRelated=MovieRelated&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        MovieRelated=MovieRelated&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
		MovieRelated=MovieRelated&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></td></a>" &vbcrlf
        MovieRelated=MovieRelated&"</tr>" &vbcrlf
       	MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		Case 3
		MovieRelated=MovieRelated&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center""><a href="""&movieurl&""" "&OpenS&"><img src="""&RS("MoviePic")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        MovieRelated=MovieRelated&"</tr>" &vbcrlf
       	MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		MovieRelated=MovieRelated&"</tr><tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center"" valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		MovieRelated=MovieRelated&"主演："&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        MovieRelated=MovieRelated&"地区："&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        MovieRelated=MovieRelated&"类型："&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        MovieRelated=MovieRelated&"影币："&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        MovieRelated=MovieRelated&"观看次数："&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"添加时间："&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        MovieRelated=MovieRelated&"剧情看点："&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		Case 4
		MovieRelated=MovieRelated&"<td><table width=""100%"" border=""0"" cellspacing=""2"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td width=""70"" style=""line-height: 20px;"">["&RegionName(RS("MovieRegion"),OpenS)&"]</td>" &vbcrlf
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<td><a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"<td width=""70"">"&timedate(RS("MovieDate"))&"</td>" &vbcrlf
		end if
  		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		end Select
		if i mod TdVolume = 0 then MovieRelated=MovieRelated&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table>"
end function
function MovieActor(ActorStyle,OpenStyle)
if OpenStyle=1 then
OpenS="target=""_blank"""
end if
MovieActor="<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""3"">"
MovieActor=MovieActor&"<tr>" &vbcrlf
MovieActor=MovieActor&"<td>" &vbcrlf
yanyuan = split(movc(3,0),"|") 
For n=0 To Ubound(yanyuan)
MovieActor=MovieActor&"<table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
MovieActor=MovieActor&"<tr>" &vbcrlf
MovieActor=MovieActor&"<td width=""15%""><a href="""&GetConfig("WebiInstallDir")&"class.asp?searchtype=2&Keyword="&yanyuan(n)&""" "&OpenS&" class="""&ActorStyle&""">"&yanyuan(n)&"</a></td>" &vbcrlf
MovieActor=MovieActor&"<td>" &vbcrlf
set RS=server.createobject("adodb.recordset")
sql1="select ID,MovieName from YWNT_TMS_Movie where  MovieHide=0 and MovieRecovery=0 and MovieAudit=1 and InStr(1,LCase(MovieActor),LCase('"&yanyuan(n)&"'),0)<>0 order by ID desc" 
RS.open sql1,conn,1,1
do while not RS.eof
movieurl="movie.asp?id="&RS("id")
MovieActor=MovieActor&"<a href="""&movieurl&""" "&OpenS&" class="""&ActorStyle&""">"&RS("MovieName")&"</a>" &vbcrlf
RS.movenext
loop
RS.close
set RS=nothing
MovieActor=MovieActor&"</td>" &vbcrlf
MovieActor=MovieActor&"</tr>" &vbcrlf
MovieActor=MovieActor&"</table>" &vbcrlf
next 
MovieActor=MovieActor&"</td>" &vbcrlf
MovieActor=MovieActor&"</tr>" &vbcrlf
MovieActor=MovieActor&"</table>" &vbcrlf
end function
function MovieComments(CommentsVolume)
MovieComments=MovieComments&"<SCRIPT src="""&GetConfig("WebiInstallDir")&"Users/Users_Comments.asp?MovieID="&movc(0,0)&"&CommentsVolume="&CommentsVolume&""" type=text/javascript></SCRIPT>"
MovieComments=MovieComments&"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""3"">" &vbcrlf
MovieComments=MovieComments&"<form action="""&GetConfig("WebiInstallDir")&"Users/Users_SaverComments.asp"" method=""post"" name=""form"" id=""form"" onSubmit=""return process_comment(this);"">" &vbcrlf
MovieComments=MovieComments&"<tr>" &vbcrlf
MovieComments=MovieComments&"<td width=""40"">内容：</td>" &vbcrlf
MovieComments=MovieComments&"<td><textarea name=""CommentsContent"" rows=""8"" wrap=""virtual"" id=""textarea"" style=""width:100%""></textarea></td>" &vbcrlf
MovieComments=MovieComments&"<td style=""width: 180px"">" &vbcrlf
for i=1 to 20
if len(i)=1 then a="0" & i else a=i
MovieComments=MovieComments&"<img src="""&GetConfig("WebiInstallDir")&"function/faces/"&a&".gif"" border=0 onclick=""insertface('[face"&a&"]')"">"
next
MovieComments=MovieComments&"</td>" &vbcrlf
MovieComments=MovieComments&"</tr>" &vbcrlf
MovieComments=MovieComments&"<tr>" &vbcrlf
MovieComments=MovieComments&"<td colspan=""3"" align=""center"">" &vbcrlf
MovieComments=MovieComments&"<input name=""ID"" type=""hidden"" id=""reviewname"" value="""&movc(0,0)&""" />" &vbcrlf
MovieComments=MovieComments&"<input type=""submit"" name=""Submit"" value="" 提交 "" />" &vbcrlf
MovieComments=MovieComments&"<input name=""Reset"" type=""reset"" id=""Reset"" value="" 重置 "" /></td>" &vbcrlf
MovieComments=MovieComments&"</tr>" &vbcrlf
MovieComments=MovieComments&"</form>" &vbcrlf
MovieComments=MovieComments&"</table>" &vbcrlf
MovieComments=MovieComments&"<div style=""PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px"" align=""right""><a href="""&GetConfig("WebiInstallDir")&"Users/Users_index.asp?Url=Users_AllComments.asp?MovieID="&movc(0,0)&""" target=""_blank"">更多评论</a></div>" &vbcrlf
MovieComments=MovieComments&"<script language=""JavaScript"" type=""text/javascript"">" &vbcrlf
MovieComments=MovieComments&"function process_comment(form) {" &vbcrlf
MovieComments=MovieComments&"if (form.CommentsContent.value=='') {" &vbcrlf
MovieComments=MovieComments&"alert(""请填写内容！"");" &vbcrlf
MovieComments=MovieComments&"form.CommentsContent.focus();" &vbcrlf
MovieComments=MovieComments&"return false;" &vbcrlf
MovieComments=MovieComments&"}" &vbcrlf
MovieComments=MovieComments&"}" &vbcrlf
MovieComments=MovieComments&"function insertface(smileface)" &vbcrlf
MovieComments=MovieComments&"{" &vbcrlf
MovieComments=MovieComments&"document.form.CommentsContent.value+=smileface;" &vbcrlf
MovieComments=MovieComments&"}" &vbcrlf
MovieComments=MovieComments&"</script>" &vbcrlf
end function
function FlashSlide(typeid,Style,Slidewidth,Slideheight)
select case Style
Case 1
FlashSlide="<script type=""text/javascript"">" &vbcrlf
FlashSlide=FlashSlide&"var focus_width="&Slidewidth&"" &vbcrlf
FlashSlide=FlashSlide&"var focus_height="&Slideheight&"" &vbcrlf
FlashSlide=FlashSlide&"var text_height=0" &vbcrlf
FlashSlide=FlashSlide&"var swf_height = focus_height+text_height" &vbcrlf

Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select top 6 SlideName,SlidePic,SlideUrl,SlideIndex from YWNT_TMS_Slide Where"
if typeid<>"" then
sql=sql&" SlideType="&typeid&""
else
sql=sql&" SlideIndex=1"
end if
sql=sql&" Order by SlideWith asc,ID asc"
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
FlashSlide=FlashSlide&"imgUrl"&i&"="""&RS("SlidePic")&""";" &vbcrlf
FlashSlide=FlashSlide&"imgtext"&i&"="""&RS("SlideName")&""";" &vbcrlf
FlashSlide=FlashSlide&"imgLink"&i&"=escape("""&RS("SlideUrl")&""");" &vbcrlf
pic=pic&"imgUrl"&i&"+""|""+"
links=links&"imgLink"&i&"+""|""+"
texts=texts&"imgtext"&i&"+""|""+"
RS.movenext     
loop
RS.close
Set RS = Nothing
FlashSlide=FlashSlide&"var pics="&left(pic,clng(len(pic))-5) &vbcrlf
FlashSlide=FlashSlide&"var links="&left(links,clng(len(links))-5) &vbcrlf
FlashSlide=FlashSlide&"var texts="&left(texts,clng(len(texts))-5) &vbcrlf
FlashSlide=FlashSlide&"document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"" width=""'+ focus_width +'"" height=""'+ swf_height +'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""allowScriptAccess"" value=""sameDomain""><param name=""movie"" value="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/flash.swf""><param name=""quality"" value=""high""><param name=""bgcolor"" value=""#F0F0F0"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""FlashVars"" value=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<embed src="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/flash.swf"" wmode=""opaque"" FlashVars=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"" menu=""false"" bgcolor=""#F0F0F0"" quality=""high"" width=""'+ focus_width +'"" height=""'+ focus_height +'"" allowScriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" />');  document.write('</object>');" &vbcrlf
FlashSlide=FlashSlide&"</script>" &vbcrlf
Case 2
Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select top 6 SlideName,SlidePic,SlideUrl,SlideIndex from YWNT_TMS_Slide Where"
if typeid<>"" then
sql=sql&" SlideType="&typeid&""
else
sql=sql&" SlideIndex=1"
end if
sql=sql&" Order by SlideWith asc,ID asc"
Rs.open sql,Conn,1,1
do while not RS.eof
pic=pic&"'"&RS("SlidePic")&"'"&","
title=title&"'"&RS("SlideName")&"'"&","
Link=Link&"'"&RS("SlideUrl")&"'"&","
RS.movenext     
loop
RS.close
Set RS = Nothing
FlashSlide="<DIV style="" OVERFLOW: hidden; WIDTH: "&Slidewidth&"px; HEIGHT: "&Slideheight&"px""><SCRIPT language=JavaScript src="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/slideshow.js"" type=text/javascript></SCRIPT>"
FlashSlide=FlashSlide&"<SCRIPT language=JavaScript type=text/javascript>"
FlashSlide=FlashSlide&"var mySlideList = ["&left(pic,clng(len(pic))-1)&"];"
FlashSlide=FlashSlide&"var myAltList = ["&left(title,clng(len(title))-1)&"];"
FlashSlide=FlashSlide&"var myLinkList = ["&left(Link,clng(len(Link))-1)&"];"
FlashSlide=FlashSlide&"var mySlideShow = new SlideShowSize(mySlideList,myAltList,myLinkList,'imgUnit',5000, 'mySlideShow',"&Slidewidth&","&Slideheight&",0,800,600);"
FlashSlide=FlashSlide&"mySlideShow.init();"
FlashSlide=FlashSlide&"mySlideShow.play();"
FlashSlide=FlashSlide&"</SCRIPT></DIV>"
end select
end function
function MoviePlay(PlayStyle,PlayType,Play1Style,Play2Style,Play3Style)
if movc(8,0)<>1 then
MoviePlay=MoviePlay&"该影片已关闭观看"
exit function
else
if PlayType=4 then
Set RS = Server.CreateObject(YWNT_TMS_RS)
RS.Open ("Select P2PType From YWNT_TMS_Sever Where ID="&movc(15,0)&""), Conn, 1, 1
P2PType = RS("P2PType")
RS.Close
Set RS = Nothing
PlayType=P2PType+3
end if
select case PlayType
Case 4
'bobop2p
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_P2PUrl where MovieID="&movc(0,0)&" order by ID asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=3
playweb="PlayerP2PBobo.asp"
Case 5
'原力p2p
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select filmid from p2pfilm where MovieID="&movc(0,0)&" order by filmid asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=4
playweb="PlayerP2PForceTech.asp"
Case 6
'Qvod
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_P2PUrl where MovieID="&movc(0,0)&" order by ID asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=5
playweb="PlayerQvod.asp"
Case else
'普通
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select id from YWNT_TMS_MovieUrl where MovieID="&movc(0,0)&" order by id asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=1
IF movc(16,0)=3 Then
playweb="PlayCollect.asp" '小偷
ElseIF movc(16,0)=4 Then
playweb="PlayFramework.asp"	'框架
Else
IF GetSysPlay("MovieType")=0 Then
playweb="Play.asp"
Else
playweb="PlayPower.asp"
End IF
End IF
end select

if Moviefor=True then
for c=1 to Ubound(url,2)+1
MoviePlay=MoviePlay&"<div style=""width:60px;float:left;text-align:center;""><a href=""javascript:OpenWindow('"&GetConfig("WebiInstallDir")&playweb&"?ID="&movc(0,0)&"&UrlID="&url(0,c-1)&"&MovieType="&MovieType&"&SeverType="&PlayType&"')"">"
if Ubound(url,2)<=2 then
if PlayStyle=0 then
MoviePlay=MoviePlay&"<span class="""&Play1Style&""">第"&c&"集</span></a></div>"
else
if c=1 then
MoviePlay=MoviePlay&"<img src="""&Play1Style&""" border=""0""></a></div>"
elseif c=2 then
MoviePlay=MoviePlay&"<img src="""&Play2Style&""" border=""0""></a></div>"
elseif c=3 then
MoviePlay=MoviePlay&"<img src="""&Play3Style&""" border=""0""></a></div>"
end if
end if
else
MoviePlay=MoviePlay&"<span class="""&Play1Style&""">第"&c&"集</span></a></div>"
end if
next
end if
end if
end function

function MovieDown(DownType,DownStyle)
On Error Resume Next
select case GetSysPlay("MovieBtDown")
Case 0
if movc(9,0)<>1 then
MovieDown="该影片已关闭下载"
exit function
else
MovieType=2
playweb="Down.asp"
MovieDown="<a href=""javascript:OpenWindow('"&GetConfig("WebiInstallDir")&playweb&"?ID="&movc(0,0)&"&MovieType="&MovieType&"')"">"
if DownType=1 then
MovieDown=MovieDown&"<img src="""&DownStyle&""" border=""0""></a>"
else
MovieDown=MovieDown&"<span class="""&DownStyle&""">点击下载</span></a>&nbsp;&nbsp;"
end if
end if
Case 1
MovieDown="<a href=""http://su.kuaiche.com/?site=bt.ywnt.net&k="&URLEncode8(movc(2,0))&""" target=""_blank"">BT联盟下载该影片</a>"
end select
end function

Function URLEncode8(ByVal strIn)
Dim ret
Dim i
Dim u
Dim b(2)
For i = 1 To Len(strIn)
u = AscW(Mid(strIn, i, 1)) And &HFFFF&
If u < 128 Then
If isalnum(u) Then
ret = ret & Chr(u)
Else
ret = ret & "%" & LeftFill(Hex(u), 2, "0")
End If
ElseIf u < 2048 Then
b(1) = &H80 Xor (u And &H3F)
u = u \ (2 ^ 6)
b(0) = &HC0 Xor (u And &H1F)
ret = ret & "%" & Hex(b(0)) & "%" & Hex(b(1))
Else
b(2) = &H80 Xor (u And &H3F)
u = u \ (2 ^ 6)
b(1) = &H80 Xor (u And &H3F)
u = u \ (2 ^ 6)
b(0) = &HE0 Xor (u And &HF)
ret = ret & "%" & Hex(b(0)) & "%" & Hex(b(1)) & "%" & Hex(b(2))
End If
Next
URLEncode8 = ret
End Function

function featureleb(Style,Volume,TdVolume,FStyle,picwidth,picheight,OpenStyle)
featureleb="<table width=""100%""  border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
featureleb=featureleb&"<tr>" &vbcrlf
Set Rs = server.CreateObject(YWNT_TMS_RS)
sql="Select top "&Volume&" ID,FeatureName,FeatureNameE,FeaturePIC from YWNT_TMS_FeatureClass Order by FeatureWith asc,id asc"
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
if OpenStyle=1 then
OpenS="target=""_blank"""
end if
Featureurl="Feature.asp?Template="&RS("ID")
Select Case Style
Case 1
featureleb=featureleb&"<td><a href="""&Featureurl&""" "&OpenS&"><img src="""&RS("FeaturePIC")&""" width="""&picwidth&""" height="""&picheight&""" border=""0"" class="""&FStyle&"""></a></td>"&vbcrlf
Case 2
featureleb=featureleb&"<td><a href="""&Featureurl&""" "&OpenS&" class="""&FStyle&""">"&RS("FeatureName")&"</a></td>" &vbcrlf
end Select
if i mod TdVolume = 0 then featureleb=featureleb&"</tr><tr>" &vbcrlf
RS.movenext     
loop
RS.close     
set RS=nothing
featureleb=featureleb&"</tr>" &vbcrlf
featureleb=featureleb&"</table>" &vbcrlf
end function

function NoticeLeb(Volume,TdVolume,TitleStyle,TitleVolume,ShowDate,OpenStyle,DhPhoto,HjPhoto)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" ID,NoticeTitle,NoticeDate,NoticeColor,NoticeStrong,NoticeEm from YWNT_TMS_Notice WHERE NoticeType=0 Order by ID desc"
		Rs.open sql,Conn,1,1
		NoticeLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		NoticeLeb=NoticeLeb&"<tr>" &vbcrlf
		do while not RS.eof
		i=i+1
		NoticeTitle=zf(RS("NoticeTitle"),TitleVolume,"")
	 	IF Rs("NoticeStrong")<>"" Then
	 	NoticeTitle="<strong>"& NoticeTitle &"</strong>"
	 	End If
	 	IF Rs("NoticeEm")<>"" Then
	 	NoticeTitle = "<em>"&NoticeTitle&"</em>"
	 	End if
	 	IF Rs("NoticeColor")<>"" Then
	 	NoticeTitle = "<font color="""&Rs("NoticeColor")&""">"&NoticeTitle&"</font>"
	 	End If
		If IsPicTF(DhPhoto)=True Then
		DhStyle = "<img src="""&DhPhoto&""" border=""0"">"
		Else
		DhStyle = ""&DhPhoto&""
		End If
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
        NoticeLeb=NoticeLeb&"<td style=""line-height: 20px;"">"&DhStyle&"</td>" &vbcrlf
		NoticeLeb=NoticeLeb&"<td><a href="""&GetConfig("WebiInstallDir")&"Users/Users_Index.asp?Url=Users_Notice.asp?Action=NoticeContent&ID="&RS("ID")&""" "&OpenS&" class="""&TitleStyle&""">"&NoticeTitle&"</a></td>" &vbcrlf
		if ShowDate<>"" then
        NoticeLeb=NoticeLeb&"<td width=""100"">"&timedate(RS("NoticeDate"))&"</td>" &vbcrlf
		Hjcolspan=3
		else
		Hjcolspan=2
		end if
  		NoticeLeb=NoticeLeb&"</tr>" &vbcrlf
		NoticeLeb=NoticeLeb&"<tr>" &vbcrlf
 		NoticeLeb=NoticeLeb&"<td colspan="""&Hjcolspan&""" height=""1"" background="""&HjPhoto&"""></td>" &vbcrlf
		if i mod TdVolume = 0 then NoticeLeb=NoticeLeb&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		NoticeLeb=NoticeLeb&"</tr>" &vbcrlf
		NoticeLeb=NoticeLeb&"</table>"
end function

function HelpLeb(Volume,TdVolume,TitleStyle,TitleVolume,ShowDate,OpenStyle,DhPhoto,HjPhoto)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" ID,HelpHeading,HelpDate from YWNT_TMS_UsersHelp Order by ID desc"
		Rs.open sql,Conn,1,1
		HelpLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		HelpLeb=HelpLeb&"<tr>" &vbcrlf
		do while not RS.eof
		i=i+1
		If IsPicTF(DhPhoto)=True Then
		DhStyle = "<img src="""&DhPhoto&""" border=""0"">"
		Else
		DhStyle = ""&DhPhoto&""
		End If
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
        HelpLeb=HelpLeb&"<td style=""line-height: 20px;"">"&DhStyle&"</td>" &vbcrlf
		HelpLeb=HelpLeb&"<td><a href="""&GetConfig("WebiInstallDir")&"Users/Users_Index.asp?Url=Users_Help.asp?Action=Content&ID="&RS("ID")&""" "&OpenS&" class="""&TitleStyle&""">"&zf(RS("HelpHeading"),TitleVolume,"")&"</a></td>" &vbcrlf
		if ShowDate<>"" then
        HelpLeb=HelpLeb&"<td width=""100"">"&timedate(RS("HelpDate"))&"</td>" &vbcrlf
		Hjcolspan=3
		else
		Hjcolspan=2
		end if
  		HelpLeb=HelpLeb&"</tr>" &vbcrlf
		HelpLeb=HelpLeb&"<tr>" &vbcrlf
 		HelpLeb=HelpLeb&"<td colspan="""&Hjcolspan&""" height=""1"" background="""&HjPhoto&"""></td>" &vbcrlf
		if i mod TdVolume = 0 then HelpLeb=HelpLeb&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		HelpLeb=HelpLeb&"</tr>" &vbcrlf
		HelpLeb=HelpLeb&"</table>"
end function

function UserLoginLeb(LableType,LoginDisStyle,BGStyle,TextStyle,ButtonStyle,Reg_LinkCss,Get_PassCss,Out_LinkCss,Users_LinkCss)
		UserLoginLeb="<iframe src="""&GetConfig("WebiInstallDir")&"Users/Users_Login.asp?LableType="&LableType&"&LoginDisStyle="&LoginDisStyle&"&BGStyle="&BGStyle&"&TextStyle="&TextStyle&"&ButtonStyle="&ButtonStyle&"&Reg_LinkCss="&Reg_LinkCss&"&Get_PassCss="&Get_PassCss&"&Out_LinkCss="&Out_LinkCss&"&Users_LinkCss="&Users_LinkCss&"&CssID="&CssID&""" frameborder=""0"" width=""100%""  name=""Login"" onload=""document.all('Login').style.height=Login.document.body.scrollHeight;"" scrollong=""no"" marginheight=""0"" marginwidth=""0""></iframe>"
end function

function SearchInputLeb(LableType,SearchDisStyle,BGStyle,TextStyle,SelectStyle,ButtonStyle)
SearchInputLeb=SearchInputLeb&"<SCRIPT>" &vbcrlf
SearchInputLeb=SearchInputLeb&"function formcheck()" &vbcrlf
SearchInputLeb=SearchInputLeb&"{" &vbcrlf
SearchInputLeb=SearchInputLeb&"if (searchform.Keyword.value=="""")" &vbcrlf
SearchInputLeb=SearchInputLeb&"{" &vbcrlf
SearchInputLeb=SearchInputLeb&"alert('请输入搜索内容!');" &vbcrlf
SearchInputLeb=SearchInputLeb&"searchform.Keyword.focus();" &vbcrlf
SearchInputLeb=SearchInputLeb&"return false;" &vbcrlf
SearchInputLeb=SearchInputLeb&"}" &vbcrlf
SearchInputLeb=SearchInputLeb&"}" &vbcrlf
SearchInputLeb=SearchInputLeb&"</SCRIPT>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<style type=""text/css"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<!--" &vbcrlf
SearchInputLeb=SearchInputLeb&".td {" &vbcrlf
SearchInputLeb=SearchInputLeb&"font-size: 12px;" &vbcrlf
SearchInputLeb=SearchInputLeb&"color: #333333;" &vbcrlf
SearchInputLeb=SearchInputLeb&"}" &vbcrlf
SearchInputLeb=SearchInputLeb&"-->" &vbcrlf
SearchInputLeb=SearchInputLeb&"</style>" &vbcrlf
If IsPicTF(BGStyle)=True Then
	DivBgStyle = " style=""background-image:url(" & BGStyle & ");"""
Else
	DivBgStyle = " class=""" & BGStyle & """"
End If
select case SearchDisStyle
Case 0
SearchInputLeb=SearchInputLeb&"<table border=""0"" cellspacing=""0"" cellpadding=""0"" "&DivBgStyle&">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<form name=""searchform"" action="""&GetConfig("WebiInstallDir")&"search.asp"" method=""post"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<td height=""25"" colspan=""2"" align=""center"" class=""td"">影片搜索：" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input name=""Keyword"" type=""text"" class="""&TextStyle&"""></td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<tr align=""center"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<td height=""25""><select name=""searchtype"" class="""&SelectStyle&""">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""1"">按名称查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""2"">按演员查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""3"">按全部查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</select>&nbsp;" &vbcrlf
SearchInputLeb=SearchInputLeb&"</td><td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input onClick=""return formcheck();"" size=""10"" "
if IsPicTF(ButtonStyle)=True then 
SearchInputLeb=SearchInputLeb&"type=""image"" src="""&ButtonStyle&""" "
else 
SearchInputLeb=SearchInputLeb&"type=""submit"" class="""&ButtonStyle&""" value=""搜索"""
end if
SearchInputLeb=SearchInputLeb&"></td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</form>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</table>" &vbcrlf
Case 1
SearchInputLeb=SearchInputLeb&"<table border=""0"" cellpadding=""0"" cellspacing=""0"" "&DivBgStyle&">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<form name=""searchform"" action="""&GetConfig("WebiInstallDir")&"search.asp"" method=""post"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<td height=""25"" align=""center"" class=""td"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input name=""Keyword"" type=""text"" class="""&TextStyle&""">&nbsp;" &vbcrlf
SearchInputLeb=SearchInputLeb&"</td><td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<select name=""searchtype"" class="""&SelectStyle&""">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""1"">按名称查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""2"">按演员查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""3"">按全部查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</select>&nbsp;" &vbcrlf
SearchInputLeb=SearchInputLeb&"</td><td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input onClick=""return formcheck();"" "
if IsPicTF(ButtonStyle)=True then 
SearchInputLeb=SearchInputLeb&"type=""image"" src="""&ButtonStyle&""""
else 
SearchInputLeb=SearchInputLeb&"type=""submit"" class="""&ButtonStyle&""" value=""搜索"""
end if
SearchInputLeb=SearchInputLeb&"></td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</form>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</table>" &vbcrlf
end select 
end function

function SetHome()
SetHome="<a href=""#"" onClick=""this.style.behavior='url(#default#homepage)';this.setHomePage('"&GetConfig("Weburl")&"');"" onMouseOut=""window.status='"&GetConfig("WebName")&"';return true;"" onMouseOver=""window.status='将本站设定为您的首页';return true;"">设为首页</a>"
end function

function SetCollection()
SetCollection="<a href=""#"" onClick=""javascript:window.external.addFavorite('"&GetConfig("Weburl")&"','"&GetConfig("WebName")&"');return false;"" onMouseOut=""window.status='"&GetConfig("WebName")&"';return true;"" onMouseOver=""window.status='将本站加入您的收藏夹';return true;"">加入收藏</a>"
end function

function SetupDir()
SetupDir=GetConfig("WebiInstallDir")
end function

function WebUrlW()
WebUrlW=GetConfig("WebUrl")
end function

function WebNameW()
WebNameW=GetConfig("WebName")
end function

function Vote(ID)
Vote="<script language=""javascript"" src="""&GetConfig("WebiInstallDir")&"Function/vote.asp?id="&ID&"""></script>"
end function

function Ad(ID)
Ad="<script language=""javascript"" src="""&GetConfig("WebiInstallDir")&"AD/Ad.asp?id="&ID&"""></script>"
end function

function LinkLeb(Style,Volume,TdVolume)
LinkLeb="<table width=""100%""  border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
LinkLeb=LinkLeb&"<tr>" &vbcrlf
Set Rs = server.CreateObject(YWNT_TMS_RS)
Select Case Style
Case 1
sql="Select top "&Volume&" LinkUrl,LinkPic from YWNT_TMS_Link where LinkType=1 and LinkAudit=1 Order by LinkWith asc,id desc"
Case 2
sql="Select top "&Volume&" LinkName,LinkUrl from YWNT_TMS_Link where LinkType=0 and LinkAudit=1 Order by LinkWith asc,id desc"
end Select
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
Select Case Style
Case 1
LinkLeb=LinkLeb&"<td><a href="""&RS("LinkUrl")&""" target=""_blank""><img src="""&RS("LinkPic")&""" width="""&GetLink("LinkPicWidth")&""" height="""&GetLink("LinkPicHeight")&""" border=""0""></a></td>" &vbcrlf
Case 2
LinkLeb=LinkLeb&"<td><a href="""&RS("LinkUrl")&""" target=""_blank"">"&RS("LinkName")&"</a></td>" &vbcrlf
end Select
if i mod TdVolume = 0 then LinkLeb=LinkLeb&"</tr><tr>" &vbcrlf
RS.movenext     
loop
RS.close     
set RS=nothing
LinkLeb=LinkLeb&"</tr>" &vbcrlf
LinkLeb=LinkLeb&"</table>" &vbcrlf
end function

function NavLeb(ClassType,LinkCss,margin,Segregation,ShowLive,ShowFree,ShowAll,OpenStyle,Typeid)
if OpenStyle=1 then
OpenS="target=""_blank"""
end if
Set Rs=Server.CreateObject(YWNT_TMS_RS)
Select Case ClassType
Case 1
sql="select ID,ClassName,ClassNameE from YWNT_TMS_MovieClass where ClassID=0 Order by ClassWith asc,id desc"
NavLeb="<a href="""&GetConfig("Weburl")&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">首页</a>"
IF ShowLive<>"" Then
NavMei="<a class="""&LinkCss&""" href=""#"" style=""margin-right:"&margin&";margin-left:"&margin&""" onClick=""window.open('"&GetConfig("WebiInstallDir")&"Live/live.asp','Tvwindow', 'height=463, width=702, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');"">直播</a>"&Segregation
End IF
IF GetConfig("WebHtmlMode")<>"asp" Then

IF ShowFree<>"" Then
NavMei=NavMei&"<a href="""&GetConfig("WebiInstallDir")&"Freemovie."&GetConfig("WebHtmlMode")&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">免费试看</a>"&Segregation
End IF

IF ShowAll<>"" Then
NavMei=NavMei&"<a href="""&GetConfig("WebiInstallDir")&"Allmovie."&GetConfig("WebHtmlMode")&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">全部影片</a>"
End IF

Else

IF ShowFree<>"" Then
NavMei=NavMei&"<a href="""&GetConfig("WebiInstallDir")&"Freemovie.asp"" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">免费试看</a>"&Segregation
End IF

IF ShowAll<>"" Then
NavMei=NavMei&"<a href="""&GetConfig("WebiInstallDir")&"Allmovie.asp"" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">全部影片</a>"
End IF

End If

Case 2
if Typeid="" or Typeid=0 then exit function
sql="select ID,ClassName,ClassNameE from YWNT_TMS_MovieClass where ClassID="&Typeid&" Order by ClassWith asc,id desc"
End Select
Rs.open sql,Conn,1,1
if RS.eof then
Set RsClass=Server.CreateObject(YWNT_TMS_RS)
SqlClass="select ClassID from YWNT_TMS_MovieClass where ID="&Typeid&" Order by ClassWith asc,id desc"
RsClass.open SqlClass,Conn,1,1
TypeidX=RsClass("ClassID")
RsClass.close   
set RsClass=nothing
NavLeb=NavLeb(ClassType,LinkCss,margin,Segregation,"","","",OpenStyle,TypeidX)
exit function
else
do while not RS.eof
classurl="Class.asp?ID="&RS("ID")
NavLeb=NavLeb&"<a href="""&classurl&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">"&RS("ClassName")&"</a>"
RS.movenext
if not rs.eof then 
NavLeb=NavLeb&Segregation
end if
loop
NavLeb=NavLeb&NavMei
end if
RS.close   
set RS=nothing
end function

function TvLeb(Tvname,CssClass)
TvLeb="<a class="""&CssClass&""" href=""#"" onClick=""window.open('"&GetConfig("WebiInstallDir")&"Live/live.asp','Tvwindow', 'height=463, width=702, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');"">"
If IsPicTF(Tvname)=True Then
TvLeb=TvLeb&"<img src="""&Tvname&""" border=""0"">"
else
TvLeb=TvLeb&Tvname
end if
TvLeb=TvLeb&"</a>"
end function

function Tophtml(Keywords,Description,Title,Css,Content)
Tophtml=Tophtml&"<html>" &vbcrlf
Tophtml=Tophtml&"<head>" &vbcrlf
Tophtml=Tophtml&"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />" &vbcrlf
Tophtml=Tophtml&"<meta name=""Keywords"" content="""&Keywords&""" />" &vbcrlf
Tophtml=Tophtml&"<meta name=""Description"" content="""&Description&""" />" &vbcrlf
Tophtml=Tophtml&"<title>"&title&"</title>" &vbcrlf
Tophtml=Tophtml&Css
Tophtml=Tophtml&"</head>" &vbcrlf
Tophtml=Tophtml&"<body>" &vbcrlf
Tophtml=Tophtml&Content &vbcrlf
Tophtml=Tophtml&"</body>" &vbcrlf
Tophtml=Tophtml&"</html>"
end function

function Location(Style,TemplateType,Typeid)
Location="<a href="""&GetConfig("Weburl")&""" class="""&Style&""">首页</a>"
Select Case TemplateType
Case 2,3
Location=Location&ClassLocation(Typeid,Style)
Case 4
Location=Location&ClassLocation(movc(1,0),Style)&" - <a href=""#"" class="""&Style&""">"&movc(2,0)&"</a>"
Case 5
Location=Location&" - <a href=""#"" class="""&Style&""">专题栏目</a> - <a href=""#"" class="""&Style&""">"&FeatureNameW&"</a>"
Case 6
IF Request("searchtype")=1 Then
Location=Location&" - <a href=""#"" class="""&Style&""">查找影片</a> - <a href=""#"" class="""&Style&""">"&Request("Keyword")&"</a>"
ElseIF Request("searchtype")=2 Then
Location=Location&" - <a href=""#"" class="""&Style&""">查找演员</a> - <a href=""#"" class="""&Style&""">"&Request("Keyword")&"</a>"
ElseIF Request("searchtype")=3 Then
Location=Location&" - <a href=""#"" class="""&Style&""">查找关键字</a> - <a href=""#"" class="""&Style&""">"&Request("Keyword")&"</a>"
ElseIF Request("searchtype")=4 Then
Location=Location&" - <a href=""#"" class="""&Style&""">地区分类</a> - "&RegionName(Request("Keyword"),"")
End IF
Case 7
Location=Location&" - <a href=""#"" class="""&Style&""">免费试看</a>"
Case 8
Location=Location&" - <a href=""#"" class="""&Style&""">全部影片</a>"
end Select
end function

Function ClassLocation(Typeid,Style)
Set RsClass=Server.CreateObject(YWNT_TMS_RS)
SqlClass="select ID,ClassID,ClassName,ClassNameE from YWNT_TMS_MovieClass where ID="&Typeid&" Order by  id desc"
RsClass.open SqlClass,Conn,1,1
if not RsClass.eof then 
classurl="Class.asp?ID="&RsClass("ID")
ClassLocation=ClassLocation(RsClass("ClassID"),Style)&" - <a href="""&classurl&""" class="""&Style&""">"&RsClass("ClassName")&"</a>" &vbcrlf
end if
RsClass.close
set RsClass=nothing
End Function
%>