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

📄 movieannouncesave.asp

📁 很好的企业网站管理系统!可以适应各种不同的小型企业!
💻 ASP
字号:
<%Admin="UserSee"%>
<!--#include file="check.asp"-->
<!--#include file="mdb_path_movie.asp"-->
<%
	dim id
	dim newsname
	dim newsnote
	dim sql
	dim rs
	dim founderr
	founerr=false
	'if trim(request.form("newsname"))="" then
  	'	founderr=true
  	'	errmsg="<li>新闻名称不能空</li>"
	'end if
	if trim(request.form("newsnote"))="" then
  		founderr=true
  		errmsg=errmsg+"<li>公告内容不能为空</li>"
	end if
	if founderr=false then
	'	newsname=request("newsname")		
		newsnote=request("newsnote")
		
	set rs=server.createobject("adodb.recordset")
	if request("action")="add" then
		call newsoft()
	elseif request("action")="edit" then
		call editsoft()
	end if
sub newsoft()
	sql="select * from Announce where (id is null)" 
	rs.open sql,conn,1,3
	rs.addnew
	'rs("newsname")=newsname	
	rs("newsnote")=newsnote
	rs("addtime")=date()
	rs.update
end sub
sub editsoft()
	sql="select * from Announce where id="&request("id")
	rs.open sql,conn,1,3
	'rs("newsname")=newsname	
	rs("newsnote")=newsnote
	'rs("lasthits")=date()
	rs.update
end sub

	if makejs=1 then
		UpdateJs(news)
	end if
	set rs=nothing
	conn.close
	set conn=nothing
%>
<html>

<head>
<title></title>
<link rel="stylesheet" type="text/css" href="admin.css">

</head>

<body>
  
<table width="98%" border="0" cellpadding="3" cellspacing="1" align="center">
  <tr>
    
<th width="100%" height="20" bgcolor="#145f74">
<p align="center"><font color="#FFFFFF">
 <%if request("action")=add then%>
 添加
 <%else%>
 修改
 <%end if%>
 公告成功</font>
</td>
  </tr>
  <tr>
    
<td width="100%">
<p align="left"><br>
   
    公告内容为:<%=newsnote%></p>
    您可以进行其他操作
    </td>
  </tr>
</table>
<%
else
 response.write "由于以下的原因不能保存数据:"
 response.write errmsg
end if
%>

</body>
</html>

⌨️ 快捷键说明

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