📄 saveceps.asp
字号:
<!--#include file="../../includes/keepHouse.asp"-->
<%
call insureID()
%>
<html>
<head>
<title>WebOffice</title>
</head>
<body>
<%
if (request("action")="Compose") then
call saveCompose()
elseif (request("action")="Edit") then
call saveEdit()
elseif (request("action")="Postil") then
call savePostil()
elseif (request("action")="Submit") then
call saveSubmit()
else
call trigErr()
end if
sub saveCompose()
dim SUMMPLAN_TITLE
dim SUMM_CONTENT
dim PLAN_CONTENT
SUMMPLAN_TITLE = request("Title")
SUMM_CONTENT = request("Summ")
PLAN_CONTENT = request("Plan")
SUMMPLAN_TITLE = replacePrime(SUMMPLAN_TITLE)
SUMM_CONTENT = replacePrime(SUMM_CONTENT)
PLAN_CONTENT = replacePrime(PLAN_CONTENT)
if SUMMPLAN_TITLE="" then
SUMMPLAN_TITLE="无"
end if
if SUMM_CONTENT="" then
SUMM_CONTENT="无"
end if
if PLAN_CONTENT="" then
PLAN_CONTENT="无"
end if
COMPOSE_DATE = date()
PERSONNEL_ID = session("PERSONNEL_ID")
sql="INSERT INTO PersonalSummPlan (SUMMPLAN_TITLE, PLAN_CONTENT, SUMM_CONTENT, COMPOSE_DATE, " _
&"SUBMITED, POSTILED, POSTIL_CONTENT, POSTIL_DATE, PERSONNEL_ID) " _
&"VALUES ('"&SUMMPLAN_TITLE&"','"&PLAN_CONTENT&"','"&SUMM_CONTENT _
&"','"&COMPOSE_DATE&"',0,0,'','',"&session("PERSONNEL_ID")&")"
call openDB()
conn.execute(sql)
call closeDB()
response.write "添加成功! <<<a href=""Browse.asp"">返回</a>"
end sub
sub saveEdit()
dim SUMMPLAN_ID
dim SUMMPLAN_TITLE
dim PLAN_CONTENT
dim SUMM_CONTENT
dim COMPOSE_DATE
dim PERSONNEL_ID
PERSONNEL_ID = session("PERSONNEL_ID")
SUMMPLAN_ID = request("SUMMPLAN_ID")
SUMMPLAN_TITLE = request("SUMMPLAN_TITLE")
PLAN_CONTENT = request("PLAN_CONTENT")
SUMM_CONTENT = request("SUMM_CONTENT")
SUMMPLAN_TITLE = replace(SUMMPLAN_TITLE,"'","#Rep_PRIME_lace#")
SUMM_CONTENT = replace(SUMM_CONTENT,"'","#Rep_PRIME_lace#")
PLAN_CONTENT = replace(PLAN_CONTENT,"'","#Rep_PRIME_lace#")
if SUMMPLAN_ID="" then
call trigErr()
end if
if SUMMPLAN_TITLE="" then
SUMMPLAN_TITLE="无"
end if
if SUMM_CONTENT="" then
SUMM_CONTENT="无"
end if
if PLAN_CONTENT="" then
PLAN_CONTENT="无"
end if
COMPOSE_DATE = date()
if (request("Submit")="Submit") then
SUBMITED = 1
SUBMIT_DATE = date()
else
SUBMITED = 0
SUBMIT_DATE = ""
end if
sql="UPDATE PersonalSummPlan " _
&"SET SUMMPLAN_TITLE='"&SUMMPLAN_TITLE&"',SUMM_CONTENT='"&SUMM_CONTENT&"',PLAN_CONTENT='"&PLAN_CONTENT&"',SUBMIT_DATE='" _
&SUBMIT_DATE&"',SUBMITED="&SUBMITED _
&"WHERE SUMMPLAN_ID="&SUMMPLAN_ID&" AND PERSONNEL_ID="&PERSONNEL_ID
call openDB()
conn.execute(sql)
call closeDB()
response.write "修改成功! <<<a href=""Browse.asp"">返回</a>"
end sub
sub savePostil()
if session("POSITION_ID")<>1 and session("POSITION_ID")<>4 then
response.write "<br><p align=center>您没有操作的权限!</p>"
end if
dim SUMMPLAN_ID
dim POSTIL_CONTENT
SUMMPLAN_ID = request("SUMMPLAN_ID")
POSTIL_CONTENT = request("POSTIL_CONTENT")
POSTIL_CONTENT = replace(POSTIL_CONTENT,"'","#Rep_PRIME_lace#")
if SUMMPLAN_ID="" or POSTIL_CONTENT="" then
call trigErr()
end if
sql="UPDATE PersonalSummPlan SET POSTILED = 1, POSTIL_CONTENT='" _
&POSTIL_CONTENT&"' "&"WHERE SUMMPLAN_ID = "&SUMMPLAN_ID
call openDB()
conn.execute(sql)
call closeDB()
response.write "保存成功! [<a href=""Browse.asp""><<返回</a>]"
end sub
sub saveSubmit()
dim SUMMPLAN_ID
SUMMPLAN_ID = request("SUMMPLAN_ID")
if SUMMPLAN_ID="" then
call trigErr()
end if
sql="UPDATE PersonalSummPlan SET SUBMITED=1, SUBMIT_DATE=GETDATE() " _
&"WHERE SUMMPLAN_ID="&SUMMPLAN_ID&" AND PERSONNEL_ID="&session("PERSONNEL_ID")
call openDB()
conn.execute(sql)
call closeDB()
response.write "保存成功! [<a href=""Browse.asp""><<返回</a>]"
end sub
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -