<html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--专题影片管理</title>
<LINK href="css/css.css" type=text/css rel=stylesheet>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<script language=JavaScript src='../Editor/language/schi/editor_lang.js'></script>
<script language=JavaScript src='../Editor/editor.js'></script>
<script language="JavaScript" src="YWNT_TMS_inc/YWNT_TMS_Common.js"></script>
<script language="JavaScript" src="YWNT_TMS_Inc/Calendar.js"></script>
<!--#include file="../Conn.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Page.asp" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("FeatureMovie")
sub EditSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Movie where ID="&NoSqlHack(Request.Form("ID"))&" Order by ID desc"
		Rs.open sql,Conn,1,3
		RS("SeverID")=NoSqlHack(Request.Form("SeverID"))
		RS("TypeID")=NoSqlHack(Request.Form("ClassID"))
		RS("MovieName")=NoSqlHack(Request.Form("MovieName"))
		RS("MovieActor")=NoSqlHack(Request.Form("MovieActor"))
		RS("MovieRegion")=NoSqlHack(Request.Form("MovieRegion"))
		RS("MoviePic")=NoSqlHack(Request.Form("MoviePic"))
		RS("MovieCoin")=NoSqlHack(Request.Form("MovieCoin"))
		RS("MovieClick")=NoSqlHack(Request.Form("MovieClick"))
		RS("MovieCompetence")=NoSqlHack(Request.Form("MovieCompetence"))
		RS("MovieGroup")=NoSqlHack(Request.Form("GroupID"))
		RS("MovieLook")=NoSqlHack(Request.Form("MovieLook"))
		RS("MovieDown")=NoSqlHack(Request.Form("MovieDown"))
		RS("MovieSuggest")=NoSqlHack(Request.Form("MovieSuggest"))
		RS("MovieHot")=NoSqlHack(Request.Form("MovieHot"))
		RS("MovieSerialization")=NoSqlHack(Request.Form("MovieSerialization"))
		if Request.Form("MovieFeature")<>"" then
		RS("MovieFeature")=1
		else
		RS("MovieFeature")=0
		end if
		if Request.Form("MovieFree")<>"" then
		RS("MovieFree")=NoSqlHack(Request.Form("MovieFree"))
		end if
		if Request.Form("FeatureID")<>"" then
		RS("MovieFeatureID")=NoSqlHack(Request.Form("FeatureID"))
		end if
		RS("MovieContent")=NoSqlHack(Request.Form("Content"))
		RS("MovieAudit")=1
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		call EditMovieUrl("YWNT_TMS_MovieUrl","EditUrl","MovieUrl",NoSqlHack(Request.Form("ID")))
		if Request.Form("Url1")<>"" then
		call AddMovieUrl("YWNT_TMS_MovieUrl",NoSqlHack(Request.Form("UrlVolume")),"Url","MovieUrl",NoSqlHack(Request.Form("ID")))
		end if
			Select Case SeverP2pType(NoSqlHack(Request.Form("SeverID")))
			Case 1,3
		call EditMovieUrl("YWNT_TMS_P2PUrl","EditP2Purl","P2PUrl",NoSqlHack(Request.Form("ID")))
		if Request.Form("P2Purl1")<>"" then
		call AddMovieUrl("YWNT_TMS_P2PUrl",NoSqlHack(Request.Form("P2pVolume")),"P2Purl","P2PUrl",NoSqlHack(Request.Form("ID")))
		end if
			Case 2
		conn.execute "delete from p2pfilm WHERE MovieID ="&NoSqlHack(Request.Form("ID"))&""
		call AddMovieUrl("p2pfilm",NoSqlHack(Request.Form("P2pNmu")),"EditP2Purl","Url",NoSqlHack(Request.Form("ID")))
		if Request.Form("P2Purl1")<>"" then
		call AddMovieUrl("p2pfilm",NoSqlHack(Request.Form("P2pVolume")),"P2PUrl","Url",NoSqlHack(Request.Form("ID")))
		end if
			End Select
		call EditMovieUrl("YWNT_TMS_DownUrl","EditDownurl","DownUrl",NoSqlHack(Request.Form("ID")))
		if Request.Form("Downurl1")<>"" then
		call AddMovieUrl("YWNT_TMS_DownUrl",NoSqlHack(Request.Form("DownVolume")),"Downurl","DownUrl",NoSqlHack(Request.Form("ID")))
		end if
		Call AddLog("修改专题影片"&Request.Form("MovieName"),4)
		call Admin_ShowErr("<li>修改专题影片成功</li>",""&Request.Form("ReturnURL")&"",1)
end sub
sub AddSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Movie"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("SeverID")=NoSqlHack(Request.Form("SeverID"))
		RS("TypeID")=NoSqlHack(Request.Form("ClassID"))
		RS("MovieName")=NoSqlHack(Request.Form("MovieName"))
		RS("MovieActor")=NoSqlHack(Request.Form("MovieActor"))
		RS("MovieRegion")=NoSqlHack(Request.Form("MovieRegion"))
		RS("MoviePic")=NoSqlHack(Request.Form("MoviePic"))
		RS("MovieCoin")=NoSqlHack(Request.Form("MovieCoin"))
		RS("MovieClick")=NoSqlHack(Request.Form("MovieClick"))
		RS("MovieCompetence")=NoSqlHack(Request.Form("MovieCompetence"))
		RS("MovieGroup")=NoSqlHack(Request.Form("GroupID"))
		RS("MovieLook")=NoSqlHack(Request.Form("MovieLook"))
		RS("MovieDown")=NoSqlHack(Request.Form("MovieDown"))
		RS("MovieSuggest")=NoSqlHack(Request.Form("MovieSuggest"))
		RS("MovieHot")=NoSqlHack(Request.Form("MovieHot"))
		RS("MovieSerialization")=NoSqlHack(Request.Form("MovieSerialization"))
		if Request.Form("MovieFeature")<>"" then
		RS("MovieFeature")=1
		else
		RS("MovieFeature")=0
		end if
		if Request.Form("MovieFree")<>"" then
		RS("MovieFree")=NoSqlHack(Request.Form("MovieFree"))
		end if
		if Request.Form("FeatureID")<>"" then
		RS("MovieFeatureID")=NoSqlHack(Request.Form("FeatureID"))
		end if
		RS("MovieDate")=Now()
		RS("MovieContent")=NoSqlHack(Request.Form("Content"))
		RS("MovieAudit")=1
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		set RS = Conn.execute("select top 1 ID from YWNT_TMS_Movie Order by ID desc")
		ID=RS("ID")
		Rs.Close
		Set Rs = Nothing
		if Request.Form("Url1")<>"" then
		call AddMovieUrl("YWNT_TMS_MovieUrl",NoSqlHack(Request.Form("UrlVolume")),"Url","MovieUrl",ID)
		end if
		if Request.Form("P2Purl1")<>"" then
			Select Case SeverP2pType(NoSqlHack(Request.Form("SeverID")))
			Case 1,3
		call AddMovieUrl("YWNT_TMS_P2PUrl",NoSqlHack(Request.Form("P2pVolume")),"P2Purl","P2PUrl",ID)
			Case 2
		call AddMovieUrl("p2pfilm",NoSqlHack(Request.Form("P2pVolume")),"P2PUrl","Url",ID)
			End Select
		end if
		if Request.Form("Downurl1")<>"" then
		call AddMovieUrl("YWNT_TMS_DownUrl",NoSqlHack(Request.Form("DownVolume")),"Downurl","DownUrl",ID)
		end if
		Call AddLog("添加专题影片"&Request.Form("MovieName"),4)
		call Admin_ShowErr("<li>添加影片成功</li><li><a href=""Admin_Movie.asp?Action=Add""><b>继续添加影片</b></a>&nbsp;&nbsp;<a href=""Admin_Movie.asp?Action=Edit&ID="&ID&"""><b>返回编辑影片</b></a></li>","Admin_Movie.asp",1)
end sub
sub Del()
	Select Case GetSysPlay("MovieRecycling")
	Case 1
	Set Rs = server.CreateObject(YWNT_TMS_RS)
	sql="select * from YWNT_TMS_Movie where ID in ("&NoSqlHack(Request("ID"))&")"
	Rs.open sql,conn,1,1
	do while not Rs.eof
	Call DeleteFile(CollectionMoive("MoviePic",RS("ID")))
	IF GetConfig("WebHtmlMode")<>"asp" Then
	Call DeleteFile(GetConfig("HtmlDIr")&"Movie_"&RS("ID")&"."&GetConfig("WebHtmlMode"))
	END IF
	Rs.movenext
	loop
	Rs.close
	set Rs=nothing
	Call DelMovieUrl(NoSqlHack(Request("ID")))
	conn.execute "delete from YWNT_TMS_Movie WHERE ID in ("&NoSqlHack(Request("ID"))&")"
	conn.execute "delete from YWNT_TMS_UsersCollection WHERE CollectionMoiveID in ("&NoSqlHack(Request("ID"))&")"
	conn.execute "delete from YWNT_TMS_Comments WHERE CommentsMovieID in ("&NoSqlHack(Request("ID"))&")"
	Call AddLog("完全删除专题影片",4)
	Case else
	Conn.execute("Update YWNT_TMS_Movie set MovieRecovery=1 where ID in ("&NoSqlHack(Request("ID"))&")")
	Call AddLog("删除专题影片到回收站",4)
	End Select
	call Admin_ShowErr("<li>删除影片成功！</li>",""&Request.ServerVariables("HTTP_REFERER")&"",1)
end sub
sub Hide()
	Conn.execute("Update YWNT_TMS_Movie set MovieHide=1 where ID in ("&NoSqlHack(Request.Form("ID"))&")")
	Call AddLog("隐藏影片",4)
	call Admin_ShowErr("<li>隐藏影片成功！</li>",""&Request.ServerVariables("HTTP_REFERER")&"",1)
end sub
sub ResumeW()
	Conn.execute("Update YWNT_TMS_Movie set MovieHide=0 where ID in ("&NoSqlHack(Request.Form("ID"))&")")
	Call AddLog("恢复隐藏影片",4)
	call Admin_ShowErr("<li>恢复隐藏影片成功！</li>",""&Request.ServerVariables("HTTP_REFERER")&"",1)
end sub
sub DelUrl()
	conn.execute "delete from "&NoSqlHack(Request.QueryString("SelectName"))&" WHERE ID="&NoSqlHack(Request.QueryString("ID"))&""
	response.redirect Request.ServerVariables("HTTP_REFERER")
end sub%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td class=xingmu>专题影片管理</td>
    </tr>
    <tr>
      <td class="hback"><a href="Admin_FeatureMovie.asp">专题影片管理</a> | <a href="Admin_FeatureMovie.asp?Action=Add">添加专题影片</a> | <a href="Admin_Movie.asp">影片管理首页</a></td>
    </tr>
  </tbody>
</table>
<% Action=Trim(request("Action"))
Select Case Action
Case "Add"
	call Add()
Case "AddSave"
	call AddSave()
Case "Edit"
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Movie where ID="&NoSqlHack(Request.QueryString("ID"))&" Order by ID desc"
		Rs.open sql,Conn,1,1
		YWNT_TMS_ID=RS("ID")
		YWNT_TMS_SeverID=RS("SeverID")
		YWNT_TMS_TypeID=RS("TypeID")
		YWNT_TMS_MovieName=RS("MovieName")
		YWNT_TMS_MovieActor=RS("MovieActor")
		YWNT_TMS_MovieRegion=RS("MovieRegion")
		YWNT_TMS_MoviePic=RS("MoviePic")
		YWNT_TMS_MovieCoin=RS("MovieCoin")
		YWNT_TMS_MovieClick=RS("MovieClick")
		YWNT_TMS_MovieCompetence=RS("MovieCompetence")
		YWNT_TMS_MovieGroup=RS("MovieGroup")
		YWNT_TMS_MovieLook=RS("MovieLook")
		YWNT_TMS_MovieDown=RS("MovieDown")
		YWNT_TMS_MovieSuggest=RS("MovieSuggest")
		YWNT_TMS_MovieHot=RS("MovieHot")
		YWNT_TMS_MovieSerialization=RS("MovieSerialization")
		YWNT_TMS_MovieFeature=RS("MovieFeature")
		YWNT_TMS_MovieFree=RS("MovieFree")
		YWNT_TMS_MovieFeatureID=RS("MovieFeatureID")
		YWNT_TMS_MovieContent=RS("MovieContent")
		RS.close   
      	set RS=nothing
	call Edit()
Case "EditSave"
	call EditSave()
Case "Del"
	call Del()
Case "Hide"
	call Hide()
Case "ResumeW"
	call ResumeW()
Case "DelUrl"
	call DelUrl()
Case else
	call List()
End Select
sub List()
Dim int_RPP
	int_RPP=GetConfig("PageNumber") '设置每页显示数目%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td class=xingmu>专题影片分类管理</td>
    </tr>
    <tr>
      <td class="hback"><a href="Admin_FeatureMovie.asp">所有专题影片</a> |
        <%call Featuretop() %></td>
    </tr>
  </tbody>
</table>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td colspan="5" class=xingmu>影片查询</td>
    </tr>
  <form action="Admin_Movie.asp" method="post">
    <tr>
      <td align="right" class="hback">按日期查询：</td>
      <td class="hback"><INPUT name=StopDate id=StopDate onfocus=setday(this) value="" size="15" readOnly maskType="longDate" realValue="">
          <IMG onclick=StopDate.focus() src="images/calendar.gif" align=absBottom> 到
        <INPUT name=EndDate id=EndDate onfocus=setday(this) value="" size="15" readOnly maskType="longDate" realValue="">
          <IMG onclick=EndDate.focus() src="images/calendar.gif" align=absBottom></td>
      <td align="right" class="hback">按影片名称查询：</td>
      <td class="hback"><input name="MovieName2" type="text" id="MovieName" size="20"></td>
      <td class="hback"><input type="submit" name="Submit2" value="查 询"></td>
    </tr>
  </form>
  </tbody>
</table>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td align="center" class=xingmu>影片名称</td>
      <td width="12%" align="center" class=xingmu>所属服务器</td>
      <td width="12%" align="center" class=xingmu>所属专题栏目</td>
      <td width="8%" align="center" class=xingmu>开放方式</td>
      <td width="4%" align="center" class=xingmu>推荐</td>
      <td width="4%" align="center" class=xingmu>热点</td>
      <td width="4%" align="center" class=xingmu>连载</td>
      <td width="4%" align="center" class=xingmu>专题</td>
      <td width="4%" align="center" class=xingmu>隐藏</td>
      <td colspan="2" align="center" class=xingmu>操作</td>
    </tr>
  <form name="forms" action="Admin_FeatureMovie.asp" method="post">
    <%  Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select ID,SeverID,MovieName,MovieActor,MovieRegion,MovieLook,MovieDown,MovieSuggest,MovieHot,MovieSerialization,MovieFeature,MovieHide,MovieFeatureID from YWNT_TMS_Movie where MovieRecovery=0 and MovieAudit=1 and MovieHide=0 and MovieFeature=1"
		if Request.QueryString("ID")<>"" then
			sql=sql&"And MovieFeatureID="&NoSqlHack(Request.QueryString("ID"))&" Order by ID desc"
		else
		    sql=sql&" Order by ID desc"
		end if
		Rs.open sql,Conn,1,1
	if Rs.eof then
	   Response.Write"<TR  class=""hback""><TD colspan=""12"" class=""hback"" height=""40"">没有记录。</TD></TR>"
	else
		Rs.PageSize=int_RPP
		cPageNo=NoSqlHack(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 %>
    <tr>
      <td height=32 align="center" class="hback"><%=RS("ID")%></td>
      <td height=32 class="hback"><img src="images/movie.gif" width="16" height="16" align="absbottom"><%=RS("MovieName")%></td>
      <td height=32 class="hback"><% SeverName(RS("SeverID")) %></td>
      <td height=32 class="hback"><% FeatureName(RS("MovieFeatureID")) %></td>
      <td height=32 align="center" class="hback">观看 下载 </td>
      <td height=32 align="center" class="hback"><%if RS("MovieSuggest")=1 then Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieSuggest&value=0&ID="&RS("ID")&"""><img src=""Images/icon_01.gif"" border=""0"" /></a>" else Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieSuggest&value=1&ID="&RS("ID")&"""><img src=""Images/icon_02.gif"" border=""0"" /></a>" end if%></td>
      <td height=32 align="center" class="hback"><%if RS("MovieHot")=1 then Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieHot&value=0&ID="&RS("ID")&"""><img src=""Images/icon_01.gif"" border=""0"" />" else Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieHot&value=1&ID="&RS("ID")&"""><img src=""Images/icon_02.gif"" border=""0"" />" end if%></td>
      <td height=32 align="center" class="hback"><%if RS("MovieSerialization")=1 then Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieSerialization&value=0&ID="&RS("ID")&"""><img src=""Images/icon_01.gif"" border=""0"" />" else Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieSerialization&value=1&ID="&RS("ID")&"""><img src=""Images/icon_02.gif"" border=""0"" />" end if%></td>
      <td height=32 align="center" class="hback"><%if RS("MovieFeature")=1 then Response.Write"<img src=""Images/icon_01.gif"" border=""0"" />" else Response.Write"<img src=""Images/icon_02.gif"" border=""0"" />" end if%></td>
      <td height=32 align="center" class="hback"><%if RS("MovieHide")=1 then Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieHide&value=0&ID="&RS("ID")&"""><img src=""Images/icon_01.gif"" border=""0"" />" else Response.Write"<a href=""Admin_Movie.asp?Action=Attribute&Aname=MovieHide&value=1&ID="&RS("ID")&"""><img src=""Images/icon_02.gif"" border=""0"" />" end if%></td>
      <td width="10%" align="center" class="hback"><A href="Admin_FeatureMovie.asp?Action=Edit&ID=<%=RS("ID")%>">修改</A>｜<A href="Admin_FeatureMovie.asp?Action=Del&ID=<%=RS("ID")%>">删除</A></td>
      <td width="3%" align="center" class="hback"><input name="ID2" type="checkbox" id="ID" value="<% = RS("ID")%>"></td>
    </tr>
    <%Rs.MoveNext
	next 
	end if%>
    <tr>
      <td height=32 colspan="11" align="right" class="hback"><input type="button" name="Submit3" value="删除"  onClick="document.forms.Action.value='Del';{if(confirm('确定删除您所选择的影片吗？')){this.document.forms.submit();return true;}return false;}">
          <input type="button" name="Submit43" value="隐藏" onClick="document.forms.Action.value='Del';{if(confirm('确定隐藏您所选择的影片吗？')){this.document.forms.submit();return true;}return false;}"></td>
      <td align="center" class="hback"><input name="Action" type="hidden" id="Action">
          <input type="checkbox" name="chkall" value="checkbox" onClick="CheckAll(document.forms.chkall.checked);"></td>
    </tr>
  </form>
  <tr align="right">
    <td height=32 colspan="12" class="hback"><% response.Write fPageCount(Rs,cPageNo) %></td>
  </tr>
  </tbody>
  
</table>
<%end sub
sub Add()%>

<script language="javascript">
function setid()
{
str='';
if(!window.form.UrlVolume.value)
window.form.UrlVolume.value=1;
for(i=1;i<=window.form.UrlVolume.value;i++)
{
if(window.form.UrlVolume.value<100)
{
if(i<10)
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+'0'+i+''+window.form.UrlSuffix.value+'">&nbsp;第'+i+'集<br>';
}
else
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+i+''+window.form.UrlSuffix.value+'">&nbsp;第'+i+'集<br>';
}
}
else if(window.form.UrlVolume.value<1000)
{
if(i<10)
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+'00'+i+''+window.form.UrlSuffix.value+'">&nbsp;第'+i+'集<br>';
} 
else if(i<100)
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+'0'+i+''+window.form.UrlSuffix.value+'">&nbsp;第'+i+'集<br>';
}
else
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+i+''+window.form.UrlSuffix.value+'">&nbsp;第'+i+'集<br>';
}
}
}
document.all.urlup.innerHTML=str;
}
function setidP2p()
{
strP2P='';
if(!window.form.P2pVolume.value)
window.form.P2pVolume.value=1;
for(i=1;i<=window.form.P2pVolume.value;i++)
{
if(window.form.P2pVolume.value<100)
{
if(i<10)
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+'0'+i+''+window.form.P2pSuffix.value+'">&nbsp;第'+i+'集<br>';
}
else
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+i+''+window.form.P2pSuffix.value+'">&nbsp;第'+i+'集<br>';
}
}
else if(window.form.P2pVolume.value<1000)
{
if(i<10)
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+'00'+i+''+window.form.P2pSuffix.value+'">&nbsp;第'+i+'集<br>';
} 
else if(i<100)
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+'0'+i+''+window.form.P2pSuffix.value+'">&nbsp;第'+i+'集<br>';
}
else
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+i+''+window.form.P2pSuffix.value+'">&nbsp;第'+i+'集<br>';
}
}
}
document.all.P2Pup.innerHTML=strP2P;
}
function setidDwon()
{
strDown='';
if(!window.form.DownVolume.value)
window.form.DownVolume.value=1;
for(i=1;i<=window.form.DownVolume.value;i++)
{
if(window.form.DownVolume.value<100)
{
if(i<10)
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+'0'+i+''+window.form.DownSuffix.value+'">&nbsp;第'+i+'集<br>';
}
else
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+i+''+window.form.DownSuffix.value+'">&nbsp;第'+i+'集<br>';
}
}
else if(window.form.DownVolume.value<1000)
{
if(i<10)
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+'00'+i+''+window.form.DownSuffix.value+'">&nbsp;第'+i+'集<br>';
} 
else if(i<100)
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+'0'+i+''+window.form.DownSuffix.value+'">&nbsp;第'+i+'集<br>';
}
else
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+i+''+window.form.DownSuffix.value+'">&nbsp;第'+i+'集<br>';
}
}
}
document.all.Downup.innerHTML=strDown;
}
</script>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td colspan="4" class=xingmu>添加影片</td>
    </tr>
  <form action="Admin_Movie.asp?Action=AddSave" method="post" name="form">
    <tr>
      <td width="21%" height=32 align="right" class="hback">选择服务器：</td>
      <td colspan="3" class="hback"><input name="SeverName" type="text" size="40" readonly>
	  <input name="SeverID" type="hidden" id="SeverID" value="">
      <input type="button" name="SubmitSever" value="选择服务器" onClick="SelectSever();">
      <input type="button" name="SubmitSeverAdd" value="添加服务器" onClick="window.location.href='Admin_Sever.asp?Action=Add'"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">选择栏目：</td>
      <td colspan="3" class="hback"><input name="ClassName" type="text" size="40" readonly>
	  <input name="ClassID" type="hidden" id="ClassID" value="">
          <input type="button" name="SubmitClass" value="选择栏目" onClick="SelectClass();">
      <input type="button" name="SubmitClassAdd" value="添加栏目" onClick="window.location.href='Admin_Type.asp?Action=Add'"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片名称：</td>
      <td colspan="3" class="hback"><input name="MovieName" type="text" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片演员：</td>
      <td colspan="3" class="hback"><input name="MovieActor" type="text" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片地区：</td>
      <td colspan="3" class="hback"><%call MovieRegion("MovieRegion","")%></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片图片：</td>
      <td colspan="3" class="hback"><input name="MoviePic" type="text" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">图片上传：</td>
      <td colspan="3" class="hback"><iframe src="Dialog/UpMoviePic.asp" width="100%" height="100%" frameborder="0" scrolling="no" align="center"></iframe></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">所需影币：</td>
      <td width="16%" height=32 class="hback"><input name="MovieCoin" type="text" value="2" size="10"></td>
      <td width="21%" align="right" class="hback">初始点击数： </td>
      <td class="hback"><input name="MovieClick" type="text" value="0" size="10"></td>
    </tr>
	    <tr>
      <td height=32 align="right" class="hback">影片权限：</td>
      <td colspan="3" class="hback"><input name="MovieCompetence" type="radio" onClick="showThumbnail_RateOrSize(0,'UserGroup')" value="0" checked>
        所有会员组
        <input type="radio" name="MovieCompetence" value="1" onClick="showThumbnail_RateOrSize(1,'UserGroup')">
        指定会员组</td>
	    </tr>
    <tr id=UserGroup style="display:none">
      <td height=32 colspan="4" class="hback"><%= GetUserGroup_CheckBox(MovieGroup,6) %></td>
    </tr>
	 <tr>
      <td height=32 align="right" class="hback">开放方式：</td>
      <td colspan="3" class="hback"><input name="MovieLook" type="checkbox" value="1" checked>
        在线观看      <input type="checkbox" name="MovieDown" value="1">
       影片下载      </td>
	 </tr>
    <tr>
      <td height=32 align="right" class="hback">影片属性：</td>
      <td colspan="3" class="hback"><input type="checkbox" name="MovieSuggest" value="1">
        推荐影片      <input type="checkbox" name="MovieHot" value="1">
        热点影片
        <input type="checkbox" name="MovieSerialization" value="1">
连载影片
<input type="checkbox" name="MovieFeature" value="1" checked>
        专题影片      
        <input name="MovieFree" type="checkbox" id="MovieFree" value="1">
免费试看 </td>
    </tr>
	  <tr>
      <td height=32 align="right" class="hback">所属专题：</td>
      <td colspan="3" class="hback"><input name="FeatureName" type="text" size="40" readonly>
        <input name="FeatureID" type="hidden" id="FeatureID" value="">
        <input type="button" name="SubmitFeature" value="选择栏目" onClick="SelectFeature();">
        <input type="button" name="SubmitFeatureAdd" value="添加栏目" onClick="window.location.href='Admin_FeatureType.asp?Action=Add'"></td>
	  </tr>
    <tr>
      <td height=32 align="right" class="hback">影片地址设定：</td>
      <td colspan="3" class="hback"><input name="MovieURl" type="text" size="40">
        集数
          <input name="UrlVolume" type="text" size="5">
        格式
        <input name="UrlSuffix" type="text" size="5">
      <input type="button" name="SubmitUrl" onClick="setid();" value="设定"></td>
    </tr>
	<tr><td class="hback" align="right">影片地址：</td><td colspan="3" class="hback" id="urlup"></td></tr>
    <tr>
      <td height=32 align="right" class="hback">P2P地址设定：</td>
      <td colspan="3" class="hback"><input name="P2pUrl" type="text" size="40">
        集数
  <input name="P2pVolume" type="text" size="5">
格式
<input name="P2pSuffix" type="text" size="5">
<input type="button" name="SubmitP2p" onClick="setidP2p();" value="设定"></td>
    </tr>
	<tr><td class="hback" align="right">P2P影片地址：</td><td colspan="3" class="hback" id="P2Pup"></td></tr>
    <tr>
      <td height=32 align="right" class="hback">下载地址设定：</td>
      <td colspan="3" class="hback"><input name="DownUrl" type="text" size="40">
        集数
  <input name="DownVolume" type="text" size="5">
格式
<input name="DownSuffix" type="text" size="5">
<input type="button" name="SubmitDown" onClick="setidDwon();" value="设定"></td>
    </tr>
	<tr><td class="hback" align="right">下载地址：</td>
	<td colspan="3" class="hback" id="Downup"></td></tr>
    <tr>
      <td align="right" class="hback">影片介绍：</td>
      <td colspan="3" class="hback"><script>
		var oEdit1 = new InnovaEditor("oEdit1");
		oEdit1.arrStyle = [["BODY",false,"","font:12px verdana,arial,sans-serif;"]];
		oEdit1.height=400;
		oEdit1.cmdAssetManager="modalDialogShow('<%=GetConfig("WebiInstallDir")&GetConfig("AdminDir")%>Dialog/SelectPic.asp?CurrPath=<% = CurrPath %>',640,410)";
		oEdit1.btnFlash=true;
		oEdit1.btnMedia=true;
		oEdit1.RENDER("");
	</script>
	<input type="hidden" name="Content"  id="Content" value=""></td>
    </tr>
    <tr>
      <td height=32 colspan="4" align="center" class="hback"><input type="button" name="Submit" value="添 加" onClick="SubmitMovie();"></td>
    </tr>
  </form>
  </tbody>
</table>
<%end sub
sub Edit()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td colspan="4" class=xingmu>修改影片</td>
    </tr>
  <form action="Admin_Movie.asp?Action=EditSave" method="post" name="form">
    <tr>
      <td width="21%" height=32 align="right" class="hback">选择服务器：</td>
      <td colspan="3" class="hback"><input name="SeverName" type="text" value="<% SeverName(YWNT_TMS_SeverID) %>" size="40" readonly>
	  <input name="SeverID" type="hidden" id="SeverID" value="<%=YWNT_TMS_SeverID%>">
      <input type="button" name="SubmitSever" value="选择服务器" onClick="SelectSever();">
      <input type="button" name="SubmitSeverAdd" value="添加服务器" onClick="window.location.href='Admin_Sever.asp?Action=Add'"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">选择栏目：</td>
      <td colspan="3" class="hback"><input name="ClassName" type="text" value="<% ClassName(YWNT_TMS_TypeID) %>" size="40" readonly>
	  <input name="ClassID" type="hidden" id="ClassID" value="<%=YWNT_TMS_TypeID%>">
          <input type="button" name="SubmitClass" value="选择栏目" onClick="SelectClass();">
      <input type="button" name="SubmitClassAdd" value="添加栏目" onClick="window.location.href='Admin_Type.asp?Action=Add'"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片名称：</td>
      <td colspan="3" class="hback"><input name="MovieName" type="text" value="<%=YWNT_TMS_MovieName%>" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片演员：</td>
      <td colspan="3" class="hback"><input name="MovieActor" type="text" value="<%=YWNT_TMS_MovieActor%>" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片地区：</td>
      <td colspan="3" class="hback"><%call MovieRegion("MovieRegion",YWNT_TMS_MovieRegion)%></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">影片图片：</td>
      <td colspan="3" class="hback"><input name="MoviePic" type="text" value="<%=YWNT_TMS_MoviePic%>" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">图片上传：</td>
      <td colspan="3" class="hback"><iframe src="Dialog/UpMoviePic.asp" width="100%" height="100%" frameborder="0" scrolling="no" align="center"></iframe></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">所需影币：</td>
      <td width="16%" height=32 class="hback"><input name="MovieCoin" type="text" value="<%=YWNT_TMS_MovieCoin%>" size="10"></td>
      <td width="21%" align="right" class="hback">点击数： </td>
      <td class="hback"><input name="MovieClick" type="text" value="<%=YWNT_TMS_MovieClick%>" size="10"></td>
    </tr>
	    <tr>
      <td height=32 align="right" class="hback">影片权限：</td>
      <td colspan="3" class="hback"><input name="MovieCompetence" type="radio" onClick="showThumbnail_RateOrSize(0,'UserGroup')" value="0" <%if YWNT_TMS_MovieCompetence=0 then Response.Write"checked"%>>
        所有会员组
        <input type="radio" name="MovieCompetence" value="1" onClick="showThumbnail_RateOrSize(1,'UserGroup')" <%if YWNT_TMS_MovieCompetence=1 then Response.Write"checked"%>>
        指定会员组</td>
	    </tr>
    <tr id=UserGroup style="display:none">
      <td height=32 colspan="4" class="hback"><%= GetUserGroup_CheckBox(YWNT_TMS_MovieGroup,6) %></td>
    </tr>
	 <tr>
      <td height=32 align="right" class="hback">开放方式：</td>
      <td colspan="3" class="hback"><input name="MovieLook" type="checkbox" value="1" <%if YWNT_TMS_MovieLook=1 then Response.Write"checked"%>>
        在线观看      <input type="checkbox" name="MovieDown" value="1" <%if YWNT_TMS_MovieDown=1 then Response.Write"checked"%>>
       影片下载      </td>
	 </tr>
    <tr>
      <td height=32 align="right" class="hback">影片属性：</td>
      <td colspan="3" class="hback"><input type="checkbox" name="MovieSuggest" value="1" <%if YWNT_TMS_MovieSuggest=1 then Response.Write"checked"%>>
        推荐影片      <input type="checkbox" name="MovieHot" value="1" <%if YWNT_TMS_MovieHot=1 then Response.Write"checked"%>>
        热点影片      <input type="checkbox" name="MovieSerialization" value="1" <%if YWNT_TMS_MovieSerialization=1 then Response.Write"checked"%>>
连载影片
<input type="checkbox" name="MovieFeature" value="1" <%if YWNT_TMS_MovieFeature=1 then Response.Write"checked"%>>
        专题影片      
        <input name="MovieFree" type="checkbox" id="MovieFree" value="1" <%if YWNT_TMS_MovieFree=1 then Response.Write"checked"%>>
免费试看 </td>
    </tr>
	  <tr>
      <td height=32 align="right" class="hback">所属专题：</td>
      <td colspan="3" class="hback"><input name="FeatureName" type="text" size="40" readonly value="<% FeatureName(YWNT_TMS_MovieFeatureID) %>">
        <input name="FeatureID" type="hidden" id="FeatureID" value="<%=YWNT_TMS_MovieFeatureID%>">
        <input type="button" name="SubmitFeature" value="选择栏目" onClick="SelectFeature();">
        <input type="button" name="SubmitFeatureAdd" value="添加栏目"></td>
	  </tr>
       <tr>
      <td height=32 align="right" class="hback">影片地址设定：</td>
      <td colspan="3" class="hback"><input name="MovieURl" type="text" size="40">
        集数
          <input name="UrlVolume" type="text" size="5">
        格式
        <input name="UrlSuffix" type="text" size="5">
      <input type="button" name="SubmitUrl" onClick="setid();" value="设定"></td>
    </tr>
	<tr><td rowspan="2" class="hback" align="right">影片地址：</td>
	<td colspan="3" class="hback"><%call MovieUrl("YWNT_TMS_MovieUrl","EditUrl","MovieUrl",YWNT_TMS_ID)%></td>
	</tr>
	<tr>
  	<td colspan="3" class="hback" id="urlup"></td>
	</tr>
    <tr>
      <td height=32 align="right" class="hback">P2P地址设定：</td>
      <td colspan="3" class="hback"><input name="P2pUrl" type="text" size="40">
        集数
  <input name="P2pVolume" type="text" size="5">
格式
<input name="P2pSuffix" type="text" size="5">
<input type="button" name="SubmitP2p" onClick="setidP2p();" value="设定"></td>
    </tr>
	<tr><td rowspan="2" class="hback" align="right">P2P影片地址：</td>
	<td colspan="3" class="hback"><%Select Case SeverP2pType(YWNT_TMS_SeverID)
			Case 1,3
			 call MovieUrl("YWNT_TMS_P2PUrl","EditP2Purl","P2PUrl",YWNT_TMS_ID) 
			Case 2
			 call MovieUrl("p2pfilm","EditP2Purl","Url",YWNT_TMS_ID) 
			End Select%></td>
	</tr>
	<tr>
  	<td colspan="3" class="hback" id="P2Pup"></td>
	</tr>
    <tr>
      <td height=32 align="right" class="hback">下载地址设定：</td>
      <td colspan="3" class="hback"><input name="DownUrl" type="text" size="40">
        集数
  <input name="DownVolume" type="text" size="5">
格式
<input name="DownSuffix" type="text" size="5">
<input type="button" name="SubmitDown" onClick="setidDwon();" value="设定"></td>
    </tr>
	<tr><td rowspan="2" class="hback" align="right">下载地址：</td>
	<td colspan="3" class="hback"><%call MovieUrl("YWNT_TMS_DownUrl","EditDownurl","DownUrl",YWNT_TMS_ID)%></td>
	</tr>
	<tr>
  	<td colspan="3" class="hback" id="Downup"></td>
	</tr>
    <tr>
      <td align="right" class="hback">影片介绍：</td>
      <td colspan="3" class="hback"><pre id="idTemporary" name="idTemporary" style="display:none"><%if YWNT_TMS_MovieContent<>"" then Response.Write Server.HTMLEncode(YWNT_TMS_MovieContent)%></pre>
        <script>
		var oEdit1 = new InnovaEditor("oEdit1");
		oEdit1.arrStyle = [["BODY",false,"","font:12px verdana,arial,sans-serif;"]];
		oEdit1.height=400;
		oEdit1.cmdAssetManager="modalDialogShow('<%=GetConfig("WebiInstallDir")&GetConfig("AdminDir")%>Dialog/SelectPic.asp?CurrPath=<% = CurrPath %>',500,4100)";
		oEdit1.btnFlash=true;
		oEdit1.btnMedia=true;
		oEdit1.RENDER(document.getElementById("idTemporary").innerHTML);
	</script>
	<input type="hidden" name="Content"  id="Content" value=""></td>
    </tr>
    <tr>
      <td height=32 colspan="4" align="center" class="hback"><input name="ReturnURL" type="hidden" value="<%=Request.ServerVariables("HTTP_REFERER")%>"><input type="hidden" name="ID" value="<%=YWNT_TMS_ID%>">
      <input type="button" name="Submit" value="修 改" onClick="SubmitMovie();"></td>
    </tr>
  </form>
  </tbody>
</table>
<script language="javascript">
function setid()
{
str='';
Movienum=<%= movienum("YWNT_TMS_MovieUrl",YWNT_TMS_ID) %>;
if(!window.form.UrlVolume.value)
window.form.UrlVolume.value=1;
for(i=1;i<=window.form.UrlVolume.value;i++)
{
if(window.form.UrlVolume.value<100)
{
if((i+Movienum)<10)
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+'0'+(i+Movienum)+''+window.form.UrlSuffix.value+'">&nbsp;第'+(i+Movienum)+'集<br>';
}
else
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+(i+Movienum)+''+window.form.UrlSuffix.value+'">&nbsp;第'+(i+Movienum)+'集<br>';
}
}
else if(window.form.UrlVolume.value<1000)
{
if((i+Movienum)<10)
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+'00'+(i+Movienum)+''+window.form.UrlSuffix.value+'">&nbsp;第'+(i+Movienum)+'集<br>';
} 
else if((i+Movienum)<100)
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+'0'+(i+Movienum)+''+window.form.UrlSuffix.value+'">&nbsp;第'+(i+Movienum)+'集<br>';
}
else
{
str+='<input type="text" name="url'+i+'" size=50 value="'+window.form.MovieURl.value+''+(i+Movienum)+''+window.form.UrlSuffix.value+'">&nbsp;第'+(i+Movienum)+'集<br>';
}
}
}
document.all.urlup.innerHTML=str;
}
function setidP2p()
{
strP2P='';
p2pnum=<%= movienum("YWNT_TMS_P2PUrl",YWNT_TMS_ID) %>;
if(!window.form.P2pVolume.value)
window.form.P2pVolume.value=1;
for(i=1;i<=window.form.P2pVolume.value;i++)
{
if(window.form.P2pVolume.value<100)
{
if((i+p2pnum)<10)
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+'0'+(i+p2pnum)+''+window.form.P2pSuffix.value+'">&nbsp;第'+(i+p2pnum)+'集<br>';
}
else
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+(i+p2pnum)+''+window.form.P2pSuffix.value+'">&nbsp;第'+(i+p2pnum)+'集<br>';
}
}
else if(window.form.P2pVolume.value<1000)
{
if((i+p2pnum)<10)
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+'00'+(i+p2pnum)+''+window.form.P2pSuffix.value+'">&nbsp;第'+(i+p2pnum)+'集<br>';
} 
else if((i+p2pnum)<100)
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+'0'+(i+p2pnum)+''+window.form.P2pSuffix.value+'">&nbsp;第'+(i+p2pnum)+'集<br>';
}
else
{
strP2P+='<input type="text" name="P2Purl'+i+'" size=50 value="'+window.form.P2pUrl.value+''+(i+p2pnum)+''+window.form.P2pSuffix.value+'">&nbsp;第'+(i+p2pnum)+'集<br>';
}
}
}
document.all.P2Pup.innerHTML=strP2P;
}
function setidDwon()
{
strDown='';
Downnum=<%= movienum("YWNT_TMS_DownUrl",YWNT_TMS_ID) %>;
if(!window.form.DownVolume.value)
window.form.DownVolume.value=1;
for(i=1;i<=window.form.DownVolume.value;i++)
{
if(window.form.DownVolume.value<100)
{
if((i+Downnum)<10)
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+'0'+(i+Downnum)+''+window.form.DownSuffix.value+'">&nbsp;第'+(i+Downnum)+'集<br>';
}
else
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+(i+Downnum)+''+window.form.DownSuffix.value+'">&nbsp;第'+(i+Downnum)+'集<br>';
}
}
else if(window.form.DownVolume.value<1000)
{
if((i+Downnum)<10)
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+'00'+(i+Downnum)+''+window.form.DownSuffix.value+'">&nbsp;第'+(i+Downnum)+'集<br>';
} 
else if((i+Downnum)<100)
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+'0'+(i+Downnum)+''+window.form.DownSuffix.value+'">&nbsp;第'+(i+Downnum)+'集<br>';
}
else
{
strDown+='<input type="text" name="Downurl'+i+'" size=50 value="'+window.form.DownUrl.value+''+(i+Downnum)+''+window.form.DownSuffix.value+'">&nbsp;第'+(i+Downnum)+'集<br>';
}
}
}
document.all.Downup.innerHTML=strDown;
}
</script>
<%end sub%>
  <script language="javascript">
<%if request("Action")="Edit" then%>
showThumbnail_RateOrSize(<%=YWNT_TMS_MovieCompetence%>,'UserGroup')
<%end if%>
function showThumbnail_RateOrSize(param,pname)
{
	if(param==1)
	{
		document.getElementById(pname).style.display="block"
	}else
	{
		document.getElementById(pname).style.display="none"
	}
}
  </script>
<%call connclose()%>
</BODY></HTML>
