📄 wm.user.asp
字号:
<!--#include file="WM.Sys_Cook.asp"-->
<!--#include file="../API/HiAPI/Class_API.asp"-->
<%
If CheckAdminFlag("Member") = False Then Call WRMPS.ErrView("·您没有权限进行此操作",0)
Dim ID,UserName,Table,Word,N,PassWord
Dim WM_GroupFlag,WM_GroupName,WM_GroupID
Dim WM_Estate,UserGroup,A_UserGroup,UserGroupID,SavePath
Dim API
ID = WRMPS.CheckStr(Request("ID"), 0)
Page = WRMPS.CheckStr(Request("page"),1)
Table = WRMPS.CheckStr(Request("Table"), 0)
Word = WRMPS.CheckStr(Request("Word"), 0)
UserGroup = WRMPS.CheckStr(Request("UserGroup"), 1)
Call DBConnBegin()
Set Rs = Server.CreateObject("ADODB.RecordSet")
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<tr class=td2><td colspan=2> <a href=WM.User.asp>会员管理</a> | <a href=WM.User.asp?Estate=2>已锁定会员</a> | <a href=WM.User.asp?Action=Through>待审核会员</a></td></tr>" & vbCrLf
Content = Content & "<tr class=td2><form name=form1 method=post><td width='43%'> <input name='Word' type='text' style='width:180' maxlength='50' value='" & WRMPS.CheckStr(Request("Word"), 0) & "'> "
Content = Content & "<select name=Table align=absmiddle>"
Content = Content & "<option value=WM_UserName " & WRMPS.GetCheckVer("WM_UserName", Table, 0) & ">用户名</option>"
Content = Content & "<option value=WM_ID " & WRMPS.GetCheckVer("WM_ID", Table, 0) & ">会员ID</option>"
Content = Content & "<option value=WM_Email " & WRMPS.GetCheckVer("WM_Email", Table, 0) & ">电子邮件</option>"
Content = Content & "</select> <input type=submit name='Submit' value=' 查询 ' >"
Content = Content & "</td></form>"
Content = Content & "<form name=form1 method='post' action='WM.User.asp'><td width='57%'> "
Content = Content & "<select name=Estate align=absmiddle onChange='javascript:submit()'>"
Content = Content & "<option value=''>====</option>"
Content = Content & "<option value=2 " & WRMPS.GetCheckVer("2", WRMPS.CheckStr(Request("Estate"),1), 0) & ">已锁定会员</option>"
Content = Content & "<option value=3 " & WRMPS.GetCheckVer("3", WRMPS.CheckStr(Request("Estate"),1), 0) & ">已通过邮箱认证</option>"
Content = Content & "<option value=4 " & WRMPS.GetCheckVer("4", WRMPS.CheckStr(Request("Estate"),1), 0) & ">已通过实名认证</option>"
Content = Content & "<option value=1 " & WRMPS.GetCheckVer("1", WRMPS.CheckStr(Request("Estate"),1), 0) & ">已注册店铺</option>"
Content = Content & "</select> "
Content = Content & "<select name=UserGroup align=absmiddle onChange='javascript:submit()'>"
Content = Content & "<option value=''>== 选择会员组 ==</option>"
Set Rs = Conn.Execute("Select WM_GroupName,WM_ID,WM_GroupUser from WM_UserGroup Where WM_GroupUser > 0 Order by WM_ID")
Do While Not Rs.EOF
Content = Content & "<option value=" & Rs(1) & " " & WRMPS.GetCheckVer(Rs(1), Int(UserGroup), 0) & ">" & Rs(0) & "</option>"
Rs.MoveNext
Loop
Rs.Close
Content = Content & "</select> "
Content = Content & "</td></form></tr></Table>" & vbCrLf
Select Case Request("Action")
Case "EditSave"
Dim TrueName,Tel,QQ,AddRess,WM_Sign,i,WM_Face,Email_,Area,Web,Sex,Integral
Dim PassEdit,AnswerEdit,Question,Answer
UserName = WRMPS.CheckStr(Request("UserName"),0)
If UserName = "" Then Call WRMPS.ErrView("·操作错误",0)
Email_ = WRMPS.CheckStr(Request("Email_"),0)
Email = WRMPS.CheckStr(Request("Email"),0)
TrueName = WRMPS.CheckStr(Request("TrueName"),0)
Tel = WRMPS.CheckStr(Request("Tel"),0)
QQ = WRMPS.CheckStr(Request("QQ"),0)
AddRess = WRMPS.CheckStr(Request("AddRess"),0)
WM_Sign = WRMPS.CheckStr(Request("WM_Sign"),0)
If WM_Sign = "" Then WM_Sign = ""
WM_Face = WRMPS.CheckStr(Request("Pic"),0)
If Left(WM_Face,Len(WR_Setting(3))) = WR_Setting(3) Then WM_Face = Right(WM_Face,Len(WM_Face)-Len(WR_Setting(3)))
AreaID = WRMPS.CheckStr(Request("AreaID"),1)
If AreaID = "" Then AreaID = WRMPS.CheckStr(Request("Area_"),1)
If AreaID = "" Then AreaID = 0
Web = WRMPS.CheckStr(Request("Web"),0)
If Web = "" Then Web = Null
Sex = WRMPS.CheckStr(Request("Sex"),1)
If Sex = "" Then Sex = 1
UserGroupID = WRMPS.CheckStr(Request("UserGroupID"),1)
Rs.Open "Select WM_GroupFlag from WM_UserGroup Where WM_ID = " & UserGroupID & "", Conn, 1, 1
If Not Rs.EOF Then
WM_GroupFlag = Rs(0)
End If
Rs.Close
If TrueName = "" Then Call WRMPS.ErrView("·请输入您的真实姓名<meta http-equiv=refresh content='1;URL=?Action=Edit&ID="&ID&"&Page="&Page&"&Estate=" & Request("Estate") & "&UserGroup=" & UserGroup & "&Table=" & Table & "&Word=" & Word&"'>",0)
If Email_ <> Email Then
Set Rs = Conn.Execute("Select Top 1 WM_ID From WM_Member Where WM_Email = '"&Email&"' and WM_ID<>"&ID&"")
If Not Rs.Eof Then
Call WRMPS.ErrView("·此邮箱已经有人使用<meta http-equiv=refresh content='1;URL=?ID="&ID&"&Page="&Page&"&Estate=" & Request("Estate") & "&UserGroup=" & UserGroup & "&Table=" & Table & "&Word=" & Word&"'>",1)
End If
Rs.Close
End If
If Email = "" Then Call WRMPS.ErrView("·请输入您的电子邮箱<meta http-equiv=refresh content='1;URL=?ID="&ID&"&Page="&Page&"&Estate=" & Request("Estate") & "&UserGroup=" & UserGroup & "&Table=" & Table & "&Word=" & Word&"'>",0)
PassWord = WRMPS.CheckStr(Request("PassWord"),0)
If PassWord <> "" Then
If Len(PassWord)<5 Or Len(PassWord)>15 Then Call WRMPS.ErrView("·新密码必须在 "&Split(WR_User(4),"|")(0)&"-"&Split(WR_User(4),"|")(1)&" 位之间",0)
If WRMPS.CheckStr(Request("UserName"),0) = PassWord Then Call WRMPS.ErrView("·密码不能与用户名相同",0)
PassEdit = ",WM_PassWord='"&MD5(2,PassWord)&"'"
Else
PassEdit = ""
End If
Question = WRMPS.CheckStr(Request("Question"),0)
If Question = "" Then Call WRMPS.ErrView("·请输入密码提示问题",0)
Answer = WRMPS.CheckStr(Request("Answer"),0)
If Answer <> "" Then
AnswerEdit = ",WM_Answer='"&MD5(2,Answer)&"'"
Else
AnswerEdit = ""
End If
'API整合接口
If API_Enable Then
Set API = New API_WRMPS
API.LoadXmlFile True
API.UserName=UserName
API.TrueName=TrueName
API.EMail=Email
API.QQ=QQ
API.AddRess=AddRess
API.Sex=Sex
API.Web=Web
If PassEdit <> "" Then API.PassWord=PassWord
API.Question=Question
If AnswerEdit <> "" Then API.Answer=Answer
Call API.ProcessMultiPing("update")
Set API=Nothing
End If
Conn.Execute("Update WM_Member Set WM_TrueName='"&TrueName&"',WM_AreaID="&AreaID&",WM_Email='"&Email&"',WM_Tel='"&Tel&"',WM_QQ='"&QQ&"',WM_AddRess='"&AddRess&"',WM_Sign='"&WM_Sign&"',WM_Face='"&WM_Face&"',WM_Sex="&Sex&",WM_Web='"&Web&"',WM_GroupID = "&UserGroupID&",WM_Flag = '"&WM_GroupFlag&"',WM_Question='"&Question&"'"&PassEdit&AnswerEdit&" where WM_ID="&ID&"")
Call WRMPS.SCache("FlagTime",Now())
Call WRMPS.ErrView("·用户资料修改成功<meta http-equiv=refresh content='1;URL=?ID="&ID&"&Page="&Page&"&Estate=" & Request("Estate") & "&UserGroup=" & UserGroup & "&Table=" & Table & "&Word=" & Word&"'>",1)
Case "Edit"
Rs.Open "Select WM_Email,WM_TrueName,WM_Face,WM_Sign,WM_Tel,WM_QQ,WM_AddRess,WM_AreaID,WM_Sex,WM_Web,WM_UserName,WM_GroupID,WM_CompanyReNum,WM_RegTime,WM_LastLoginTime,WM_LastIP,WM_LoginNum,WM_Integral,WM_CountOut,WM_ComID,WM_PassWord,WM_Faith,WM_ClassNum,WM_Money,WM_Question,WM_CompanyNum,WM_ArticleNum,WM_CouponNum From WM_Member Where WM_ID = "&ID&"" ,Conn,1,1
If Not Rs.Eof Then
Area = "没有选择城市"
If Rs(7) > 0 Then
Area=WRDB.GetClassName("WM_Area",Rs(7))
End If
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<tr><td class=td3 colspan=3><strong>"&Rs(10)&"</strong> 会员信息操作</td></tr>" & vbCrLf
Content = Content & "<form method='POST' action='?Action=EditSave&ID="&ID&"&Page="&Page&"&Estate=" & Request("Estate") & "&UserGroup=" & UserGroup & "&Table=" & Table & "&Word=" & Word&"' name=myform>" & vbCrLf
Content = Content & "<input name=UserName type=hidden value='"&Rs(10)&"'>" & vbCrLf
Content = Content & "<input name=Email_ type=hidden value='"&Rs(0)&"'>" & vbCrLf
Content = Content & "<input name=Area_ type=hidden value='"&Rs(7)&"'>" & vbCrLf
Content = Content & "<tr class=td4><td colspan=3><strong>修改会员密码</strong></td></tr>" & vbCrLf
Content = Content & "<tr class=td2><td width='30%'><strong>登录密码</strong><br>为空则不修改</td><td colspan=2><input name='PassWord' type='text' Style='width:200' maxlength=50 value=''></td></tr>" & vbCrLf
Content = Content & "<tr class=td2><td><strong>密码提示问题</strong></td><td colspan=2><input name='Question' type='text' Style='width:200' maxlength=50 value='"&Rs(24)&"'></td></tr>" & vbCrLf
Content = Content & "<tr class=td2><td><strong>提示问题答案</strong><br>为空则不修改</td><td colspan=2><input name='Answer' type='text' Style='width:200' maxlength=50 value=''></td></tr>" & vbCrLf
Content = Content & "<tr><td class=td4 colspan=3><strong>基本资料</strong></td></tr>" & vbCrLf
Content = Content & "<tr class=td2><td width='30%'><strong>真实姓名</strong></td><td colspan=2><input name=TrueName type=text Style=width:200 maxlength=50 value="&Rs(1)&"> <font Class=Font2>*</font></td></tr>" & vbCrLf
Content = Content & "<tr class=td2><td><strong>性别</strong></td><td colspan=2><input name=Sex type=radio value=1 Class=radio"&WRMPS.GetCheckVer(1, Rs(8), 1)&">男孩 <input name=Sex type=radio value=0 Class=radio"&WRMPS.GetCheckVer(0, Rs(8), 1)&">女孩 <font Class=Font2>*</font></td></tr>" & vbCrLf
Content = Content & "<tr class=td2><td><strong>所属会员组</strong><br>如为代理商将不能调整会员组</td>" & vbCrLf
Content = Content & "<td colspan=2>"
If Rs(11) = 3 Then
Set Rso = Conn.Execute("Select WM_GroupName from WM_UserGroup Where WM_ID = 3")
If Not Rso.Eof Then
Content = Content & "<strong>" & Rso(0) & "</strong><input type=hidden name=UserGroupID value="&Rs(11)&">"
End If
Rso.Close
Else
Content = Content & "<select name=UserGroupID align=absmiddle>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -