网页登录界面

て烟熏妆下的殇ゞ 提交于 2020-03-10 05:32:21
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ Language=VBScript %>
<% if isempty(Request.Form("Login")) then
      Session.abandon
      Session("NumAttempts") = 1
      TheMessage = "请在下面登录本系统:"
   else
      TheUsername=Request.Form("Username")
      ThePassword=Request.Form("Password")
      If Instr(TheUsername, "'")=0 and Instr(ThePassword, "'")=0 then
         set RSLogin = server.createobject("adodb.recordset")
         RSLogin.open "select * from userinfo where strloginname = '"&TheUsername& "' and strpassword = '"&ThePassword&"'",session("conn")
            if RSLogin.EOF then
               Session("NumAttempts") = Session("NumAttempts") + 1
               if Application("NumAttempts") = 0 then
                  TheMessage = "登录不成功,请重试:"
               elseif Session("NumAttempts") > Application("NumAttempts") then
                  TheMessage = "登录不成功,登录次数已满,无法重试"
               else
                  TheTimes=Application("NumAttempts")-Session("NumAttempts")+1
                  TheMessage = "登录不成功,还有" & TheTimes & "次机会,请重试:"
               end if
            else
        Session("id") = RSLogin("lngloginid")
               Session("id1") = RSLogin("lngflid")
               Session("code") = RSLogin("strlogincode")
        Session("name") = RSLogin("strloginname")
        Session("password") = RSLogin("strPassword")
               RSLogin.close
               set RSLogin=nothing
        Response.Redirect "../home.asp"
            end if
       else
           TheMessage="用户名或者密码输入不合格式" 
       end if
   end if %>
<HTML>
<HEAD>
<META name="GENERATOR" content="IBM HomePage Builder 2001 V5.0.0 for Windows">
<TITLE>用户登陆</TITLE>
</HEAD>
<BODY style="margin-top : 0px;margin-left : 0px;margin-right : 0px;">
<FORM  name="form" method="post" action="login.asp">
<TABLE boder="0" width="799" align="center" cellspacing="0" cellpadding="0">
  <TBODY>
     <TR>
      <TD width="117" height="129" rowspan="2" background="ntop_right.jpg"></TD>
      <TD width="565" height="94"><IMG src="loginhead1.png" width="100%" height="94" border="0"></TD>
      <TD width="117" height="129" rowspan="2"><IMG src="ntop_right.jpg" width="100%" height="129" border="0"></TD>
    </TR>
    <TR>
      <TD align="center" height="35" bgcolor="#000040"><IMG src="loginhead2.jpg" width="100%" height="35" border="0"></TD>
    </TR>
    <TR>
      <TD height="332" background="middle_leftbg.jpg"></TD>
      <TD width="563" align="center" valign="top" style="border-style : solid solid solid solid;border-color : silver silver silver silver;border-width : 0px 1px;border-bottom-width : 0px;border-left-width : 1px;" nowrap>
      <TABLE boder="0" width="100%" align="center" cellspacing="0" cellpadding="0">
        <TBODY>
          <TR>
            <TD height="43"></TD>
          </TR>
          <TR>
            <TD align="center" height="26" style="font-size : 13px;color : navy;" background="loginbj2.jpg"><% =TheMessage %></TD>
          </TR>
        </TBODY>
      </TABLE>
      <BR>
      <BR>
      <BR>
<% if TheMessage <> "登录不成功,登录次数已满,无法重试" then %>
      <IMG src="yh.jpg" width="48" height="16" border="0">  
      <SELECT name="Username" style="border-width : 1px 1px 1px 1px;border-style : solid solid solid solid;border-color : #8080c0 #8080c0 #8080c0 #8080c0;width : 130px;font-size : 16px;color : navy;">
       <OPTION ><% ="" %></OPTION>
       <% set rs = server.createobject("adodb.recordset")
         rs.open "select strloginname from userinfo where lngloginid >1 order by strlogincode",session("conn") 
         do until rs.eof %>
              <OPTION value=<% =rs("strloginname") %>><% =rs("strloginname") %></OPTION>
            <% rs.movenext
         loop
         rs.close
         set rs=nothing  %></SELECT><BR>
            <BR>
            <IMG src="mm.jpg" width="48" height="16" border="0">  
            <INPUT size="13" style="border-width : 1px 1px 1px 1px;border-style : solid solid solid solid;border-top-color : #8080c0;border-right-color : #8080c0;border-bottom-color : #8080c0;border-left-color : #8080c0;font-size : 17px;color : navy;" type="password" name="Password"><BR>
            <br>        
            <INPUT type="submit" name="Login" value="  " style="background-color : #8080c0;border-top-width : 0px;border-right-width : 0px;border-bottom-width : 0px;border-left-width : 0px;width : 90px;height : 28px;background-image : url(tj.gif);cursor : pointer;background-position : 1px 1px;">
     </TD><% end if %>
      <TD background="middle_leftbg.jpg"></TD>
    </TR>
    <TR>
      <TD colspan="3"><IMG src="loginbuttom.png" width="100%" height="49" border="0"></TD>
    </TR>
</TBODY>
</TABLE>
<center><HR width="358" size="1" style="color : #8080c0;">
<IMG src="loginbuttom1.jpg" width="269" height="48" border="0"><br>
</center></FORM>
</BODY>
</HTML>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!