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

📄 saveced.asp

📁 功能强大的办公自动化系统 具有前后台管理系统 具有很好的应用性
💻 ASP
字号:
<!--#include file="../../includes/keepHouse.asp"-->
<%
call insureID()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WebOffice</title>
</head>

<body>
<%
if (request("action")="Compose") then
	call saveCompose()
	response.end
elseif (request("action")="Edit") then
	call saveEdit()
	response.end
elseif (request("action")="Delete") then
	call saveDelete()
	response.end
else
	call trigErr()
end if

sub saveCompose()
	dim NOTE_TITLE
	dim NOTE_CONTENT
	NOTE_TITLE = request("Title")
	NOTE_CONTENT = request("Content")
	NOTE_TITLE = replacePrime(NOTE_TITLE)
	NOTE_CONTENT = replacePrime(NOTE_CONTENT)
	if NOTE_TITLE="" or NOTE_CONTENT="" then
		call trigErr()
	end if
	PERSONNEL_ID = session("PERSONNEL_ID")	
	sql="INSERT INTO PersonalNotes (NOTE_TITLE,NOTE_CONTENT,COMPOSE_DATE,PERSONNEL_ID) " _
		&"VALUES ('"&NOTE_TITLE&"', '"&NOTE_CONTENT&"', GETDATE(), "&PERSONNEL_ID&") "
	call openDB()
	conn.execute(sql)
	response.write "提交成功!&nbsp;&nbsp;&lt;&lt;<a href=""Browse.asp"">返回</a>"
	call closeDB()
end sub

sub saveEdit()
	dim NOTE_ID
	dim NOTE_TITLE
	dim NOTE_CONTENT
	NOTE_ID = request("NOTE_ID")
	if NOTE_ID = "" then
		call trigErr()
	end if
	NOTE_TITLE = request("Title")
	NOTE_CONTENT = request("Content")
	NOTE_TITLE = replacePrime(NOTE_TITLE)
	NOTE_CONTENT = replacePrime(NOTE_CONTENT)
	if NOTE_TITLE="" or NOTE_CONTENT="" then
		call trigErr()
	end if
	sql="UPDATE PersonalNotes " _
		&"SET NOTE_TITLE='"&NOTE_TITLE&"',NOTE_CONTENT='"&NOTE_CONTENT&"',COMPOSE_DATE=GETDATE() " _
		&"WHERE NOTE_ID="&NOTE_ID
	call openDB()
	conn.execute(sql)
	response.write "修改成功!&nbsp;&nbsp;&lt;&lt;<a href=""Browse.asp"">返回</a>"
	call closeDB()
end sub

sub saveDelete()
	NOTE_ID = request("NOTE_ID")
	if NOTE_ID = "" then
		call trigErr()
	end if
	sql ="DELETE FROM PersonalNotes WHERE NOTE_ID="&NOTE_ID
	call openDB()
	conn.execute(sql)
	response.write "修改成功!&nbsp;&nbsp;&lt;&lt;<a href=""Browse.asp"">返回</a>"
	call closeDB()
end sub
%>
</body>
</html>

⌨️ 快捷键说明

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