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

📄 post_update.asp

📁 这是一个自己研发的薪酬管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'文件功能:存储客户端递交的新增、修改员工信息
'版权所有:万户网络
'编写人员:房鹏
'编写时间:2003-8-12
'修改人员:房鹏
'修改时间:2003-8-13
'修改目的:增加MD5密码加密,判断修改资料对用户密码的操作
%>

<!-- #include file="../Common/Cls_DbProcess2.1.asp" -->
<!-- #include file="../wh_employees/Cls_wh_employees.asp" -->
<!-- #include file="../pub/md5.asp" -->
<!-- #include file="../pub/fun.asp" -->
<!-- #include file="../pub/conn.asp" -->
<%call checklogin()%>
<HTML>
<HEAD>
    <META NAME="GENERATOR" CONTENT="WindSoft Programmer3">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=gb2312">
    <TITLE>wh_employees--存储</TITLE>
    <%
    dim mStr_WINDCallType
    mStr_WINDCallType = trim(request.querystring("WINDCallType"))       '调用方式
    dim mStr_WINDURL   '请将需要全局传递的变量链接到本变量上,使用方法参见WINDCallType,多个变量之间采用&链接
    mStr_WINDURL = "WINDCallType="+Server.URLEncode(mStr_WINDCallType)
    %>
</HEAD>
<BODY>
<%
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.asp?"+mStr_WINDURL+"&Continue=1")
        end if
    end if
end function

function CheckData()
'功能:存储资料
'参数:无
'返回:无
dim Str_Mess
dim Int_Count
dim Str_PK_employee_id                     '主鍵
dim Str_employee_name                      '姓名
dim Str_employee_pwd                       '密码
dim Str_employee_type                      '类型
dim Str_employee_edu                       '学历
dim Str_employee_joindate                  '参加工作时间
dim Str_employee_birth                     '生日
dim Str_employee_memo                      '备注
dim Str_employee_right                     '权限
dim Str_dpt_id                             '部门ID

    Str_PK_employee_id                     = trim(request.form("PK_employee_id"))
    Str_employee_name                      = trim(request.form("employee_name"))
    Str_employee_pwd                       = md5(trim(request.form("employee_pwd")))
    Str_employee_type                      = trim(request.form("employee_type"))
    Str_employee_edu                       = trim(request.form("employee_edu"))
    Str_employee_joindate                  = trim(request.form("employee_joindate"))
    Str_employee_birth                     = trim(request.form("employee_birth"))
    Str_employee_memo                      = trim(request.form("employee_memo"))
    Str_employee_right                     = trim(request.form("employee_right"))
    Str_dpt_id                             = trim(request.form("dpt_id"))

    Str_Mess           =  ""
    Int_Count          =  1

    if (trim(Str_employee_name)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [姓名] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_employee_pwd)="8f00b204e9800998" and trim(Str_PK_employee_id)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [密码] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_employee_type)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [类型] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_employee_edu)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [学历] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (not (IsDate(Str_employee_joindate))) then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [参加工作时间] 一栏必须为日期!"
        Int_Count = Int_Count+1
    end if
    if (not (IsDate(Str_employee_birth))) then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [生日] 一栏必须为日期!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_employee_right)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [权限] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_dpt_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
    CheckData = mCls_wh_employees.SaveData(Str_PK_employee_id, Str_employee_name, Str_employee_pwd, Str_employee_type, Str_employee_edu, Str_employee_joindate, Str_employee_birth, Str_employee_memo, Str_employee_right, Str_dpt_id)
end function
%>

⌨️ 快捷键说明

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