login.asp

来自「关于网络渗透技术的详细讲解」· ASP 代码 · 共 211 行

ASP
211
字号
<!--#include file="conn.asp" -->
<!--#include file="Include/inc.asp"-->
<!--#include file="Include/md5.asp"-->

<%
'====================================================================
'						----用户登陆----
'						2004-10-12 eason007
'
'
'====================================================================

If request.Querystring("action")="check" then
	
	Dim Flag,i
	Dim UserName,UserPassword,SaveTimes,nsrmc
	Dim temp(20)
	Dim sysSetting
	Flag=true
	UserName=Request.Form("UserName")
	UserPassword=Request.Form("PassWord")
	SaveTimes=Request.Form("SaveTimes")
	If not ChkForm(UserName,1) then Flag=false
	If not ChkForm(UserPassWord,1) then Flag=false
	If not ChkForm(SaveTimes,0) then Flag=false
	
	If Flag then
		UserPassword=MD5(UserPassword)
		Dim UserID,GID,RegTime
		Sql="select State,Reg_Pass,[ID],User_Group,RegTime,nsrmc From NB_User where Reg_Name='"&UserName&"'"
		set rs=Conn.Execute(Sql)
		If RS.Eof Or Rs.Bof Then sysErr(18)
		If Rs(1)<>UserPassword Then sysErr(36)
		If RS(0)<>1 Then sysErr(3)
		UserID=Rs(2)
		nsrmc=rs(5)
		GID=Rs(3)
		RegTime=Rs(4)
		Sql="Select GroupName,islogin,Setting FROM NB_UserGroup WHERE ID="&GID
		set rs=conn.Execute(Sql)
		If RS.Eof Or Rs.Bof Then sysErr(3)
			If Rs(1)=0 Then SysErr(37)
			temp(0)=UserID
			temp(1)=UserName
			temp(2)=rs(0)
			temp(3)=rs(1)
			temp(19)=nsrmc
			sysSetting=split(rs(2),",")
			for i=0 to 9
				temp(i+4)=sysSetting(i)
			next
			Temp(i+4)=RegTime
			Temp(i+5)=sysSetting(10)
			'response.write regtime
			'response.end
			'response.redirect("tax.asp")

			If Temp(7)<>"0" Then 
				If SysOpration(Temp(6))=False Then SysErr(38)
			End If

			session("UserID")=temp
'			response.Cookies("userdata")=join(temp,",")
			If SaveTimes=10 then Response.Cookies("userdata").expires=Date()+720
				SQL="UpDate [NB_User] Set [Login]=[Login]+1,LastIp='"&GetUserIp&"',LasTime=Now() Where Id="&GID
				Conn.Execute(SQL)
'				sysSus 4,""
'               Response.Write "<meta http-equiv='refresh' content='3;URL="&session("form_h")&".asp?feed="&session("feed")&"'>" 
if session("form_h")<>"viewfeed" then
     if request("form_h")<>"userloginbar" then
                              response.write "<script language=javascript>window.open('"&session("form_h")&".asp?feed="&session("feed")&"','','top=0 left=0 toolbar=yes scrollbar=yes width=800 height=600')</script>"
    else
         response.redirect "userloginbar.asp"
   end if 
 else
 Response.Write "<meta http-equiv='refresh' content='3;URL="&session("form_h")&".asp?feed="&session("feed")&"'>"
 end if
'                             response.write "<script language=javascript>window.close();</script>"
%>

			<%else
				sysErr(3)
			end if
		set rs=nothing	
End if

If Request("action")="logout" Then 
	session("UserID")=""
	Response.Cookies("userdata")=""
	Response.Cookies("userdata").expires=Date()
	response.Redirect("officeonline.asp")
End If
%>
<HTML><HEAD><TITLE><%=SysInfo(0)%></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="Admin_Style.css" rel=stylesheet>
<SCRIPT language=JavaScript src="管理员登录.files/softkeyboard.js"></SCRIPT>

<SCRIPT language=javascript>
<!--
function SetFocus() {
if(document.Login.UserName.value == '')
  document.Login.UserName.focus();
else
  document.Login.UserName.select();
}
function CheckForm() {
  if(document.Login.UserName.value == '') {
    alert('请输入用户名!');
    document.Login.UserName.focus();
    return false;
  }
  if(document.Login.password.value == '') {
    alert('请输入密码!');
    document.Login.password.focus();
    return false;
  }
}
}
//-->
</SCRIPT>

<META content="Microsoft FrontPage 6.0" name=GENERATOR><script language="JavaScript">
var ie=(document.all)?true:false;
function sublogin(){
if(document.login.UserName.value==''||document.login.PassWord.value==''||document.login.PassWord.value.length<6||document.login.PassWord.value.length>14){
alert("请填写好您的用户名和密码再提交");
document.login.UserName.focus();
return true;
}else{document.login.submit();}
}
</script></HEAD>
<BODY topmargin="20"> 
<script>

window.moveTo(300,250);

window.resizeTo(400,300);

</script>

<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.UserName.value == "")
  {
    alert("请在 UserName 域中输入值。");
    theForm.UserName.focus();
    return (false);
  }

  if (theForm.UserName.value.length < 15)
  {
    alert("在 UserName 域中,请至少输入 15 个字符。");
    theForm.UserName.focus();
    return (false);
  }

  if (theForm.UserName.value.length > 15)
  {
    alert("在 UserName 域中,请最多输入 15 个字符。");
    theForm.UserName.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form action="login.asp?action=check&form_h='&<%=request("form_h")%>'" method="post" name="FrontPage_Form1" target="_self" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript">
	<TABLE cellSpacing=0 cellPadding=0 width=210 align=center border=0>
  <TBODY>

    <TD vAlign=top width=183 >
      <TABLE cellSpacing=0 cellPadding=0 width=183 border=0 height="70">
        <TBODY>
        <TR>
          <TD colSpan=4 height=37 width="183">
			<p align="center">纳税人登录</TD></TR>
        <TR>
   
          <TD width=63 height="33" rowspan="2">
			<p align="center">请输入<br>
			您的<br>
			纳税人<br>
			信息</TD>
   
          <TD width=120 height="16"><FONT color=#043bc9>纳税人税务登记证号:</FONT><!--webbot bot="Validation" s-data-type="String" b-value-required="TRUE" i-minimum-length="15" i-maximum-length="15" --><INPUT id=UserName 
            onmouseover="this.style.background='#ffffff';" 
            style="border-style:solid; border-width:1px; FONT-SIZE: 9pt; WIDTH: 118; HEIGHT: 18; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" 
            onfocus=this.select(); onmouseout="this.style.background='#F7F7F7'" 
            maxLength=15 name=UserName size="20"></TD>
          </TR>
        <TR>
          <TD height="17" width="120">
          <FONT color=#043bc9>登录密码:</FONT><INPUT onmouseover="this.style.background='#ffffff';" 
            style="border-style:solid; border-width:1px; FONT-SIZE: 9pt; WIDTH: 118; HEIGHT: 18; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" 
            onfocus=this.select(); onmouseout="this.style.background='#F7F7F7'" 
            type=password maxLength=18 name=password size="20"></TD>
          </TR></TBODY></TABLE></TD>
   </TR><tr><td><INPUT type=hidden value=Login name=Action>	
		<p align="center">	<input type="submit" value="提交" name="B1"> 
</td></tr></TBODY></TABLE></FORM>
<SCRIPT language=JavaScript type=text/JavaScript>
CheckBrowser();
SetFocus();
</SCRIPT>
</BODY></HTML>




⌨️ 快捷键说明

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