?? usersave.asp
字號:
<!-- #include file="../ConnDB.asp" -->
<!--#include file="../class/person.asp"-->
<html>
<head>
<title>保存用戶信息</title>
</head>
<body>
<%
set objPerson = new Person '創建Person對象,用于訪問個人信息表
Dim sql,uid
uid = Request("userid") ' 用戶名
objPerson.UserId = uid ' 用戶名
objPerson.UserPwd = Request("pwd") ' 密碼
objPerson.Name = Request("username") ' 姓名
objPerson.Sex = CInt(Request("sex")) ' 性別
objPerson.Address = Request("address") ' 地址
objPerson.Postcode = Request("telephone") ' 郵編
objPerson.Email = Request("email") ' 電子郵件
objPerson.Telephone = Request("telephone") ' 電話
objPerson.Mobile = Request("mobile") ' 手機
objPerson.Company = Request("company") ' 單位
objPerson.Birthday = Request("birthday") ' 生日
If Request.Form("isadd")="new" Then
'判斷此用戶是否存在
if objPerson.HavePerson(uid) then
%>
<script language="javascript">
alert("已經存在此用戶名!");
history.go(-1);
</script>
<%
else
objPerson.Status = 0 ' 當前狀態
objPerson.UserType = 0 ' 用戶類型
objPerson.insert()
end if
else
'更新用戶信息
objPerson.update(objPerson.UserId)
end if
Response.Write "<h2>用戶信息已成功保存!</h2>"
%>
</body>
<script language="javascript">
opener.location.reload();
setTimeout("window.close()",800);
</script>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -