⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_collecting_movie.asp

📁 一款不错的影音视频网站源代码。asp的程序。后台有自动采集功能
💻 ASP
字号:
<!--#include file="../../inc/conn.asp"-->
<!-- #include file="collecting_function.asp" -->
<!--#include file="../../inc/page.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>采集影片管理--雷风影视系统</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="../images/css_body.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.3790.4275" name=GENERATOR>
</HEAD>
<BODY>
<DIV class=bodytitle>
<DIV class=bodytitleleft></DIV>
<DIV class=bodytitletxt>采集影片管理</DIV>
</DIV>
<%
call login_check()
select case Request.QueryString("action")
case "edit"
	call edit()
case "sedit"
	call sedit()
	call addlog("修改采集影片")
	call showerr("采集影片修改成功",Request.Form("url"))
case "del"
	call del()
	call addlog("删除采集影片")
	call showerr("采集影片删除成功",Request.ServerVariables("HTTP_REFERER"))
case "storage","storageall"
	call storage()
case "storagemovie"
	call storagemovie()
	call addlog("采集影片入库")
case else
	call main()
end select

sub sedit()
	conn.execute("update "&web_dbtop&"collect_movie set typeid='"&Request.Form("typeid")&"',regionid='"&Request.Form("regionid")&"',moviename='"&Request.Form("moviename")&"',movieactor='"&Request.Form("movieactor")&"',moviepic='"&Request.Form("moviepic")&"',content='"&Request.Form("content")&"',movieurl='"&Request.Form("movieurl")&"',Storage="&Request.Form("Storage")&" where id="&Request.Form("id")&"")
end sub

sub del()
	Set rs = server.CreateObject("Adodb.RecordSet")
	sql="select moviepic from "&web_dbtop&"collect_movie where id in ("&Request("id")&") and Storage=0"
	rs.open sql,conn,1,1
	do while not rs.eof
		deletefile("../../"&web_picdir&rs("moviepic"))
	rs.movenext
	loop
	rs.close:set rs = nothing
	conn.execute("delete from "&web_dbtop&"collect_movie where id in ("&Request("id")&")")
end sub

sub main()
Set rs = server.CreateObject("Adodb.RecordSet")
sql="select * from "&web_dbtop&"collect_movie"
	if Request("keyword")<>"" then
		sql=sql&" where InStr(1,LCase(moviename),LCase('"&Trim(Request("keyword"))&"'),0)<>0"
	elseif Request("CollectName")<>"" then
		sql=sql&" where CollectName='"&Request("CollectName")&"'"
	elseif Request("Storage")<>"" then
		sql=sql&" where Storage="&Request("Storage")&""
	end if
	sql=sql&" Order by id desc"
rs.open sql,Conn,1,1
%>
<TABLE width="96%" border=0 align=center cellpadding=0 cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">
  <TBODY>
    <TR>
      <TD bgColor=#f5fafe><table width="96%" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr>
		<form action="admin_collecting_movie.asp" method="post" onSubmit="return Validator.Validate(this,3)"> 
          <td width="10%"><strong>搜索影片:</strong></td>
          <td width="21%"><input id=keyword size=20 name=keyword dataType="Require" msg="请填搜索影片"></td>
          <td width="10%" align="center"><INPUT class=inputbut type=submit value=搜索 name=Submit></td>
          </form>
		  <td width="10%"><strong>采集项目:</strong></td>
          <td width="30%"><%call selecturl("collect","CollectName")%></td>
          <td align="center"><a href="?Storage=0">未入库</a> | <a href="?Storage=1">已入库</a></td>
        </tr>
      </table></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="96%" border=0 align=center cellpadding="5" cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">
<form name="form" method="post">
  <TBODY>
    <TR align="center" bgColor=#f5fafe>
      <TD width="4%">&nbsp;</TD>
      <TD>影片名称</TD>
      <TD width="15%">采集项目名称</TD>
      <TD width="10%">影片栏目</TD>
      <TD width="10%">影片地区</TD>
      <TD width="10%">入库状态</TD>
      <TD width="11%">采集时间</TD>
      <TD width="11%">操作</TD>
    </TR>
	<%if not rs.eof then
	rs.PageSize=20
	page=Request.QueryString("page")
	If page="" Then page = 1
	If not isnumeric(page) Then page = 1
	page = Clng(page)
	If page>rs.PageCount Then page=rs.PageCount 
	If page<=0 Then page=1
	rs.AbsolutePage=page
	for i=1 to 20
	 if rs.eof Then exit For%>
    <TR bgcolor="#FFFFFF" onMouseOver="this.bgColor='#f5fafe'" onMouseOut="this.bgColor='#FFFFFF'">
      <TD align="center"><input name="id" type="checkbox" id="id" value="<%=rs("id")%>"></TD>
      <TD><%=rs("moviename")%></TD>
      <TD align="center"><%=rs("CollectName")%></TD>
      <TD align="center"><%=rs("typeid")%></TD>
      <TD align="center"><%=rs("regionid")%></TD>
      <TD align="center"><%if rs("Storage")=1 then Response.Write"已入库" else Response.Write"未入库" end if%></TD>
      <TD align="center"><%=rs("TimeDate")%></TD>
      <TD align="center"><A href="?action=edit&id=<%=rs("id")%>">修改</a> | <A href="?action=del&id=<%=rs("id")%>" onClick="return confirm('确定要删除吗?');">删除</a></TD>
    </TR>
	<%rs.MoveNext
	next 
	end if%>
	<TR bgcolor="#f8fbfb">
      <TD align="center"><input name="chkall" type="checkbox" id="chkall" value="checkbox" onClick="CheckAll(document.form.chkall.checked);"/></TD>
      <TD colspan="7"><input type="button" name="storage" value="入库选择影片"  onClick="document.form.action='?action=storage';{if(chkCheckBoxChs('id')==false){alert('请至少选择一个影片!');return;}this.document.form.submit();return true;}" class=inputbut> <input type="button" name="storageall" value="入库全部影片"  onClick="document.form.action='?action=storageall';{if(confirm('确定要入库全部影片吗?'));this.document.form.submit();}" class=inputbut> <input type="button" name="del" value="批量删除"  onClick="document.form.action='?action=del';{if(chkCheckBoxChs('id')==false){alert('请至少选择一个影片!');return;}};{if(confirm('确定删除您所选择的影片吗?')){this.document.form.submit();return true;}}" class=inputbut></TD>
    </TR>
    <TR align="center" bgcolor="#f8fbfb">
      <TD colspan="8"><%=show(rs.recordCount,20,page,4,"page","curr")%></TD>
    </TR>
  </TBODY>
  </form>
</TABLE>
<script language="javascript" src="../inc/movie.js"></script>
<%rs.close:set rs = nothing
end sub
sub edit()
	Set rs = server.CreateObject("Adodb.RecordSet")
	sql="select * from "&web_dbtop&"collect_movie where id="&Request.QueryString("id")
	rs.open sql,conn,1,1%>
<TABLE width="96%" border=0 align=center cellpadding="4" cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">
  <form action="?action=sedit" method="post" onSubmit="return Validator.Validate(this,3)">
    <TBODY>
      <TR>
        <TD width="20%" bgColor=#f5fafe>影片栏目:</TD>
        <TD bgColor=#ffffff><input id=moviename size=50 name=typeid value="<%=rs("typeid")%>" dataType="Require" msg="请填写影片名称"></TD>
      </TR>
	  <TR>
        <TD bgColor=#f5fafe>影片地区:</TD>
        <TD bgColor=#ffffff><input id=moviename size=50 name=regionid value="<%=rs("regionid")%>" dataType="Require" msg="请填写影片名称"></TD>
      </TR>
      <TR>
        <TD bgColor=#f5fafe>影片名称:</TD>
        <TD bgColor=#FFFFFF><input id=moviename size=50 name=moviename value="<%=rs("moviename")%>" dataType="Require" msg="请填写影片名称"></TD>
      </TR>
      <TR>
        <TD bgColor=#f5fafe>影片演员:</TD>
        <TD bgColor=#ffffff><INPUT name=movieactor id=movieactor size=50 value="<%=rs("movieactor")%>" dataType="Require" msg="请填写影片演员"></TD>
      </TR>
      <TR>
        <TD bgColor=#f5fafe>影片图片:</TD>
        <TD bgColor=#ffffff><INPUT name=moviepic id=moviepic size=50 value="<%=rs("moviepic")%>" dataType="Require" msg="请填写影片图片"></TD>
      </TR>
	  <TR>
        <TD bgColor=#f5fafe>入库状态:</TD>
        <TD bgColor=#ffffff><input type="radio" value="0" name="Storage" <%if rs("Storage")=0 then Response.Write"checked"%>> 未入库 <input type="radio" value="1" name="Storage" <%if rs("Storage")=1 then Response.Write"checked"%>> 已入库</TD>
	  </TR>
      <TR>
        <TD bgColor=#f5fafe>影片地址:</TD>
		<TD bgColor=#ffffff><textarea name="movieurl" rows="4" style="width:550px;table-layout:fixed; word-wrap:break-word;"><%=rs("movieurl")%></textarea></TD>
      </TR>
      <TR>
        <TD bgColor=#f5fafe>影片介绍:</TD>
        <TD bgColor=#ffffff><textarea name="content" style="display:none"><%=rs("content")%></textarea>
            <iframe ID="Editor" name="Editor" src="../editor/index.html?ID=content" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" style="height:320px;width:100%"></iframe></TD>
      </TR>
      <TR align="center" bgcolor="#f8fbfb">
        <TD colspan="2">  <input name="id" type="hidden" value="<%=rs("id")%>"><input name="url" type="hidden" value="<%=Request.ServerVariables("HTTP_REFERER")%>"><INPUT class=inputbut type=submit value=入库 name=Submit></TD>
      </TR>
    </TBODY>
  </form>
</TABLE>
<%
rs.close:set rs = nothing
end sub
sub storage()
%>
<TABLE width="96%" border=0 align=center cellpadding="4" cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">
  <form action="?action=storagemovie&actiontype=<%=Request.QueryString("action")%>" method="post" onSubmit="return Validator.Validate(this,3)">
    <TBODY>
	  <TR>
        <TD colspan="2" bgColor=#f5fafe>影片入库设置</TD>
      </TR>
      <TR>
        <TD width="20%" bgColor=#f5fafe>入库播放器类型:</TD>
        <TD bgColor=#ffffff><%call storageplay("playertype",1,"")%></TD>
      </TR>
	  <TR>
        <TD bgColor=#f5fafe>重复影片入库设置:</TD>
        <TD bgColor=#ffffff><input type="radio" value="0" name="RepeatMovie" checked> 不入库重复影片 <input type="radio" value="1" name="RepeatMovie"> 更新重复影片 <input type="radio" value="2" name="RepeatMovie"> 重复影片入库到地址二</TD>
	  </TR>
      <TR align="center" bgcolor="#f8fbfb">
        <TD colspan="2"><input name="id" type="hidden" value="<%=Request.Form("id")%>"><input name="url" type="hidden" value="<%=Request.ServerVariables("HTTP_REFERER")%>"><INPUT class=inputbut type=submit value=入库 name=Submit></TD>
      </TR>
    </TBODY>
  </form>
</TABLE>
<%
end sub
sub storagemovie()
%>
<TABLE width="96%" border=0 align=center cellpadding="5" cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">
  <TBODY>
    <TR>
      <TD vAlign=center bgColor=#f5fafe>入库状态: </TD>
    </TR>
    <TR bgcolor="#FFFFFF">
      <TD align="center" bgcolor="#FFFFFF"><div class="refreshlen"><div class="xingmu" id="refreshlentext"></div></div></TD>
    </TR>
    <TR align="center" bgcolor="#FFFFFF">
      <TD><span id="storagetext">正在入库</span></TD>
    </TR>
  </TBODY>
</TABLE>
<%
	if Request.QueryString("actiontype")="storage" then
		sql="select * from "&web_dbtop&"collect_movie where id in ("&Request.Form("id")&") and Storage=0 Order by id desc"
	else
		sql="select * from "&web_dbtop&"collect_movie where Storage=0 Order by id desc"
	end if
	Set rs = server.CreateObject("Adodb.RecordSet")
	rs.open sql,conn,1,1
	intnum=rs.recordCount
	i=0
	do while not rs.eof
		i=i+1
		if rs("ClassType")=0 then
			typeid=showstoragecontent("type","typename",rs("typeid"))
		else
			typeid=cturn("type",rs("typeid"))
		end if
		if rs("RegionType")=0 then
			regionid=showstoragecontent("region","regionname",rs("regionid"))
		else
			regionid=cturn("region",rs("regionid"))
		end if
		if i>=intnum then
			Response.Write "<script type=""text/javascript"" language=""javascript"">"
			Response.Write "document.getElementById(""refreshlentext"").style.width = ""100%"";"
			Response.Write "document.getElementById(""refreshlentext"").innerHTML = ""100%"";"
			Response.Write "document.getElementById(""storagetext"").innerHTML = ""入库完毕 <a href='"&Request.Form("url")&"'>返回</a>"";"
			Response.Write "</script>"
		elseif i mod 10 = 0 then
			Response.Write "<script type=""text/javascript"" language=""javascript"">"
			Response.Write "document.getElementById(""refreshlentext"").style.width = """&(i/intnum*100)&"%"";"
			Response.Write "document.getElementById(""refreshlentext"").innerHTML = """&(i/intnum*100)&"%"";"
			Response.Write "document.getElementById(""storagetext"").innerHTML = ""正在入库"";"
			Response.Write "</script>"
		end if
		if typeid="" then
			Response.Write"<TABLE width=""96%"" border=0 align=center cellpadding=""4"" cellSpacing=1 class=tbtitle style=""BACKGROUND: #cad9ea;"">"
			Response.Write"<TR><TD bgColor=#ffffff>"&rs("moviename")&"</TD>"
			Response.Write"<TD width=""30%"" bgColor=#ffffff align=""center"">影片入库失败没有找到对应转换栏目</TD></TR></TABLE>"
		else
			Set frs = conn.execute("select id,moviepic from "&web_dbtop&"movie where moviename='"&rs("moviename")&"'")
			if not frs.eof then
				id=frs("id")
				cf=1
				deletefile("../../"&web_picdir&frs("moviepic"))
			else
				cf=0
			end if
			frs.close
			set frs = nothing
			if cf=0 then
				Set trs = server.CreateObject("Adodb.RecordSet")
				tsql="select * from "&web_dbtop&"movie"
				trs.open tsql,conn,1,3
				trs.addnew
				trs("typeid")=typeid
				trs("regionid")=regionid
				trs("moviename")=rs("moviename")
				trs("movieactor")=rs("movieactor")
				trs("moviepic")=rs("moviepic")
				trs("content")=rs("content")
				trs("movietime")=now()
				trs.update
				id=trs("id")
				trs.close   
				set trs=nothing
				conn.execute("INSERT INTO "&web_dbtop&"movieurl (movieurl,movieid,movietype,movienum) VALUES ('"&rs("movieurl")&"',"&id&","&Request.Form("playertype")&",1)")
				conn.execute("INSERT INTO "&web_dbtop&"movieurl (movieurl,movieid,movietype,movienum) VALUES ('',"&id&",0,2)")
			elseif cf=1 and Request.Form("RepeatMovie")<>0 then
				conn.execute("update "&web_dbtop&"movie set typeid="&typeid&",regionid="&regionid&",movieactor='"&rs("movieactor")&"',content='"&rs("content")&"',movietime=now() where id="&id&"")
				conn.execute("update "&web_dbtop&"movieurl set movieurl='"&rs("movieurl")&"',movietype="&Request.Form("playertype")&" where movieid="&id&" and movienum="&Request.Form("RepeatMovie")&"")
			end if
			conn.execute("update "&web_dbtop&"collect_movie set Storage=1 where id="&rs("id")&"")
		end if
	rs.MoveNext
	loop
	rs.close   
	set rs=nothing
end sub
call connclose()
%>
<script language="javascript" src="../inc/js.js"></script>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -