Reservados todos los Derechos - Net2Land 2000.
<%
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={Mysql};Server=mysql.net2land.com;Database=net2land;UID=net2land;PWD=F93msp9a"
'DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
'DSNtemp=dsntemp & "DBQ=" & server.MapPath("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={Mysql};Server=mysql.net2land.com;Database=net2land;UID=net2land;PWD=F93msp9a"
'DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
'DSNtemp=dsntemp & "DBQ=" & server.MapPath("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,"pascua.asp","pascuapost.asp")
scriptname = "http://" & request.servervariables("server_name") & scriptname
mailbody = anafn2 & " te ha enviado una postcard desde Net2PostCards
"
mailbody = mailbody & "Puedes retirarla desde la siguiente dirección :
"
mailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apass
mailbody = mailbody & ""
mailbody = mailbody & "
"
mailbody = mailbody & "de lo contrario apunta tu navegador a " & scriptname
mailbody = mailbody & "
e ingresa los siguientes datos
"
mailbody = mailbody & "Postcard Id = " & id
mailbody = mailbody & "
Postcard Password = " & apass
mailbody = mailbody & "
Net2PostCards: http://www.net2land.com/postcards
"
blabla = "Postcard de " & anafn2
'#### Aca te cambie un poco la logica para poder enviar el email al user
'### inicio No Modificar
messageSubject = blabla
messageText = mailbody
fromName = anetfang2
fromAddress = "postcards@net2land.com"
returnReceipt = " "
toAddressList = anetfang1
%>
Gracias por utilizar Net2PostCards!
-Categorias-