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

📄 post_update.asp

📁 这是一个自己研发的薪酬管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'文件功能:wh_salaries--存储
'编写人员:房鹏(AhFun)
'编写时间:2003-08-11 19:10:03
'开发平台:ASP3.0 + MSSQL2000
'修改时间:2003-08-22
'修改目的:重写存储方式
%>

<!-- #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--存储</TITLE>
    <%
    dim mStr_WINDCallType
    mStr_WINDCallType = trim(request.querystring("WINDCallType"))       '调用方式
    dim mStr_WINDURL   '请将需要全局传递的变量链接到本变量上,使用方法参见WINDCallType,多个变量之间采用&链接
    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()
'敏感数据加密
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()
'功能:初始化
'参数:无
'返回:无
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()
'功能:存储资料
'参数:无
'返回:无
dim Str_Mess
dim Int_Count
dim Str_PK_salary_id                       '主鍵
dim Str_salary_date                        '工资发放时间
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) + ") [发放月份] 一栏必须为数值!"
        Int_Count = Int_Count+1
    end if
    if (not (IsDate(Str_salary_date))) then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [发放时间] 一栏必须为日期!"
        Int_Count = Int_Count+1
    end if
    if (not (IsNumeric(Str_employee_id))) then
        Str_Mess  = Str_Mess  +"\n"+ cstr(Int_Count) + ") [员工ID] 一栏必须为数值!"
        Int_Count = Int_Count+1
    end if
    if (Str_Mess<>"") then
        CheckData= "对不起,您录入的资料存在以下错误:" _
        +"\n"+ Str_Mess  _
        +"\n"+"\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) + ") [发放时间] 不能小于 [发放月份]!"
'			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
%>

⌨️ 快捷键说明

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