%@LANGUAGE="VBSCRIPT"%>
<% msg=""%>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form_contact") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_agitel_connect_STRING
MM_editCmd.CommandText = "INSERT INTO T_MESSAGES (NomPrenoms_mess, Email_mess, Message_mess, date_mess) VALUES (?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("nompre_txt")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("email_txt")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 203, 1, 1073741823, Request.Form("message_txt")) ' adLongVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 135, 1, -1, MM_IIF(Request.Form("date_txt"), Request.Form("date_txt"), null)) ' adDBTimeStamp
on error resume next
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "contacts.php"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
' Response.Redirect(MM_editRedirectUrl)
msg="Ok"
End If
End If
%>
<%
if (err.number<>0) then
msg="erreur"
end if
%>
<% if msg="Ok" then%>
The Message send succefully Vous aurez un élément de reponse à votre message dans undélai de 48 heures.
<% end if%>
<% if msg="erreur" then%>
Error for sending message
Veuillez essayer à nouveau en remplissant correctement le formulaire de contact.
<%=err.description%>
<% end if%>
The Contacts
AGITEL-FORMATION ENGINEERING SCHOOLS
03 BP 882 Abidjan 03 – Republic of Côte d’Ivoire