页面中需要用户填写的HTML表单元素。
该页面中仅有两个表单元素,如表所示
名称 表单元素类型 含义 最大长度
username text 管理员名称 25
password password 管理员密码 25
2.页面所涉及的数据库表信息
此页仅向系统提交管理员用户名称和密码,并没有涉及到数据库表的操作。
页面代码分析
5.1.2 帐号验证页
1.Chklogin.asp此页为验证名称和密码的页面,无页面效果
2.页面中需要用户填写的HTML表单元素。
3.页面所涉及的数据库表信息
管理员名称和密码存在文件中,并没有涉及到数据库表的操作。
页面代码分析
<%
dim sql
dim rs
dim seekerrs
dim founduser
dim username
dim companyid
dim password
dim errmsg
dim founderr
founderr=false
FoundUser=false
username=request.form("username")
password=request.Form("password")
if username="" then
response.redirect "index.asp"
end if
if password="" then
response.redirect "index.asp"
end if
if username="admin" and password="admin" then
response.cookies("adminok")=true
response.redirect "manage.asp"
else
response.redirect "index.asp"
end if
%>
5.1.3管理后台页
Manage.asp页面示例
图为管理员登陆录成功后所看到的页面效果。
页面中需要用户添写HTML的表单元素
此页面无需填写HTML表单元素
页面所涉及的数据库表信息
此页使用了系统中的信息记录表learning.
4.页面代码分析
<%
if request.cookies("adminok")="" then
response.redirect "login.asp"
end if
%>
<!--#include file="articleconn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理文件</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<link rel="stylesheet" href="css/article.css">
</head>
<%
const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<body bgcolor="#FFFFFF">
<p> </p>
<table width="700" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#99CCFF">
<td height="10" bgcolor="#3399cc">
<div align="center"><b>管 理 界 面</b></div>
</td>
</tr>
<tr>
<td height="49"><%
dim sql
dim rs
sql="select * from learning order by articleid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'> 还 没 有 任 何 信 息</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
&n
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 4/17/17
asp信息查询系统(四)由毕业论文网(www.huoyuandh.com)会员上传。