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

📄 user_info_code.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 5 页
字号:
    CompanyID = PE_CLng(rsUser("CompanyID"))
    rsUser.Update
    rsUser.Close
    Set rsUser = Nothing
    If FoundInArr(RegFields_MustFill, "TrueName", ",") = True And TrueName = "" Then
        FoundErr = True
        ErrMsg = "真实姓名不能为空!"
        Exit Sub
    End If
    If ClientID <> 0 Then
        Conn.Execute ("Update PE_Client Set ClientName='" & TrueName & "' Where ClientID=" & ClientID)
    End If

    Dim sqlContacter, rsContacter
    Set rsContacter = Server.CreateObject("adodb.recordset")
    sqlContacter = "select * From PE_Contacter where ContacterID=" & ContacterID & ""
    rsContacter.open sqlContacter, Conn, 1, 3
    If rsContacter.BOF And rsContacter.EOF Then
        ContacterID = GetNewID("PE_Contacter", "ContacterID")
        Conn.Execute ("update PE_User set ContacterID=" & ContacterID & " where UserID=" & UserID & "")
        rsContacter.addnew
        rsContacter("ContacterID") = ContacterID
        rsContacter("ClientID") = ClientID
        rsContacter("ParentID") = 0
        rsContacter("Family") = ""
        rsContacter("CreateTime") = Now()
        rsContacter("Owner") = ""
    End If
    rsContacter("UserType") = UserType
    rsContacter("TrueName") = TrueName
    rsContacter("Country") = nohtml(Trim(Request.Form("Country1")))
    rsContacter("Province") = nohtml(Trim(Request.Form("Province1")))
    rsContacter("City") = nohtml(Trim(Request.Form("City1")))
    rsContacter("ZipCode") = nohtml(Trim(Request.Form("ZipCode1")))
    rsContacter("Address") = nohtml(Trim(Request.Form("Address1")))
    rsContacter("Mobile") = nohtml(Trim(Request.Form("Mobile")))
    rsContacter("OfficePhone") = nohtml(Trim(Request.Form("OfficePhone")))
    rsContacter("HomePhone") = nohtml(Trim(Request.Form("HomePhone")))
    rsContacter("PHS") = nohtml(Trim(Request.Form("PHS")))
    rsContacter("Fax") = nohtml(Trim(Request.Form("Fax1")))
    rsContacter("Homepage") = nohtml(Trim(Request.Form("Homepage1")))
    rsContacter("Email") = nohtml(Trim(Request.Form("Email1")))
    rsContacter("QQ") = nohtml(Trim(Request.Form("QQ")))
    rsContacter("MSN") = nohtml(Trim(Request.Form("MSN")))
    rsContacter("ICQ") = nohtml(Trim(Request.Form("ICQ")))
    rsContacter("Yahoo") = nohtml(Trim(Request.Form("Yahoo")))
    rsContacter("UC") = nohtml(Trim(Request.Form("UC")))
    rsContacter("Aim") = nohtml(Trim(Request.Form("Aim")))
    rsContacter("Company") = nohtml(Trim(Request.Form("Company")))
    rsContacter("CompanyAddress") = nohtml(Trim(Request.Form("CompanyAddress")))
    rsContacter("Department") = nohtml(Trim(Request.Form("Department")))
    rsContacter("Position") = nohtml(Trim(Request.Form("Position")))
    rsContacter("Operation") = nohtml(Trim(Request.Form("Operation")))
    rsContacter("Title") = nohtml(Trim(Request.Form("Title")))
    rsContacter("BirthDay") = PE_CDate(Trim(Request.Form("Birthday")))
    rsContacter("IDCard") = nohtml(Trim(Request.Form("IDCard")))
    rsContacter("NativePlace") = nohtml(Trim(Request.Form("NativePlace")))
    rsContacter("Nation") = nohtml(Trim(Request.Form("Nation")))
    rsContacter("Sex") = PE_CLng(Trim(Request.Form("Sex")))
    rsContacter("Marriage") = PE_CLng(Trim(Request.Form("Marriage")))
    rsContacter("Education") = PE_CLng(Trim(Request.Form("Education")))
    rsContacter("GraduateFrom") = nohtml(Trim(Request.Form("GraduateFrom")))
    rsContacter("InterestsOfLife") = nohtml(Trim(Request.Form("InterestsOfLife")))
    rsContacter("InterestsOfCulture") = nohtml(Trim(Request.Form("InterestsOfCulture")))
    rsContacter("InterestsOfAmusement") = nohtml(Trim(Request.Form("InterestsOfAmusement")))
    rsContacter("InterestsOfSport") = nohtml(Trim(Request.Form("InterestsOfSport")))
    rsContacter("InterestsOfOther") = nohtml(Trim(Request.Form("InterestsOfOther")))
    rsContacter("Income") = PE_CLng(Trim(Request.Form("Income")))
    rsContacter("UpdateTime") = Now()

    rsContacter.Update
    rsContacter.Close
    Set rsContacter = Nothing

    Dim Company2, Address2, ZipCode2
    Company2 = Trim(Request.Form("Company2"))
    Address2 = Trim(Request.Form("Address2"))
    ZipCode2 = Trim(Request.Form("ZipCode2"))

    If UserType = 1 Then
        If Company2 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>请输入单位名称!</li>"
        End If
        If Address2 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>请输入单位的联系地址!</li>"
        End If
        If ZipCode2 = "" Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>请输入单位的邮政编码!</li>"
        End If
        If FoundErr = True Then
            Exit Sub
        End If

        Dim sqlCompany, rsCompany
        Set rsCompany = Server.CreateObject("adodb.recordset")
        sqlCompany = "select * From PE_Company where CompanyID=" & CompanyID & ""
        rsCompany.open sqlCompany, Conn, 1, 3
        If rsCompany.BOF And rsCompany.EOF Then
            CompanyID = GetNewID("PE_Company", "CompanyID")
            Conn.Execute ("update PE_User set CompanyID=" & CompanyID & " where UserID=" & UserID & "")
            rsCompany.addnew
            rsCompany("CompanyID") = CompanyID
            rsCompany("ClientID") = 0
        End If

        rsCompany("CompanyName") = nohtml(Trim(Request.Form("Company2")))
        rsCompany("Country") = nohtml(Trim(Request.Form("Country2")))
        rsCompany("Province") = nohtml(Trim(Request.Form("Province2")))
        rsCompany("City") = nohtml(Trim(Request.Form("City2")))
        rsCompany("Address") = nohtml(Trim(Request.Form("Address2")))
        rsCompany("ZipCode") = nohtml(Trim(Request.Form("ZipCode2")))
        rsCompany("Phone") = nohtml(Trim(Request.Form("Phone")))
        rsCompany("Fax") = nohtml(Trim(Request.Form("Fax2")))
        rsCompany("HomePage") = nohtml(Trim(Request.Form("Homepage2")))
        rsCompany("BankOfDeposit") = nohtml(Trim(Request.Form("BankOfDeposit")))
        rsCompany("BankAccount") = nohtml(Trim(Request.Form("BankAccount")))
        rsCompany("TaxNum") = nohtml(Trim(Request.Form("TaxNum")))
        rsCompany("StatusInField") = PE_CLng(Trim(Request.Form("StatusInField")))
        rsCompany("CompanySize") = PE_CLng(Trim(Request.Form("CompanySize")))
        rsCompany("BusinessScope") = nohtml(Trim(Request.Form("BusinessScope")))
        rsCompany("AnnualSales") = nohtml(Trim(Request.Form("AnnualSales")))
        rsCompany("ManagementForms") = PE_CLng(Trim(Request.Form("ManagementForms")))
        rsCompany("RegisteredCapital") = nohtml(Trim(Request.Form("RegisteredCapital")))
        rsCompany("CompanyIntro") = PE_HTMLEncode(Trim(Request.Form("CompanyIntro")))
        rsCompany("CompamyPic") = nohtml(Trim(Request.Form("CompamyPic")))
        rsCompany.Update
        rsCompany.Close
        Set rsCompany = Nothing
    End If

    Call WriteSuccessMsg("修改信息成功!", ComeUrl)
End Sub


Sub ModifyPwd()
    Response.Write "<form name='myform' action='User_Info.asp' method='post'>" & vbCrLf
    Response.Write "  <table width='400' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>" & vbCrLf
    Response.Write "    <tr align='center' class='title'>" & vbCrLf
    Response.Write "      <td height='22' colSpan='2'><b>修 改 密 码</b></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='120' align='right' class='tdbg5'>用 户 名:</td>" & vbCrLf
    Response.Write "      <td>" & UserName & "</td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'> " & vbCrLf
    Response.Write "      <td width='120' align='right' class='tdbg5'>旧 密 码:</td>" & vbCrLf
    Response.Write "      <td><input name='OldPassword' type='password' maxLength='16' size='30'></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='120' align='right' class='tdbg5'>新 密 码:</td>" & vbCrLf
    Response.Write "      <td> <input name='Password' type='password' maxLength='16' size='30'> </td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='120' align='right' class='tdbg5'>确认密码:</td>" & vbCrLf
    Response.Write "      <td><input name='PwdConfirm' type='password' maxLength='16' size='30'>" & vbCrLf
    Response.Write "      </td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr align='center' class='tdbg'>" & vbCrLf
    Response.Write "      <td height='40' colspan='2'>" & vbCrLf
    Response.Write "        <input name='UserName' type='hidden' id='UserName' value='" & UserName & "'>" & vbCrLf
    Response.Write "        <input name='Action' type='hidden' id='Action' value='SavePwd'>" & vbCrLf
    Response.Write "        <input name='Submit' type='submit' id='Submit' value=' 保 存 '>" & vbCrLf
    Response.Write "      </td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "  </table>" & vbCrLf
    Response.Write "</form>" & vbCrLf
End Sub

Sub SavePwd()
    Dim OldPassword, Password, PwdConfirm
    Dim rsUser, sqlUser
    OldPassword = Trim(Request.Form("OldPassword"))
    Password = Trim(Request.Form("Password"))
    PwdConfirm = Trim(Request.Form("PwdConfirm"))
    If OldPassword = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请输入旧密码!</li>"
    Else
        If CheckBadChar(OldPassword) = False Then
            ErrMsg = ErrMsg + "<li>旧密码中含有非法字符</li>"
            FoundErr = True
        End If
    End If
    If Len(Password) > 12 Or Len(Password) < 6 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请输入新密码(不能大于12小于6)。</li>"
    Else
        If CheckBadChar(Password) = False Then
            ErrMsg = ErrMsg + "<li>新密码中含有非法字符</li>"
            FoundErr = True
        End If
    End If
    If PwdConfirm = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请输入确认密码!</li>"

⌨️ 快捷键说明

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