📄 saveinfo.asp
字号:
<!--#include file="conn.asP"-->
<!--#include file="func.asp"-->
<%
logchk session("userid"),session("password")
if session("userid")="" or session("password")="" or session("manbid")="" then
errmsg="您的用户ID与PASSWORD错误!请重新登录!"
errshow(errmsg)
else
id=request.form("id")
method=request.form("method")
username=trim(request.form("username"))
userid=trim(request.form("userid"))
password=trim(request.form("password"))
passagain=trim(request.form("passagain"))
homepage=lcase(trim(request.form("homepage")))
email=trim(request.form("email"))
jj=request.form("jj")
manbid=request.form("manbid")
username=server.HTMLEncode(username)
email=server.HTMLEncode(email)
err=0
errmsg=""
if username="" then
errmsg=errmsg+"<br>您忘了写上您的大名!"
err=1
end if
if isempty(method) or method="" then
if isempty(id) or id="" then
errmsg=errmsg+"<br>修改错误,请重新登录!"
errshow(errmsg)
end if
end if
if session("manbid")=0 and method="new" and userid="" then
errmsg=errmsg+"<br>用户ID可不能不填呵!"
err=1
end if
if password="" or passagain="" or (password<>passagain) then
errmsg=errmsg+"<br>密码填写错误!请检查!"
err=1
end if
if not IsValidEmail(email) then
errmsg=errmsg+"<br>请检查您EMAIL地址,可不能不填呵!"
err=1
end if
if isempty(jj) or jj="" then
errmsg=errmsg+"<br>别忘了写上您那段介绍呵!"
err=1
end if
if err=1 then
errshow(errmsg)
end if
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set insert = Server.CreateObject("ADODB.Recordset")
if method="new" and session("manbid")=0 then
cmdTemp.commandtext="select * from manboard where (userid is null)"
else
cmdTemp.CommandText="SELECT * FROM manboard WHERE id=" &id
if session("manbid")=0 and manbid<>0 then
else
session("password")=password
end if
end if
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = conn
insert.Open cmdTemp, , 1, 3
if method="new" and session("manbid")=0 then
insert.AddNew
insert("userid")=userid
end if
insert("username")=username
insert("email")=email
insert("password")=password
if homepage<>"http://" or homepage<>"" then
insert("homepage")=homepage
end if
insert("jj")=jj
if session("manbid")=0 then
insert("manbid")=manbid
end if
insert.update
if err.number<>0 then
response.write "数据库操作失败:"&err.description
end if
set insert=nothing
set cmdTemp=nothing
set conn=nothing
%>
<%
if session("manbid")=0 then
response.redirect "userman.asp"
else
%>
<html>
<head>
<title>资料修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body bgcolor="#FFFFFF" background="images/bg.gif">
<table width="600" class=buinput>
<tr>
<td> </td>
</tr>
<tr>
<td align='center'>所以信息已经保存!其中包括网上大名、密码、电子邮箱等等!</td>
</tr>
<tr>
<td align='center'> </td>
</tr>
</table>
</body>
</html>
<%end if%>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -