home *** CD-ROM | disk | FTP | other *** search
/ Freelog 9 / Freelog009.iso / BAS / Internet / Abb / profiledit.asp < prev    next >
Text File  |  2000-03-02  |  10KB  |  217 lines

  1. <% @ LANGUAGE="VBScript" lcid="1036" %>
  2. <!--#include file="include.asp"-->
  3. <%
  4.     Nom2=Replace(request.form("Nom"), "'", "''")
  5.     Passe2=Replace(request.form("Passe"), "'", "''")
  6. %>
  7. <html>
  8.  
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  11. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  12. <meta name="ProgId" content="FrontPage.Editor.Document">
  13. <title>ABB</title>
  14. <style type="text/css">
  15. <!--
  16. A:link{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  17. A:visited{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  18. A:active{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  19. A:hover{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  20. -->
  21. </style>
  22. </head>
  23.  
  24. <body bgcolor="<% =EnvironnementRes("envback") %>" text="<% =EnvironnementRes("envtxt") %>" link="<% =EnvironnementRes("envlnk") %>" vlink="<% =EnvironnementRes("envvlnk") %>">
  25. <p align="center"><font face="Arial">
  26. <a href="default.asp"><img border="0" src="<% =EnvironnementRes("envlogo") %>" alt="Retour α la page principale"></a>
  27.  
  28.  <b>Modifier votre profil</b></font>
  29. <%
  30. If len(Nom2) > 0 Then
  31.     strAutSQL = "SELECT * FROM Utilisateur WHERE usrlogin='" & Nom2 & "' "
  32.     set AutRes=ConnectionBD.Execute(strAutSQL)
  33.     
  34.     If AutRes.EOF=false Then
  35.     
  36.     Passe3=Passe2
  37.     
  38.     longeur1=Len(Nom2)
  39.     longeur2=Len(Passe2)
  40.  
  41.     J=1
  42.     For I=1 To longeur2
  43.         char1=Mid(Nom2,J,1)
  44.         char2=Mid(Passe2,I,1)
  45.         char3=Mid(Passe2,I,1)
  46.         code1=Asc(char1)
  47.         code2=Asc(char2)
  48.         code2=code2+code1
  49.         If code2>255 Then
  50.             code2=code2-255
  51.         End If
  52.         char2=Chr(code2)
  53.         Passe2=Replace(Passe2,char3,char2,1,1)
  54.  
  55.         J=J+1
  56.         If J>longeur1 Then
  57.         J=1
  58.         End If
  59.     Next
  60.     'Cryptage du mot de passe
  61.     
  62.     If AutRes("usrpass") = Passe2 Then 
  63.         strStatSQL = "SELECT * FROM Statut WHERE statid=" & AutRes("usrstatu") & " "
  64.         set StatRes=ConnectionBD.Execute(strStatSQL)
  65.     %>
  66. <p align="center"> 
  67. <p align="center"><font face="Arial" size="2">Merci, Votre identitΘ est
  68. confirmΘe : <% =AutRes("usrlogin") %> (<% =StatRes("statdesc") %>)</font>
  69. <p align="center"><font face="Arial" size="2">Vous pouvez modifier les
  70. informations suivantes :<br>
  71. (les champs marquΘs par * sont obligatoires)</font>
  72. <form method="POST" action="doprofiledit.asp" name="FrontPage_Form1">
  73. <div align="center">
  74.   <center>
  75.   <table border="0" cellpadding="3" cellspacing="1" width="95%">
  76.     <tr>
  77.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b>*Adresse
  78.         E-mail :</b></font></td>
  79.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="text" name="Email" size="30" value="<% =AutRes("usrmail") %>"></font></td>
  80.     </tr>
  81.     <tr>
  82.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><b>*Mot
  83.         de passe :</b></font></td>
  84.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><input type="text" name="Passe" size="30" value="<% =Passe3 %>"></font></td>
  85.     </tr>
  86.     <% If EnvironnementRes("envfacul1")<>"" Then %>
  87.     <tr>
  88.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b><% =EnvironnementRes("envfacul1") %></b></font></td>
  89.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="text" name="Facul1" size="30" value="<% =AutRes("usrfacul1") %>"></font></td>
  90.     </tr>
  91.     <% End If %>
  92.     <% If EnvironnementRes("envfacul2")<>"" Then %>
  93.     <tr>
  94.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><b><% =EnvironnementRes("envfacul2") %></b></font></td>
  95.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><input type="text" name="Facul2" size="30" value="<% =AutRes("usrfacul2") %>"></font></td>
  96.     </tr>
  97.     <% End If %>
  98.     <% If EnvironnementRes("envfacul3")<>"" Then %>
  99.     <tr>
  100.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b><% =EnvironnementRes("envfacul3") %></b></font></td>
  101.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="text" name="Facul3" size="30" value="<% =AutRes("usrfacul3") %>"></font></td>
  102.     </tr>
  103.     <% End If %>
  104.     <% If EnvironnementRes("envfacul4")<>"" Then %>
  105.     <tr>
  106.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><b><% =EnvironnementRes("envfacul4") %></b></font></td>
  107.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><input type="text" name="Facul4" size="30" value="<% =AutRes("usrfacul4") %>"></font></td>
  108.     </tr>
  109.     <% End If %>
  110.     <% If EnvironnementRes("envfacul5")<>"" Then %>
  111.     <tr>
  112.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b><% =EnvironnementRes("envfacul5") %></b></font></td>
  113.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="text" name="Facul5" size="30" value="<% =AutRes("usrfacul5") %>"></font></td>
  114.     </tr>
  115.     <% End If %>
  116.     <tr>
  117.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b>Site
  118.         Internet :</b></font></td>
  119.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="text" name="Internet" size="30" value="<% =AutRes("usrweb") %>"></font></td>
  120.     </tr>
  121.     <tr>
  122.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><b>Occupation
  123.         :</b></font></td>
  124.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><input type="text" name="Occupation" size="30" value="<% =AutRes("usrocc") %>"></font></td>
  125.     </tr>
  126.     <tr>
  127.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b>Ville,
  128.         Pays :</b></font></td>
  129.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="text" name="Location" size="30" value="<% =AutRes("usrloc") %>"></font></td>
  130.     </tr>
  131.     <tr>
  132.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><b>IntΘrΩts
  133.         :</b></font></td>
  134.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><input type="text" name="Interets" size="50" value="<% =AutRes("usrint") %>"></font></td>
  135.     </tr>
  136.     <% If EnvironnementRes("envicq")=true Then %>
  137.     <tr>
  138.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b>NumΘro
  139.         ICQ :</b></font></td>
  140.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="text" name="ICQ" size="20" value="<% =AutRes("usricq") %>"></font></td>
  141.     </tr>
  142.     <% End If %>
  143.     <tr>
  144.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>" valign="top"><font face="Arial" size="2"><b>Signature
  145.         :</b></font></td>
  146.       <td width="50%"  bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><textarea rows="4" name="Signature" cols="30" wrap="virtual"><% =AutRes("usrsign") %></textarea></font></td>
  147.     </tr>
  148.     <tr>
  149.       <td width="50%" bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><b>Sauvegarder
  150.         le nom d'utilisateur et mot de passe dans un cookie ?<br>
  151.         </b></font><font face="Arial" size="1">(Attention, ne pas utiliser les cookies
  152.         vous obligera α entrer votre nom et mot de passe α chaque fois, pour
  153.         en savoir plus sur les cookies, <a href="faq.asp#Les cookies" target="_blank">cliquez
  154.         ici</a>)</font></td>
  155.       <td width="50%" bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><input type="radio" name="cookie" value="Non" checked>
  156.         Oui</font>
  157.         <p><font face="Arial" size="2"><input type="radio" value="Oui" name="cookie">
  158.         Non</font></td>
  159.     </tr>
  160.   </table>
  161.  
  162. <input type="hidden" name="Id" value="<% =AutRes("usrid") %>">
  163. <input type="hidden" name="Nom" value="<% =Nom2 %>">
  164.   <p align="center"><input type="submit" value="Envoyer les modifications" name="Envoyer"><input type="reset" value="Effacer tous les champs" name="Effacer"></p>
  165.   </center>
  166. </div></form>
  167. <p align="center"> 
  168. <% Else %>
  169.   
  170. <p align="center">
  171.  <font face="Arial" size="2"><b>Ce n'est pas le bon mot de passe.
  172.  <%
  173. temps=Now()
  174. While DateDiff("s",temps,Now())<3
  175. Wend
  176. %>
  177. <script language="javascript">
  178. history.back();
  179. </script>
  180. <% End If
  181. Else %>
  182. <p align="center">
  183.  <font face="Arial" size="2"><b>
  184. Entrez un nom d'utilisateur valide.
  185. <br>
  186. <br>
  187. <a href="subscribe.asp">Si vous n'Ωtes pas encore inscrit, cliquez ici.</a>
  188. <%
  189. temps=Now()
  190. While DateDiff("s",temps,Now())<10
  191. Wend
  192. %>
  193. <script language="javascript">
  194. history.back();
  195. </script>
  196. <% End If
  197. Else %>
  198. <p align="center">
  199.  <font face="Arial" size="2"><b>
  200. Entrez un nom d'utilisateur valide.
  201. <br>
  202. <br>
  203. <a href="subscribe.asp">Si vous n'Ωtes pas encore inscrit, cliquez ici.</a>
  204. <%
  205. temps=Now()
  206. While DateDiff("s",temps,Now())<10
  207. Wend
  208. %>
  209. <script language="javascript">
  210. history.back();
  211. </script>
  212. <% End If %>
  213.  </b>
  214. </font>
  215. <!--#include file="basdepage.asp"-->
  216. </body>
  217. </html>