?? post_update.asp
字號(hào):
<%@ Language=VBScript %>
<%
'文件功能:wh_salaries--存儲(chǔ)
'編寫人員:房鵬(AhFun)
'編寫時(shí)間:2003-08-11 19:10:03
'開發(fā)平臺(tái):ASP3.0 + MSSQL2000
'修改時(shí)間:2003-08-22
'修改目的:重寫存儲(chǔ)方式
%>
<!-- #include file="../Common/Cls_DbProcess2.1.asp" -->
<!-- #include file="../wh_salaries/Cls_wh_salaries.asp" -->
<!-- #include file="../pub/conn.asp" -->
<!-- #include file="../pub/fun.asp" -->
<!-- #include file="../pub/rsa.asp" -->
<%call checklogin()%>
<%
if session("right")<3 then
dim lr
lr="<font color=red>"&now()&"有"&session("name")&"試圖修改工資總表 IP:"&REQUEST.SERVERVARIABLES("REMOTE_ADDR")&"</font>"
call savelog("../pub/error.htm",lr)
call savedatalog(now(),session("name"),"試圖修改工資總表",REQUEST.SERVERVARIABLES("REMOTE_ADDR"),2)
response.redirect("../error.asp?msg=2")
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="WindSoft Programmer3">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=gb2312">
<TITLE>wh_salaries--存儲(chǔ)</TITLE>
<%
dim mStr_WINDCallType
mStr_WINDCallType = trim(request.querystring("WINDCallType")) '調(diào)用方式
dim mStr_WINDURL '請(qǐng)將需要全局傳遞的變量鏈接到本變量上,使用方法參見WINDCallType,多個(gè)變量之間采用&鏈接
mStr_WINDURL = "WINDCallType="+Server.URLEncode(mStr_WINDCallType)
%>
</HEAD>
<BODY>
<%
dim salary_info1,salary_info2,salary_isopen
salary_info1=left(replace(request("salary_info1"),"undefined",""),len(replace(request("salary_info1"),"undefined",""))-1)
salary_info2=left(replace(request("salary_info2"),"undefined",""),len(replace(request("salary_info2"),"undefined",""))-1)
sub jiami()
'敏感數(shù)據(jù)加密
dim plus(100,2)
dim minus(100,2)
dim plus_split
dim minus_split
plus_split = split(salary_info1,";")
salary_info1=""
for i = 0 to ubound(plus_split)
plus(i,0)=left(plus_split(i),instr(plus_split(i),":")-1)
plus(i,1)=Encryptstr(right(plus_split(i),len(plus_split(i))-instr(plus_split(i),":")))
salary_info1=salary_info1&""&plus(i,0)&":"&plus(i,1)&";"
next
minus_split = split(salary_info2,";")
salary_info2=""
for j = 0 to ubound(minus_split)
minus(j,0)=left(minus_split(j),instr(minus_split(j),":")-1)
minus(j,1)=Encryptstr(right(minus_split(j),len(minus_split(j))-instr(minus_split(j),":")))
salary_info2=salary_info2&""&minus(j,0)&":"&minus(j,1)&";"
next
salary_info1=left(salary_info1,len(salary_info1)-1)
salary_info2=left(salary_info2,len(salary_info2)-1)
end sub
'response.write(salary_info1&"<br>")
'response.write(salary_info2)
'response.end
call InitData()
%>
</BODY>
</HTML>
<%
function InitData()
'功能:初始化
'參數(shù):無
'返回:無
dim Str_Mess
Str_Mess = CheckData()
if (Str_Mess<>"") then
call ShowMess(16,Str_Mess)
call WindowBack()
else
if (request.form("Continue")="") then
select case mStr_WINDCallType
case else:
call WindowReplace("Main.asp?"+mStr_WINDURL)
end select
else
call WindowReplace("Update_select.asp?"+mStr_WINDURL+"&Continue=1")
end if
end if
end function
function CheckData()
'功能:存儲(chǔ)資料
'參數(shù):無
'返回:無
dim Str_Mess
dim Int_Count
dim Str_PK_salary_id '主鍵
dim Str_salary_date '工資發(fā)放時(shí)間
dim Str_salary_month '月份
dim Str_employee_id '員工ID
Str_PK_salary_id = trim(request.form("PK_salary_id"))
Str_salary_date = trim(request.form("salary_date"))
Str_salary_month = trim(request.form("salary_month"))
Str_employee_id = trim(request.form("employee_id"))
Str_salary_memo = trim(request.form("salary_memo"))
Str_salary_isopen =trim(request.form("salary_isopen"))
if (not (IsNumeric(Str_salary_month))) then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [發(fā)放月份] 一欄必須為數(shù)值!"
Int_Count = Int_Count+1
end if
if (not (IsDate(Str_salary_date))) then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [發(fā)放時(shí)間] 一欄必須為日期!"
Int_Count = Int_Count+1
end if
if (not (IsNumeric(Str_employee_id))) then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [員工ID] 一欄必須為數(shù)值!"
Int_Count = Int_Count+1
end if
if (Str_Mess<>"") then
CheckData= "對(duì)不起,您錄入的資料存在以下錯(cuò)誤:" _
+"\n"+ Str_Mess _
+"\n"+"\n"+"請(qǐng)檢查資料或聯(lián)系管理員!"
exit function
end if
call jiami()
Str_salary_info1 = salary_info1
Str_salary_info2 = salary_info2
Str_Mess = ""
Int_Count = 1
' if ((IsNumeric(Str_salary_month)) and (IsDate(Str_salary_date))) then
' if month(Str_salary_date)<int(Str_salary_month) then
' Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [發(fā)放時(shí)間] 不能小于 [發(fā)放月份]!"
' Int_Count = Int_Count+1
' end if
' end if
CheckData = mCls_wh_salaries.SaveData(Str_PK_salary_id, Str_salary_date, Str_salary_month, Str_employee_id, Str_salary_info1, Str_salary_info2, Str_salary_memo, Str_salary_isopen)
end function
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -