📄 save_user.asp
字号:
<!--#include file="conn.asp"-->
<%
'=========================================================
' 随然日记本(多用户版) Version:3.0
' Date: 2004-11-15
' Script Written by 随然(dampure)
' 随然日记本演示地址:http://www.suiran.cn
'=========================================================
' Copyright (C) 2003,2004 真露无香. All rights reserved.
' Web: www.yongzi.com
' Diary:http://www.suiran.cn
'=========================================================
username=trim(request("username"))
passwd=trim(request("passwd"))
nickname=trim(request("nickname"))
readpwd=trim(request("readpwd"))
diary_name=trim(request("diary_name"))
content=trim(request("content"))
pic=request("type")
suiji=request("suiji")
question=request("question")
answer=request("answer")
leibie=request("leibie")
address=request("address")
pinglunlock=request("pinglunlock")
if Session("admindiary")="" then
%>
<script language=vbscript>
MsgBox "呵呵~~~!你不是管理员吧!不要乱来噢~~~!"
location.href = "javascript:history.back()"
</script>
<%
else
set rs2=server.createobject("ADODB.recordset")
rs2.Open "SELECT * FROM admin where user='"&username&"' and userid<>"&request("userid"),conn,1,3
if not rs2.eof then
%>
<script language=vbscript>
MsgBox "用户名已存在,请使用其他用户名!"
location.href = "javascript:history.back()"
</script>
<%
end if
rs2.close
set rs=server.createobject("ADODB.recordset")
rs.Open "SELECT * FROM admin where userid="&request("userid"),conn,1,3
rs("title")=diary_name
rs("infor")=content
rs("user")=username
rs("picshow")=suiji
rs("readpwd")=readpwd
rs("leibie")=leibie
rs("address")=address
rs("say")=pinglunlock
if passwd<>"" then rs("pwd")=passwd
rs("nickname")=nickname
rs("pic")=pic
rs("question")=question
if answer<>"" then rs("answer")=answer
rs.update
rs.close
%>
<script language=vbscript>
MsgBox "修改用户信息成功,请返回!"
location.href = "admin.asp"
</script>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -