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

  1. <% @ LANGUAGE="VBScript" lcid="1036" %>
  2. <!--#include file="include.asp"-->
  3. <%
  4.     Email2=Replace(request.form("Email"), "'", "''")
  5.     Passe2=Replace(request.form("Passe"), "'", "''")
  6.     Internet2=Replace(request.form("Internet"), "'", "''")
  7.     Occupation2=Replace(request.form("Occupation"), "'", "''")
  8.     Location2=Replace(request.form("Location"), "'", "''")
  9.     Interets2=Replace(request.form("Interets"), "'", "''")
  10.     ICQ2=Replace(request.form("ICQ"), "'", "''")
  11.     Signature2=Replace(request.form("Signature"), "'", "''")
  12.     Facul12=Replace(request.form("Facul1"), "'", "''")
  13.     Facul22=Replace(request.form("Facul2"), "'", "''")
  14.     Facul32=Replace(request.form("Facul3"), "'", "''")
  15.     Facul42=Replace(request.form("Facul4"), "'", "''")
  16.     Facul52=Replace(request.form("Facul5"), "'", "''")
  17.     Id2=request.form("Id")
  18.     Nom2=request.form("Nom")
  19.     cookie2=request.form("cookie")
  20.     
  21.     If Email2<>"" and Passe2<>"" Then
  22.         If cookie2="Oui" Then
  23.             Response.Cookies("abb").Expires = Now()
  24.         Else
  25.             Response.Cookies("abb")("nom") = Nom2
  26.             Response.Cookies("abb")("passe") = Passe2
  27.             Response.Cookies("abb").Expires = Now() + 365
  28.         End If
  29.     End If
  30. %>
  31. <html>
  32.  
  33. <head>
  34. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  35. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  36. <meta name="ProgId" content="FrontPage.Editor.Document">
  37. <title>ABB</title>
  38. <style type="text/css">
  39. <!--
  40. A:link{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  41. A:visited{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  42. A:active{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  43. A:hover{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  44. -->
  45. </style>
  46. </head>
  47.  
  48. <body bgcolor="<% =EnvironnementRes("envback") %>" text="<% =EnvironnementRes("envtxt") %>" link="<% =EnvironnementRes("envlnk") %>" vlink="<% =EnvironnementRes("envvlnk") %>">
  49. <font face="Arial" size="2"><b>
  50. <% If Email2<>"" and Passe2<>"" Then %>
  51. <%
  52. longeur1=Len(Nom2)
  53. longeur2=Len(Passe2)
  54.  
  55. J=1
  56. For I=1 To longeur2
  57.     char1=Mid(Nom2,J,1)
  58.     char2=Mid(Passe2,I,1)
  59.     char3=Mid(Passe2,I,1)
  60.     code1=Asc(char1)
  61.     code2=Asc(char2)
  62.     code2=code2+code1
  63.     If code2>255 Then
  64.         code2=code2-255
  65.     End If
  66.     char2=Chr(code2)
  67.     Passe2=Replace(Passe2,char3,char2,1,1)
  68.  
  69.     J=J+1
  70.     If J>longeur1 Then
  71.         J=1
  72.     End If
  73. Next
  74. 'Cryptage du mot de passe
  75.  
  76. SQLStmt3 = "UPDATE Utilisateur "
  77. SQLStmt3 = SQLStmt3 & "SET usrmail='" & Email2 & "' , usrpass='" & Passe2 & "' , usrweb='" & Internet2 & "' , usrocc='" & Occupation2 & "' , usrloc='" & Location2 & "' , usrint='" & Interets2 & "' , usricq='" & ICQ2 & "' , usrsign='" & Signature2 & "' , usrfacul1='" & Facul12 & "' , usrfacul2='" & Facul22 & "' , usrfacul3='" & Facul32 & "' , usrfacul4='" & Facul42 & "' , usrfacul5='" & Facul52 & "' "
  78. SQLStmt3 = SQLStmt3 & "WHERE usrid=" & Id2 & " "
  79. Set RS3 = ConnectionBD.Execute(SQLStmt3)
  80. %>
  81. <center>Merci, les modifications ont ΘtΘ effectuΘes.<br><br>Vous allez automatiquement Ωtre ramenΘ sur le forum.<br>Sinon cliquez ici : <a href="default.asp">Retour au forum</a></center>
  82. <%
  83. temps=Now()
  84. While DateDiff("s",temps,Now())<3
  85. Wend
  86. %>
  87. <script language="javascript">
  88. document.location="default.asp";
  89. </script>
  90. <% Else %>
  91. <center>Remplissez tous les champs obligatoires SVP.</center>
  92. <%
  93. temps=Now()
  94. While DateDiff("s",temps,Now())<3
  95. Wend
  96. %>
  97. <script language="javascript">
  98. history.back();
  99. </script>
  100. <% End If %>
  101. </b></font>
  102. <!--#include file="basdepage.asp"-->
  103. </body>
  104.  
  105. </html>
  106.