<% 'Insert your mailserver name and port (usually 25) mailserver="srvsmtp.struer.net" %> <% Flag = request.form("Flag") If IsEmpty(Flag) or Flag = "" then %>

Send julekort: Sjove clipart

Skriv en overskrift til kortet

Streg



Vælg et kort: Klik på knappen til venstre for billedet


Streg



 Skriv din besked:  
 Modtagers navn:">
 Modtagers e-mail:">
 Dit navn:
 Din e-mail:


<% end if if flag = 1 then anafn1 = request.form("nafn1") anetfang1 = request.form("netfang1") anafn2 = request.form("nafn2") anetfang2 = request.form("netfang2") akvedja = request.form("kvedja") afsogn = request.form("fsogn") amynd = request.form("mynd") akvedja = server.HTMLencode(Request.form("kvedja")) akvedja = Replace(akvedja, vbCrLf, "
") %>
Se kort...
<%= afsogn %>


<%= akvedja %>
Til:
<%= anafn1 %>
<%= anetfang1 %>

Fra:
<%= anafn2 %>
<%= anetfang2 %>

<% End If If Flag = 2 then Randomize apass = int(rnd*99999)+1 adags = now() anafn1 = request.form("nafn1") anetfang1 = request.form("netfang1") anafn2 = request.form("nafn2") anetfang2 = request.form("netfang2") akvedja = request.form("kvedja") afsogn = request.form("fsogn") amynd = request.form("mynd") set conn = server.createobject("adodb.connection") DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtemp=dsntemp & "DBQ=" & server.mappath("../../../db/kort.mdb") conn.Open DSNtemp SQLstmt = "INSERT INTO kort (pass,dags,nafn1,netfang1,nafn2,netfang2,kvedja,fsogn,mynd)" SQLstmt = SQLstmt & " VALUES (" SQLstmt = SQLstmt & "'" & apass & "'," SQLstmt = SQLstmt & "'" & adags & "'," SQLstmt = SQLstmt & "'" & anafn1 & "'," SQLstmt = SQLstmt & "'" & anetfang1 & "'," SQLstmt = SQLstmt & "'" & anafn2 & "'," SQLstmt = SQLstmt & "'" & anetfang2 & "'," SQLstmt = SQLstmt & "'" & akvedja & "'," SQLstmt = SQLstmt & "'" & afsogn & "'," SQLstmt = SQLstmt & "'" & amynd & "'" SQLstmt = SQLstmt & ")" Set RS = conn.execute(SQLstmt) If err.number>0 then response.write "VBScript error:" & "

" response.write "Number=" & err.number & "

" response.write "Explanation.=" & err.description & "

" response.write "Help Context=" & err.helpcontext & "

" response.write "Help Path=" & err.helppath & "

" response.write "Native Error=" & err.nativeerror & "

" response.write "Source=" & err.source & "

" response.write "SQLState=" & err.sqlstate & "

" end if IF conn.errors.count> 0 then response.write "Access database error" & "

" response.write SQLstmt & "

" for counter= 0 to conn.errors.count response.write "Error #" & conn.errors(counter).number & "

" response.write "Explanation. -> " & conn.errors(counter).description & "

" next Conn.Close set conn = nothing else Conn.Close set conn = nothing set conn = server.createobject("adodb.connection") DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtemp=dsntemp & "DBQ=" & server.MapPath("../../../db/kort.mdb") conn.Open DSNtemp sqlstmt = "SELECT * FROM kort WHERE nafn1 = " sqlstmt = sqlstmt & "'" & anafn1 & "'" sqlstmt = sqlstmt & " AND pass = " sqlstmt = sqlstmt & apass sqlstmt = sqlstmt & " ORDER BY id DESC;" 'rs.Open sqlstmt,conn,3,3 set rs = conn.Execute(sqlstmt) id = rs("id") Conn.Close Set conn = nothing dim mailbody scriptname = Request.servervariables("script_name") scriptname = Replace(scriptname,"skrifa.asp","skoda.asp") scriptname = "http://" & request.servervariables("server_name") & scriptname mailbody = anafn2 & " har sendt dig et elektronisk postkort" & Vbcrlf & vbcrlf mailbody = mailbody & "Du kan se kortet ved at klikke herunder:" & vbcrlf mailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apass mailbody = mailbody & vbcrlf & vbcrlf mailbody = mailbody & "Eller besøg " & scriptname & vbcrlf mailbody = mailbody & "Login til postkort " & vbcrlf mailbody = mailbody & "Postkort Id = " & id & vbcrlf mailbody = mailbody & "Postkort Password = " & apass & vbCrlf & vbcrlf mailbody = mailbody & "Med venlig hilsen http://www.julidannevang.dk" blabla = "Postkort fra " & anafn2 'Response.Write mailbody set SMTP=Server.CreateObject("Jmail.SMTPMail") SMTP.ServerAddress= mailserver SMTP.Sender=anetfang2 SMTP.AddRecipient anetfang1 SMTP.Subject=blabla SMTP.Body=mailbody SMTP.Execute %> Dit postkort er sendt!!
Postkortet er sendt til: <%= anafn1 %>
Afsender er: <%= anafn2 %>

Tilbage <% end if end if %>