User.asp
资源名称:7.rar [点击查看]
上传用户:lfyh0123
上传日期:2020-11-04
资源大小:200k
文件大小:19k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#include file="wapls_up.asp"-->
- <%
- '==================================
- '=文 件 名:User.asp
- '=适用版本:蓝色世纪WAP网站管理系统(CMS)V1.1
- '=官方版权:http://www.songfr.cn
- '=文件功能:网站会员前台
- '=文件作者:蓝色阳光
- '=发行时间:2007-02-01
- '==================================
- IF Request.QueryString("Action")="reg" Then
- call reg
- elseIF Request.QueryString("Action")="login" Then
- call login
- elseIF Request.QueryString("Action")="add" Then
- call add
- elseIF Request.QueryString("Action")="logout" Then
- call logout
- elseIF Request.QueryString("Action")="main" Then
- call main
- elseIF Request.QueryString("Action")="lostpass" Then
- call lostpass
- elseIF Request.QueryString("Action")="editdata" Then
- call editdata
- elseIF Request.QueryString("Action")="editPass" Then
- call editPass
- else
- call index
- End IF
- '========会员系统主页=======
- Function index
- Response.write "<card id='index' title='会员登陆'>"
- Response.write "<p align='"&const1&"'>"
- if user_system=0 then
- response.write "对不起,会员系统暂不开放!<br/>"
- else
- if session("name")<>"" then
- response.redirect "?Action=main"
- else
- if len(mb_user)>1 then
- response.write ""&outHTM(mb_user)&"<br/>"
- end if
- %>
- 会员名称:<br/><input name="name<%=minute(now)%><%=second(now)%>" type="text" maxlength="10"/><br/>
- 会员密码:<br/><input type="password" name="pass<%=minute(now)%><%=second(now)%>" maxlength="8"/><br/>
- 验证号码:<br/><input name="yz<%=minute(now)%><%=second(now)%>" format="*N" maxlength="4" size="8"/> <%=s%><br/>
- <anchor>[会员登陆]<go href="?Action=login" method='post'>
- <postfield name="username" value="$(name<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="password" value="$(pass<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz" value="$(yz<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz1" value="<%=s%>"/>
- </go></anchor><br/>
- <a href="?Action=lostpass">[忘记密码]</a><br/>
- <%
- if user_system=3 then
- response.write "[会员注册]"
- else
- response.write "<a href='?Action=add'>[会员注册]</a>"
- end if
- end if
- end if
- end Function
- '========会员系统登陆=======
- Function login
- Response.write "<card id='index' title='会员登陆'>"
- Response.write "<p align='"&const1&"'>"
- if user_system=0 then
- response.write "对不起,会员系统暂不开放!<br/>"
- end if
- dim UserName,userpwd,yz,yz1,userpass
- UserName=request.form("username")
- userpwd=md5(request.form("password"))
- yz=request("yz")
- yz1=Request("yz1")
- if yz<>yz1 then
- response.redirect "wapls_404.asp?id=9"
- end if
- sql="select * from wapls_user where name='"&UserName&"'"
- set rs=server.createobject("adodb.recordset")
- rs.open sql,conn,1,3
- if rs.eof and rs.bof then
- response.redirect "wapls_404.asp?id=4"
- elseif rs("password")<>userpwd then
- response.redirect "wapls_404.asp?id=5"
- elseif rs("passed")=0 then
- response.redirect "wapls_404.asp?id=6"
- elseif rs("lock")=1 then
- response.redirect "wapls_404.asp?id=7"
- else
- dim old_time,old_ip
- rs("last_time")=now()
- rs("last_ip")=Request.ServerVariables("REMOTE_ADDR")
- rs("login_num")=rs("login_num")+1
- rs("user_exper")=rs("user_exper")+user_addexper
- rs.update
- session("name")=username
- session("userlogin")=user_session
- rs.close:set rs=nothing
- Response.Write "欢迎"&session("name")&"您的再次到来!<br/><br/>"
- Response.Write "<a href='?Action=main'>[控制面板]</a>"
- end if
- end Function
- '========会员系统控制=======
- Function main
- if session("name")="" then
- response.redirect "index.asp"
- end if
- Response.write "<card id='index' title='控制面板'>"
- Response.write "<p align='"&const1&"'>"
- sql="select * from wapls_user where name='"&session("name")&"'"
- set rs=server.createobject("adodb.recordset")
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- response.write"无此用户"
- else
- if rs("user_type")=1 then
- usertype="普通会员"
- elseif rs("user_type")=2 then
- usertype="VIP会员"
- else
- usertype="游客"
- end if
- if rs("sex")=1 then
- sex="男"
- else
- sex="女"
- end if
- response.write "ID编号:"&rs("user_id")
- response.write "<br/>会员名称:"&session("name")
- response.write "<br/>会员性别:"&sex
- response.write "<br/>真实名称:"&rs("author")
- response.write "<br/>会员权限:"&usertype
- response.write "<br/>登陆次数:"&rs("login_num")
- response.write "<br/>QQ号码:"&rs("qq")
- response.write "<br/>手机号码:"&rs("tel")
- response.write "<br/>电子邮箱:"&rs("email")
- response.write "<br/>经验:"&rs("user_exper")
- response.write "|金币:"&rs("user_money")
- response.write "<br/>会员注册时间:"&rs("reg_date")
- response.write "<br/>最后登录时间:"&rs("last_time")
- response.write "<br/>最后登录IP:"&rs("last_ip")
- if len(mb_logo)>1 then
- response.write "<br/><img src='"&mb_logo&"/fgx.gif' alt='.'/>"
- else
- response.write "<br/>----------"
- end if
- response.write "<br/><a href='?Action=editdata'>[资料修改]</a>"
- Response.Write "<br/><a href='?Action=editPass'>[密码修改]</a>"
- response.write "<br/><a href='?Action=logout'>[安全退出]</a>"
- rs.close
- set rs=nothing
- end if
- end Function
- '========会员系统退出=======
- Function logout
- session("name")=""
- session("userlogin")=""
- Response.write "<card id='index' title='安全退出' ontimer='index.asp'><timer value='10'/>"
- Response.write "<p align='"&const1&"'>"
- Response.Write "安全退出成功...<br/>"
- end Function
- '========会员密码找回=======
- Function lostpass
- Response.write "<card id='index' title='密码找回'>"
- Response.write "<p align='"&const1&"'>"
- if request("lostpass")="true" then
- yz=request("yz")
- yz1=Request("yz1")
- if yz<>yz1 then
- response.redirect "wapls_404.asp?id=9"
- end if
- dim UserName,Answer
- userid=request.form("userid")
- Answer=md5(request.form("answer"))
- sql="select * from wapls_user where user_id="&userid
- set rs=server.createobject("adodb.recordset")
- rs.open sql,conn,1,3
- if rs("Answer")<>Answer then
- response.redirect "wapls_404.asp?id=19"
- else
- rs("password")=md5("wapls")
- rs.update
- Response.Write "密码找回成功!<br/>会员名称:"&rs("name")&"<br/>会员密码:wapls(已做初始化修改)<br/>请及时登录并修改密码!<br/>"
- session("name")=rs("name")
- session("userlogin")=user_session
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
- else
- response.write "----------<br/>"
- end if
- Response.Write "<a href='?Action=editPass'>[密码修改]</a>"
- rs.close
- set rs=nothing
- end if
- else
- if request("telok")="true" then
- tel=request.form("tel")
- sqltel="select * from wapls_user where tel='"&tel&"'"
- set rstel=server.createobject("adodb.recordset")
- rstel.open sqltel,conn,1,1
- if rstel.eof and rstel.bof then
- response.redirect "wapls_404.asp?id=18"
- elseif rstel("passed")=0 then
- response.redirect "wapls_404.asp?id=6"
- elseif rstel("lock")=1 then
- response.redirect "wapls_404.asp?id=7"
- else
- %>
- 密码问题:<br/><%=rstel("Question")%><br/>
- 密码答案:<br/><input type="text" name="answer<%=minute(now)%><%=second(now)%>" maxlength="30"/><br/>
- 验证号码:<br/><input name="yz<%=minute(now)%><%=second(now)%>" format="*N" maxlength="4" size="8"/> <%=s%><br/>
- <anchor>[下一步]<go href="?Action=lostpass" method='post'>
- <postfield name="answer" value="$(answer<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz" value="$(yz<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz1" value="<%=s%>"/>
- <postfield name="userid" value="<%=rstel("user_id")%>"/>
- <postfield name="lostpass" value="true"/>
- </go></anchor><br/>
- <%
- end if
- else
- %>
- 手机号码:<br/><input type="text" format="*N" name="tel<%=minute(now)%><%=second(now)%>" maxlength="11"/><br/>
- <anchor>[下一步]<go href="?Action=lostpass" method='post'>
- <postfield name="tel" value="$(tel<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="telok" value="true"/>
- </go></anchor><br/>
- <%
- rstel.close
- set rstel=nothing
- end if
- end if
- end Function
- '========会员注册提交=======
- Function reg
- if request.form("adduser")="true" then
- Response.write "<card id='index' title='会员注册'>"
- Response.write "<p align='"&const1&"'>"
- if user_system=0 then
- response.write "对不起,会员系统暂不开放!<br/>"
- elseif user_system=3 then
- response.write "对不起,新会员注册暂不开放!<br/>"
- end if
- yz=request("yz")
- yz1=Request("yz1")
- if yz<>yz1 then
- response.redirect "wapls_404.asp?id=9"
- end if
- dim UserName,Password,PwdConfirm,Question,Answer,Sex,Email,Author,Tel,qq
- UserName=request.form("UserName")
- Password=request.form("Password")
- PwdConfirm=request.form("PwdConfirm")
- Question=request.form("Question")
- Answer=md5(request.form("Answer"))
- Sex=Request.form("Sex")
- qq=Request.form("qq")
- Email=request.form("Email")
- Tel=request.form("Tel")
- if conn.Execute("select count(*) from wapls_user where email='"&Email&"'")(0)<>0 then
- response.redirect "wapls_404.asp?id=25"
- end if
- if conn.Execute("select count(*) from wapls_user where tel='"&tel&"'")(0)<>0 then
- response.redirect "wapls_404.asp?id=26"
- end if
- if request("Author")="" then
- Author=""
- else
- Author=request("Author")
- end if
- if strLength(UserName)<4 then
- response.redirect "wapls_404.asp?id=20"
- end if
- if len(Password)<6 then
- response.redirect "wapls_404.asp?id=21"
- end if
- if Password<>PwdConfirm then
- response.redirect "wapls_404.asp?id=22"
- end if
- if BPCheckEMail(Email)=false then
- response.redirect "wapls_404.asp?id=23"
- end if
- if request.form("bbsReg")="" then
- bbsReg=0
- else
- bbsReg=1
- end if
- dim sqlReg,rsReg
- sqlReg="select * from wapls_user where name='"&UserName&"'"
- set rsReg=server.createobject("adodb.recordset")
- rsReg.open sqlReg,conn,1,3
- if not(rsReg.bof and rsReg.eof) then
- rsReg.close
- set rsReg=nothing
- response.redirect "wapls_404.asp?id=24"
- else
- rsReg.addnew
- rsReg("name")=UserName
- rsReg("password")=md5(Password)
- rsReg("question")=Question
- rsReg("answer")=Answer
- rsReg("sex")=Sex
- rsReg("email")=Email
- rsReg("author")=Author
- rsReg("tel")=Tel
- rsReg("qq")=qq
- rsReg("user_type")=1
- rsReg("login_num")=0
- if user_system=1 then '会员系统设置为用户注册需要通过审核
- rsReg("passed")=0
- else
- rsReg("passed")=1
- end if
- rsReg("last_ip")=request_ip
- rsReg("last_time")=now()
- rsReg("user_money")=user_startmoney
- rsReg("user_exper")=user_startexper
- rsReg("content")=""
- rsReg.update
- rsReg.close
- set rsReg=nothing
- response.write "注册成功!<br/>"
- session("name")=UserName
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
- else
- response.write "----------<br/>"
- end if
- Response.Write "<a href='?Action=main'>[控制面板]</a>"
- end if
- else
- Response.write "<card id='index' title='会员注册'>"
- Response.write "<p align='"&const1&"'>"
- %>
- 会员名称:*<br/><input name="name<%=minute(now)%><%=second(now)%>" type="text" maxlength="10"/><br/>
- 会员密码:*<br/><input type="password" name="pass<%=minute(now)%><%=second(now)%>" maxlength="8"/><br/>
- 确认密码:*<br/><input type="password" name="Pwd<%=minute(now)%><%=second(now)%>" maxlength="8"/><br/>
- 安全提问:*<br/><select name="Question<%=minute(now)%><%=second(now)%>">
- <option>请选择提示问题</option>
- <option value="母亲的名字">母亲的名字</option>
- <option value="父亲的名字">父亲的名字</option>
- <option value="出生的城市">出生的城市</option>
- <option value="您的手机颜色">您的手机颜色</option>
- <option value="您个人手机型号">您个人手机型号</option>
- <option value="您最喜欢的人名称">您最喜欢的人名称</option>
- <option value="身份证最后四位数字">身份证最后四位数字</option>
- </select><br/>
- 安全回答:*<br/><input type="text" name="Answer<%=minute(now)%><%=second(now)%>" maxlength="10"/><br/>
- 真实姓名:<br/><input type="text" name="author<%=minute(now)%><%=second(now)%>" maxlength="8"/><br/>
- 手机号码:*<br/><input type="text" format="*N" name="tel<%=minute(now)%><%=second(now)%>" maxlength="11"/><br/>
- 电子邮箱:*<br/><input type="text" name="email<%=minute(now)%><%=second(now)%>" maxlength="100"/><br/>
- QQ号码:<br/><input type="text" format="*N" name="qq<%=minute(now)%><%=second(now)%>" maxlength="11"/><br/>
- 会员性别:*<br/>
- <select name="sex<%=minute(now)%><%=second(now)%>" value="1">
- <option value="1">男士</option>
- <option value="0">女士</option>
- </select><br/>
- 验证号码:*<br/><input name="yz<%=minute(now)%><%=second(now)%>" format="*N" maxlength="4" size="8"/> <%=s%><br/>
- <anchor>[提交注册]<go href="?Action=reg" method='post'>
- <postfield name="username" value="$(name<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="password" value="$(pass<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="PwdConfirm" value="$(Pwd<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="Question" value="$(Question<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="Answer" value="$(Answer<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="author" value="$(author<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="tel" value="$(tel<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="qq" value="$(qq<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="email" value="$(email<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="sex" value="$(sex<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz" value="$(yz<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz1" value="<%=s%>"/>
- <postfield name="adduser" value="true"/>
- </go></anchor>
- <%
- end if
- end Function
- '========会员资料修改=======
- Function editdata
- if request.form("editdata")="true" then
- Response.write "<card id='index' title='资料修改'>"
- Response.write "<p align='"&const1&"'>"
- if user_system=0 then
- response.write "对不起,会员系统暂不开放!<br/>"
- end if
- yz=request("yz")
- yz1=Request("yz1")
- if yz<>yz1 then
- response.redirect "wapls_404.asp?id=9"
- end if
- dim Sex,Email,Author,qq,id
- id=request.form("id")
- Sex=Request.form("Sex")
- qq=Request.form("qq")
- Email=request.form("Email")
- Author=request("Author")
- if BPCheckEMail(Email)=false then
- response.redirect "wapls_404.asp?id=23"
- end if
- dim sqlReg,rsReg
- sqlReg="select * from wapls_user where user_id="&id
- set rsReg=server.createobject("adodb.recordset")
- rsReg.open sqlReg,conn,1,3
- if rsReg.bof and rsReg.eof then
- rsReg.close
- set rsReg=nothing
- response.redirect "wapls_404.asp?id=2"
- else
- rsReg("sex")=Sex
- rsReg("email")=Email
- rsReg("qq")=qq
- rsReg("Author")=Author
- rsReg.update
- rsReg.close
- set rsReg=nothing
- response.write "修改成功!<br/>"
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
- else
- response.write "----------<br/>"
- end if
- end if
- else
- Response.write "<card id='index' title='资料修改'>"
- Response.write "<p align='"&const1&"'>"
- sql="select * from wapls_user where name='"&session("name")&"'"
- set rs=server.createobject("adodb.recordset")
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- response.write"无此用户"
- else
- %>
- 会员名称:<%=rs("name")%><br/>
- 真实姓名:<br/><input type="text" name="author<%=minute(now)%><%=second(now)%>" maxlength="8" value="<%=rs("author")%>"/><br/>
- 手机:<%=rs("tel")%><br/>
- 电子邮箱:*<br/><input type="text" name="email<%=minute(now)%><%=second(now)%>" maxlength="100" value="<%=rs("email")%>"/><br/>
- QQ号码:<br/><input type="text" format="*N" name="qq<%=minute(now)%><%=second(now)%>" maxlength="11" value="<%=rs("qq")%>"/><br/>
- 会员性别:*<br/>
- <select name="sex<%=minute(now)%><%=second(now)%>" value="<%=rs("sex")%>">
- <option value="1">男士</option>
- <option value="0">女士</option>
- </select><br/>
- 验证号码:*<br/><input name="yz<%=minute(now)%><%=second(now)%>" format="*N" maxlength="4" size="8"/> <%=s%><br/>
- <anchor>[提交注册]<go href="?Action=editdata" method='post'>
- <postfield name="author" value="$(author<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="qq" value="$(qq<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="email" value="$(email<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="sex" value="$(sex<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz" value="$(yz<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz1" value="<%=s%>"/>
- <postfield name="id" value="<%=rs("user_id")%>"/>
- <postfield name="editdata" value="true"/>
- </go></anchor><br/>
- <%
- rs.close
- set rs=nothing
- end if
- end if
- Response.Write "<a href='?Action=main'>[控制面板]</a>"
- end Function
- '========会员密码修改=======
- Function editPass
- if request.form("editPass")="true" then
- Response.write "<card id='index' title='密码修改'>"
- Response.write "<p align='"&const1&"'>"
- if user_system=0 then
- response.write "对不起,会员系统暂不开放!<br/>"
- end if
- yz=request("yz")
- yz1=Request("yz1")
- if yz<>yz1 then
- response.redirect "wapls_404.asp?id=9"
- end if
- dim Password,PwdConfirm,id
- Password=request.form("Password")
- PwdConfirm=request.form("PwdConfirm")
- id=request.form("id")
- dim sqlReg,rsReg
- sqlReg="select * from wapls_user where user_id="&id
- set rsReg=server.createobject("adodb.recordset")
- rsReg.open sqlReg,conn,1,3
- if rsReg.bof and rsReg.eof then
- rsReg.close
- set rsReg=nothing
- response.redirect "wapls_404.asp?id=2"
- if len(Password)<6 then
- response.redirect "wapls_404.asp?id=21"
- end if
- if Password<>PwdConfirm then
- response.redirect "wapls_404.asp?id=22"
- end if
- else
- rsReg("password")=md5(Password)
- rsReg.update
- rsReg.close
- set rsReg=nothing
- response.write "密码成功!<br/>"
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
- else
- response.write "----------<br/>"
- end if
- end if
- else
- Response.write "<card id='index' title='密码修改'>"
- Response.write "<p align='"&const1&"'>"
- sql="select * from wapls_user where name='"&session("name")&"'"
- set rs=server.createobject("adodb.recordset")
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- response.write"无此用户"
- else
- %>
- 新的密码:*<br/><input type="password" name="pass<%=minute(now)%><%=second(now)%>" maxlength="8"/><br/>
- 确认密码:*<br/><input type="password" name="Pwd<%=minute(now)%><%=second(now)%>" maxlength="8"/><br/>
- 验证号码:*<br/><input name="yz<%=minute(now)%><%=second(now)%>" format="*N" maxlength="4" size="8"/> <%=s%><br/>
- <anchor>[提交注册]<go href="?Action=editPass" method='post'>
- <postfield name="password" value="$(pass<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="PwdConfirm" value="$(Pwd<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz" value="$(yz<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz1" value="<%=s%>"/>
- <postfield name="id" value="<%=rs("user_id")%>"/>
- <postfield name="editPass" value="true"/>
- </go></anchor><br/>
- <%
- rs.close
- set rs=nothing
- end if
- end if
- Response.Write "<a href='?Action=main'>[控制面板]</a>"
- end Function
- '========会员注册声明=======
- Function add
- Response.write "<card id='index' title='会员注册'>"
- Response.write "<p align='"&const1&"'>"
- %>
- 继续注册前请先阅读【<%=wapname%>】网站协议<br/>
- <br/><%=outHTM(user_add)%><br/><br/>
- <a href="?Action=reg">我同意</a>|<anchor><prev/>不同意</anchor><br/>
- <%
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/>"
- else
- response.write "----------"
- end if
- end Function
- %><br/><a href="index.asp">[返回首页]</a>
- <!--#include file="wapls_down.asp"-->