⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usersetup.asp

📁 BBS源码 利用ASP的一个功能齐全的BBS论坛源码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	Sign=Left(BBS94KK.Fun.HtmlCode(BBS94KK.Fun.GetStr("Sign")),255)
	PicH=BBS94KK.Fun.GetStr("PicH")
	PicW=BBS94KK.Fun.Getstr("PicW")
	If BBS94KK.BbsCache(26)=1 And Instr(PicUrl,"://")>0 Then BBS94KK.GotoErr(38)'禁止外部图片
	If PicUrl="" then
		PicUrl="headpic/"& HeadPic &".gif"
		PicW= BbsCache(21)
		PicH= BbsCache(22)
	End If
	If (QQ<>"" And not isnumeric(QQ)) Or (IsQQpic="1" and QQ="") then BBS94KK.GoToErr(34)
	If Len(Mail)>50 or Len(HeadPic)>220 or Len(QQ)>20 or Len(Home)>250 or Len("Honor")>16 Then BBS94KK.GoToErr(49)
	If Not isnumeric(PicW) or Not isnumeric(PicH) Then BBS94KK.GoToErr(47)
	If Int(PicW)>int(BBS94KK.BbsCache(20)) or int(PicH)>int(BBS94KK.BbsCache(20)) then
		PicW=BBS94KK.BbsCache(21)
		PicH=BBS94KK.BbsCache(22)
	End If
	If Not isdate(Birthday) then
		Birthday="Birthday=null"
		Else
		Birthday="Birthday='"&Birthday&"'"
		Cache.Name="Birthday"
		Cache.clean()
	End If
		BBS94KK.execute("update [KK_User] set "&Birthday&",Sex="&Sex&",PicW="&PicW&",PicH="&PicH&",Mail='"&Mail&"',QQ='"&QQ&"',Honor='"&Honor&"',Pic='"&PicUrl&"',Home='"&Home&"',Sign='"&Sign&"',IsQQpic="&IsQQpic&" where name='"&BBS94KK.MyName&"' And Password='"&BBS94KK.MyPwd&"'")
	Caption="修 改 成 功"
	Content="<div style='margin:15;line-height: 150%'><li>资料修改成功!<li><a href=UserInfo.asp>返回我的用户控制面版</a><li><a href=index.asp>返回首页</a></div>"
	Session(BBS94KK.CacheName & "MyInfo") = Empty
	Call BBS94KK.ShowTable(Caption,Content)
End Sub

Sub MyPassword
	Dim Caption,Content
	Call BBS94KK.Head("修改密码")
	MyManager()
	Caption="修改密码"
	Content="<form style='margin:0' method='POST' action='?action=SaveMyPassword' name='form'>"&_
	"<br><table align='center' width='97%' border='0' cellpadding='0' cellspacing='5' bgcolor='#FFFFFF' style='border-right: #BCBCBC 2px solid; border-bottom: #BCBCBC 2px solid;border-top: #e8e8e8 1px solid; border-left: #e8e8e8 1px solid;'><tr><th align='left' height='25' bgcolor='#E8E8E8' colspan=3>&nbsp;<img src='Images/inn.gif' align='absmiddle'> <b>修改密码</b></th></tr><tr><td>"&_
	"<table width=98% align='center' border=1 rules=rows frame=void style='border-collapse: collapse;'>"&_
	"<tr><td width='50%'><b>旧密码确认</b>:<br>请输入旧密码进入确认</td><td><input type='password' name='Password' size='30' maxlength='20'></td></tr><tr><td><b>新的密码(最多14位)</b>:<br>请使用除“'”和“|”以及中文以外的字符</td><td width='50%'><input type='password' name='NewPassword' size='30' maxlength='20'></td></tr><tr><td><b>重复密码</b>:<br>请再输一遍确认</td><td><input type='password' name='RePassword' size='30' maxlength='20'></td></tr>"&_
	"<tr><td colspan='2' height='30' align='center'><input type='submit' value='确定修改!'>&nbsp;&nbsp; <input type=reset value='取消重置!'></td></tr></table></td></tr></table><br></form>"
	Call BBS94KK.ShowTable(Caption,Content)
End Sub

Sub SaveMyPassword
	Dim Password,NewPassword,RePassword,Caption,Content
	BBS94KK.Fun.CheckMake'禁止外部提交
	Call BBS94KK.Head("修改密码")
	MyManager()
	Password=BBS94KK.Fun.GetStr("Password")
	NewPassword=BBS94KK.Fun.GetStr("NewPassword")
	RePassword=BBS94KK.Fun.GetStr("RePassword")
	If Password="" or Repassword="" or NewPassword="" Then BBS94KK.GoToErr(32)	
	If Repassword<>NewPassword Then BBS94KK.GoToErr(31)
	If Not BBS94KK.Fun.CheckPassword(Password) Or Not BBS94KK.Fun.CheckPassword(NewPassword) Then BBS94KK.GoToErr(28)
	If BBS94KK.Fun.StrLength(NewPassword)>14 Then BBS94KK.GoToErr(29)
	If md5(Password)<>BBS94KK.MyPwd Then BBS94KK.GoToErr(39) 	
	IF instr("|123456789|1234|12345|123456|1234567|12345678|aaaa|1111|2222|3333|8888|","|"& NewPassword &"|")>0 or len(NewPassword)<4 Then BBS94KK.GoToErr(33)
	BBS94KK.execute("update [KK_user] set [password]='"&Md5(Newpassword)&"' where name='"&BBS94KK.MyName&"'")
	BBS94KK.execute("update [KK_admin] set [password]='"&Md5(Newpassword)&"' where name='"&BBS94KK.MyName&"'")	
	Response.Cookies(BBS94KK.CookiesName)("MyPwd")=Md5(NewPassword)
	Caption=" 修 改 成 功"
	Content="<div style='margin:15;line-height: 150%'><li>你的密码修改成功!<li><a href=UserInfo.asp>返回我的用户控制面版</a><li><a href=index.asp>返回首页</a></div>"
	Call BBS94KK.ShowTable(Caption,Content)
End Sub

Sub ForgetPassword
	Dim UserName,Caption,Content
	Call BBS94KK.Head("找回密码")
	Caption="找回密码"
	UserName=BBS94KK.Fun.GetStr("UserName")
	If UserName="" Then
	Content="<form style='margin:0' method='POST'>"&_
	"<br><table align='center' width='97%' border='0' cellpadding='0' cellspacing='5' bgcolor='#FFFFFF' style='border-right: #BCBCBC 2px solid; border-bottom: #BCBCBC 2px solid;border-top: #e8e8e8 1px solid; border-left: #e8e8e8 1px solid;'><tr><th align='left' height='25' bgcolor='#E8E8E8' colspan=3>&nbsp;<img src='Images/inn.gif' align='absmiddle'> 找回密码</td></tr><tr><td>"&_
	"<table width=98% align='center' border=1 rules=rows frame=void>"&_
	"<tr><td width='50%'><b>您的用户名:</b><br>请输入注册的用户名称进入确认</td><td><input type='text' name='UserName' size='30' maxlength='20'></td></tr>"&_
	"<tr><td colspan='2' height='30' align='center'><input type='submit' value='确定!'>&nbsp;&nbsp; <input type=reset value='重置!'></td></tr></table></td></tr></table><br></form>"
	Else
	BBS94KK.Fun.CheckMake'禁止外部提交
	If Not BBS94KK.Fun.CheckName(UserName) Then BBS94KK.GoToErr(28)
	If BBS94KK.execute("select name from [KK_User] where name='"&UserName&"'").eof Then BBS94KK.GoToErr(51) 
	Content="<form style='margin:0' method='POST' action='?Action=GetPassword'>"&_
	"<br><table align='center' width='97%' border='0' cellpadding='0' cellspacing='5' bgcolor='#FFFFFF' style='border-right: #BCBCBC 2px solid; border-bottom: #BCBCBC 2px solid;border-top: #e8e8e8 1px solid; border-left: #e8e8e8 1px solid;'><tr><td height='25' bgcolor='#E8E8E8' colspan=3>&nbsp;<img src='Images/inn.gif' align='absmiddle'> <b>找回密码</b></td></tr><tr><td>"&_
	"<table width=98% align='center' border=1 rules=rows frame=void style='border-collapse: collapse;'>"&_
	"<tr><td width='50%'><b>用户名称:</b></td><td><input name='UserName' type='hidden' value='"&UserName&"'><b>"& UserName &"</b></td></tr><tr><td><b>密码问题:</b><br>请输入您在注册时填写的提示问题</td><td width='50%'><input type='text' name='Clue' size='30' maxlength='20'></td></tr><tr><td><b>问题答案:</b><br>请输入您在注册时填写的问题答案</td><td><input type='text' name='Answer' size='30' maxlength='20'></td></tr>"&_
	"<tr><td colspan='2' height='30' align='center'><input type='submit' value='确定!'>&nbsp;&nbsp; <input type=reset value='重置!'></td></tr></table></td></tr></table><br></form>"
	End If
	Call BBS94KK.ShowTable(Caption,Content)
End Sub

Sub GetPassword
	Dim UserName,Clue,Answer,Caption,NewPassword,Content
	BBS94KK.Fun.CheckMake'禁止外部提交
	Call BBS94KK.Head("找回密码")
	If BBS94KK.GetCookiesInfo("Forge",0)>2 Then BBS94KK.GoToErr(54)
	UserName=BBS94KK.Fun.GetStr("UserName")
	Clue=BBS94KK.Fun.GetStr("Clue")
	Answer=BBS94KK.Fun.GetStr("Answer")
	If UserName="" or Clue="" or Answer="" Then BBS94KK.GoToErr(32)
	If Not BBS94KK.Fun.CheckName(UserName) Then BBS94KK.GoToErr(28)
	If not BBS94KK.Fun.CheckIn(Clue) or not BBS94KK.Fun.CheckIn(Answer) Then BBS94KK.GoToErr(52)	
	If BBS94KK.execute("select name from [KK_User] where name='"&UserName&"'").eof Then BBS94KK.GoToErr(51) 
	IF BBS94KK.execute("select name from [KK_User] where name='"&UserName&"' And Answer='"&Md5(Answer)&"' And Clue='"&Clue&"'").eof  Then
		BBS94KK.GoToErr(53)
	Else
		Randomize
		NewPassword=int(90000*rnd)+10000
		BBS94KK.execute("update [KK_user] set [password]='"&Md5(NewPassword)&"' where name='"&UserName&"'")
		BBS94KK.execute("update [KK_admin] set [password]='"&Md5(NewPassword)&"' where name='"&UserName&"'")	
		Caption="成功通过验证"
		Content="<div style='margin:15;line-height: 150%'><li>您成功的通过密码保护的检验!<li>用户名称:<font color=red>"&UserName&"</font> &nbsp; 获得新密码:<font color=red>"&NewPassword&"</font><li>先记住新密码,请您马上登陆论坛,尽快修改密码!</div>"
		Call BBS94KK.ShowTable(Caption,Content)
		Response.Write BBS94KK.Template.ReadTemplate("用户登陆")
	End If	
End Sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -