<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% dim king,action:action=request("action") set king=new kingcms king.head 0,0 select case action case"" king_def case"logout" king_logout case"forget" king_forget case"activate" king_activate case"youactivate" king_youactivate case else king.error("system/error") end select king_outhtm set king=nothing 'def *** *** www.KingCMS.com *** *** sub king_def() kingtitle=king.lang("login/title2") kingguide=king.guide(0)&king.lang("login/login") if king.id>0 then king_loginok else king_login end if end sub 'loginok *** *** www.KingCMS.com *** *** sub king_loginok() kingtitle=king.lang("login/loginok"):kingguide=king.guide(0)&""&king.lang("user/center")&" >> "&kingtitle ol="
"&king.ubar()&"
"&king.lang("login/loginok")&"

" ol=ol&king.lang("login/ok|name:"&king.name)&" ["&king.lang("login/logout")&"]

" ol=ol&"
" end sub 'login *** *** www.KingCMS.com *** *** sub king_login() dim username,userhidden,checked,validity,selected,islogin,isuser,ispass,re username=llll("username") userhidden=llll("userhidden") validity=llll("validity") re=request.ServerVariables("http_referer") if llll("re")<>"" then re=llll("re") if re="" then re="user.asp" islogin=true isuser=true ispass=true if validity="" then validity="7" if userhidden="" then userhidden="1" '登录验证 if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) then dim userpass,userkey,rs if session("loginerror")<>"" then if datediff("s",session("loginerror"),tnow)<15 then islogin=false end if end if set rs=conn.execute("select userkey,userpass,useractivate from kinguser where username='"&lll1(username)&"' and userlock=0 and userdel=0;") if not rs.eof and not rs.bof then userkey=rs(0) userpass=lll("userpass") if len(userkey)>0 then userpass=md5(userpass&userkey,1) else userpass=md5(userpass,0)'16位加密 end if '进行比较 if userpass=rs(1) then if islogin then'必须到时后才可以验证 dim newkey :newkey=left(userpass,6) dim newpass :newpass=md5(lll("userpass")&newkey,1) conn.execute "update kinguser set userkey='"&newkey&"',userpass='"&newpass&"',userlogins=userlogins+1,lastlogin='"&tnow&"',lastip='"&king.ip&"' where username='"&username&"';" ' dim server_name:server_name=lcase(request.servervariables("server_name")) ' if left(server_name,4)="www." then server_name=right(server_name,len(server_name)-4) '写cookies response.cookies("user"&king_key)("name")=username response.cookies("user"&king_key)("pass")=md5(newkey&left(newpass,4)&king_salt,1)'newpass if cdbl(validity)>0 then response.cookies("user"&king_key).expires=now+validity end if '登陆成功 if cstr(rs(2))="ok" then ol="
"&king.lang("login/success")&"
" ol=ol&"

1) "&king.lang("back/home")&"

" ol=ol&"

2) "&king.lang("back/bbshome")&"

" ol=ol&"

3) "&king.lang("back/user")&"

" ol=ol&"

4) "&re&"

" ol=ol&"

5) "&king.lang("login/logout1")&"

" ol=ol&"
" exit sub else response.redirect "login.asp?action=activate"'需要输入激活码 end if end if else ispass=false'密码错误时,激活session session.timeout=2 session("loginerror")=tnow end if else isuser=false end if set rs=nothing end if ol="
" ol=ol&"
"&king.lang("login/title2")&"
" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"
"&king.lang("user/name")&" "'会员名 ol=ol&""&king.lang("login/noreg")&"" ol=ol&king.check("username|6|reg/tip/username1|"&king_user_min&"-"&king_user_max&";username|11|reg/tip/username2;username|9|reg/tip/username3|select count(userid) from kinguser where username='$pro$' and (userlock=1 or userdel=1);"&isuser&"|13|login/tip/isuser") ol=ol&"
"&king.lang("user/pass")&" "&session("loginerr")'密码 ol=ol&""&king.lang("login/forget")&"" ol=ol&king.check("userpass|6|admin/tip/pass1size|6-30;"&islogin&"|13|login/tip/islogin;"&ispass&"|13|login/tip/ispass") ol=ol&"
"&king.lang("login/cookies")&""'cookies ol=ol&"" ol=ol&"
"&king.lang("login/hidden")&""'登录方式 if cstr(userhidden)="1" then checked=" checked=""checked""" else checked="" ol=ol&" "&king.lang("login/hidden/on") if cstr(userhidden)="0" then checked=" checked=""checked""" else checked="" ol=ol&" "&king.lang("login/hidden/off") ol=ol&"
" ol=ol&"
" ol=ol&"" ol=ol&"" ol=ol&" " ol=ol&"" ol=ol&"
" ol=ol&"
" if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) and king.checkerr then response.redirect re end sub 'forget *** *** www.KingCMS.com *** *** sub king_forget() kingtitle=king.lang("login/forget"):kingguide=king.guide(0)&kingtitle dim data,dataform,i,usercode'usercode:验证码 dim selected,sql,rs sql="username,usermail,userbirthday,userquestion,useranswer"'4 dataform=split(sql,",") usercode=session("usercode") redim data(ubound(dataform)) if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) then for i=0 to ubound(dataform) data(i)=llll(dataform(i)) next end if ol="
" ol=ol&"
"&kingtitle&"
" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"" ' sql="username,usermail,userbirthday,userquestion,useranswer"'4 if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) and king.checkerr then set rs=conn.execute("select "&sql&",userkey from kinguser where username='"&lll("username")&"' and usermail='"&lll("usermail")&"' and userbirthday='"&lll("userbirthday")&"' and userquestion="&lll("userquestion")&" and useranswer='"&lll("useranswer")&"' and userdel=0 and userlock=0;") if not rs.eof and not rs.bof then ol="" ol=ol&"
"&king.lang("user/pass/new")&"
" ol=ol&"
"&king.lang("user/name")&" (2-30)" ol=ol&king.check("username|6|reg/tip/username1|"&king_user_min&"-"&king_user_max&";username|11|reg/tip/username2;username|9|reg/tip/username3|select count(userid) from kinguser where username='$pro$' and (userlock=1 or userdel=1)") ol=ol&"
"&king.lang("user/mail")&"" ol=ol&king.check("usermail|6|reg/tip/usermail|1-100;usermail|4|reg/tip/usermail") ol=ol&"
"&king.lang("user/birthday")&" (1995-08-15)" ol=ol&king.check("userbirthday|8|reg/tip/userbirthday|^(19"&chr(3)&"$king124"&chr(2)&"20)\d{2}\-(0[1-9]{1}"&chr(3)&"$king124"&chr(2)&"1[0-2]{1})\-([012]{1}[1-9]{1}"&chr(3)&"$king124"&chr(2)&"3[01]{1})$") ol=ol&"
"&king.lang("user/question")&""'安全提问 ol=ol&"" ol=ol&king.check("userquestion|2|reg/tip/userquestion")&"
"&king.lang("user/answer")&"" ol=ol&king.check("useranswer|6|reg/tip/useranswer|1-50") ol=ol&"
" ol=ol&"" ol=ol&"" ol=ol&"" '密码输入通过后保存新的密码 if king.checkerr then dim newkey :newkey=llIl(6) dim newpass :newpass=md5(lll("pass1")&newkey,1) conn.execute "update kinguser set userkey='"&newkey&"',userpass='"&newpass&"' where username='"&lll("username")&"';" '写cookies response.cookies("user"&king_key)("name")=lll("username") response.cookies("user"&king_key)("pass")=md5(newkey&left(newpass,4)&king_salt,1)'newpass response.cookies("user"&king_key).expires=now+7 response.redirect "user.asp" end if else ol=ol&"" end if set rs=nothing end if ol=ol&"
"&king.lang("user/name")&""&data(0)&"" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"
"&king.lang("user/pass/new1")&"" ol=ol&king.check("pass1|7|admin/tip/comppass|pass2;pass1|6|admin/tip/pass1size|6-30") ol=ol&"
"&king.lang("user/pass/new2")&"
"&king.lang("user/tip")&""&king.lang("user/tip/not")&"
" ol=ol&"
" ol=ol&"" ol=ol&" " ol=ol&"" ol=ol&"
" ol=ol&"
" end sub 'youactivate *** *** www.KingCMS.com *** *** sub king_youactivate() kingtitle=king.lang("user/activate/re"):kingguide=king.guide(0)&""&king.lang("user/center")&" >> "&kingtitle dim rs,isactivate isactivate=false if king.id=0 then king.error("login/level") if conn.execute("select count(userid) from kinguser where userid="&king.id&" and useractivate='ok' and userlock=0 and userdel=0;")(0)=1 then king.error("login/tip/activateok") exit sub end if ol="
" ol=ol&"
"&kingtitle&"
" ol=ol&"" if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) then'数据提交 set rs=conn.execute("select useractivate from kinguser where userid="&king.id&" and username='"&lll("username")&"' and usermail='"&lll("usermail")&"' and userlock=0 and userdel=0;") if not rs.eof and not rs.bof then ol=ol&"" isactivate=true end if set rs=nothing end if if isactivate=false then ol=ol&"" ol=ol&"" end if ol=ol&"
"&king.lang("user/activate")&"
"&king.lang("user/name")&"
"&king.lang("user/mail")&"" ol=ol&king.check(isactivate&"|13|reg/tip/mail") ol=ol&"
" if isactivate=false then ol=ol&"
" ol=ol&"" ol=ol&" " ol=ol&"" ol=ol&"
" end if ol=ol&"
" end sub 'activate *** *** www.KingCMS.com *** *** sub king_activate() kingtitle=king.lang("activate/input"):kingguide=king.guide(0)&""&king.lang("user/center")&" >> "&kingtitle dim useractivate,rs if king.id=0 then king.error("login/level") if conn.execute("select count(userid) from kinguser where userid="&king.id&" and useractivate='ok' and userlock=0 and userdel=0;")(0)=1 then king.error("login/tip/activateok") exit sub end if useractivate=llll("useractivate") if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) then'数据提交 set rs=conn.execute("select useractivate from kinguser where userid="&king.id&" and userlock=0 and userdel=0;") if not rs.eof and not rs.bof then if cstr(rs(0))=cstr(useractivate) then conn.execute "update kinguser set useractivate='ok' where userid="&king.id&";" ol="
"&king.ubar()&"
"&king.lang("user/activate/ok")&"
" ol=ol&"

"&king.lang("user/activate/welcome")&"

" ol=ol&"

1) "&king.lang("back/home")&"

" ol=ol&"

2) "&king.lang("back/user")&"

" ol=ol&"

3) "&king.lang("login/logout1")&"

" ol=ol&"
" exit sub else useractivate=rs(0) end if else ol=king.error("login/level") end if set rs=nothing end if ol="
" ol=ol&"
"&kingtitle&"
" ol=ol&"" ol=ol&"" ol=ol&"" ol=ol&"
"&king.lang("user/activate")&"" ol=ol&king.check("useractivate|12|login/tip/activate|"&useractivate) ol=ol&"

"&king.lang("user/activate/tip")&"

" ol=ol&"

"&king.lang("user/activate/forget")&"

" ol=ol&"
" ol=ol&"
" ol=ol&"" ol=ol&" " ol=ol&"" ol=ol&"
" ol=ol&"
" end sub 'logout *** *** www.KingCMS.com *** *** sub king_logout() response.cookies("user"&king_key)("name")="" response.cookies("user"&king_key)("pass")="" response.cookies("user"&king_key).expires=date-100 response.redirect("login.asp") end sub 'outhtm *** *** www.KingCMS.com *** *** sub king_outhtm()%> <%=kingtitle%>
动画创作家园  动画人最专业的动画理论网站。
<%=ol%>
动画创作家园QQ群①:2444514(满) QQ群②:15363563(满) QQ群③:48533909(满) QQ群④:44832229 (满) QQ群⑤:43100861 (满) QQ群⑥: 48773990 最佳分辨率 1024×768
维爱迪动画创作家园 京ICP备05049867号
如果您感觉动画创作家园不错,别忘了告诉您的朋友哦,朋友会感谢您的^_^
<%end sub%>