rewriting with refresh

L

Licass

hello , i need help to prevent users from rewriting form data when refresh a
page. this is the code :




<html>

<head>


<%


Function ParseBody(strText)

strText = Replace(strText, Chr(13), "<br>")
ParseBody = strText
End Function


Dim myConnString
Dim myConnection
Dim mySQL
myConnString = Application("basededados1_ConnectionString")


Set myConnection = Server.CreateObject("ADODB.Connection")

myConnection.Open myConnString


mySQL= "INSERT INTO prereserva"
mySQL= mySQL &
"(cod_casa,nm_mes,n_semana,inicio,fim,preco,quinzena,nome,morada,email,telef
one,perguntas,sugestões,comentários,id) "
mySQL= mySQL & "VALUES ('" & Request.Form("cod_casa") & "','"

mySQL= mySQL & Request.Form("nm_mes")
mySQL= mySQL & "','" & Request.Form("n_semana")
mySQL= mySQL & "','" & Request.Form("inicio")
mySQL= mySQL & "','" & Request.Form("fim")
mySQL= mySQL & "','" & Request.Form("preco")
mySQL= mySQL & "','" & Request.Form("quinzena")
mySQL= mySQL & "','" & Request.Form("nome")
mySQL= mySQL & "','" & Request.Form("morada")
mySQL= mySQL & "','" & Request.Form("email")
mySQL= mySQL & "','" & Request.Form("telefone")
mySQL= mySQL & "','" & Request.Form("perguntas")
mySQL= mySQL & "','" & Request.Form("sugestoes")

mySQL= mySQL & "','" & Request.Form("comentarios")

mySQL= mySQL & "','" & Request.Form("id")& "')"





myConnection.Execute mySQL


myConnection.Close
Set myConnection = Nothing
%>


<link rel="stylesheet" type="text/css" href="estiloEnter.css">
</head>

<body bgcolor="#FFFFFF" class="ftxt">

<p><b><font face="Tahoma" size="2" color="#0000FF">&lt;---- Teste aqui os
seus
dados e proceda ao pagamento via Paypal ou cartão de crédito</font></b></p>

<p><b><span ><font>Obrigado pelo seu interesse!
<br>
Foi enviado um E-mail.</font></span></b></p>
<b>
<span><font>Enviado para: <%
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Response.Write Request.Form("EMail")
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%>
</font></span></b><p><b><span>De:&nbsp; Sulférias</font></span></b></p>
<b>
</p>
<p><span>Assunto: Dados Pré reserva
</font></span></p>

<!--webbot bot="DatabaseRegionStart"
s-columnnames="n_prereserva,data,expira,cod_casa,nm_mes,n_semana,inicio,fim,
preco,Nome,morada,email,telefone,perguntas,sugestões,Comentários,quinzena,va
lor,id"
s-columntypes="3,135,135,3,3,202,135,135,6,202,202,202,202,202,202,202,202,2
02,3" s-dataconnection="BaseDeDados1" b-tableformat="FALSE"
b-menuformat="FALSE" s-menuchoice="n_prereserva" s-menuvalue="n_prereserva"
b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE"
b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="7"
b-makeform="TRUE" s-recordsource="query_prereserva"
s-displaycolumns="n_prereserva,email,preco,valor,id" s-criteria s-order
s-sql="SELECT * FROM query_prereserva" b-procedure="FALSE" clientside
suggestedext="asp" s-defaultfields s-norecordsfound="Não foram devolvidos
registos." i-maxrecords="256" i-groupsize="0" botid="0"
u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc"
u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="BODY" preview="&lt;table border=0
width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;Isto é o
início de uma área de resultados da base de dados. A página tem de ser
obtida a partir de um servidor web com um web browser para ser visualizada
correctamente; a web actual está armazenada na rede ou disco
local.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" startspan
b-WasTableFormat="FALSE" b-ReplaceDatabaseRegion="FALSE" --><!--#include
file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>Não é
possível ao componente 'Resultados de base de dados' desta página mostrar o
conteúdo da base de dados. A página tem de ter um nome de ficheiro que
termine em '.asp' e a web tem de estar localizada num servidor que suporte
as Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM query_prereserva"
fp_sDefault=""
fp_sNoRecords="Não foram devolvidos registos."
fp_sDataConn="BaseDeDados1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="n_prereserva"
fp_sMenuValue="n_prereserva"
fp_sColTypes="&n_prereserva=3&data=135&expira=135&cod_casa=3&nm_mes=3&n_sema
na=202&inicio=135&fim=135&preco=6&Nome=202&morada=202&email=202&telefone=202
&perguntas=202&sugestões=202&Comentários=202&quinzena=202&valor=202&id=3&"
fp_iDisplayCols=5
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="57035" --><form
METHOD="POST" action="ver_prereserva.asp" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript"
name="FrontPage_Form1">
<p>
<!--webbot bot="PurpleText" preview="Defina as propriedades deste
formulário de forma a enviar entradas do utilizador para a página
adequada." --></p>
<p>
<input type="text" name="quinzena" size="20"
value="<%=Request("quinzena")%>"></p>
<div align="center">
<center>
<table BORDER="0" class="ftxt" style="border-width:0; border-collapse:
collapse" bordercolor="#111111" cellpadding="0" cellspacing="0" width="700">
<tr>
<td width="81">&nbsp;</td>
<td width="617">
</td>
</tr>
<tr>
<td width="81">&nbsp;</td>
<td width="617">
<input TYPE="hidden" NAME="email"
VALUE="<%=FP_FieldHTML(fp_rs,"email")%>"></td>
</tr>
<tr>
<td width="81">&nbsp;</td>
<td width="617">
<!--webbot bot="Validation" s-data-type="Integer"
s-number-separators=" " --><input TYPE="hidden" NAME="preco"
VALUE="<%=FP_FieldHTML(fp_rs,"preco")%>"></td>
</tr>
<tr>
<td width="81"><b>valor do sinal:</b></td>
<td width="617">
<!--webbot bot="Validation" s-data-type="Number" s-number-separators="
.." --><input NAME="valor" readonly=true border=0 SIZE="7"
VALUE="<%=cint(Request("preco")*0.3)%> ">
<b> Eur
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input TYPE="submit" NAME="fp_submit" value="Fazer pagamento/reserva"
style="font-family: Myriad Web; font-weight: bold" class="botao"></b></td>
</tr>
<tr>
<td COLSPAN="2"
width="698"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
</tr>
</table>
</center>
</div>
<input type="hidden" name="n_semana"
value="<%=Request.Form("n_semana")%>">
<input type="hidden" name="nm_mes" value="<%=Request.Form("nm_mes")%>">
<input type="hidden" name="cod_casa"
value="<%=Request.Form("cod_casa")%>">
<input type="hidden" name="n_prereserva"
value="<%=FP_FieldHTML(fp_rs,"n_prereserva")%>" size="20">
<input type="hidden" name="id" value="<%=FP_FieldHTML(fp_rs,"id")%>">
</form>

<% n_prereser = fp_rs("n_prereserva")%>


<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="BODY" preview="&lt;table border=0
width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;Isto é o fim
de uma área de resultados da base de
dados.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></b>


<%

Dim meumail
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject
Dim strBody
Dim strparamim

strFrom="(e-mail address removed)"

strTo=Request.Form("email")

strSubject = " Pré reserva " & n_prereser




strBody = "<html>"
strBody = strBody & "<head></head>"
strBody = strBody & "<body class=" &quot &"ftxt" &quot &";>"



strBody = strBody & " O nº da sua pré reserva e o seu E-mail são os dados
para aceder á situação em que se encontra." & Chr(13) & Chr(13) & Chr(13)
strBody = strBody & "Relembramos que a pré reserva tem 5 dias para reservar
com envio de sinal no valor de 30% do valor do aluguer." & Chr(13) & Chr(13)
& Chr(13)
strBody = strBody & "Estes são os dados da sua pré reserva:" & Chr(13) &
Chr(13)
strBody = strBody & "Préreserva nº: " & n_prereser & "" & Chr(13)
strBody = strBody & "Expira em: " & now()+7 & "" & Chr(13)
strBody = strBody & "Refª Casa: " & Request.Form("cod_casa") & "" & Chr(13)
strBody = strBody & "Mês: " & Request.Form("nm_mes") & Chr(13)
strBody = strBody & "Semana: " & Request.Form("n_semana") & Chr(13)
strBody = strBody & "Início: " & Request.Form("inicio") & Chr(13)
strBody = strBody & "Fim: " & Request.Form("fim") & Chr(13)
strBody = strBody & "Preço: " & Request.Form("preco")& " Eur" & Chr(13)
strBody = strBody & "Em nome de: " & Request.Form("nome") & Chr(13)
strBody = strBody & "Residente em: " & Request.Form("morada") & Chr(13)
strBody = strBody & "Telefone: " & Request.Form("telefone") & Chr(13) &
Chr(13)
strBody = strBody & Request.Form("perguntas") & Chr(13)
strBody = strBody & Request.Form("sugestoes") & Chr(13)
strBody = strBody & Request.Form("comentarios") & Chr(13)


strBody = strBody & Chr(13) & "Obrigado.Esperamos que o nosso serviço vá de
encontro ás suas expectativas."




strBody = strBody & "</body>"

strBody = strBody & "</html>"


Set myCDONTSMail = CreateObject("CDONTS.NewMail")
set meumail = CreateObject("CDONTS.NewMail")

meumail.bodyformat=0
meumail.mailformat=0
mycdontsmail.mailformat=0
mycdontsmail.bodyformat=0
myCDONTSMail.Send strFrom,strTo,strSubject,strBody

meumail.send strFrom,"(e-mail address removed)",strSubject,strBody





Set myCDONTSMail = Nothing
set meumail = Nothing



%>


<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' Call the ParseBody function and pass the strBody string to it.
' This will replace the Chr(13) characters with <br> tags in the HTML.
Response.Write(ParseBody(strBody))

'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%>



<head>
<NETA HTTP-EQUIV="PRAGNA" CONTENT="NO-CACHE"></head>
</body>





</html>
 
S

Stefan B Rusynko

Try at top of page
<%
Response.AddHeader "Cache-Control", "No-cache"
Response.AddHeader "Pragma", "No-cache"
Response.CacheControl = "No-cache"
Response.Expires = -1
Response.ExpiresAbsolute=#Jan 1, 2006 12:00:00#
%>

PS
That is why if the form is on the page ver_prereserva.asp it is always best to set the form action to another .asp page to do all
your processing of the form fields

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| hello , i need help to prevent users from rewriting form data when refresh a
| page. this is the code :
|
|
|
|
| <html>
|
| <head>
|
|
| <%
|
|
| Function ParseBody(strText)
|
| strText = Replace(strText, Chr(13), "<br>")
| ParseBody = strText
| End Function
|
|
| Dim myConnString
| Dim myConnection
| Dim mySQL
| myConnString = Application("basededados1_ConnectionString")
|
|
| Set myConnection = Server.CreateObject("ADODB.Connection")
|
| myConnection.Open myConnString
|
|
| mySQL= "INSERT INTO prereserva"
| mySQL= mySQL &
| "(cod_casa,nm_mes,n_semana,inicio,fim,preco,quinzena,nome,morada,email,telef
| one,perguntas,sugestões,comentários,id) "
| mySQL= mySQL & "VALUES ('" & Request.Form("cod_casa") & "','"
|
| mySQL= mySQL & Request.Form("nm_mes")
| mySQL= mySQL & "','" & Request.Form("n_semana")
| mySQL= mySQL & "','" & Request.Form("inicio")
| mySQL= mySQL & "','" & Request.Form("fim")
| mySQL= mySQL & "','" & Request.Form("preco")
| mySQL= mySQL & "','" & Request.Form("quinzena")
| mySQL= mySQL & "','" & Request.Form("nome")
| mySQL= mySQL & "','" & Request.Form("morada")
| mySQL= mySQL & "','" & Request.Form("email")
| mySQL= mySQL & "','" & Request.Form("telefone")
| mySQL= mySQL & "','" & Request.Form("perguntas")
| mySQL= mySQL & "','" & Request.Form("sugestoes")
|
| mySQL= mySQL & "','" & Request.Form("comentarios")
|
| mySQL= mySQL & "','" & Request.Form("id")& "')"
|
|
|
|
|
| myConnection.Execute mySQL
|
|
| myConnection.Close
| Set myConnection = Nothing
| %>
|
|
| <link rel="stylesheet" type="text/css" href="estiloEnter.css">
| </head>
|
| <body bgcolor="#FFFFFF" class="ftxt">
|
| <p><b><font face="Tahoma" size="2" color="#0000FF">&lt;---- Teste aqui os
| seus
| dados e proceda ao pagamento via Paypal ou cartão de crédito</font></b></p>
|
| <p><b><span ><font>Obrigado pelo seu interesse!
| <br>
| Foi enviado um E-mail.</font></span></b></p>
| <b>
| <span><font>Enviado para: <%
| '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| Response.Write Request.Form("EMail")
| '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| %>
| </font></span></b><p><b><span>De:&nbsp; Sulférias</font></span></b></p>
| <b>
| </p>
| <p><span>Assunto: Dados Pré reserva
| </font></span></p>
|
| <!--webbot bot="DatabaseRegionStart"
| s-columnnames="n_prereserva,data,expira,cod_casa,nm_mes,n_semana,inicio,fim,
| preco,Nome,morada,email,telefone,perguntas,sugestões,Comentários,quinzena,va
| lor,id"
| s-columntypes="3,135,135,3,3,202,135,135,6,202,202,202,202,202,202,202,202,2
| 02,3" s-dataconnection="BaseDeDados1" b-tableformat="FALSE"
| b-menuformat="FALSE" s-menuchoice="n_prereserva" s-menuvalue="n_prereserva"
| b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE"
| b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="7"
| b-makeform="TRUE" s-recordsource="query_prereserva"
| s-displaycolumns="n_prereserva,email,preco,valor,id" s-criteria s-order
| s-sql="SELECT * FROM query_prereserva" b-procedure="FALSE" clientside
| suggestedext="asp" s-defaultfields s-norecordsfound="Não foram devolvidos
| registos." i-maxrecords="256" i-groupsize="0" botid="0"
| u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc"
| u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="BODY" preview="&lt;table border=0
| width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td bgcolor=&quot;#FFFF00&quot;
| align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;Isto é o
| início de uma área de resultados da base de dados. A página tem de ser
| obtida a partir de um servidor web com um web browser para ser visualizada
| correctamente; a web actual está armazenada na rede ou disco
| local.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" startspan
| b-WasTableFormat="FALSE" b-ReplaceDatabaseRegion="FALSE" --><!--#include
| file="_fpclass/fpdblib.inc"-->
| <% if 0 then %>
| <SCRIPT Language="JavaScript">
| document.write("<div style='background: yellow; color: black;'>Não é
| possível ao componente 'Resultados de base de dados' desta página mostrar o
| conteúdo da base de dados. A página tem de ter um nome de ficheiro que
| termine em '.asp' e a web tem de estar localizada num servidor que suporte
| as Active Server Pages.</div>");
| </SCRIPT>
| <% end if %>
| <%
| fp_sQry="SELECT * FROM query_prereserva"
| fp_sDefault=""
| fp_sNoRecords="Não foram devolvidos registos."
| fp_sDataConn="BaseDeDados1"
| fp_iMaxRecords=256
| fp_iCommandType=1
| fp_iPageSize=0
| fp_fTableFormat=False
| fp_fMenuFormat=False
| fp_sMenuChoice="n_prereserva"
| fp_sMenuValue="n_prereserva"
| fp_sColTypes="&n_prereserva=3&data=135&expira=135&cod_casa=3&nm_mes=3&n_sema
| na=202&inicio=135&fim=135&preco=6&Nome=202&morada=202&email=202&telefone=202
| &perguntas=202&sugestões=202&Comentários=202&quinzena=202&valor=202&id=3&"
| fp_iDisplayCols=5
| fp_fCustomQuery=False
| BOTID=0
| fp_iRegion=BOTID
| %>
| <!--#include file="_fpclass/fpdbrgn1.inc"-->
| <!--webbot bot="DatabaseRegionStart" endspan i-checksum="57035" --><form
| METHOD="POST" action="ver_prereserva.asp" onsubmit="return
| FrontPage_Form1_Validator(this)" language="JavaScript"
| name="FrontPage_Form1">
| <p>
| <!--webbot bot="PurpleText" preview="Defina as propriedades deste
| formulário de forma a enviar entradas do utilizador para a página
| adequada." --></p>
| <p>
| <input type="text" name="quinzena" size="20"
| value="<%=Request("quinzena")%>"></p>
| <div align="center">
| <center>
| <table BORDER="0" class="ftxt" style="border-width:0; border-collapse:
| collapse" bordercolor="#111111" cellpadding="0" cellspacing="0" width="700">
| <tr>
| <td width="81">&nbsp;</td>
| <td width="617">
| </td>
| </tr>
| <tr>
| <td width="81">&nbsp;</td>
| <td width="617">
| <input TYPE="hidden" NAME="email"
| VALUE="<%=FP_FieldHTML(fp_rs,"email")%>"></td>
| </tr>
| <tr>
| <td width="81">&nbsp;</td>
| <td width="617">
| <!--webbot bot="Validation" s-data-type="Integer"
| s-number-separators=" " --><input TYPE="hidden" NAME="preco"
| VALUE="<%=FP_FieldHTML(fp_rs,"preco")%>"></td>
| </tr>
| <tr>
| <td width="81"><b>valor do sinal:</b></td>
| <td width="617">
| <!--webbot bot="Validation" s-data-type="Number" s-number-separators="
| ." --><input NAME="valor" readonly=true border=0 SIZE="7"
| VALUE="<%=cint(Request("preco")*0.3)%> ">
| <b> Eur
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
| p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
| <input TYPE="submit" NAME="fp_submit" value="Fazer pagamento/reserva"
| style="font-family: Myriad Web; font-weight: bold" class="botao"></b></td>
| </tr>
| <tr>
| <td COLSPAN="2"
| width="698"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
| nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
| ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
| </tr>
| </table>
| </center>
| </div>
| <input type="hidden" name="n_semana"
| value="<%=Request.Form("n_semana")%>">
| <input type="hidden" name="nm_mes" value="<%=Request.Form("nm_mes")%>">
| <input type="hidden" name="cod_casa"
| value="<%=Request.Form("cod_casa")%>">
| <input type="hidden" name="n_prereserva"
| value="<%=FP_FieldHTML(fp_rs,"n_prereserva")%>" size="20">
| <input type="hidden" name="id" value="<%=FP_FieldHTML(fp_rs,"id")%>">
| </form>
|
| <% n_prereser = fp_rs("n_prereserva")%>
|
|
| <!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE"
| b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0"
| clientside tag="BODY" preview="&lt;table border=0
| width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td bgcolor=&quot;#FFFF00&quot;
| align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;Isto é o fim
| de uma área de resultados da base de
| dados.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
| startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
| <!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></b>
|
|
| <%
|
| Dim meumail
| Dim myCDONTSMail
| Dim strFrom
| Dim strTo
| Dim strSubject
| Dim strBody
| Dim strparamim
|
| strFrom="(e-mail address removed)"
|
| strTo=Request.Form("email")
|
| strSubject = " Pré reserva " & n_prereser
|
|
|
|
| strBody = "<html>"
| strBody = strBody & "<head></head>"
| strBody = strBody & "<body class=" &quot &"ftxt" &quot &";>"
|
|
|
| strBody = strBody & " O nº da sua pré reserva e o seu E-mail são os dados
| para aceder á situação em que se encontra." & Chr(13) & Chr(13) & Chr(13)
| strBody = strBody & "Relembramos que a pré reserva tem 5 dias para reservar
| com envio de sinal no valor de 30% do valor do aluguer." & Chr(13) & Chr(13)
| & Chr(13)
| strBody = strBody & "Estes são os dados da sua pré reserva:" & Chr(13) &
| Chr(13)
| strBody = strBody & "Préreserva nº: " & n_prereser & "" & Chr(13)
| strBody = strBody & "Expira em: " & now()+7 & "" & Chr(13)
| strBody = strBody & "Refª Casa: " & Request.Form("cod_casa") & "" & Chr(13)
| strBody = strBody & "Mês: " & Request.Form("nm_mes") & Chr(13)
| strBody = strBody & "Semana: " & Request.Form("n_semana") & Chr(13)
| strBody = strBody & "Início: " & Request.Form("inicio") & Chr(13)
| strBody = strBody & "Fim: " & Request.Form("fim") & Chr(13)
| strBody = strBody & "Preço: " & Request.Form("preco")& " Eur" & Chr(13)
| strBody = strBody & "Em nome de: " & Request.Form("nome") & Chr(13)
| strBody = strBody & "Residente em: " & Request.Form("morada") & Chr(13)
| strBody = strBody & "Telefone: " & Request.Form("telefone") & Chr(13) &
| Chr(13)
| strBody = strBody & Request.Form("perguntas") & Chr(13)
| strBody = strBody & Request.Form("sugestoes") & Chr(13)
| strBody = strBody & Request.Form("comentarios") & Chr(13)
|
|
| strBody = strBody & Chr(13) & "Obrigado.Esperamos que o nosso serviço vá de
| encontro ás suas expectativas."
|
|
|
|
| strBody = strBody & "</body>"
|
| strBody = strBody & "</html>"
|
|
| Set myCDONTSMail = CreateObject("CDONTS.NewMail")
| set meumail = CreateObject("CDONTS.NewMail")
|
| meumail.bodyformat=0
| meumail.mailformat=0
| mycdontsmail.mailformat=0
| mycdontsmail.bodyformat=0
| myCDONTSMail.Send strFrom,strTo,strSubject,strBody
|
| meumail.send strFrom,"(e-mail address removed)",strSubject,strBody
|
|
|
|
|
| Set myCDONTSMail = Nothing
| set meumail = Nothing
|
|
|
| %>
|
|
| <% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| ' Call the ParseBody function and pass the strBody string to it.
| ' This will replace the Chr(13) characters with <br> tags in the HTML.
| Response.Write(ParseBody(strBody))
|
| '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| %>
|
|
|
| <head>
| <NETA HTTP-EQUIV="PRAGNA" CONTENT="NO-CACHE"></head>
| </body>
|
|
|
|
|
| </html>
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top