saveuser1.asp
资源名称:qnmov30.rar [点击查看]
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:1k
源码类别:
家庭/个人应用
开发平台:
ASP/ASPX
- <%@ LANGUAGE = "vbscript" %>
- <!--#include file ="../md5/md5.asp"-->
- <!--#include file="security.asp"-->
- <!--#include file="articleconn.asp"-->
- <%if session("flag")>1 then
- response.write "<br><p align=center>您的操作权限不够!</p>"
- response.end
- end if
- %>
- <%
- username=LCase(Request("username"))
- password=LCase(Request("newpin"))
- re_newpin=LCase(Request("re_newpin"))
- if password<>re_newpin then
- response.write"<script>alert('初始密码与确认密码不一致,不接受!');history.back();</Script>"
- response.end
- end if
- password=MD5(password)
- flag=Request("flag")
- Set rs=Server.CreateObject("Adodb.RecordSet")
- rs.Open "Select * from password where name='"&username&"'",conn
- if not rs.EOF then
- Response.Write "<font color=red><div align=center><br><br>该用户名已经存在</div></font>"
- Response.End
- end if
- rs.close
- sql="select * from password"
- rs.open sql,conn,1,3
- rs.addnew
- rs("name")=username
- rs("pwd")=password
- rs("flag")=flag
- rs.update
- rs.Close
- set rs=Nothing
- conn.Close
- set conn=Nothing
- Response.Redirect "adminuser.asp"
- %>