📄 movieedit.asp
字号:
<%@language=vbscript codepage=936 %>
<!--#include file="../inc/conn.asp"-->
<!--#include file="AdminChkPurview.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>修改影片</title>
<link rel="stylesheet" type="text/css" href="../inc/Admin_Style.css">
<script language = "JavaScript">
function isNumber(String)
{
var Letters = "1234567890";
var i;
var c;
if(String.charAt( 0 )=='-')
return false;
if( String.charAt( String.length - 1 ) == '-' )
return false;
for( i = 0; i < String.length; i ++ )
{
c = String.charAt( i );
if (Letters.indexOf( c ) < 0)
return false;
}
return true;
}
function CheckForm()
{
if (document.myform.Titley.value=="")
{
alert("影片名称不能为空!");
document.myform.Titley.focus();
return false;
}
if (document.myform.howlong.value=="")
{
alert("影片长度不能为空!");
document.myform.howlong.focus();
return false;
}
if(!isNumber(document.myform.howlong.value))
{
alert("影片长度只能为数字!");
document.myform.howlong.focus();
return false;
}
if (document.myform.namey.value=="")
{
alert("影片主演不能为空!");
document.myform.namey.focus();
return false;
}
if (document.myform.domurl3.value=="")
{
alert("影片图片不能为空!");
document.myform.domurl3.focus();
return false;
}
if (document.myform.Content.value=="")
{
alert("影片内容不能为空!");
document.myform.Content.focus();
return false;
}
if (document.myform.Content.value.length>2048000)
{
alert("文章内容太长,超出了ACCESS数据库的限制(2048K)!建议将文章分成几部分录入。");
document.myform.Content.focus();
return false;
}
return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
if request("areyou")="删除" then
conn.execute"delete from movieurl where id="&request("id")
conn.close
set conn=nothing
response.redirect Request.ServerVariables("HTTP_REFERER")
end if
%>
<%
dim sql
dim rs
sql="select * from learning where articleid="&clng(request("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align=center>
<form method="POST" name="myform" onSubmit="return CheckForm();" action="Movieedit.asp" target="_self">
<tr>
<td height="22" align="center" class="title" colspan="3"><b>修 改 影 片</b></td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>影片名称:</strong></td>
<td width="730"><input name="Titley" type="text" value="<%=rs("title")%>" size="50" maxlength="30"></td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>影片设置:</strong></td>
<td colspan="2">
<select name="typeid" size="1">
<%
dim rs1,sql1,sel
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from type order by arrange",conn,1,1
do while not rs1.eof%>
<option value="<%=CStr(rs1("typeID"))%>" name="typeid" <% if CStr(rs1("typeID"))=CStr(rs("typeid")) then%> selected <%end if%>><%=rs1("type")%></option>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
</option>
</select>
<select size="1" name="where">
<option <%if rs("where")="大陆" then%> selected <%end if%> value="大陆">大陆</option>
<option <%if rs("where")="台湾" then%> selected <%end if%> value="台湾">台湾</option>
<option <%if rs("where")="香港" then%> selected <%end if%> value="香港">香港</option>
<option <%if rs("where")="日韩" then%> selected <%end if%> value="日韩">日本</option>
<option <%if rs("where")="韩国" then%> selected <%end if%> value="韩国">韩国</option>
<option <%if rs("where")="欧美" then%> selected <%end if%> value="欧美"> 欧美</option>
<option <%if rs("where")="其他" then%> selected <%end if%> value="其他">其他</option>
</select>
<select size="1" name="movielevel">
<option value="1" <%if rs("softlevel")=1 then%> selected <%end if%>>一星级</option>
<option value="2" <%if rs("softlevel")=2 then%> selected <%end if%>>二星级</option>
<option value="3" <%if rs("softlevel")=3 then%> selected <%end if%>>三星级</option>
<option value="4" <%if rs("softlevel")=4 then%> selected <%end if%>>四星级</option>
<option value="5" <%if rs("softlevel")=5 then%> selected <%end if%>>五星级</option>
</select>
<select size="1" name="canlook">
<option <%if rs("canlook")=1 then%> selected <%end if%> value="1">普通影片</option>
<option <%if rs("canlook")=3 then%> selected <%end if%> value="3">黄金影片</option>
<option <%if rs("canlook")=0 then%> selected <%end if%> value="0">免费影片</option>
</select>
</td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>播放格式:</strong></td>
<td colspan="2">
<input type="radio" name="movietype" value="rm" <%if rs("movietype")="rm" then%> checked <% end if%> style="border: 0px;background-color: #eeeeee;">
<img src="../Images/realplayer.gif" width="20" height="20" border="0">
<input type="radio" name="movietype" value="md" <%if rs("movietype")="md" then%> checked <% end if%> style="border: 0px;background-color: #eeeeee;">
<img src="../Images/mediaplayer.gif" width="20" height="20" border="0">
<input type="radio" value="mov" name="movietype" <%if rs("movietype")="mov" then%> checked <% end if%> style="border: 0px;background-color: #eeeeee;">
<img src="../Images/QuickTime.gif" width="20" height="20" border="0"> </td>
<tr class="tdbg">
<td width="254" align="right"><strong>影片长度:</strong></td>
<td colspan="2">
<input type="text" name="howlong" size="4" class="smallinput" maxlength="255" value="<%=rs("howlong")%>">分钟
</td>
</tr>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>领衔主演:</strong></td>
<td colspan="2">
<input type="text" name="namey" size="50" class="smallinput" maxlength="50" value="<%=rs("name")%>">
</td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>图片地址:</strong></td>
<td colspan="2">
<input type="text" name="domurl3" size="50" class="smallinput" maxlength="255" value="<%=rs("domurl")%>">
</td>
</tr>
<tr class="tdbg">
<td align="right"><strong>上传图片:</strong></td>
<td colspan="2">
<iframe style="top:2px" ID="UploadFiles" src="upload.asp" frameborder=0 scrolling=no width="450" height="25">
</iframe>
</td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>隶属服务器:</strong></td>
<td colspan="2">
<select class="smallSel" name="serverip" size="1">
<%
set rs4=server.createobject("adodb.recordset")
rs4.open "select * from movie",conn,1,1
dim i
i=1
do while not rs4.eof
%>
<option value="<%=rs4("id")%>" <%if rs4("id")=rs("serverip") then%> selected <%end if%>>
第<%=i%>服务器 <%=rs4("ipsip")%></option>
<%
i=i+1
rs4.movenext
loop
rs4.close
set rs4=nothing
%>
</select>
</td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>影片地址:</strong></td>
<td colspan="2">
<table width="554" cellspacing="0" border="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="490">
<%
sql="select * from movieurl where nameid='"&clng(request("id"))&"' order by id"
set rsurl=server.createobject("adodb.recordset")
rsurl.open sql,conn,1,1
if rsurl.bof and rsurl.eof then
response.write "没有影片提供观看"
else
no=rsurl.recordcount
for i=1 to no
%>
<input type="text" name="url<%=i%>" class="button" size="17" value="<%=rsurl("url")%>">第<%=i%>集
<a href="Movieedit.asp?id=<%=rsurl("id")%>&areyou=删除">删除</a>
<% if i mod 2=0 then%><br>
<%
end if
rsurl.movenext
next
end if
rsurl.close
set rsurl=nothing
%>
<input type="text" name="movieurl" class="button" size="17" value="">
<input type="hidden" name="id" value="<%=clng(request("id"))%>">
<input type="submit" value="增加" name="B1" style="cursor: hand;background-color: #cccccc;">
</td>
</tr>
<tr>
<td colspan="2" id="upid" width="564"></td>
</tr>
</table>
</td>
</tr>
<tr class="tdbg">
<td width="254" align="right" valign="middle"><p><strong>影片简介:</strong></p></td>
<td colspan="2">
<textarea name="Content" value="" cols="50" rows="10"><%=replace(rs("Content"),"""","")%></textarea></td>
</tr>
<tr class="tdbg">
<td width="254" align="right"><strong>推荐设置:</strong></td>
<td colspan="2">热点推荐
<input type="radio" name="best" value="1" <%if rs("best")=true then%> checked <%end if%> style="border: 0px;background-color: #eeeeee;">
是
<input type="radio" name="best" value="0" <%if rs("best")<>true then%> checked <%end if%> style="border: 0px;background-color: #eeeeee;">
否<input type="hidden" name="no" value="<%=no%>">
首页推荐:
<input type="radio" name="firstbest" value="1" <%if rs("firstbest")=true then%> checked <%end if%> style="border: 0px;background-color: #eeeeee;">
是
<input type="radio" name="firstbest" value="0" <%if rs("firstbest")<>true then%> checked <%end if%> style="border: 0px;background-color: #eeeeee;">
否 <input type="hidden" name="no" value="<%=no%>">
</td>
</tr>
</td>
</tr>
<tr class="tdbg">
<td align="center" colspan="3">
<input name="modify" type="submit" id="modify" value=" 修 改 " style="cursor: hand;background-color: #cccccc;">
<input name="Cancel" type="reset" id="Cancel" value=" 重 填 " style="cursor: hand;background-color: #cccccc;"> </td></tr>
</form>
</table>
<!--#include file="AdminFooder.asp"-->
</body>
</html>
<%
if request("movieurl")<>"" then
set rs=server.createobject("adodb.recordset")
sql1="select * from movieurl where (id is null)"
rs.open sql1,conn,1,3
rs.addnew
rs("url")=request.form("movieurl")
rs("nameid")=request.form("id")
rs.update
rs.close
response.redirect Request.ServerVariables("HTTP_REFERER")
end if
if request("modify")=" 修 改 " then
set rs=server.createobject("adodb.recordset")
sql="select * from learning where articleid="&clng(request("id"))
rs.open sql,conn,3,3
rs("typeid")=Request.Form("typeid")
rs("softlevel")=Request.Form("movielevel")
rs("serverip")=request.form("serverip")
rs("where")=request.form("where")
rs("title")=request.form("Titley")
rs("name")=request.form("namey")
rs("typeid")=request.form("typeid")
rs("best")=request.form("best")
rs("firstbest")=request.form("firstbest")
rs("onlinelook")=request.form("onlinelook")
rs("down")=request.form("down")
rs("url")=request.form("url")
rs("howlong")=request.form("howlong")
rs("domurl")=request.form("domurl3")
rs("movietype")=request.form("movietype")
rs("canlook")=request("canlook")
rs("Content")=request("Content")
rs.update
rs.close
dim t
t=0
set rs=server.createobject("adodb.recordset")
sql1="select * from movieurl where nameid='"&clng(request("id"))&"'"
rs.open sql1,conn,1,3
do while not rs.eof
t=t+1
rs("url")=request.form("url"&t&"")
rs.update
rs.movenext
loop
response.redirect Request.ServerVariables("HTTP_REFERER")
end if
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -