77范文网 - 专业文章范例文档资料分享平台

个人网站毕业论文(2) - 图文(5)

来源:网络收集 时间:2019-04-22 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

沧州师范学院计算机系毕业论文

图13

4、发表留言浏览效果图,如图14。

图14

二、关键代码设计

(一) 页面相同基本信息代码页面 include.asp

16

沧州师范学院计算机系毕业论文

<%

set oRs=server.createobject(\sSql=\oRs.Open sSql,Conn,1,1 If Not oRs.Eof Then

W_ID=oRs(\

W_WebsiteAppe=oRs(\W_SuppExpl=oRs(\W_WebSiteName=oRs(\W_WebSiteUrl=oRs(\W_StatMastName=oRs(\W_StatMastEmail=oRs(\W_StatMastQQ=oRs(\

W_WebSiteKeyword=oRs(\W_WebSiteIntr=oRs(\

W_WebSiteCopyInfo=oRs(\

End If oRs.Close

If W_WebsiteAppe=\

Response.Write \Response.Write W_SuppExpl

Response.Write \Response.End

cellspacing='0'>\

End If

Dim WebTitle,WebName

WebName=W_WebSiteName&\WebTitle=\%>

(二)数据库连接代码页面 conn.asp <%

Function SafeRequest(ParaName,ParaType) Dim ParaValue

ParaValue=Request(ParaName)

17

沧州师范学院计算机系毕业论文

If ParaType=1 then

If not isNumeric(ParaValue) then

Response.write \参数\必须为数字型,请正确操作!\Response.end End if Else

ParaValue=replace(ParaValue,\End if

SafeRequest=ParaValue End function

Function FormatSQL(strChar)

if IsNull(strChar) Or IsEmpty(strChar) then FormatSQL=\else

FormatSQL=replace(strChar,\ FormatSQL=replace(FormatSQL,\\FormatSQL=replace(FormatSQL,\?\FormatSQL=replace(FormatSQL,\(\FormatSQL=replace(FormatSQL,\)\FormatSQL=replace(FormatSQL,\﹤\FormatSQL=replace(FormatSQL,\﹥\FormatSQL=replace(FormatSQL,\。\FormatSQL=replace(FormatSQL,\;\FormatSQL=replace(FormatSQL,\=\FormatSQL=replace(FormatSQL,\%\FormatSQL=replace(FormatSQL,\※\end if End Function dim conn dim connstr

db=\

connstr = \+ server.mappath(db) + \Access Driver (*.mdb)};\

set conn=server.createobject(\

18

沧州师范学院计算机系毕业论文

if err.number<>0 then %>

(三)分页功能模块代码 <%

if not rs.eof then

rs.MoveFirst '注意放到前面来,否则到任何页总是在第一个记录上 end if

rs.pagesize=MaxPerPage '设置每页最多显示多少条记录 If trim(Request(\ '如果请求的页次不为空

CurrentPage= CLng(request(\ 'clng是转换成长整型数据类型,并赋值到当If CurrentPage> rs.PageCount then '如果当前页次大于总页数,则将最大页次赋值

CurrentPage = rs.PageCount

前页次上 到当前页次上

End If

CurrentPage= 1 '一切条件不成立,将当前页设为第一页 err.clear set conn=nothing

response.write \数据库连接出错!\Response.End conn.open connstr if err then

err.clear set conn=nothing

response.write \数据库连接出错!\Response.End

else

end if

end if

Else End If

totalPut=rs.recordcount '将总记录赋值于TOTALPUT

if CurrentPage<>1 then '如果当前页数不等于第一页

19

沧州师范学院计算机系毕业论文

%>

if (currentPage-1)*MaxPerPage

rs.move(currentPage-1)*MaxPerPage '相对当前记录数向后移动 dim bookmark '定义书签变量

bookmark=rs.bookmark '将当前记录的标签赋于变量BOOKMARK上

的记录数小于总记录的话

end if

end if dim n,k

if (totalPut mod MaxPerPage)=0 then '总记录数与每页最大记录数求余的结果为

n= totalPut \\ MaxPerPage n= totalPut \\ MaxPerPage + 1

零时,则N返回整数页次,否则再加一.

else end if

(四)图片显示功能模块代码

sql=\else

sql=\end if

set rsnews=server.createobject(\rsnews.open sql,conn,1,1

if rsnews.eof then

Response.Write \end if

IF Not rsnews.eof Then proCount=rsnews.recordcount

rsnews.PageSize=24

'定义显示数目

if not IsEmpty(Request(\

ToPage=CInt(Request(\

20

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库个人网站毕业论文(2) - 图文(5)在线全文阅读。

个人网站毕业论文(2) - 图文(5).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/614618.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: