|
gizmolady -> RE: CDO mail and Frontpage Database (2/24/2007 9:35:50)
|
Hope I"m sending this right... <% ' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit. On Error Resume Next Session("FP_OldCodePage") = Session.CodePage Session("FP_OldLCID") = Session.LCID Session.CodePage = 1252 Session.LCID = 1033 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, "Cannot create connection" Set fp_rs = Server.CreateObject("ADODB.Recordset") FP_DumpError strErrorUrl, "Cannot create record set" fp_conn.Open Application("resultceramic_ConnectionString") FP_DumpError strErrorUrl, "Cannot open database" fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable FP_DumpError strErrorUrl, "Cannot open record set" fp_rs.AddNew FP_DumpError strErrorUrl, "Cannot add new record set to the database" Dim arFormFields0(3) Dim arFormDBFields0(3) Dim arFormValues0(3) arFormFields0(0) = "cmugs" arFormDBFields0(0) = "cmugs" arFormValues0(0) = Request("cmugs") arFormFields0(1) = "UserName" arFormDBFields0(1) = "UserName" arFormValues0(1) = Request("UserName") arFormFields0(2) = "CeramicMugs" arFormDBFields0(2) = "CeramicMugs" arFormValues0(2) = Request("CeramicMugs") FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0 FP_SaveFieldToDB fp_rs, Now, "Timestamp" fp_rs.Update FP_DumpError strErrorUrl, "Cannot update the database" fp_rs.Close fp_conn.Close Session("FP_SavedFields")=arFormFields0 Session("FP_SavedValues")=arFormValues0 Session.CodePage = Session("FP_OldCodePage") Session.LCID = Session("FP_OldLCID") End If End If Session.CodePage = Session("FP_OldCodePage") Session.LCID = Session("FP_OldLCID") %> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Thank you for your order</title> </head> <body> <form method="POST" action="--WEBBOT-SELF--"> <!--webbot bot="SaveDatabase" startspan SuggestedExt="asp" S-DataConnection="resultceramic" S-RecordSource="Results" U-Database-URL="fpdb/resultceramic.mdb" S-Builtin-Fields="Timestamp" S-Builtin-DBFields="Timestamp" S-Form-Fields="cmugs UserName CeramicMugs" S-Form-DBFields="cmugs UserName CeramicMugs" U-ASP-Include-Url="_fpclass/fpdbform.inc" U-Confirmation-Url="orderform.htm" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan i-checksum="40548" --> <p align="center"> </p> <p align="center">Thank you for your order.</p> <p align="center">You have selected <nobr> <!--webbot bot="DatabaseRegionStart" s-columnnames="cmugs,id" s-columntypes="202,202" s-dataconnection="storeg" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="cmugs" s-menuvalue="cmugs" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="cmugs" s-displaycolumns="cmugs" s-criteria="[cmugs] EQ {cmugs} +" s-order s-sql="SELECT * FROM cmugs WHERE (cmugs = '::cmugs::')" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="cmugs=" s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " b-InForm="TRUE" b-UseDotNET="FALSE" CurrentExt sa-InputTypes="202" b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes="202" b-WasTableFormat="FALSE" startspan --><!--#include file="_fpclass/fpdblib.inc"--> <% if 0 then %> <SCRIPT Language="JavaScript"> document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>"); </SCRIPT> <% end if %> <% fp_sQry="SELECT * FROM cmugs WHERE (cmugs = '::cmugs::')" fp_sDefault="cmugs=" fp_sNoRecords="No records returned." fp_sDataConn="storeg" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=False fp_fMenuFormat=True fp_sMenuChoice="cmugs" fp_sMenuValue="cmugs" fp_sColTypes="&cmugs=202&id=202&" fp_iDisplayCols=1 fp_fCustomQuery=False BOTID=0 fp_iRegion=BOTID %> <!--webbot bot="DatabaseRegionStart" endspan i-checksum="27263" --><select NAME="cmugs" SIZE="1"> <!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn1.inc" startspan --><!--#include file="_fpclass/fpdbrgn1.inc"--> <!--webbot bot="AspInclude" endspan i-checksum="63746" --> <option><%=FP_FieldHTML(fp_rs,"cmugs")%></option> <!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn2.inc" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"--> <!--webbot bot="AspInclude" endspan i-checksum="63754" --></select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Results</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr> Ceramic Mugs <input type="submit" value="Place Order" name="B1"> </p> <p align="center">Click on the BACK button on your browser to change your order.</p> <p align="center"><a href="orderform.htm">Return to order page</a></p> <p> </p> <p> </p> <p> </p> <input type="hidden" name="UserName" value="<%Response.Write Session("Username")%>"> <input type="hidden" name="CeramicMugs" value="CeramicMugs"> </form> </html> <% Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.To = "fshayward@earthlink.net" objCDOMail.From = "fshAYWARD@EARTHLINK.NET" objCDOMail.Subject = "Ceramic Mugs" strBody = "Username:" & Session("Username") & vbCRLF strBody = strbody & "CeramicMugs: "& Session(fp_) & vbCRLF strBody= strbody & Session("FP_SavedValues") objCDOMail.Body =strbody objCDOMail.BodyFormat = 1 objCDOMail.MailFormat = 1 objCDOMail.Send Set objCDOMail = Nothing %> </body> </html>
|
|
|
|