<% 
response.Expires=-1
on error resume next
%>
<!--#include virtual="/incs/config.asp"-->
<!--#include virtual="/incs/md5.asp" -->
<!--#include virtual="/incs/web_top.asp" -->
<%
dud_url=session("dud_url")
If SafeRequest("usrname")<>"" And SafeRequest("usrpass")<>""  Then
	yourname    =lcase(trim(SafeRequest("usrname")))
	yourpass= trim(SafeRequest("usrpass"))

   yourname=replace(yourname,"'","单引")
		screenwidth=SafeRequest("screenwidth")
		screenheight=SafeRequest("screenheight")
		l_dot=screenwidth&"*"&screenheight
	
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
browsestr=Request.ServerVariables("HTTP_USER_AGENT")
' 浏览器
if instr(browsestr,"NetCaptor") then
	l_vs="NetCaptor"
elseif instr(browsestr,"MSIE 6") then
	l_vs="MSIE 6.x"
elseif instr(browsestr,"MSIE 5") then
	l_vs="MSIE 5.x"
elseif instr(browsestr,"MSIE 4") then
	l_vs="MSIE 4.x"
elseif instr(browsestr,"Netscape") then
	l_vs="Netscape"
elseif instr(browsestr,"Opera") then
	l_vs="Opera"
else
	l_vs="Other"
end if
' 操作系统
if instr(browsestr,"Windows NT 5.0") then
	l_os="Win 2000"
elseif instr(browsestr,"Windows NT 5.1") then
	l_os="Win XP"
elseif instr(browsestr,"Windows NT") then
	l_os="Win NT"
elseif instr(browsestr,"Windows 9") then
	l_os="Win 9x"
elseif instr(browsestr,"unix") or instr(browsestr,"linux") or instr(browsestr,"SunOS") or instr(browsestr,"BSD") then
	l_os="Unix..."
elseif instr(browsestr,"Mac") then
	l_os="Mac"
else
	l_os="Other"
end if
' 访问者所在地区

l_ip=request.servervariables("remote_addr")
theip=transip(l_ip)
hrdip=l_ip
'''''''''''''''''自动封锁功能开始
query="select * from iplck where (l_ipnum<=" & theip & " and l_ipendnum>=" & theip & ")"
rs.Open query,conn,1,1
if not  rs.eof then '被锁
l_id=rs("l_id")
oldip=rs("l_ip")
hrdip=oldip
end if
rs.close
query="select * from iplck where (l_ipnum<=" & theip & " and l_ipendnum>=" & theip & ") and (l_sft=1 or l_hrd=1)"
rs.open query,conn,1,1
if rs.eof then
ckeerrs=clng(request.Cookies("hzhost")("loginerrs"))
if  (ckeerrs>=clng(pl_ipsfttms)) or (cheerrs>=clng(pl_iphrdtms)) then
    Response.Cookies("hzhost")("loginerrs") =0
    Response.Cookies("hzhost").path = "/"
    Response.Cookies("hzhost").expires =dateadd("yyyy",1,now())
	'call errorpage(-2,"您当前已成功 解除了IP锁定，请返回重新登录！")
end if
end if
rs.close
'''''############如果有软锁定过期，则解锁
if pl_ipsfttms<>"0"  then
query="select * from iplck where (l_ipnum<=" & theip & " and l_ipendnum>=" & theip & ") and l_sft=1"
rs.Open query,conn,1,1
if not  rs.eof then '被锁
l_id=rs("l_id")
oldlip=rs("l_ip")
l_exptme=rs("l_exptme")
l_errlgn=clng(rs("l_errlgn"))
if  l_exptme<=now() then '解锁
query="update iplck set l_sft=0   where  l_id="&l_id
conn.execute query,1,1
    Response.Cookies("hzhost")("loginerrs") =0
    Response.Cookies("hzhost").path = "/"
    Response.Cookies("hzhost").expires =dateadd("yyyy",1,now())
else 
'如果软封锁未过期，则判断硬封锁。  
ckeerrs=clng(request.Cookies("hzhost")("loginerrs"))
ckeerrs=clng(ckeerrs+1)
 Response.Cookies("hzhost")("loginerrs") =ckeerrs	
doresult=hardlock
 call errorpage(-2,"对不起，由于登录本系统连续失败次数过多，您的IP地址当前已被锁定！")
end if
end if
rs.close
end if
'''''''''''''''''自动解锁功能结束	

'''''''''''''''''检测IP所属地市	
query="select * from iplst where (ip1<=" & theip & " and ip2>=" & theip & ")"
rs.Open query,conn,1,1

if rs.EOF then
    l_prv="未知"     
else
    l_prv=trim(rs("ip_prv"))    
end if
rs.Close
'''''''增加登录记录
query="insert lgnlst(l_unme,l_agt,l_ip,l_addtme,l_os,l_vs,l_prv,l_ifok,l_dot) values('"&yourname&"','','"&l_ip&"',getdate(),'"&l_os&"','"&l_vs&"','"&l_prv&"',0,'"&l_dot&"')"
conn.execute query,1,1
findlastid logid

if pl_ifsecnum="1" then 
usrverify=SafeRequest("usrverify")
if  usrverify="" then
    call errorpage(-2,"对不起，请输入验证码！")
elseif trim(usrverify)<>cstr(Session("loginnumber"))  then
    call errorpage(-2,"对不起，验证码不符！")
end if
end if

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        recs=chk_usrpss(yourname,"登录名称",4,16)
        recs=chk_usrpss(yourpass,"登录密码",6,16)
		yourpass    = md5(yourpass)

	if yourname=pl_usrnme_gst or yourname=pl_usrnme_sys then
	call errorpage(-2,"对不起，该用户禁止登录！")
	end if
	

	rs.open "select * from memlst where u_nme='"& yourname&"' " ,conn,1,3
	If rs.eof And rs.bof Then
		rs.close
		conn.close
    call errorpage(-2,"对不起，您不是本站的合法用户，请返回(101)！")
	  else

	    if  trim(rs("u_pss"))<>trim(yourpass) then 
		
'''''''''''''''''自动封锁功能开始	
'''''读coolies
ckeerrs=clng(request.Cookies("hzhost")("loginerrs"))
ckeerrs=clng(ckeerrs+1)
 Response.Cookies("hzhost")("loginerrs") =ckeerrs	
'''''读coolies结束
''''如果达到软锁，则加入软锁开始 
if  clng(ckeerrs)>=clng(pl_ipsfttms)  and pl_ipsfttms<>"0" then
query="select * from memlst where u_nme='"&pl_usrnme_sys&"'"
rs1.open query,conn,1,1
if rs1.eof then
    call errorpage(-2,"对不起，意外错误(105)！")
end if
pl_usrpss_sys=trim(rs1("u_pss"))
rs1.close
if chk_int(l_id) then
   substrContent = "entryclass:sys2_mng"&VEnd
    substrContent =substrContent& "entrytype:lckip_sftedt"&VEnd
   substrContent =substrContent& "entryuser:"&pl_usrnme_sys&VEnd
   substrContent =substrContent& "entrypass:"&pl_usrpss_sys&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "l_ip:" &oldip& VEnd
   substrContent = substrContent & "l_sft:" &"1"& VEnd
   substrContent = substrContent & "." & VEnd
 doresult = hzsocket(substrContent)
    substrContent = "entryclass:sys2_mng"&VEnd
   substrContent =substrContent& "entrytype:lckip_exptmeedt"&VEnd
   substrContent =substrContent& "entryuser:"&pl_usrnme_sys&VEnd
   substrContent =substrContent& "entrypass:"&pl_usrpss_sys&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "l_ip:" &oldip& VEnd
   substrContent = substrContent & "l_exptme:" &dateadd("h",pl_ipsftday,now())& VEnd
   substrContent = substrContent & "." & VEnd
else
   substrContent = "entryclass:sys2_mng"&VEnd
   substrContent =substrContent& "entrytype:lckip_add"&VEnd
   substrContent =substrContent& "entryuser:"&pl_usrnme_sys&VEnd
   substrContent =substrContent& "entrypass:"&pl_usrpss_sys&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "l_ip:" &l_ip& VEnd
   substrContent = substrContent & "l_ipend:" &l_ip& VEnd
   substrContent = substrContent & "l_msk:" &"255.255.255.255"& VEnd
   substrContent = substrContent & "l_tpe:" &"1"& VEnd
   substrContent = substrContent & "l_exptme:" &dateadd("h",pl_ipsftday,now())& VEnd
   substrContent = substrContent & "." & VEnd
end if
doresult = hzsocket(substrContent)
if_addsft=true
end if
'''''硬封锁 
doresult=hardlock()
if doresult<>"" then
    call errorpage(-2,"对不起，您连续登录失败次数过多，已被系统自动锁定！")
end if
''''如果达到软锁，则加入软锁结束
'''''''''''''''''自动封锁功能结束	
		
		rs.close
		conn.close
    call errorpage(-2,"对不起，您不是本站的合法用户，请返回(102)！")
		elseif  rs("u_lck")=1 then
		call errorpage(-2,"对不起，该用户已被禁登录，请联系管理人员！")
		else
		
'''''''''''''''''自动封锁功能开始	
'''''写coolies为0
    Response.Cookies("hzhost")("loginerrs") =0
    Response.Cookies("hzhost").path = "/"
    Response.Cookies("hzhost").expires =dateadd("yyyy",1,now())
'''''写coolies为0结束
'''''''''''''''''自动封锁功能结束	

query="select c_nme from clslst where c_cls="&rs("u_prc")

rs1.open query,conn,1,1
		if rs1.recordcount<>1 then
		call errorpage(-2,"对不起，系统发生错误，请返回！")
		else
		levelname=trim(rs1("c_nme"))
		pwid=rs("u_pwr")
		rs("u_lgncnt")=clng(rs("u_lgncnt"))+1
		rs("u_lsttme")=now()
		rs("u_lstip")=request.servervariables("remote_addr")
		rs.update
		session("usrid")=rs("u_id")
		session("usrname")=trim(rs("u_nme"))
		session("usrpass")=yourpass
		session("usrclass")=clng(rs("u_prc"))
		session("sysclass")=rs("u_sys")
		session("sysrotnme")=rs("u_rotnme")
		session("sysare")=rs("u_are")
		tempstr=split(session("sysare"),",")
		tempstring=""
		for tempc=0 to ubound(tempstr)
		tempvar=trim(tempstr(tempc))
		if chk_int(tempvar) then
		if tempstring="" then
		tempstring="u_myare="&tempvar
		else
		tempstring=tempstring &" or u_myare="&tempvar
		end if
		end if
		next
   		if tempstring="" then
		tempstring=" 1=1 "
		end if
     session("sysarestr")=tempstring
		session("usrclassname")=levelname
		session("usremail")=rs("u_eml")
		rs.close
		query="select  pw_str,pw_nme from pwrlst where pw_id="&pwid
		rs.open query,conn,1,1
		if rs.recordcount=1 then
		session("syspower")=trim(rs("pw_str"))
                session("syspwrcls")=pwid
				session("syspwrnme")=trim(rs("pw_nme"))
		end if
		rs.close
		query="update lgnlst set l_ifok=1 where l_id="&logid
		conn.execute query,1,1
		conn.close
		response.write "<script language='javascript'>"+vbcrlf
        response.write "parent.location.href='/control/index.asp';"+vbcrlf
        response.write "</script>"
		'response.redirect "/control/"		
		response.end
		end if		
		rs1.close
		end if 
	End If
End If


function hardlock()
if  clng(ckeerrs)>=clng(pl_iphrdtms) and pl_iphrdtms<>"0" then
query="select * from memlst where u_nme='"&pl_usrnme_sys&"'"
rs1.open query,conn,1,1
if rs1.eof then
    call errorpage(-2,"对不起，意外错误(105)！")
end if
pl_usrpss_sys=trim(rs1("u_pss"))
rs1.close
if chk_int(l_id) or  if_addsft then
   substrContent = "entryclass:sys2_mng"&VEnd
   substrContent =substrContent& "entrytype:lckip_hrdedt"&VEnd
   substrContent =substrContent& "entryuser:"&pl_usrnme_sys&VEnd
   substrContent =substrContent& "entrypass:"&pl_usrpss_sys&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "l_ip:" &hrdip& VEnd
   substrContent = substrContent & "l_hrd:" &"1"& VEnd
   substrContent = substrContent & "." & VEnd
else
   substrContent = "entryclass:sys2_mng"&VEnd
   substrContent =substrContent& "entrytype:lckip_add"&VEnd
   substrContent =substrContent& "entryuser:"&pl_usrnme_sys&VEnd
   substrContent =substrContent& "entrypass:"&pl_usrpss_sys&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "l_ip:" &l_ip& VEnd
   substrContent = substrContent & "l_ipend:" &l_ip& VEnd
   substrContent = substrContent & "l_msk:" &"255.255.255.255"& VEnd
   substrContent = substrContent & "l_tpe:" &"2"& VEnd
   substrContent = substrContent & "l_exptme:" &dateadd("h",pl_ipsftday,now())& VEnd
   substrContent = substrContent & "." & VEnd
end if
doresult = hzsocket(substrContent)
else
doresult=""
end if
hardlock=doresult
end function		
%>

      <table cellspacing=0 cellpadding=0 width="100%" border=0>
        <tbody> 
        <tr> 
          <td colspan=2><img height=3 
            src="/imgs/spacer.gif" width=3></td>
        </tr>
        <tr> 
          
          
    <td width=438 
          background=/imgs/bg_inside_pages_link.jpg 
          height=30>&nbsp;<img height=11 
            src="/imgs/aword_square.gif" width=11 
            align=absMiddle> <a href="/">首 页</a> <strong>&gt;</strong> 会员登录</td>
          <td>&nbsp;</td>
        </tr>
        <tr> 
          <td colspan=2><img height=10 
            src="/imgs/shadow_inside_pages.jpg" 
        width=438></td>
        </tr>
        </tbody>
      </table>
 <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=top width=180 bgColor=#f3f3f3><IMG height=121 
            src="/imgs/s_eagle_server_single.jpg" width=180> </TD>
          <TD vAlign=top width=10 
          background=/imgs/bg_inside_pages_block.jpg><IMG 
            height=1 src="/imgs/bg_inside_pages_block.jpg" 
            width=10></TD>
          <TD vAlign=top align=right>
            <table cellspacing=2 cellpadding=0 width="100%" border=0>
              <tbody> 
              <tr> 
                <td class=clear colspan=2 valign="middle"><span class=enbold><strong>会员登录</strong></span></td>
              </tr>
              <tr> 
                <td class=clear colspan=2 valign="top"> <br>
                  <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <form action=/members/login.asp method=post name=reg_form><tr> 
                      <td> 
                          <table width="90%" border="0" cellspacing="1" cellpadding="1" align="center" bgcolor="#666666">
                            <tr bgcolor="#FFFFFF"> 
                              <td height="25" width="35%" align="center">&nbsp;&nbsp;登录名称</td>
                              <td> 
                                <input type="text" name="usrname" maxlength="16" class=dud_input1>
                              </td>
                            </tr>
                            
                            <tr bgcolor="#FFFFFF"> 
                              <td height="25" align="center">&nbsp;&nbsp;登录密码</td>
                              <td> 
                                <input type="password" name="usrpass" maxlength="16" class=dud_input1>
                                <input name=screenwidth value="" type=hidden>
                                <input name=screenheight value="" type=hidden>
                              </td>
                            </tr>
							<% if pl_ifsecnum="1" then %>
							<tr bgcolor="#FFFFFF"> 
                              <td height="25" width="35%" align="center">&nbsp;&nbsp;验证码</td>
                              <td> 
                                <input type="password" name="usrverify" size="5"   maxlength="4">&nbsp;<img  src="/incs/loginverify.asp">
                              </td>
                            </tr>
							<% end if %>
                          </table>
                        <div align="center"><br>
                            <input type="submit" name="Submit" value=" 登录 " class=dud_button1>
                            <input type="button" name="Submit22" value="注册新会员" class=dud_button1 onclick="javascript:location.href='/members/usr_reg.asp';">
                            <input type="button" name="Submit2" value="取回密码" class=dud_button1 onclick="javascript:location.href='/members/getpass.asp';">
                          </div>
                      </td>
                    <tr> 
                      <td>&nbsp;</td>
                    </tr></form>
                  </table>
                </td>
              </tr>
              <tr> 
                <td colspan=2></td>
              </tr>
              <tr> 
                <td class=clear colspan=2 valign="middle"><b>注册会员的好处<br>
                  <br>
                  </b></td>
              </tr>
              <tr> 
                <td class=clear colspan=2 valign="middle">
                  <table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td style="line-height:150%">1、拥有各项查询功能，如查询您申请的所有域名或空间，查询支持情况等；<br>
                        2、拥有各项管理功能，您可以通过该会员来实时管理您的域名或空间等服务；<br>
                        3、可以通过登录本系统获得本站最新优惠资讯，以最优惠的价格享受同等服务；<br>
                        4、可以接受到本站发出的最新通知，如公告，变更等。</td>
                    
                    <tr> 
                      <td>&nbsp;</td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td class=clear colspan=2 valign="middle"><br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                </td>
              </tr>
              </tbody> 
            </table>
          </TD>
        </TR></TBODY></TABLE>
      
	  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD bgColor=#cccccc><IMG height=1 
            src="/imgs/spacer.gif" 
      width=1></TD></TR></TBODY></TABLE>
	  <script>
				reg_form.screenwidth.value=screen.width;
				reg_form.screenheight.value=screen.height;
				</script>
				<%
				
%>
<!--#include virtual="/incs/web_bottom.asp"-->