Myvalidcode.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:7k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="../FS_Inc/Md5.asp" -->
  6. <!--#include file="lib/strlib.asp" -->
  7. <!--#include file="lib/UserCheck.asp" -->
  8. <%
  9. If Request.Form("Action") = "Save" then
  10. if Trim(Request.Form("PassQuestion"))="" then
  11. strShowErr = "<li>请输入密码提示问题!</li>"
  12. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Myvalidcode.asp")
  13. Response.end
  14. End if
  15. Dim RsSaveTFObj
  16. Set RsSaveTFObj = server.CreateObject(G_FS_RS)
  17. RsSaveTFObj.open "select  UserID From FS_ME_Users where UserNumber = '"& Fs_User.UserNumber &"' and UserPassword='"& md5(Request.Form("UserPassword"),16)&"'",User_Conn,1,3
  18. if Not RsSaveTFObj.eof then
  19. Dim RsSaveIObj
  20. Set RsSaveIObj = server.CreateObject(G_FS_RS)
  21. RsSaveIObj.open "select  UserID,UserPassword,PassQuestion,PassAnswer,safeCode,OnlyLogin From FS_ME_Users where UserNumber = '"& Fs_User.UserNumber &"'",User_Conn,1,3
  22. if Request.Form("UserPassword_1")<>"" then
  23. RsSaveIObj("UserPassword") = Md5(Request.Form("UserPassword_1"),16)
  24. End if
  25. RsSaveIObj("PassQuestion") = NoSqlHack(Replace(Request.Form("PassQuestion"),"''",""))
  26. if Request.Form("PassAnswer")<>"" then
  27. RsSaveIObj("PassAnswer") = Md5(Request.Form("PassAnswer"),16)
  28. End if
  29. if Request.Form("safeCode")<>"" then
  30. RsSaveIObj("safeCode") = Md5(Request.Form("safeCode"),16)
  31. End if
  32. if Request.Form("OnlyLogin")<>"" then
  33. RsSaveIObj("OnlyLogin")  =0
  34. Else
  35. RsSaveIObj("OnlyLogin")  =1
  36. End if
  37. RsSaveIObj.update
  38. RsSaveIObj.close:set RsSaveIObj = nothing
  39. strShowErr = "<li>安全资料修改成功!</li>"
  40. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Myvalidcode.asp")
  41. Response.end
  42. Else
  43. strShowErr = "<li>您的原密码不正确!</li>"
  44. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Myvalidcode.asp")
  45. Response.end
  46. End if
  47. RsSaveTFObj.close:set RsSaveTFObj = nothing
  48. Else
  49. %>
  50. <html xmlns="http://www.w3.org/1999/xhtml">
  51. <title>我的安全资料-网站内容管理系统</title>
  52. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  53. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  54. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  55. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  56. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  57. <head>
  58. <body>
  59. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  60.   <tr>
  61.     <td>
  62.       <!--#include file="top.asp" -->
  63.     </td>
  64.   </tr>
  65. </table>
  66. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  67.   
  68.     <tr class="back"> 
  69.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  70.     </tr>
  71.     <tr class="back"> 
  72.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  73.           <!--#include file="menu.asp" -->
  74.         </div></td>
  75.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  76.         <tr class="hback"> 
  77.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  78.             <a href="main.asp">会员首页</a> &gt;&gt; 安全资料</td>
  79.         </tr>
  80.       </table> 
  81.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  82.         <form name="form1" method="post" action="">
  83.           <tr class="hback"> 
  84.             <td class="hback_1"><div align="right"><strong>原密码</strong></div></td>
  85.             <td class="hback"><input name="UserPassword" type="password" id="UserPassword" size="26" maxlength="20"> 
  86.             </td>
  87.           </tr>
  88.           <tr class="hback"> 
  89.             <td class="hback_1"><div align="right"><strong>新密码</strong></div></td>
  90.             <td class="hback"><input name="UserPassword_1" type="password" id="UserPassword_1" size="26" maxlength="20">
  91.               不修改保持为空</td>
  92.           </tr>
  93.           <tr class="hback"> 
  94.             <td width="14%" class="hback_1"><div align="right"><strong>密码提示问题</strong></div></td>
  95.             <td width="86%" class="hback"><input name="PassQuestion" type="text" id="PassQuestion" value="<% = Fs_User.PassQuestion%>" size="26" maxlength="20"></td>
  96.           </tr>
  97.           <tr class="hback"> 
  98.             <td class="hback_1"><div align="right"><strong>密码答案</strong></div></td>
  99.             <td class="hback"><input name="PassAnswer" type="text" id="PassAnswer" size="26" maxlength="50">
  100.               不修改保持为空</td>
  101.           </tr>
  102.           <tr class="hback">
  103.             <td class="hback_1"><div align="right"><strong>安全码</strong></div></td>
  104.             <td class="hback"><input name="safeCode" type="text" id="safeCode" size="26" maxlength="50" readonly>
  105.               不修改保持为空</td>
  106.           </tr>
  107.           <tr class="hback"> 
  108.             <td class="hback_1"><div align="right"><strong>多人登陆</strong></div></td>
  109.             <td class="hback"><input type="checkbox" name="OnlyLogin" value="0"  <% if  Fs_User.OnlyLogin = 0 then response.Write("checked")%>>
  110.               开启</td>
  111.           </tr>
  112.           <tr class="hback"> 
  113.             <td height="45" colspan="2" class="hback"> <div align="left"> 
  114.                 <input name="Action" type="hidden" id="Action" value="Save">
  115.                 <input type="submit" name="Submit" value="保存资料"   onClick="{if(confirm('确认保存您所修改的参数吗?')){this.document.form1.submit();return true;}return false;}">
  116.                   
  117.                 <input type="reset" name="Submit3" value="重新填写">
  118.               </div></td>
  119.           </tr>
  120.           <tr class="hback"> 
  121.             <td height="45" colspan="2" class="hback">  
  122.               <div align="left"></div></td>
  123.           </tr>
  124.         </form>
  125.       </table>
  126.        </td>
  127.     </tr>
  128.     <tr class="back"> 
  129.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  130.           <!--#include file="Copyright.asp" -->
  131.         </div></td>
  132.     </tr>
  133. </table>
  134. </body>
  135. </html>
  136. <%
  137. End if
  138. Set Fs_User = Nothing
  139. %>
  140. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->