user_edit.asp
上传用户:apresys
上传日期:2021-03-30
资源大小:813k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <!--#include file="checkuser.asp"-->
  3. <!--#include file="md5.asp" -->
  4. <%
  5. dim action
  6. action=request("action")
  7. select case action
  8. case "edit" 
  9. passwd=request.form("pwd")
  10. passwd1=md5(trim(request.form("pwd")))   
  11. set rs=server.createobject("adodb.recordset") 
  12. sql="select * from userinfo where userid="&userid
  13. rs.open sql,conn,1,3
  14. rs("fullname") = trim(request.Form("fullname"))
  15. rs("depname") = trim(request.Form("depname"))
  16. if passwd<>rs("pwd") then
  17. rs("pwd")=passwd1
  18. end if
  19. rs.update
  20. rs.close
  21. set rs=nothing
  22. response.Write "<script language=javascript>alert('修改成功!');</script>"
  23. response.write "<meta http-equiv=""refresh"" content=""0;url=document.asp"">"
  24. response.end
  25. end select
  26. %>
  27. <html>
  28. <head>
  29. <title>∷汽车4S店配件仓储管理系统:.</title>
  30. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  31. <link href="css/main.css" rel="stylesheet" type="text/css">
  32. <SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>
  33. <style type="text/css">
  34. <!--
  35. td {  font-family: "宋体"; font-size: 9pt}
  36. body {  font-family: "宋体"; font-size: 9pt}
  37. select {  font-family: "宋体"; font-size: 9pt}
  38. A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
  39. A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt} 
  40. -->
  41. </style>
  42. </head>
  43. <BODY topMargin=0 rightMargin=0 leftMargin=0>       
  44. <!--#include file="top.asp"--><br>
  45. <br>
  46. <fieldset style="width:50%"><legend>编辑个人资料</legend>
  47. <table width="300" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
  48.           <form name="powersearch" method="post" action="user_edit.asp" ><input name="action" value="edit" type="hidden">
  49.   <%set rs=server.CreateObject("ADODB.RecordSet")
  50.           sql="select * from userinfo where userid="&userid
  51.           rs.open sql,conn,1,1
  52.   %>
  53.   <tr><td width="100" align="right" height="22">用户名:&nbsp;</td><td width="200">&nbsp;<%=name%></td></tr>
  54.   <tr><td width="100" align="right" height="22">密 码:&nbsp;</td><td width="200">&nbsp;<input name="pwd"  type="password"  size="10"  value='<%= rs("pwd")%>'></td></tr>
  55.   <tr><td width="100" align="right" height="22">全 名:&nbsp;</td><td width="200">&nbsp;<input name="fullname"  type="text"  size="10"  value='<%= rs("fullname")%>'></td></tr>
  56.   <tr><td width="100" align="right" height="22">部 门:&nbsp;</td><td width="200">&nbsp;<select name="depname"  size="1" style='width:80'>
  57. <%
  58. set rs3=server.createobject("adodb.recordset")
  59.    rs3.open "select * from department",conn,1,1
  60.    if not rs3.eof then
  61.    do while not rs3.eof
  62. %>
  63. <option <% if trim(rs3("depname"))=trim(rs("depname")) then
  64. %> selected="selected"<%end if%>><%=rs3("depname")%></option>
  65. <%
  66. rs3.movenext
  67. loop
  68. end if
  69. rs3.close
  70. set rs3=nothing
  71. %>
  72. </select></td></tr>
  73. <tr><td colspan="4" height="30" align="center"><input type="submit"  value="编辑"></td></tr>
  74. <%
  75. rs.close
  76. set rs=nothing
  77. %>
  78. </form>
  79.   </table>
  80. </fieldset>
  81. </body>
  82. </html>