ImageVerifierCode 换一换
格式:DOCX , 页数:20 ,大小:17.14KB ,
资源ID:24462952      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/24462952.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(文章系统自动与手动分页方法的实现.docx)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

文章系统自动与手动分页方法的实现.docx

1、文章系统自动与手动分页方法的实现文章系统分页方法的实现:一、后台添加部分加入“文章分页方式:1.手动分页 2.自动分页 3.不分页”,在数据库中写入一个值以判断后台管理员选择的分页方式。并注明,如果用手动分页方式,在需要分页的地方需插入代码:“NextPage”标记,前台程序以此标记判断手动分页部分文章的分页显示方式。范例:1.分页方式: 不分页  自动  手动 注意:手动方式要输入“ NextPage ”二、前台显示文章部分,先判断后台管理员选择的文章分页方式,如果用户选择的是自动分页,则调用“自动分页部分程序”,选择的是手动分页则调用“手动

2、分页部分程序”。范例:1.判断后台管理员发表文章的时候使用的分页方法判断方法:(这里以showContent为数据库分页方式字段做例子讲解)打开数据库后判断后台管理员使用的是哪种分页方式,以便调用不同的程序;其中“AutoShow”为自动分页,“FingerShow”为手动分页方式。2.自动分页:说明:此代码将显示文章和文章自动分页的整个过程包含在一个文件内执行,所以在显示文章页面就需要加入以下代码:,此代码将显示文章和自动分页的文件包含进去,以执行“Call”语句,调用整个程序过程。3.手动分页:说明:此代码将显示文章和文章自动分页的整个过程包含在一个文件内执行,所以在显示文章页面就需要加入

3、以下代码:,此代码将显示文章和自动分页的文件包含进去,以执行“Call”语句,调用整个程序过程。4.inc目录下page.asp文件的程序代码如下:(仅供参考)%过程名:autoshow 功 能:文章内容自动分页 Const ShowContentByPage=Yes 文章内容是否分页显示Const MaxPerPage_Content=1000 每页显示大约字符数sub AutoShow()dim CurrentPagedim ContentLen,MaxPerPage,pages,i,lngBounddim BeginPoint,EndPointArticleID=rs(SMT_id)st

4、rContent=rs(SMT_news)ContentLen=len(strContent)CurrentPage=trim(request(page)if ShowContentByPage=No or ContentLen=MaxPerPage_Content thenresponse.write(&strContent&)if ShowContentByPage=Yes thenresponse.write 1end ifelseif CurrentPage= thenCurrentPage=1elseCurrentPage=Cint(CurrentPage)end ifpages=C

5、ontentLenMaxPerPage_Contentif MaxPerPage_Content*pagesContentLen thenpages=pages+1end iflngBound=MaxPerPage_Content 最大误差范围if CurrentPagepages then CurrentPage=pagesdim lngTempdim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3dim lngTemp2,

6、lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2dim lngTemp5,lngTemp5_1,lngTemp5_2dim lngTemp6,lngTemp6

7、_1,lngTemp6_2 if CurrentPage=1 thenBeginPoint=1elseBeginPoint=MaxPerPage_Content*(CurrentPage-1)+1 lngTemp1_1_1=instr(BeginPoint,strContent,1)lngTemp1_1_2=instr(BeginPoint,strContent,1)lngTemp1_1_3=instr(BeginPoint,strContent,1)if lngTemp1_1_10 thenlngTemp1_1=lngTemp1_1_1elseif lngTemp1_1_20 thenlng

8、Temp1_1=lngTemp1_1_2elseif lngTemp1_1_30 thenlngTemp1_1=lngTemp1_1_3elselngTemp1_1=0end if lngTemp1_2_1=instr(BeginPoint,strContent,table,1)lngTemp1_2_2=instr(BeginPoint,strContent,TABLE,1)lngTemp1_2_3=instr(BeginPoint,strContent,0 thenlngTemp1_2=lngTemp1_2_1elseif lngTemp1_2_20 thenlngTemp1_2=lngTe

9、mp1_2_2elseif lngTemp1_2_30 thenlngTemp1_2=lngTemp1_2_3elselngTemp1_2=0end if if lngTemp1_1=0 and lngTemp1_2=0 thenlngTemp1=BeginPointelseif lngTemp1_1lngTemp1_2 thenlngtemp1=lngTemp1_2elselngTemp1=lngTemp1_1+8end ifend iflngTemp2_1_1=instr(BeginPoint,strContent,1)lngTemp2_1_2=instr(BeginPoint,strCo

10、ntent,1)if lngTemp2_1_10 thenlngTemp2_1=lngTemp2_1_1elseif lngTemp2_1_20 thenlngTemp2_1=lngTemp2_1_2elselngTemp2_1=0end if lngTemp2_2_1=instr(BeginPoint,strContent,p,1)lngTemp2_2_2=instr(BeginPoint,strContent,0 thenlngTemp2_2=lngTemp2_2_1elseif lngTemp2_2_20 thenlngTemp2_2=lngTemp2_2_2elselngTemp2_2

11、=0end if if lngTemp2_1=0 and lngTemp2_2=0 thenlngTemp2=BeginPointelseif lngTemp2_1lngTemp2_2 thenlngtemp2=lngTemp2_2elselngTemp2=lngTemp2_1+4end ifend iflngTemp3_1_1=instr(BeginPoint,strContent,1)lngTemp3_1_2=instr(BeginPoint,strContent,1)if lngTemp3_1_10 thenlngTemp3_1=lngTemp3_1_1elseif lngTemp3_1

12、_20 thenlngTemp3_1=lngTemp3_1_2elselngTemp3_1=0end if lngTemp3_2_1=instr(BeginPoint,strContent,ur,1)lngTemp3_2_2=instr(BeginPoint,strContent,0 thenlngTemp3_2=lngTemp3_2_1elseif lngTemp3_2_20 thenlngTemp3_2=lngTemp3_2_2elselngTemp3_2=0end if if lngTemp3_1=0 and lngTemp3_2=0 thenlngTemp3=BeginPointels

13、eif lngTemp3_1lngTemp3_2 thenlngtemp3=lngTemp3_2elselngTemp3=lngTemp3_1+5end ifend if if lngTemp1lngTemp2 thenlngTemp=lngTemp2elselngTemp=lngTemp1end ifif lngTempBeginPoint and lngTemp=BeginPoint+lngBound thenBeginPoint=lngTempelselngTemp4_1_1=instr(BeginPoint,strContent,1)lngTemp4_1_2=instr(BeginPo

14、int,strContent,1)if lngTemp4_1_10 thenlngTemp4_1=lngTemp4_1_1elseif lngTemp4_1_20 thenlngTemp4_1=lngTemp4_1_2elselngTemp4_1=0end if lngTemp4_2_1=instr(BeginPoint,strContent,li,1)lngTemp4_2_1=instr(BeginPoint,strContent,0 thenlngTemp4_2=lngTemp4_2_1elseif lngTemp4_2_20 thenlngTemp4_2=lngTemp4_2_2else

15、lngTemp4_2=0end if if lngTemp4_1=0 and lngTemp4_2=0 thenlngTemp4=BeginPointelseif lngTemp4_1lngTemp4_2 thenlngtemp4=lngTemp4_2elselngTemp4=lngTemp4_1+5end ifend if if lngTemp4BeginPoint and lngTemp4=BeginPoint+lngBound thenBeginPoint=lngTemp4else lngTemp5_1=instr(BeginPoint,strContent,img,1)lngTemp5

16、_2=instr(BeginPoint,strContent,0 thenlngTemp5=lngTemp5_1elseif lngTemp5_20 thenlngTemp5=lngTemp5_2elselngTemp5=BeginPointend if if lngTemp5BeginPoint and lngTemp5BeginPoint+lngBound thenBeginPoint=lngTemp5elselngTemp6_1=instr(BeginPoint,strContent,1)lngTemp6_2=instr(BeginPoint,strContent,1)if lngTem

17、p6_10 thenlngTemp6=lngTemp6_1elseif lngTemp6_20 thenlngTemp6=lngTemp6_2elselngTemp6=0end if if lngTemp6BeginPoint and lngTemp6=ContentLen thenEndPoint=ContentLenelselngTemp1_1_1=instr(EndPoint,strContent,1)lngTemp1_1_2=instr(EndPoint,strContent,1)lngTemp1_1_3=instr(EndPoint,strContent,1)if lngTemp1_

18、1_10 thenlngTemp1_1=lngTemp1_1_1elseif lngTemp1_1_20 thenlngTemp1_1=lngTemp1_1_2elseif lngTemp1_1_30 thenlngTemp1_1=lngTemp1_1_3elselngTemp1_1=0end if lngTemp1_2_1=instr(EndPoint,strContent,table,1)lngTemp1_2_2=instr(EndPoint,strContent,TABLE,1)lngTemp1_2_3=instr(EndPoint,strContent,0 thenlngTemp1_2

19、=lngTemp1_2_1elseif lngTemp1_2_20 thenlngTemp1_2=lngTemp1_2_2elseif lngTemp1_2_30 thenlngTemp1_2=lngTemp1_2_3elselngTemp1_2=0end if if lngTemp1_1=0 and lngTemp1_2=0 thenlngTemp1=EndPointelseif lngTemp1_1lngTemp1_2 thenlngtemp1=lngTemp1_2-1elselngTemp1=lngTemp1_1+7end ifend iflngTemp2_1_1=instr(EndPo

20、int,strContent,1)lngTemp2_1_2=instr(EndPoint,strContent,1)if lngTemp2_1_10 thenlngTemp2_1=lngTemp2_1_1elseif lngTemp2_1_20 thenlngTemp2_1=lngTemp2_1_2elselngTemp2_1=0end if lngTemp2_2_1=instr(EndPoint,strContent,p,1)lngTemp2_2_2=instr(EndPoint,strContent,0 thenlngTemp2_2=lngTemp2_2_1elseif lngTemp2_

21、2_20 thenlngTemp2_2=lngTemp2_2_2elselngTemp2_2=0end if if lngTemp2_1=0 and lngTemp2_2=0 thenlngTemp2=EndPointelseif lngTemp2_1lngTemp2_2 thenlngTemp2=lngTemp2_2-1elselngTemp2=lngTemp2_1+3end ifend iflngTemp3_1_1=instr(EndPoint,strContent,1)lngTemp3_1_2=instr(EndPoint,strContent,1)if lngTemp3_1_10 th

22、enlngTemp3_1=lngTemp3_1_1elseif lngTemp3_1_20 thenlngTemp3_1=lngTemp3_1_2elselngTemp3_1=0end if lngTemp3_2_1=instr(EndPoint,strContent,ur,1)lngTemp3_2_2=instr(EndPoint,strContent,0 thenlngTemp3_2=lngTemp3_2_1elseif lngTemp3_2_20 thenlngTemp3_2=lngTemp3_2_2elselngTemp3_2=0end if if lngTemp3_1=0 and l

23、ngTemp3_2=0 thenlngTemp3=EndPointelseif lngTemp3_1lngTemp3_2 thenlngtemp3=lngTemp3_2-1elselngTemp3=lngTemp3_1+4end ifend if if lngTemp1lngTemp2 thenlngTemp=lngTemp2elselngTemp=lngTemp1end ifif lngTempEndPoint and lngTemp=EndPoint+lngBound thenEndPoint=lngTempelselngTemp4_1_1=instr(EndPoint,strConten

24、t,1)lngTemp4_1_2=instr(EndPoint,strContent,1)if lngTemp4_1_10 thenlngTemp4_1=lngTemp4_1_1elseif lngTemp4_1_20 thenlngTemp4_1=lngTemp4_1_2elselngTemp4_1=0end if lngTemp4_2_1=instr(EndPoint,strContent,li,1)lngTemp4_2_1=instr(EndPoint,strContent,0 thenlngTemp4_2=lngTemp4_2_1elseif lngTemp4_2_20 thenlng

25、Temp4_2=lngTemp4_2_2elselngTemp4_2=0end if if lngTemp4_1=0 and lngTemp4_2=0 thenlngTemp4=EndPointelseif lngTemp4_1lngTemp4_2 thenlngtemp4=lngTemp4_2-1elselngTemp4=lngTemp4_1+4end ifend ifif lngTemp4EndPoint and lngTemp4=EndPoint+lngBound thenEndPoint=lngTemp4else lngTemp5_1=instr(EndPoint,strContent,img,1)lngTemp5_2=instr(EndPoint,strContent,0 thenlngTemp5=lngTemp5_1-1elseif lngTemp5_20 thenlngTemp5=lngTemp5_2-1elselngTemp5=EndPointend ifif lngTemp5EndPoint and lngTemp5EndPoint+lngBound thenEndP

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1