saveuser1.asp
来自「小型房产中介源码」· ASP 代码 · 共 46 行
ASP
46 行
<%response.buffer=true%>
<!--#include file=../conn/adodb1.asp --><!--#include file="char.inc"--><!--#include file="md5.asp"-->
<%
if session("cjuser")="" and session("pwdd")="" then
response.write"<SCRIPT language=JavaScript>alert('你没有登录,无权进入!');"
response.write"this.location.href='error.htm';</SCRIPT>"
response.end
end if
%>
<%
dim username, password, right_class
dim rs, sql
username=LCase(Request("username"))
password=md5(LCase(Request("newpin")))
right_class=CInt(Request("right_class"))
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select * from Admin where user='"&username&"'",db
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 admin"
rs.open sql,db,1,3
rs.addnew
rs("user")=username
rs("pwd")=password
rs("rank")=right_class
rs.update
rs.Close
set rs=Nothing
db.Close
set db=Nothing
Response.Redirect "admin_admin.asp"
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?