📄 login.asp
字号:
<!-- #include file="include/skin.asp" -->
<!-- #include file="include/jk_md5.asp" -->
<!-- #include file="include/jk_ip_stop.asp" -->
<%
dim useripstop,ipopen,iplock,iplock2,username
useripstop=0
sql="select * from jk_stopip where s_ip='"&user_ip&"'"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
iplock=rs("s_style")
iplock2=rs("s_yj_stop")
end if
rs.close
if action="logout" then
if symbol_name(login_username) then
call joekoe_cms.exec("delete from user_login where l_username='"&login_username&"'",0)
end if
call cookies_clear(1)
dim o_url
o_url=trim(request.servervariables("http_referer"))
if instr(o_url,"login.asp")>0 or instr(o_url,"user_")>1 or o_url="" then o_url="./"
call format_redirect(o_url)
end if
if login_username<>"" and login_password<>"" then
call format_redirect("user_main.asp")
end if
index_url="user_main"
tit_fir=format_menu(index_url)
tit="用户登陆"
call web_head(0,0,2,0,0)
%>
<table border=0 cellspacing=0 cellpadding=0>
<tr><td><img src='skin/<%response.write joekoe_cms.web_skin%>/main/user_login_main.gif' border=0><td></tr>
<tr><td align=center height=150 background='skin/<%response.write joekoe_cms.web_skin%>/main/user_login_bg.gif'>
<%
ipopen=int(format_mid_num(33))
select case action
case "login_chk"
call login_chk()
case else
call login_main()
end select
%>
<td></tr>
<tr><td><img src='skin/<%response.write joekoe_cms.web_skin%>/main/user_login_end.gif' border=0><td></tr>
</table>
<script language=JavaScript src='style/softkeyboard.js'></script>
<script>
window.onload=
function ()
{
password1=null;
initCalc();
Load();
}
</script>
<%
call web_end(0,0)
sub login_main()
if iplock<>0 or iplock2<>0 then
call user_ip_stop1(1)
end if
if useripstop=0 then
dim old_url
old_url=trim(request.querystring("old_url"))
if var_null(old_url)<>"" then
old_url="&old_url="&server.urlencode(old_url)
response.write "<font class=red>请先注册并登陆本站再浏览前一页面</font>"
end if
%>
<table border=0 cellspacing=0 cellpadding=0 width='70%'>
<form name=login_frm method=post action='login.asp?action=login_chk<%response.write old_url%>' onsubmit="return login_true()">
<tr><td align=center height=25>用户名称: <input type=text name=username size=15 maxlength=20 tabindex=1></td></tr>
<tr><td align=center>登陆密码: <input type=password name=password size=15 maxlength=20 tabindex=2<%if int(format_mid_num(46))=0 then%> readOnly onKeyDown="Calc.password.value=this.value" onChange="Calc.password.value=this.value" onclick="password1=this;showkeyboard();this.readOnly=1;Calc.password.value=''"<%end if%>></td></tr>
<tr><td align=center height=25 align=center><input type=checkbox id=id_memery_info name=memery_info value='yes'> <label for=id_memery_info id=label_memery_info>记住本次登陆</label> <input type=image src='skin/<%response.write joekoe_cms.web_skin%>/main/user_login_button.gif' border=0 align=absmiddle></td></tr>
<tr><td align=center>
<table border=0>
<tr>
<td><a href='register.asp'><img src='images/index/user_register.gif' border=0></a></td>
<td width=10></td>
<td><a href='user_getpass.asp'><img src='images/index/user_getpass.gif' border=0></a></td>
</tr>
</table>
</td></tr>
<tr><td height=10></td></tr>
<tr><td align=center><a href='register.asp?action=resend'>重新发送一次我的注册验证邮件!</a></td></tr>
</form>
</table>
<%
end if
end sub
sub login_chk()
if iplock<>0 or iplock2<>0 then
call user_ip_stop1(1)
end if
if useripstop=0 then
dim password,gname,found_err,id,power,abate,hidden,face,old_url,num,startim,endtim,s_id
old_url=var_null(request.querystring("old_url"))
if symbol_name(login_username)=true then
username=login_username
else
username=trim(request.form("username"))
end if
if symbol_ok(login_password)=true then
password=login_password
else
password=trim(request.form("password"))
password=jk_md5(password,"short")
end if
found_err=""
if symbol_name(username)=false then
found_err=found_err&"+您输入的 <font class=red>用户名称</font> 为空或不符合相关规则!<br>"
end if
if symbol_ok(password)=false then
found_err=found_err&"+您输入的 <font class=red2>登陆密码</font> 为空或不符合相关规则!<br>"
end if
if found_err="" then
sql="select top 1 id,username,u_ip,power,abate,hidden from user_data where username='"&username&"' and password='"&password&"'"
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
if ipopen=1 then
found_err=found_err&"+您输入的 <font class=red>用户名称</font> 和 <font class=red>登陆密码</font> 有错误!<br>" & _
found_err&"+请重新输入以并继续登陆本站!"
response.write found_error(found_err,260)
rs.close
exit sub
else
call user_ip_stop2(0)
end if
else
username=rs("username")
power=rs("power")
abate=rs("abate")
hidden=rs("hidden")
'--------------------------------用户登陆IP限制开始----------------------------------------
if rs("u_ip")="" then
else
if rs("u_ip")<>joekoe_cms.ip_sys(0) then
response.write"<script>alert('您现在登陆的用户帐号为"&username&",登陆IP是"&joekoe_cms.ip_jks(0)&"。\n\n该帐号已经指定为IP是"&rs("u_ip")&"的用户登录。系统禁止同一帐号同时在不同IP多次登陆!\n\n如需修改指定IP,请及时与管理员"&web_dim(3)&"(E_mail:"&web_dim(4)&")联系。');window.close(); </script>"
response.end
end if
end if
'--------------------------------用户登陆IP限制结束----------------------------------------
if hidden=true and abate=false then
call user_dl_cf()
if usercf=1 then
exit sub
else
response.cookies(joekoe_cms.web_cookies)("time_load")=DateAdd("s",-5,joekoe_cms.now_time)
response.cookies(joekoe_cms.web_cookies)("login_username")=username
response.cookies(joekoe_cms.web_cookies)("login_password")=jk_encrypt(password)
sql="update user_data set last_tim='"&joekoe_cms.now_time&"',login_num=login_num+1,last_ip='"&joekoe_cms.ip_sys(0)&"' where username='"&username&"'"
call joekoe_cms.exec(sql,0)
gname=request.cookies(joekoe_cms.web_cookies)("guest_name")
gname=joekoe_cms.code_html(gname,1,0)
if var_null(gname)<>"" then
call joekoe_cms.exec("delete from user_login where l_username='"&gname&"'",0)
end if
if trim(request.form("memery_info"))="yes" then
response.cookies(joekoe_cms.web_cookies)("iscookies")="yes"
end if
if old_url<>"" then
rs.close
call format_redirect(old_url)
end if
if trim(request.form("re_log"))="yes" or trim(request.servervariables("http_referer"))<>"" then
rs.close
call format_redirect(request.servervariables("http_referer"))
end if
response.write "<meta http-equiv='refresh' content='"&dim_num(21)&"; url="&index_url&".asp'><br><br><br>你好,<font class=red>"&username&"</font> 你现在是 <font class=red>"&format_power(power,1)&"</font> 登陆模式<br><br>" & _
vbcrlf & "<a href='user_main.asp'>进入用户中心</a> ┋ <a href='login.asp?action=logout'>退出本次登陆</a><br><br><br>"
end if
else
if abate=true then
response.write "<font class=red>您的计时用户帐号已过期!</font><br><br>请与网站管理员联系申请续费计时。"
else
response.write "<font class=red>您的用户帐号还未审核!</font><br><br>请与查收您在注册时的电子邮箱并确认您的注册信息。"
end if
end if
end if
else
call user_ip_stop2(0)
end if
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -