logon.asp
来自「酷购网上商城~~ 完整的asp源代码.通过少许的改动就可以让你拥有自己的商城~~」· ASP 代码 · 共 95 行
ASP
95 行
<!--#include file=conn.asp-->
<%
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<HTML><HEAD><TITLE>版主管理入口</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type><LINK
href="images/css.css" rel=stylesheet type=text/css>
<style>
.inputbox {
padding-left:3px;
font-weight:bold;
width:100
}
</style>
</HEAD>
<BODY background="images/bookbg.gif">
<%
if Request.Form.Count=0 then
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="400">
<tr>
<td width="2%"><img border="0" src="images/T_left.gif"></td>
<td width="96%" background="images/Tt_bg.gif"></td>
<td width="2%"><img border="0" src="images/T_right.gif"></td>
</tr>
</table>
</center>
</div>
<CENTER>
<TABLE border=0 cellPadding=5 cellSpacing=1 width=400 style="border-collapse: collapse" class=a2>
<FORM action=logon.asp?user=<%=request("user")%> method=post>
<TBODY>
<TR class=a1>
<TD class=newfont6 colSpan=2 align=center height="25">版 主 管 理 入 口</TD></TR>
<TR class=a4>
<TD class=newfont6 height=30 width="400" colspan="2"> </TD>
</TR>
<TR class=a4>
<TD class=newfont6 height=21 width="200">
<DIV align=center>版主账号:</DIV></TD><!--Ajie-->
<TD height=21 width="500"> <INPUT class="inputbox" name=user1 size="20"></TD></TR>
<TR class=a4>
<TD class=newfont6 height=25 width="200">
<DIV align=center>版主密码:</DIV></TD>
<TD height=25 width="200"> <INPUT class="inputbox" name=pass
type=password size="20"></TD></TR>
<TR class=a3>
<TD colSpan=2 height="34"> <DIV align=center><INPUT type=submit value=确认登陆>
<INPUT name=B1 type=reset value=重新来过>
<INPUT name=B2 type=button id="B2" value="后 退" onClick="javascript:history.back(-1)">
</DIV></TD></TR></TBODY></FORM></TABLE>
</CENTER>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="400" >
<tr>
<td width="1%"><img border="0" src="images/T_bottomleft.gif"></td>
<td width="97%" background="images/T_bottombg.gif"></td>
<td width="2%"><img border="0" src="images/T_bottomright.gif"></td>
</tr>
</table>
</center>
</div>
</BODY></HTML>
<%
else
username=Request.FORM("user1")
password=Request.FORM("pass")
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from [user] where 用户名='"& username &"'"
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write " 该用户不存在!"
else
pass2=rs("密码")
if password=pass2 then
session("book_session")=rs("用户名")%>
<script language=JavaScript>{window.alert('成功登陆管理模式!');window.location.href='index.asp?user=<%=request("user")%>'}</script>
<%else %>
<script language=JavaScript>{window.alert('用 户 密 码 无 效 !');window.location.href='logon.asp?user=<%=request("user")%>'}</script>
<%end if
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?