<%@ 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

    COMMENTS

    We are delighted to share with you a few comments of guests who have told us how much they enjoyed their stay at the Domaine du Vieux Couvent.  We have at heart to listen and do our best to always provide an upscale quality product.  

    We appreciate you taking the time to tell us about your own experience. 

    <%if ActionSauvegarde = false then if erreur then response.Write "

    " & reply & "

    " end if %>

    value="<%=apos(request.Form("nom"))%>"<%else%>value="Last name"<%end if%> size="20">    value="<%=apos(request.Form("prenom"))%>"<%else%>value="First name"<%end if%> size="20">    value="<%=apos(request.Form("ville"))%>"<%else%>value="City"<%end if%> size="20">    value="<%=apos(request.Form("courriel"))%>"<%else%>value="Email"<%end if%> size="20">

    What is the result of 5 + 5 ?

    <%else 'Afficher message confirmation ajout response.Write "

    " & messageConfirm & "

    " end if%>

     

    Comments
    <% 'Affiche des commentaires déjà existant if UCase(request.QueryString("tout")) = "O" then limite = 999999 set rs_list = conn.execute("SELECT * FROM commentaires WHERE val_commentaire_en is not null AND val_approuve = 1 ORDER BY val_date_creation DESC") else limite = 3 set rs_list = conn.execute("SELECT * FROM commentaires WHERE val_commentaire_en is not null AND val_approuve = 1 ORDER BY val_date_creation DESC") end if x = 0 do while not rs_list.eof and x < limite response.Write "

    " & rs_list("val_commentaire_en") & "
    " response.Write ""&rs_list("val_prenom") & " " & rs_list("val_nom") & "

    " x = x + 1 rs_list.movenext loop rs_list.close set rs_list = nothing %>

    All Comments »

    Domaine du Vieux Couvent