% ' FP_ASP Frontpage 元件自動產生 ASP。請勿編輯。 On Error Resume Next Session("FP_OldCodePage") = Session.CodePage Session("FP_OldLCID") = Session.LCID Session.CodePage = 65001 Session.LCID = 2052 Err.Clear strErrorUrl = "" If Request.ServerVariables("REQUEST_METHOD") = "POST" Then If Request.Form("VTI-GROUP") = "0" Then Err.Clear Set fp_conn = Server.CreateObject("ADODB.Connection") FP_DumpError strErrorUrl, "無法建立連線" Set fp_rs = Server.CreateObject("ADODB.Recordset") FP_DumpError strErrorUrl, "無法建立記錄項" fp_conn.Open Application("contact_ConnectionString") FP_DumpError strErrorUrl, "無法開啟資料庫" fp_rs.Open "结果", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable FP_DumpError strErrorUrl, "無法開啟記錄項" fp_rs.AddNew FP_DumpError strErrorUrl, "無法新增記錄項到資料庫" Dim arFormFields0(11) Dim arFormDBFields0(11) Dim arFormValues0(11) arFormFields0(0) = "Contact_Ocupation" arFormDBFields0(0) = "Contact_Ocupation" arFormValues0(0) = Request("Contact_Ocupation") arFormFields0(1) = "Contact_mobile" arFormDBFields0(1) = "Contact_mobile" arFormValues0(1) = Request("Contact_mobile") arFormFields0(2) = "Confirmt_Email" arFormDBFields0(2) = "Confirmt_Email" arFormValues0(2) = Request("Confirmt_Email") arFormFields0(3) = "Contact_Email" arFormDBFields0(3) = "Contact_Email" arFormValues0(3) = Request("Contact_Email") arFormFields0(4) = "Contact_Phone" arFormDBFields0(4) = "Contact_Phone" arFormValues0(4) = Request("Contact_Phone") arFormFields0(5) = "Contact_Name" arFormDBFields0(5) = "Contact_Name" arFormValues0(5) = Request("Contact_Name") arFormFields0(6) = "Message" arFormDBFields0(6) = "Message" arFormValues0(6) = Request("Message") arFormFields0(7) = "Contact_FAX" arFormDBFields0(7) = "Contact_FAX" arFormValues0(7) = Request("Contact_FAX") arFormFields0(8) = "Country" arFormDBFields0(8) = "Country" arFormValues0(8) = Request("Country") arFormFields0(9) = "Address" arFormDBFields0(9) = "Address" arFormValues0(9) = Request("Address") arFormFields0(10) = "Contact_Company" arFormDBFields0(10) = "Contact_Company" arFormValues0(10) = Request("Contact_Company") FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0 If Request.ServerVariables("REMOTE_HOST") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "远程计算机名称" End If If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "浏览器类型" End If FP_SaveFieldToDB fp_rs, Now, "时间戳记" If Request.ServerVariables("REMOTE_USER") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "使用者名称" End If fp_rs.Update FP_DumpError strErrorUrl, "無法更新資料庫" fp_rs.Close fp_conn.Close FP_FormConfirmation "text/html; charset=utf-8",_ "表單確認",_ "感謝您提交下列資訊:",_ "contact.asp",_ "回到表單" End If End If Session.CodePage = Session("FP_OldCodePage") Session.LCID = Session("FP_OldLCID") %>