2个回答
2013-08-25
展开全部
<%@ Language=VBScript %>
<% if isempty(Request.Form("Login")) then
Session.abandon
Session("NumAttempts") = 1
TheMessage = "请在下面登录本系统:"
else
TheUsername=Request.Form("Username")
ThePassword=Request.Form("Password")
If TheUsername=“admin” and ThePassword=“88888888” then Response.Redirect "../home.asp"
else
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
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 %>
<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="Username" name="Username"><BR>
<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;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>这是不用建数据库的那种,但是安全和易用性不足你所谓改动一下就可以用但我觉得还是用数据库比较好,存入和读取数据库里的密码字段时,自己可以写段算法(自己定的算法,比如数据看到的是123456,你可以每个字加1,这样安全就高多了)下面这段与上面一样,但是用到数据库你也看看,做个选择(下面这段我运行通过的)上面是我在这个基础改的<%@ Language=VBScript %>
<% if isempty(Request.Form("Login")) then
Session.abandon
Session("NumAttempts") = 1
TheMessage = "请在下面登录本系统:"
else
TheUsername=Request.Form("Username")
ThePassword=Request.Form("Password")
If TheUsername=“admin” and ThePassword=“88888888” then Response.Redirect "../home.asp"
else
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
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 %>
<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="Username" name="Username"><BR>
<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;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>上面用到的几个图形你自己随便搞一下,文件名一样就可以希望能帮到你
<% if isempty(Request.Form("Login")) then
Session.abandon
Session("NumAttempts") = 1
TheMessage = "请在下面登录本系统:"
else
TheUsername=Request.Form("Username")
ThePassword=Request.Form("Password")
If TheUsername=“admin” and ThePassword=“88888888” then Response.Redirect "../home.asp"
else
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
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 %>
<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="Username" name="Username"><BR>
<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;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>这是不用建数据库的那种,但是安全和易用性不足你所谓改动一下就可以用但我觉得还是用数据库比较好,存入和读取数据库里的密码字段时,自己可以写段算法(自己定的算法,比如数据看到的是123456,你可以每个字加1,这样安全就高多了)下面这段与上面一样,但是用到数据库你也看看,做个选择(下面这段我运行通过的)上面是我在这个基础改的<%@ Language=VBScript %>
<% if isempty(Request.Form("Login")) then
Session.abandon
Session("NumAttempts") = 1
TheMessage = "请在下面登录本系统:"
else
TheUsername=Request.Form("Username")
ThePassword=Request.Form("Password")
If TheUsername=“admin” and ThePassword=“88888888” then Response.Redirect "../home.asp"
else
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
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 %>
<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="Username" name="Username"><BR>
<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;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>上面用到的几个图形你自己随便搞一下,文件名一样就可以希望能帮到你
2013-08-25
展开全部
会不会有新申请的什么账号,如果没有直接在程序代码里判断就可以了,if()
如果有,不想用数据库就用xml文件吧,用DOM操作文件
如果有,不想用数据库就用xml文件吧,用DOM操作文件
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询