⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saveuser1.asp

📁 十分好的音乐网站源码 十分好的音乐网站源码十分好的音乐网站源码十分好的音乐网站源码十分好的音乐网站源码
💻 ASP
字号:
<%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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -