% ' FP_ASP Frontpage 元件自動產生 ASP。請勿編輯。 On Error Resume Next Session("FP_OldCodePage") = Session.CodePage Session("FP_OldLCID") = Session.LCID Session.CodePage = 950 Session.LCID = 1028 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) = "Contact_Email" arFormDBFields0(2) = "Contact_Email" arFormValues0(2) = Request("Contact_Email") arFormFields0(3) = "Confirmt_Email" arFormDBFields0(3) = "Confirmt_Email" arFormValues0(3) = Request("Confirmt_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) = "Contact_FAX" arFormDBFields0(6) = "Contact_FAX" arFormValues0(6) = Request("Contact_FAX") arFormFields0(7) = "Message" arFormDBFields0(7) = "Message" arFormValues0(7) = Request("Message") arFormFields0(8) = "Country" arFormDBFields0(8) = "Country" arFormValues0(8) = Request("Country") arFormFields0(9) = "Contact_Company" arFormDBFields0(9) = "Contact_Company" arFormValues0(9) = Request("Contact_Company") arFormFields0(10) = "Address" arFormDBFields0(10) = "Address" arFormValues0(10) = Request("Address") 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=big5",_ "表單確認",_ "感謝您提交下列資訊:",_ "contact.asp",_ "回到表單" End If End If Session.CodePage = Session("FP_OldCodePage") Session.LCID = Session("FP_OldLCID") %>