📄 media.asp
字号:
<!--#include file="../check.asp"-->
<!--#include file="../weblink/conn.asp"-->
<!--#include file="../../inc/lib.asp"-->
<%
Call OpenData()
CompanyID = Trim(Request("ID"))
' tid=trim(request("tid"))
If IsSubmit then
Dim msg
Set rs=server.createobject("adodb.recordset")
If len(CompanyID)<=0 Then
'response.Write("addnew")
set rs_max=server.CreateObject("adodb.recordset")
sql="select max(sequence) as maxid from Sbe_Media"
rs_max.open sql,conn,1,1
if isnull(rs_max("maxid")) then
sequence=1
else
sequence=rs_max("maxid")+1
end if
rs_max.close
set rs_max=nothing
Rs.open "Select * from Sbe_Media where id Is null",conn,1,3
Rs.addnew
Rs("Sequence")= sequence
Else
Rs.open "Select * from Sbe_Media where ID=" & clng(CompanyID) ,conn,1,3
End if
Rs("title")=Request.Form("title")
Rs("en_title")=Request.Form("en_title")
Rs("keyword")= Request.Form("keyword")
if Request.Form("addtime")<>"" then Rs("addtime")= Request.Form("addtime"):else:Rs("addtime")=date():end if
Rs("pic")= Request.Form("pic")
If len(CompanyID)<=0 Then
Set rs2=server.createobject("adodb.recordset")
sql2="select url from Sbe_Media where url='"&request.Form("url")&"'"
rs2.open sql2,conn,1,1
if not rs2.eof then
Response.Write "<Script>alert('该视频文件名已经存在,请重命名!');history.back();</script>"
response.End()
end if
rs2.close:set rs2=nothing
Rs("url")= Request.Form("url")
Else
Rs("url")= Request.Form("url")
End If
rs.update
rs.close
Set rs=nothing
If len(CompanyID)<=0 Then
Response.Write"<script>alert('视频增加成功');this.location.href='main.asp';</script>"
Else
Response.Write"<script>alert('视频修改成功');this.location.href='main.asp';</script>"
End IF
ElseIF Len(CompanyID)>0 Then
Dim StrSQL
Dim objRec
StrSQL = "Select * from Sbe_Media Where ID=" & CompanyID
Set objRec=server.createobject("adodb.recordset")
objRec.open StrSQL,conn,1,1
With ObjRec
If .Eof And .Bof Then
Response.Write "<Script>alert('操作失败');history.back();</script>"
Response.End
Else
title = objRec("title")
en_title = objRec("en_title")
addtime= objRec("addtime")
pic= objRec("pic")
url= objRec("url")
keyword= objRec("keyword")
End If
End With
objRec.Close:set objRec=Nothing
End if
Set Rs=Server.CreateObject("adodb.recordset")
Sql="Select FtpUrl,UserName,Password from sbe_WebConfig"
rs.open sql,conn,1,1
if not rs.eof then
FtpUrl=trim(rs(0))
UserName=trim(rs(1))
Password=trim(rs(2))
end if
Set Rs=Server.CreateObject("adodb.recordset")
Sql="Select UpmovieType from sbe_WebConfig"
Rs.Open Sql,Conn,1,1
UpmovieType=Rs("UpmovieType")
Rs.close:set rs=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加信息</title>
<link href="../include/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function foreColor()
{
var arr = showModalDialog("../eWebEditor/Dialog/selcolor.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
if (arr != null) document.add.title.value='<font color='+arr+'>'+document.add.title.value+'</font>'
else document.add.title.focus();
}
function clk(value){
add.froms.value=value;
}
function CheckForm()
{
if(document.add.select.value==""){
alert("请先选择类型!")
document.add.select.focus()
return false
}
if(document.add.title.value==""){
alert("请输入信息标题!")
document.add.title.focus()
return false
}
if (eWebEditor1.getHTML()==""){
alert("系统提示\n内容不能为空");
return (false);
}
}
</script>
<script janguage="javascript">
<!--
function goFtpSite() {
document.location.href = "ftp://" + document.add.login.value + ":" + document.add.password.value + "@" + document.add.url.value;
}
//-->
</script>
<script language="JavaScript" src="../include/meizzDate.js"></script>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body>
<br>
<form name="add" method="post" OnSubmit="return CheckForm();">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="sbe_table">
<tr align="center">
<td colspan="3" class="sbe_table_title">视频管理</td>
</tr>
<tr>
<td width="16%" align="right">视频标题:</td>
<td colspan="2"><input name="title" type="text" id="title" style="width:300px;" value="<%=title%>"></td>
</tr>
<tr>
<td align="right">视频标题(英文):</td>
<td colspan="2"><input name="en_title" type="text" id="en_title" style="width:300px;" value="<%=en_title%>"></td>
</tr>
<tr>
<td align="right">添加时间:</td>
<td colspan="2"><input name="addtime" type="text" id="addtime" onFocus="setday(this)" value="<%=addtime%>"></td>
</tr>
<tr>
<td align="right">上传图片:</td>
<td width="23%"><input name="pic" type="text" id="pic" value="<%=pic%>" size="25"></td>
<td width="61%"><iframe src="../upload/upload.asp?Form_Name=add&UploadFile=pic" width="100%" height="25" frameborder="0" scrolling="no"></iframe></td>
</tr>
<tr>
<td align="right">上传视频:</td>
<td colspan="2">支持无组建上传 视频文件不能超过30M</td>
</tr>
<tr>
<td align="right">无组建上传:</td>
<td><input name="url" type="text" id="url" value="<%=url%>" size="25"></td>
<td><iframe src="../upload/upload.asp?Form_Name=add&UploadFile=url" width="100%" height="25" frameborder="0" scrolling="no"></iframe></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td align="right">相关关键词:</td>
<td colspan="2"><input name="keyword" type="text" id="keyword" value="<%=keyword%>"></td>
</tr>
<tr align="center">
<td colspan="3"><input type="hidden" name="ID" value="<%=CompanyID%>"><input name="Submit" type="submit" class="sbe_button" value="提交">
<input name="Submit2" type="reset" class="sbe_button" value="重置"></td>
</tr>
</table>
</form>
<%Call CloseDataBase()%>
</body>
</html>
<%
Private Sub news_come_Class()
'读取新闻来源
Set oRs=Conn.Execute("select * from news_come_class order by id asc")
IF oRs.Eof and oRs.bof Then Exit Sub
Do While not oRs.eof
response.write "<a href=""javascript:clk('"& oRs("title") &"');"" >"& oRs("title") &"</a>/"& vbCrLf
oRs.Movenext
Loop
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -