%@ Language= "VBScript" %>
<%
response.expires=-1000
sauvegarde = request.Form("sauvegarde")
If sauvegarde = "true" Then
count=0
erreur = False
If Trim(request.Form("prenom")) = "" Then
Count = Count + 1
reply = reply + "
First name
"
End if
If Trim(request.Form("nom")) = "" Then
Count = Count + 1
reply = reply + "
Last name
"
End if
If Trim(request.Form("ville")) = "" Then
Count = Count + 1
reply = reply + "
City
"
End if
If Trim(request.Form("courriel")) = "" Then
Count = Count + 1
reply = reply + "
Email
"
End if
If Trim(request.Form("commentaires")) = ""Then
Count = Count + 1
reply = reply + "
Comments
"
End if
If Trim(request.Form("validation")) <> "10" Then
Count = Count + 1
reply = reply + "
The result is incorrect
"
End if
If Count > 0 Then
If Count > 1 Then
reply = "The following fields are mandatory: " + reply
Else
reply = "The following field is mandatory: " + reply
End If
erreur = True
ActionSauvegarde = False
Else
'Initialisation message confirmation
messageConfirm = "Your comment as been succesfully sent. Thank you! It will be displayed after validation"
ActionSauvegarde = True
sql_add= "SELECT * FROM commentaires"
Set rs_add = Server.CreateObject("ADODB.Recordset")
rs_add.CursorLocation = 3
rs_add.Open sql_add, conn, 3, 3
rs_add.addnew
rs_add("val_nom") = apos(request.Form("nom"))
rs_add("val_prenom") = apos(request.Form("prenom"))
rs_add("val_ville") = apos(request.Form("ville"))
rs_add("val_courriel") = apos(request.Form("courriel"))
rs_add("val_commentaire_en") = aposbr(request.Form("commentaires"))
rs_add("val_date_creation") = date()
rs_add("val_approuve") = 0
rs_add.update
rs_add.Close
Set rs_add = Nothing
End If
Else
ActionSauvegarde = False
erreur = False
End If
%>
Domaine du Vieux Couvent