home *** CD-ROM | disk | FTP | other *** search
- <% @ LANGUAGE="VBScript" lcid="1036" %>
- <!--#include file="include.asp"-->
- <%
- Nom2=Replace(request.form("Nom"), "'", "''")
- Passe2=Replace(request.form("Passe"), "'", "''")
- Signature2=request.form("Signature")
- Topic2=request.form("Topic")
- Post2=request.form("Post")
- Heure2=request.form("Heure")
- Date2=request.form("Date")
- Message2=Replace(request.form("Message"), "'", "''")
- 'RΘcupΘration du formulaire prΘcΘdent
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
- <meta name="ProgId" content="FrontPage.Editor.Document">
- <title>ABB</title>
- <style type="text/css">
- <!--
- A:link{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
- A:visited{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
- A:active{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
- A:hover{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
- -->
- </style>
- </head>
-
- <body bgcolor="<% =EnvironnementRes("envback") %>" text="<% =EnvironnementRes("envtxt") %>" link="<% =EnvironnementRes("envlnk") %>" vlink="<% =EnvironnementRes("envvlnk") %>">
- <p>
- <font face="Arial" size="2"><b>
- <%
- 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<>"" Then %>
- Merci, votre rΘponse α ΘtΘ ajoutΘe !
- </b></font>
- <p><font face="Arial" size="2"><b>
- <%
- 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 & "<BR><BR>" & AutRes("usrsign")
- End If
-
- Message2=Replace(Message2, vbcrlf, "<BR>")
- 'Transformation des retours charriot en <BR>
-
- If EnvironnementRes("envabb")=true Then
- %>
- <!--#include file="abbcode.asp"-->
- <%
- 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)
-
- SQLStmt2 = "INSERT INTO Postcn (postcnpo,postcnau,postcncn,postcndt,postcnh) "
- SQLStmt2 = SQLStmt2 & "VALUES ('" & Post2 & "','" & 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)
-
- strpopoSQL = "SELECT * FROM Post WHERE postid=" & Post2 & " "
- set PopoRes=ConnectionBD.Execute(strpopoSQL)
-
- strautmailSQL = "SELECT usrmail FROM Utilisateur WHERE usrid=" & PopoRes("postaut") & " "
- set autmailRes=ConnectionBD.Execute(strautmailSQL)
-
- If PopoRes("postmail")=true Then
- Dim objCDO
- Set objCDO = Server.CreateObject("CDONTS.NewMail")
-
- objCDO.To = autmailRes("usrmail")
- objCDO.From = EnvironnementRes("envcontact")
-
- objCDO.Subject = "Forum ABB du site " & EnvironnementRes("envsite")
- objCDO.Body = AutRes("usrlogin") & " a rΘpondu α votre sujet : " & PopoRes("posttitle") & " le " & Date() & " α " & lheure
- objCDO.Send
-
- Set objCDO = Nothing
- End If
-
- Popo=PopoRes("postans")
-
- SQLStmt4 = "UPDATE Post "
- SQLStmt4 = SQLStmt4 & "SET postans = ('" & Popo + 1 & "'), postdt = ('" & Date() & "'), posth = ('" & lheure & "') "
- SQLStmt4 = SQLStmt4 & "WHERE postid=" & Post2 & " "
- Set RS4 = ConnectionBD.Execute(SQLStmt4)
-
- 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 message "<% =PopoRes("posttitle") %>",
- </b></font>
- </p>
- <p><font face="Arial" size="2"><b>
- sinon, cliquez ici : <a href="post.asp?postid=<% =Post2 %>&topicid=<% =Topic2 %>&visdt2=<% =Date2 %>&vish2=<% =Heure2 %>">Retour au message "<% =PopoRes("posttitle") %>"</a>
- <%
- temps=Now()
- While DateDiff("s",temps,Now())<3
- Wend
- %>
- <script language="javascript">
- document.location="post.asp?postid=<% =Post2 %>&topicid=<% =Topic2 %>&visdt2=<% =Date2 %>&vish2=<% =Heure2 %>";
- </script>
- <% Else %>
- <center>Entrez le corps du message...</center>
- <%
- temps=Now()
- While DateDiff("s",temps,Now())<3
- Wend
- %>
- <script language="javascript">
- history.back();
- </script>
- <% End If
- Else %>
- <center>Vous n'avez pas le droit de poster de nouveaux messages...</center>
- <%
- temps=Now()
- While DateDiff("s",temps,Now())<3
- Wend
- %>
- <script language="javascript">
- history.back();
- </script>
- <% End If
- Else %>
- <center>Ce n'est pas le bon mot de passe...</center>
- <%
- temps=Now()
- While DateDiff("s",temps,Now())<3
- Wend
- %>
- <script language="javascript">
- history.back();
- </script>
- <% End If
- Else %>
- <center>Entrez un nom d'utilisateur valide.</center>
- <br>
- <br>
- <center><a href="subscribe.asp">Si vous n'Ωtes pas encore inscrit, cliquez ici.</a></center>
- <%
- temps=Now()
- While DateDiff("s",temps,Now())<10
- Wend
- %>
- <script language="javascript">
- history.back();
- </script>
- <% End If
- Else %>
- <center>Entrez un nom d'utilisateur valide.</center>
- <br>
- <br>
- <center><a href="subscribe.asp">Si vous n'Ωtes pas encore inscrit, cliquez ici.</a></center>
- <%
- temps=Now()
- While DateDiff("s",temps,Now())<10
- Wend
- %>
- <script language="javascript">
- history.back();
- </script>
- <% End If %>
- </b></font>
- </p>
- <!--#include file="basdepage.asp"-->
- </body>
-
- </html>
-