% @ LANGUAGE="VBScript" lcid="1036" %> <% Nom2=Replace(request.form("Nom"), "'", "''") Passe2=Replace(request.form("Passe"), "'", "''") Sujet2=Replace(request.form("Sujet"), "'", "''") Signature2=request.form("Signature") Email2=request.form("Email") Topic2=request.form("Topic") Message2=Replace(request.form("Message"), "'", "''") 'Récupération du formulaire précédent %>
<% If len(Nom2) > 0 Then strAutSQL = "SELECT * FROM Utilisateur WHERE usrlogin='" & Nom2 & "' " set AutRes=ConnectionBD.Execute(strAutSQL) If AutRes.EOF=false Then longeur1=Len(Nom2) longeur2=Len(Passe2) J=1 For I=1 To longeur2 char1=Mid(Nom2,J,1) char2=Mid(Passe2,I,1) char3=Mid(Passe2,I,1) code1=Asc(char1) code2=Asc(char2) code2=code2+code1 If code2>255 Then code2=code2-255 End If char2=Chr(code2) Passe2=Replace(Passe2,char3,char2,1,1) J=J+1 If J>longeur1 Then J=1 End If Next 'Cryptage du mot de passe If AutRes("usrpass") = Passe2 Then If AutRes("usrfin") = false Then If Message2<>"" and Sujet2<>"" Then %> Merci, votre message à été ajouté !
<%
If EnvironnementRes("envhtml")=false Then
Message2=Replace(Message2, "<", "<")
Message2=Replace(Message2, ">", ">")
End If
'Si le code HTML est interdi, transformation des < et > par leur équivalents HTML pour bloquer le code.
If Signature2 = "ON" Then
Message2 = Message2 & "
" & AutRes("usrsign")
End If
Message2=Replace(Message2, vbcrlf, "
")
'Transformation des retours charriot en
If EnvironnementRes("envabb")=true Then
%>
<%
End If
'Si le code ABB est autorisé, effecuter les transformations adéquates.
Aut2=AutRes("usrid")
lheure = Hour(now)+EnvironnementRes("envdecal")
If Hour(now)+EnvironnementRes("envdecal")<0 Then
lheure = Hour(now)+EnvironnementRes("envdecal")+24
End If
lheure = lheure & ":" & Minute(now) & ":" & Second(now)
If Email2 = "ON" Then
SQLStmt = "INSERT INTO Post (posttopic,posttitle,postaut,postdt,posth,postmail) "
SQLStmt = SQLStmt & "VALUES ('" & Topic2 & "','" & Sujet2 & "','" & Aut2 & "','" & Date() & "','" & lheure & "',true)"
Set RS=ConnectionBD.Execute(SQLStmt)
Else
SQLStmt = "INSERT INTO Post (posttopic,posttitle,postaut,postdt,posth) "
SQLStmt = SQLStmt & "VALUES ('" & Topic2 & "','" & Sujet2 & "','" & Aut2 & "','" & Date() & "','" & lheure & "')"
Set RS=ConnectionBD.Execute(SQLStmt)
End If
strpopoSQL = "SELECT postid FROM Post ORDER BY postid DESC"
set PopoRes=ConnectionBD.Execute(strpopoSQL)
Popo2=PopoRes("postid")
SQLStmt2 = "INSERT INTO Postcn (postcnpo,postcnau,postcncn,postcndt,postcnh) "
SQLStmt2 = SQLStmt2 & "VALUES ('" & Popo2 & "','" & Aut2 & "','" & Message2 & "','" & Date() & "','" & lheure & "')"
Set RS2=ConnectionBD.Execute(SQLStmt2)
strTopicSQL = "SELECT * FROM Topic WHERE topicid=" & Topic2 & " "
set TopicRes=ConnectionBD.Execute(strTopicSQL)
Posts2=TopicRes("topicpost")
SQLStmt3 = "UPDATE Topic "
SQLStmt3 = SQLStmt3 & "SET topicpost = ('" & Posts2 + 1 & "') "
SQLStmt3 = SQLStmt3 & "WHERE topicid=" & Topic2 & " "
Set RS3 = ConnectionBD.Execute(SQLStmt3)
If AutRes("usrstatu")>2 Then
strStatSQL = "SELECT * FROM Statut WHERE statnbpost>" & AutRes("usrpost") & " ORDER BY statnbpost "
set StatRes=ConnectionBD.Execute(strStatSQL)
If StatRes.EOF<>True Then
If AutRes("usrpost")=StatRes("statnbpost")-1 Then
SQLStmt4 = "UPDATE Utilisateur "
SQLStmt4 = SQLStmt4 & "SET usrpost = ('" & AutRes("usrpost") + 1 & "'), usrstatu = ('" & StatRes("statid") & "') "
SQLStmt4 = SQLStmt4 & "WHERE usrid=" & AutRes("usrid") & " "
Set RS4 = ConnectionBD.Execute(SQLStmt4)
Else
SQLStmt4 = "UPDATE Utilisateur "
SQLStmt4 = SQLStmt4 & "SET usrpost = ('" & AutRes("usrpost") + 1 & "') "
SQLStmt4 = SQLStmt4 & "WHERE usrid=" & AutRes("usrid") & " "
Set RS4 = ConnectionBD.Execute(SQLStmt4)
End If
Else
SQLStmt4 = "UPDATE Utilisateur "
SQLStmt4 = SQLStmt4 & "SET usrpost = ('" & AutRes("usrpost") + 1 & "') "
SQLStmt4 = SQLStmt4 & "WHERE usrid=" & AutRes("usrid") & " "
Set RS4 = ConnectionBD.Execute(SQLStmt4)
End If
Else
SQLStmt4 = "UPDATE Utilisateur "
SQLStmt4 = SQLStmt4 & "SET usrpost = ('" & AutRes("usrpost") + 1 & "') "
SQLStmt4 = SQLStmt4 & "WHERE usrid=" & AutRes("usrid") & " "
Set RS4 = ConnectionBD.Execute(SQLStmt4)
End If
%>
Vous allez automatiquement être ramené sur le groupe "<% =TopicRes("topicdesc") %>",
sinon, cliquez ici : Retour au groupe "<% =TopicRes("topicdesc") %>" <% temps=Now() While DateDiff("s",temps,Now())<3 Wend %> <% Else %>