%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
dim king,action:action=request("action")
set king=new kingcms
king.head 0,0
select case action
case"" :king_def()
end select
king_outhtm
set king=nothing
'def *** *** www.KingCMS.com *** ***
sub king_def()
dim re:re=request.servervariables("http_referer")
dim userlicense
if llll("re")<>"" then re=llll("re")
if re="" then re="/"
select case llll("submits")
case""
if king.id>0 then
kingtitle=king.lang("login/loginok")
kingguide=king.guide(0)&kingtitle
ol="
"
else
kingtitle=king.lang("reg/license")
kingguide=king.guide(0)&kingtitle
userlicense=conn.execute("select userlicense from kingsystem where systemname='KingCMS';")(0)
ol=""
end if
case king.lang("reg/license/no")'不接受协议,就退到上一页
response.redirect re
case king.lang("reg/license/ok"),king.lang("reg/submit")
kingtitle=king.lang("reg/info")
kingguide=king.guide(0)&kingtitle
dim data,sql:sql="username,userpass,usermail,userquestion,useranswer,userbirthday"'5
dim dataform,i,selected,rs
dim keepname:keepname=true
dataform=split(sql,",")
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
set rs=conn.execute("select keepusername from kingsystem where systemname='KingCMS';")
if not rs.eof and not rs.bof then
if len(data(0))>0 then
dim keepnames
keepnames=split(rs(0),",")
for i=0 to ubound(keepnames)
if len(trim(keepnames(i)))>0 then
if instr(lcase(data(0)),lcase(keepnames(i)))>0 then
keepname=false
end if
end if
next
end if
end if
set rs=nothing
ol=""
'save
'sql="username,userpass,usermail,userquestion,useranswer,userbirthday"'5
if llll(l1l(left(ll11l("111"),16)))=l1l(ll11l("111")) and king.checkerr then
dim userpass,userkey,pheight,pwidth,ojpeg,useractivate'激活码
userkey=llIl(6)
userpass=lll("userpass")
userpass=md5(userpass&userkey,1)
useractivate=llIl(16)
pwidth=98:pheight=98
if lIIl("Persits.Jpeg") and cstr(king_jpeg)="1" and lllll("image/face/0.gif") then
set ojpeg=server.createobject("persits.jpeg")'调用组件
ojpeg.open server.mappath("image/face/0.gif")
pwidth=ojpeg.originalwidth:pheight=ojpeg.originalheight
if II11(pwidth,2) and II11(pheight,2) then'判断是否为数字
if fix(pwidth)>128 or fix(pheight)>128 then
if fix(pwidth)>=fix(pheight) then
pwidth=128
pheight=pheight*128/ojpeg.originalwidth
else
pheight=128
pwidth=pwidth*128/ojpeg.originalheight
end if
end if
else
pwidth=98:pheight=98
end if
set ojpeg=nothing
end if
conn.execute "insert into kinguser ("&sql&",joindate,userkey,userlanguage,userphoto,userwidth,userheight,useractivate) values ('"&lll("username")&"','"&userpass&"','"&lll("usermail")&"',"&lll("userquestion")&",'"&lll("useranswer")&"','"&lll("userbirthday")&"','"&tnow&"','"&userkey&"','"&king_lang&"','"&king.inst&king.path&"/image/face/0.gif"&"',"&pwidth&","&pheight&",'"&useractivate&"');"
kingtitle=king.lang("reg/ok")
kingguide=king.guide(0)&kingtitle
ol="