?? saveentry.asp
字號(hào):
<!--#include file="connection.asp"-->
<%
if session("userid") = "" then '驗(yàn)證權(quán)限
Response.Redirect "login.htm"
end if
%>
<%
dim xtitle_id, xparticulars, xddate, xamount
'獲取財(cái)務(wù)開(kāi)支信息
xtitle_id = request("title_id")
xddate = request("Ddate")
xparticulars = request("particulars")
xamount = cint(Request("amount"))
if instr(1,xparticulars,"'") > 0 then '替換單引號(hào)
xparticulars = replace(xparticulars,"'","''")
end if
conn.open = connstring '打開(kāi)數(shù)據(jù)庫(kù)
set rs = Server.CreateObject("adodb.recordset")
rs.open "select * from expenses order by e_id desc",conn
dim xe_id
xe_id = 1
if not rs.EOF then '設(shè)定開(kāi)支編號(hào)
xe_id = clng(rs.Fields("e_id")) + 1
end if
'將財(cái)務(wù)開(kāi)支信息
set rs1 = Server.CreateObject("adodb.recordset")
rs1.open "insert into expenses values(" & xe_id & ",#" & xddate & "#,'" & xparticulars & "'," & xamount & "," & xtitle_id & ",'" & session("userid") & "')",conn
'將年月日保存到session變量中
session("Sday") = right("0" & day(xddate),2)
session("Smonth") = Month(xddate)
session("Syear") = Year(xddate)
Response.Redirect "main.asp?flag=saved"
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -