<% response.Charset="ISO-8859-1" %> <% If Session("kunde") <> "" And Request.Form("submitorder") = "Afsend ordren" Then sql = "INSERT INTO nyordrenummer(ip) VALUES (""" & Request.Servervariables("REMOTE_ADDR") & """)" Conn.Execute(sql) sql = "SELECT * FROM nyordrenummer ORDER BY id DESC" Set objRS = Conn.Execute(sql) If Not objRS.EOF Then ordrenummer = objRS("id") objRS.Close body = "Ordre" body = body & "

Tak for ordren. Herunder er en kvittering for bestillingen.
Med venlig hilsen
JN Greb

" body = body & "" body = body & "" & Chr(10) body = body & "" & Chr(10) body = body & "" & Chr(10) body = body & "" End If body = body & "" & Chr(10) body = body & "
Webordre JN Greb
Bestilling fra:
Kundenummer" & Session("kundeid") & " " body = body & "
Firma" & Server.HTMLEncode(Request.Form("firma")) & " " body = body & "
Navn" & Server.HTMLEncode(Request.Form("navn")) & " " body = body & "
Vej" & Server.HTMLEncode(Request.Form("adresse")) & " " body = body & "
postnummer" & Server.HTMLEncode(Request.Form("zip")) & " " body = body & "
by" & Server.HTMLEncode(Request.Form("by")) & " " & Server.HTMLEncode(Request.Form("x6")) & " " body = body & "
Telefon" & Server.HTMLEncode(Request.Form("telefon")) & " " body = body & "
E-mail" & Server.HTMLEncode(Request.Form("mail")) & " " body = body & "
Rekvisition" & Server.HTMLEncode(Request.Form("rekvnr")) & " " body = body & "
Lågetykkelse" & Server.HTMLEncode(Request.Form("laagetykkelse")) & " " body = body & "
Leveringsdato" & Server.HTMLEncode(Request.Form("dag")) & "-" & Server.HTMLEncode(Request.Form("month")) & "-" & Server.HTMLEncode(Request.Form("project_year")) & " " body = body & "
leveringssadresse:
Firma" & Server.HTMLEncode(Request.Form("lfirma")) & " " body = body & "
Navn" & Server.HTMLEncode(Request.Form("lnavn")) & " " body = body & "
Vej" & Server.HTMLEncode(Request.Form("ladresse")) & " " body = body & "
postnummer" & Server.HTMLEncode(Request.Form("lzip")) & " " body = body & "
by" & Server.HTMLEncode(Request.Form("lby")) & " " body = body & "
Telefon" & Server.HTMLEncode(Request.Form("ltelefon")) & " " If Request.Form("maastilles") <> "" Then body = body & "
Må stilles uden kvittering. 
Har bestilt:
" body = body & "" sql = "SELECT * FROM kurv, varer, billeder WHERE varer.id = kurv.vareid AND billeder.id = varer.billede AND kurv.kundeid = """ & Session("kundeid") & """" Set objRS = Conn.Execute(sql) While Not objRS.EOF sql = "INSERT INTO ordrer (ordre, ip, kundeid, vareid, antal) VALUES (""" & ordrenummer & """,""" sql = sql & Request.Servervariables("REMOTE_ADDR") & """,""" & Session("kundeid") & """,""" sql = sql & objRS("vareid") & """,""" & objRS("antal") & """)" Conn.Execute(sql) body = body & "" objRS.MoveNext Wend objRS.Close body = body & "
AntalVarenummerBetegnelse
" & objRS("antal") & "" & objRS("varenummer") & "" If Mid(objRS("titel"),3,1) = "#" Then body = body & Mid(objRS("titel"),4) Else body = body & objRS("titel") End If body = body & "

========================================" sql = "DELETE FROM kurv WHERE kundeid = """ & Session("kundeid") & """" Conn.Execute(sql) 'mail'''''''''''''''' If Server.HTMLEncode(Request.Form("mail")) <> "" Then Set mailer = Server.CreateObject("CDONTS.NewMail") 'mailer.To = "jngreb@um4.dk" mailer.To = Server.HTMLEncode(Request.Form("mail")) mailer.from="jngreb@jngreb.dk" mailer.Subject ="Kvittering for bestilling hos JN Greb" mailer.body = body mailer.BodyFormat = 0 mailer.value("WEB-TYPE") = "JN-net" mailer.importance = 1 On Error Resume next mailer.send Set mailer = Server.CreateObject("CDONTS.NewMail") mailer.To = "jngreb@jngreb.dk;jngreb@um4.dk" 'mailer.To = Server.HTMLEncode(Request.Form("mail")) mailer.from="jngreb@jngreb.dk" mailer.Subject ="Bestilling hos JN Greb" mailer.body = body mailer.BodyFormat = 0 mailer.value("WEB-TYPE") = "JN-net" mailer.importance = 1 On Error Resume next mailer.send End If 'slut kvit ''''''''''''''''''''' Else objRS.Close End If Response.Redirect "bestilling3.asp" End If %>