如果想在ubb编辑器中也实现的话,要在cls_artical.asp文件中将
“
response.write (highlight(UnCheckStr(UBBCode(HtmlEncode(log_ViewArr(8,0)),mid(log_ViewArr(11,0),1,1),mid(log_ViewArr(11,0),2,1),mid(log_ViewArr(11,0),3,1),mid(log_ViewArr(11,0),4,1),mid(log_ViewArr(11,0),5,1))),keyword))
”
替换成
“
'=======内分页程序============
dim arrcontent,page,pagelist,content,pagecounter,x,xx
content=highlight(UnCheckStr(UBBCode(HtmlEncode(log_ViewArr(8,0)),mid(log_ViewArr(11,0),1,1),mid(log_ViewArr(11,0),2,1),mid(log_ViewArr(11,0),3,1),mid(log_ViewArr(11,0),4,1),mid(log_ViewArr(11,0),5,1))),keyword)
If InStr(1,cstr(content),"[pagesplitxx]",1)<>0 Then
ArrContent=Split(content,"[pagesplitxx]")
PageCounter=UBound(ArrContent)
Page=Request.QueryString("Page")
If isnumeric(Page)=false Then Page=1
If Page<1 Then Page=1
If Page-1>PageCounter Then Page=1
For x=1 To PageCounter+1
xx=x
If CInt(Page)=x Then xx="<font style='color:red;font-weight:bold'>"&x&"</font>"
PageList=PageList&" "&"<a href='?id="&logID&"&Page="&x&"'>["&xx&"]</a>"
Next
content=ArrContent(Page-1)&"<hr><div align='center' style='font-size:12px'>"&pagelist&"</div>"
End If
'=======内分页程序结束========
response.write (content)
”
即可,但要注意“dim arrcontent,page,pagelist,content,pagecounter,x,xx”在本页中只能出现一次,否则出错:)
[ 本帖最后由 stanley527 于 2006-10-20 23:58 编辑 ]