/td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
top.asp
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<table width="90%" border="1" align="center" cellpadding="10" cellspacing="0">
<tr>
<td><a href="/"";index.asp">首页</a>
<%
if Session("name")="" then
%>
<a href="/"";reg.asp">注册</a> <a href="/"";login.asp">登陆</a>
<a href="/"";pwd.asp">忘记密码?</a> <%
else
%>
欢迎您<%=Session("name")%>, <a href="/"";loginout.asp">注销登陆</a>
<%
end if
%>
<a href="/"";jiami.asp">加密页</a></td>
</tr>
</table>
<br>
login.asp
<!--#i nclude file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body><!--#i nclude file="top.asp"-->
<table width="90%" border="1" align="center" cellpadding="10" cellspacing="0">
<tr>
<td>
用户登陆
<%
if Session("name")="" then
%>
<form name="form1" method="post" action="loginok.asp?action=login" onsubmit="return chkform(this)">
<table border="1" cellspacing="0" cellpadding="5">
<tr>
<td width="116">用户名</td>
<td width="116"><input name="name" type="text" id="name"></td>
</tr>
<tr>
<td>密码</td>
<td><input name="pwd" type="password" id="pwd"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Submit" value="登陆">
<input type="reset" name="Submit" value="重置"></td>
</tr>
</table>
</form>
<%
else
%>
<table border="1" cellspacing="0" cellpadding="5">
<tr>
<td width="303"><%=Session("name")%>,您已经成功登陆</td>
</tr>
</table>
<%
end if
%>
</td>
</tr>
</table>
</body>
</html>
loginok.asp
<!--#i nclude file="conn.asp"-->
<%
Session.TimeOut=30
if request("action")="login" then
name=trim(request.form("name"))
pwd=trim(request.form("pwd"))
if name="" or pwd="" then
Response.Redirect ("login.asp")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from user where name=''"&name&"''and pwd=''"&pwd&"''"
rs.open sql,conn,1,1
if not rs.eof then
session("name")=name
response.redirect"edit.asp"
else
response.redirect"Error.asp"
response.end
end if
end if
%>
loginout.asp
<%
session("name")=""
response.write "<script language=javascript> alert(''退出登陆成功!'');location.href(''index.asp'');</script>"
response.end
%>
pwd.asp
<!--#i nclude file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body><!--#i nclude file="top.asp"-->
<