这是页面代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include file="fy.asp"-->
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from news where id="&Request.querystring("id")
rs.open sql,conn,1,1
%>
<%
'打开数据库中名为class的表。
set rsclass=server.createobject("adodb.recordset")
sqlclass="select * from class where id="&Request.querystring("classid")&" order by id desc"
rsclass.open sqlclass,conn,1,1
%>
<% If rs("pms")="2" Then %>
<form name="form" action="news.asp?classid=<%=rsclass("id")%>&id=<%=rs("id")%>" method="post">
请输入密码:<input type="password" name="readpwd"/>
<input type="hidden" name="pwd" value="pwd">
<input type="submit" value="确认密码" />
</form>
<%
If Request.Form("pwd")="pwd" Then
readpwd=Request.Form("readpwd")
If readpwd<>rs("readpwd") then
response.Write"<script language=javascript>alert('密码错误!');history.back(-1);</script>"
response.End()
End If
End if
%>
<%
End If
%>
....
下面是浏览文章代码