www.gusucode.com > 爱美尔女性商城源码 1.0源码程序 > wen/Inc/Fenye.asp
<% '================================================= '过程名:ManualPagination1 '作 用:采用手动分页方式显示文章具体的内容 '参 数:str1,str2,str3 '================================================= Function ManualPagination1(str1,str2) dim ArticleId,strContent,CurrentPage dim ContentLen,pages,i dim arrContent,ManualPagination_Tmp ArticleId = str1 strContent = str2 ContentLen=strContent CurrentPage=LaoYRequest(request("Page")) if Instr(strContent,"[Yao_page]")<=0 then ManualPagination_Tmp = ManualPagination_Tmp & strContent ManualPagination_Tmp = ManualPagination_Tmp & "</p>" else arrContent=split(strContent,"[Yao_page]") pages=Ubound(arrContent)+1 if CurrentPage="" then CurrentPage=1 else CurrentPage=Cint(CurrentPage) end if if CurrentPage<1 then CurrentPage=1 if CurrentPage>pages then CurrentPage=pages ManualPagination_Tmp = ManualPagination_Tmp & arrContent(CurrentPage-1) ManualPagination_Tmp = ManualPagination_Tmp & "</p><div id=""clear""></div><div id=""page""><ul>" if CurrentPage>1 then ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/List.asp?ID=" & ArticleId & "&Page=" & CurrentPage-1 ManualPagination_Tmp = ManualPagination_Tmp & "'>上一页</a></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>上一页</span></li>" end if for i=1 to pages if i=CurrentPage then ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>" & cstr(i) & "</span></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/List.asp?ID=" & ArticleId & "&Page=" & i ManualPagination_Tmp = ManualPagination_Tmp & "'>" & i & "</a></li>" end if 'if (i Mod 10) = 0 then ManualPagination_Tmp = ManualPagination_Tmp & "<br>" next if CurrentPage<pages then ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/List.asp?ID=" & ArticleId & "&Page=" & CurrentPage+1 ManualPagination_Tmp = ManualPagination_Tmp & "'>下一页</a></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>下一页</span></li>" end if ManualPagination_Tmp = ManualPagination_Tmp & "</ul></div>" end if ManualPagination1 = ManualPagination_Tmp end Function '================================================= '过程名:ManualPagination2 '作 用:采用手动分页方式显示文章具体的内容 '参 数:str1,str2,str3 '================================================= Function ManualPagination2(str1,str2) dim ArticleId,strContent,CurrentPage dim ContentLen,pages,i dim arrContent,ManualPagination_Tmp ArticleId = str1 strContent = str2 ContentLen=strContent CurrentPage=b if Instr(strContent,"[Yao_page]")<=0 then ManualPagination_Tmp = ManualPagination_Tmp & strContent ManualPagination_Tmp = ManualPagination_Tmp & "</p>" else arrContent=split(strContent,"[Yao_page]") pages=Ubound(arrContent)+1 if CurrentPage="" then CurrentPage=1 else CurrentPage=Cint(CurrentPage) end if if CurrentPage<1 then CurrentPage=1 if CurrentPage>pages then CurrentPage=pages ManualPagination_Tmp = ManualPagination_Tmp & arrContent(CurrentPage-1) ManualPagination_Tmp = ManualPagination_Tmp & "</p><div id=""clear""></div><div id=""page""><ul>" if CurrentPage>1 then ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/Html/?" & ArticleId & "_" & CurrentPage-1 & ".html" ManualPagination_Tmp = ManualPagination_Tmp & "'>上一页</a></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>上一页</span></li>" end if for i=1 to pages if i=CurrentPage then ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>" & cstr(i) & "</span></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/Html/?" & ArticleId & "_" & i & ".html" ManualPagination_Tmp = ManualPagination_Tmp & "'>" & i & "</a></li>" end if 'if (i Mod 10) = 0 then ManualPagination_Tmp = ManualPagination_Tmp & "<br>" next if CurrentPage<pages then ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/Html/?" & ArticleId & "_" & CurrentPage+1 & ".html" ManualPagination_Tmp = ManualPagination_Tmp & "'>下一页</a></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>下一页</span></li>" end if ManualPagination_Tmp = ManualPagination_Tmp & "</ul></div>" end if ManualPagination2 = ManualPagination_Tmp end Function '================================================= '过程名:ManualPagination3 '作 用:采用手动分页方式显示文章具体的内容 伪静态 '参 数:str1,str2,str3 '================================================= Function ManualPagination3(str1,str2) dim ArticleId,strContent,CurrentPage dim ContentLen,pages,i dim arrContent,ManualPagination_Tmp ArticleId = str1 strContent = str2 ContentLen=strContent CurrentPage=b if Instr(strContent,"[Yao_page]")<=0 then ManualPagination_Tmp = ManualPagination_Tmp & strContent ManualPagination_Tmp = ManualPagination_Tmp & "</p>" else arrContent=split(strContent,"[Yao_page]") pages=Ubound(arrContent)+1 if CurrentPage="" then CurrentPage=1 else CurrentPage=Cint(CurrentPage) end if if CurrentPage<1 then CurrentPage=1 if CurrentPage>pages then CurrentPage=pages ManualPagination_Tmp = ManualPagination_Tmp & arrContent(CurrentPage-1) ManualPagination_Tmp = ManualPagination_Tmp & "</p><div id=""clear""></div><div id=""page""><ul>" if CurrentPage>1 then ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/" & ArticleId & "_" & CurrentPage-1 & ".html" ManualPagination_Tmp = ManualPagination_Tmp & "'>上一页</a></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>上一页</span></li>" end if for i=1 to pages if i=CurrentPage then ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>" & cstr(i) & "</span></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/" & ArticleId & "_" & i & ".html" ManualPagination_Tmp = ManualPagination_Tmp & "'>" & i & "</a></li>" end if 'if (i Mod 10) = 0 then ManualPagination_Tmp = ManualPagination_Tmp & "<br>" next if CurrentPage<pages then ManualPagination_Tmp = ManualPagination_Tmp & "<li><a href='/" & ArticleId & "_" & CurrentPage+1 & ".html" ManualPagination_Tmp = ManualPagination_Tmp & "'>下一页</a></li>" else ManualPagination_Tmp = ManualPagination_Tmp & "<li><span>下一页</span></li>" end if ManualPagination_Tmp = ManualPagination_Tmp & "</ul></div>" end if ManualPagination3 = ManualPagination_Tmp end Function '================================================= '过程名:AutoPagination1 '作 用:采用自动分页方式显示文章具体的内容,Asp模式 '参 数:str1,str2,str3 '================================================= Function AutoPagination1(str1,str2,str3) dim AutoPagination_Tmp dim ArticleId,strContent,CurrentPage dim ContentLen,MaxPerPage,pages,i,lngBound dim BeginPoint,EndPoint ArticleId = str1 strContent = Lcase(str2) MaxPerPage = str3 ContentLen=len(strContent) CurrentPage=LaoYRequest(request("Page")) if ContentLen<=MaxPerPage then AutoPagination_Tmp = AutoPagination_Tmp & strContent AutoPagination_Tmp = AutoPagination_Tmp & "" else if CurrentPage="" then CurrentPage=1 else CurrentPage=Cint(CurrentPage) end if pages=ContentLen\MaxPerPage if MaxPerPage*pages<ContentLen then pages=pages+1 end if lngBound=ContentLen '最大误差范围 if CurrentPage<1 then CurrentPage=1 if CurrentPage>pages then CurrentPage=pages dim lngTemp dim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3 dim lngTemp2,lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2 dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2 dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2 dim lngTemp5,lngTemp5_1,lngTemp5_2 dim lngTemp6,lngTemp6_1,lngTemp6_2 if CurrentPage=1 then BeginPoint=1 else BeginPoint=MaxPerPage*(CurrentPage-1)+1 lngTemp1_1_1=instr(BeginPoint,strContent,"</table>",1) lngTemp1_1_2=instr(BeginPoint,strContent,"</TABLE>",1) lngTemp1_1_3=instr(BeginPoint,strContent,"</Table>",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(BeginPoint,strContent,"<table",1) lngTemp1_2_2=instr(BeginPoint,strContent,"<TABLE",1) lngTemp1_2_3=instr(BeginPoint,strContent,"<Table",1) if lngTemp1_2_1>0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=BeginPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2 else lngTemp1=lngTemp1_1+8 end if end if lngTemp2_1_1=instr(BeginPoint,strContent,"</p>",1) lngTemp2_1_2=instr(BeginPoint,strContent,"</P>",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(BeginPoint,strContent,"<p",1) lngTemp2_2_2=instr(BeginPoint,strContent,"<P",1) if lngTemp2_2_1>0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=BeginPoint else if lngTemp2_1>lngTemp2_2 then lngtemp2=lngTemp2_2 else lngTemp2=lngTemp2_1+4 end if end if lngTemp3_1_1=instr(BeginPoint,strContent,"</ur>",1) lngTemp3_1_2=instr(BeginPoint,strContent,"</UR>",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(BeginPoint,strContent,"<ur",1) lngTemp3_2_2=instr(BeginPoint,strContent,"<UR",1) if lngTemp3_2_1>0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=BeginPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2 else lngTemp3=lngTemp3_1+5 end if end if if lngTemp1<lngTemp2 then lngTemp=lngTemp2 else lngTemp=lngTemp1 end if if lngTemp<lngTemp3 then lngTemp=lngTemp3 end if if lngTemp>BeginPoint and lngTemp<=BeginPoint+lngBound then BeginPoint=lngTemp else lngTemp4_1_1=instr(BeginPoint,strContent,"</li>",1) lngTemp4_1_2=instr(BeginPoint,strContent,"</LI>",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(BeginPoint,strContent,"<li",1) lngTemp4_2_1=instr(BeginPoint,strContent,"<LI",1) if lngTemp4_2_1>0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=BeginPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2 else lngTemp4=lngTemp4_1+5 end if end if if lngTemp4>BeginPoint and lngTemp4<=BeginPoint+lngBound then BeginPoint=lngTemp4 else lngTemp5_1=instr(BeginPoint,strContent,"<img",1) lngTemp5_2=instr(BeginPoint,strContent,"<IMG",1) if lngTemp5_1>0 then lngTemp5=lngTemp5_1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2 else lngTemp5=BeginPoint end if if lngTemp5>BeginPoint and lngTemp5<BeginPoint+lngBound then BeginPoint=lngTemp5 else lngTemp6_1=instr(BeginPoint,strContent,"<br>",1) lngTemp6_2=instr(BeginPoint,strContent,"<BR>",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2 else lngTemp6=0 end if if lngTemp6>BeginPoint and lngTemp6<BeginPoint+lngBound then BeginPoint=lngTemp6+4 end if end if end if end if end if if CurrentPage=pages then EndPoint=ContentLen else EndPoint=MaxPerPage*CurrentPage if EndPoint>=ContentLen then EndPoint=ContentLen else lngTemp1_1_1=instr(EndPoint,strContent,"</table>",1) lngTemp1_1_2=instr(EndPoint,strContent,"</TABLE>",1) lngTemp1_1_3=instr(EndPoint,strContent,"</Table>",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(EndPoint,strContent,"<table",1) lngTemp1_2_2=instr(EndPoint,strContent,"<TABLE",1) lngTemp1_2_3=instr(EndPoint,strContent,"<Table",1) if lngTemp1_2_1>0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=EndPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2-1 else lngTemp1=lngTemp1_1+7 end if end if lngTemp2_1_1=instr(EndPoint,strContent,"</p>",1) lngTemp2_1_2=instr(EndPoint,strContent,"</P>",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(EndPoint,strContent,"<p",1) lngTemp2_2_2=instr(EndPoint,strContent,"<P",1) if lngTemp2_2_1>0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=EndPoint else if lngTemp2_1>lngTemp2_2 then lngTemp2=lngTemp2_2-1 else lngTemp2=lngTemp2_1+3 end if end if lngTemp3_1_1=instr(EndPoint,strContent,"</ur>",1) lngTemp3_1_2=instr(EndPoint,strContent,"</UR>",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(EndPoint,strContent,"<ur",1) lngTemp3_2_2=instr(EndPoint,strContent,"<UR",1) if lngTemp3_2_1>0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=EndPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2-1 else lngTemp3=lngTemp3_1+4 end if end if if lngTemp1<lngTemp2 then lngTemp=lngTemp2 else lngTemp=lngTemp1 end if if lngTemp<lngTemp3 then lngTemp=lngTemp3 end if if lngTemp>EndPoint and lngTemp<=EndPoint+lngBound then EndPoint=lngTemp else lngTemp4_1_1=instr(EndPoint,strContent,"</li>",1) lngTemp4_1_2=instr(EndPoint,strContent,"</LI>",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(EndPoint,strContent,"<li",1) lngTemp4_2_1=instr(EndPoint,strContent,"<LI",1) if lngTemp4_2_1>0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=EndPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2-1 else lngTemp4=lngTemp4_1+4 end if end if if lngTemp4>EndPoint and lngTemp4<=EndPoint+lngBound then EndPoint=lngTemp4 else lngTemp5_1=instr(EndPoint,strContent,"<img",1) lngTemp5_2=instr(EndPoint,strContent,"<IMG",1) if lngTemp5_1>0 then lngTemp5=lngTemp5_1-1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2-1 else lngTemp5=EndPoint end if if lngTemp5>EndPoint and lngTemp5<EndPoint+lngBound then EndPoint=lngTemp5 else lngTemp6_1=instr(EndPoint,strContent,"<br>",1) lngTemp6_2=instr(EndPoint,strContent,"<BR>",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1+3 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2+3 else lngTemp6=EndPoint end if if lngTemp6>EndPoint and lngTemp6<EndPoint+lngBound then EndPoint=lngTemp6 end if end if end if end if end if end if if EndPoint < BeginPoint then 'BeginPoint = BeginPoint + str4 'EndPoint = BeginPoint + str4 end if On Error Resume Next AutoPagination_Tmp = AutoPagination_Tmp & mid(strContent,BeginPoint,EndPoint-BeginPoint) If Err Then Err.clear 'response.Write "BeginPoint = "& BeginPoint 'response.Write "<br>" 'response.Write "EndPoint = "& EndPoint AutoPagination_Tmp = AutoPagination_Tmp & "</p><div id=""clear""></div><p align=center style='color:red;'>对不起,自动分页错误,请直接点下一页即可接上页继续。</p>" End If AutoPagination_Tmp = AutoPagination_Tmp & "</p><div id=""clear""></div><div id=""page""><ul>" if CurrentPage>1 then AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/List.asp?ID=" & ArticleId & "&Page=" & CurrentPage-1 AutoPagination_Tmp = AutoPagination_Tmp & "'>上一页</a></li>" else AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>上一页</span></li>" end if for i=1 to pages if i=CurrentPage then AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>" & cstr(i) & "</span></li>" else AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/List.asp?ID=" & ArticleId & "&Page=" & i AutoPagination_Tmp = AutoPagination_Tmp & "'>" & i & "</a></li>" end if if (i Mod 12) = 0 then AutoPagination_Tmp = AutoPagination_Tmp & "</ul><ul>" next if CurrentPage<pages then AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/List.asp?ID=" & ArticleId & "&Page=" & CurrentPage+1 AutoPagination_Tmp = AutoPagination_Tmp & "'>下一页</a></li>" else AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>下一页</span></li>" end if AutoPagination_Tmp = AutoPagination_Tmp & "</ul></div>" end if AutoPagination1 = AutoPagination_Tmp end Function '================================================= '过程名:AutoPagination2 '作 用:采用自动分页方式显示文章具体的内容,伪静态模式 '参 数:str1,str2,str3 '================================================= Function AutoPagination2(str1,str2,str3) dim AutoPagination_Tmp dim ArticleId,strContent,CurrentPage dim ContentLen,MaxPerPage,pages,i,lngBound dim BeginPoint,EndPoint ArticleId = str1 strContent = Lcase(str2) MaxPerPage = str3 ContentLen=len(strContent) CurrentPage=b if ContentLen<=MaxPerPage then AutoPagination_Tmp = AutoPagination_Tmp & strContent AutoPagination_Tmp = AutoPagination_Tmp & "" else if CurrentPage="" then CurrentPage=1 else CurrentPage=Cint(CurrentPage) end if pages=ContentLen\MaxPerPage if MaxPerPage*pages<ContentLen then pages=pages+1 end if lngBound=ContentLen '最大误差范围 if CurrentPage<1 then CurrentPage=1 if CurrentPage>pages then CurrentPage=pages dim lngTemp dim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3 dim lngTemp2,lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2 dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2 dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2 dim lngTemp5,lngTemp5_1,lngTemp5_2 dim lngTemp6,lngTemp6_1,lngTemp6_2 if CurrentPage=1 then BeginPoint=1 else BeginPoint=MaxPerPage*(CurrentPage-1)+1 lngTemp1_1_1=instr(BeginPoint,strContent,"</table>",1) lngTemp1_1_2=instr(BeginPoint,strContent,"</TABLE>",1) lngTemp1_1_3=instr(BeginPoint,strContent,"</Table>",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(BeginPoint,strContent,"<table",1) lngTemp1_2_2=instr(BeginPoint,strContent,"<TABLE",1) lngTemp1_2_3=instr(BeginPoint,strContent,"<Table",1) if lngTemp1_2_1>0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=BeginPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2 else lngTemp1=lngTemp1_1+8 end if end if lngTemp2_1_1=instr(BeginPoint,strContent,"</p>",1) lngTemp2_1_2=instr(BeginPoint,strContent,"</P>",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(BeginPoint,strContent,"<p",1) lngTemp2_2_2=instr(BeginPoint,strContent,"<P",1) if lngTemp2_2_1>0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=BeginPoint else if lngTemp2_1>lngTemp2_2 then lngtemp2=lngTemp2_2 else lngTemp2=lngTemp2_1+4 end if end if lngTemp3_1_1=instr(BeginPoint,strContent,"</ur>",1) lngTemp3_1_2=instr(BeginPoint,strContent,"</UR>",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(BeginPoint,strContent,"<ur",1) lngTemp3_2_2=instr(BeginPoint,strContent,"<UR",1) if lngTemp3_2_1>0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=BeginPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2 else lngTemp3=lngTemp3_1+5 end if end if if lngTemp1<lngTemp2 then lngTemp=lngTemp2 else lngTemp=lngTemp1 end if if lngTemp<lngTemp3 then lngTemp=lngTemp3 end if if lngTemp>BeginPoint and lngTemp<=BeginPoint+lngBound then BeginPoint=lngTemp else lngTemp4_1_1=instr(BeginPoint,strContent,"</li>",1) lngTemp4_1_2=instr(BeginPoint,strContent,"</LI>",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(BeginPoint,strContent,"<li",1) lngTemp4_2_1=instr(BeginPoint,strContent,"<LI",1) if lngTemp4_2_1>0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=BeginPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2 else lngTemp4=lngTemp4_1+5 end if end if if lngTemp4>BeginPoint and lngTemp4<=BeginPoint+lngBound then BeginPoint=lngTemp4 else lngTemp5_1=instr(BeginPoint,strContent,"<img",1) lngTemp5_2=instr(BeginPoint,strContent,"<IMG",1) if lngTemp5_1>0 then lngTemp5=lngTemp5_1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2 else lngTemp5=BeginPoint end if if lngTemp5>BeginPoint and lngTemp5<BeginPoint+lngBound then BeginPoint=lngTemp5 else lngTemp6_1=instr(BeginPoint,strContent,"<br>",1) lngTemp6_2=instr(BeginPoint,strContent,"<BR>",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2 else lngTemp6=0 end if if lngTemp6>BeginPoint and lngTemp6<BeginPoint+lngBound then BeginPoint=lngTemp6+4 end if end if end if end if end if if CurrentPage=pages then EndPoint=ContentLen else EndPoint=MaxPerPage*CurrentPage if EndPoint>=ContentLen then EndPoint=ContentLen else lngTemp1_1_1=instr(EndPoint,strContent,"</table>",1) lngTemp1_1_2=instr(EndPoint,strContent,"</TABLE>",1) lngTemp1_1_3=instr(EndPoint,strContent,"</Table>",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(EndPoint,strContent,"<table",1) lngTemp1_2_2=instr(EndPoint,strContent,"<TABLE",1) lngTemp1_2_3=instr(EndPoint,strContent,"<Table",1) if lngTemp1_2_1>0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=EndPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2-1 else lngTemp1=lngTemp1_1+7 end if end if lngTemp2_1_1=instr(EndPoint,strContent,"</p>",1) lngTemp2_1_2=instr(EndPoint,strContent,"</P>",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(EndPoint,strContent,"<p",1) lngTemp2_2_2=instr(EndPoint,strContent,"<P",1) if lngTemp2_2_1>0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=EndPoint else if lngTemp2_1>lngTemp2_2 then lngTemp2=lngTemp2_2-1 else lngTemp2=lngTemp2_1+3 end if end if lngTemp3_1_1=instr(EndPoint,strContent,"</ur>",1) lngTemp3_1_2=instr(EndPoint,strContent,"</UR>",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(EndPoint,strContent,"<ur",1) lngTemp3_2_2=instr(EndPoint,strContent,"<UR",1) if lngTemp3_2_1>0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=EndPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2-1 else lngTemp3=lngTemp3_1+4 end if end if if lngTemp1<lngTemp2 then lngTemp=lngTemp2 else lngTemp=lngTemp1 end if if lngTemp<lngTemp3 then lngTemp=lngTemp3 end if if lngTemp>EndPoint and lngTemp<=EndPoint+lngBound then EndPoint=lngTemp else lngTemp4_1_1=instr(EndPoint,strContent,"</li>",1) lngTemp4_1_2=instr(EndPoint,strContent,"</LI>",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(EndPoint,strContent,"<li",1) lngTemp4_2_1=instr(EndPoint,strContent,"<LI",1) if lngTemp4_2_1>0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=EndPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2-1 else lngTemp4=lngTemp4_1+4 end if end if if lngTemp4>EndPoint and lngTemp4<=EndPoint+lngBound then EndPoint=lngTemp4 else lngTemp5_1=instr(EndPoint,strContent,"<img",1) lngTemp5_2=instr(EndPoint,strContent,"<IMG",1) if lngTemp5_1>0 then lngTemp5=lngTemp5_1-1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2-1 else lngTemp5=EndPoint end if if lngTemp5>EndPoint and lngTemp5<EndPoint+lngBound then EndPoint=lngTemp5 else lngTemp6_1=instr(EndPoint,strContent,"<br>",1) lngTemp6_2=instr(EndPoint,strContent,"<BR>",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1+3 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2+3 else lngTemp6=EndPoint end if if lngTemp6>EndPoint and lngTemp6<EndPoint+lngBound then EndPoint=lngTemp6 end if end if end if end if end if end if if EndPoint < BeginPoint then 'BeginPoint = BeginPoint + str4 'EndPoint = BeginPoint + str4 end if On Error Resume Next AutoPagination_Tmp = AutoPagination_Tmp & mid(strContent,BeginPoint,EndPoint-BeginPoint) If Err Then Err.clear 'response.Write "BeginPoint = "& BeginPoint 'response.Write "<br>" 'response.Write "EndPoint = "& EndPoint AutoPagination_Tmp = AutoPagination_Tmp & "</p><div id=""clear""></div><p align=center style='color:red;'>对不起,自动分页错误,请直接点下一页即可接上页继续。</p>" End If AutoPagination_Tmp = AutoPagination_Tmp & "</p><div id=""clear""></div>" & VbCrLf AutoPagination_Tmp = AutoPagination_Tmp & "<div id=""page""><ul>" & VbCrLf if CurrentPage>1 then AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/Html/?" & ArticleId & "_" & CurrentPage-1 AutoPagination_Tmp = AutoPagination_Tmp & ".html'>上一页</a></li>" & VbCrLf else AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>上一页</span></li>" & VbCrLf end if for i=1 to pages if i=CurrentPage then AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>" & cstr(i) & "</span></li>" & VbCrLf else AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/Html/?" & ArticleId & "_" & i AutoPagination_Tmp = AutoPagination_Tmp & ".html'>" & i & "</a></li>" & VbCrLf end if if (i Mod 12) = 0 then AutoPagination_Tmp = AutoPagination_Tmp & "</ul><ul>" next if CurrentPage<pages then AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/Html/?" & ArticleId & "_" & CurrentPage+1 AutoPagination_Tmp = AutoPagination_Tmp & ".html'>下一页</a></li>" & VbCrLf else AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>下一页</span></li>" & VbCrLf end if AutoPagination_Tmp = AutoPagination_Tmp & "</ul></div>"& VbCrLf end if AutoPagination2 = AutoPagination_Tmp end Function '================================================= '过程名:AutoPagination3 '作 用:采用自动分页方式显示文章具体的内容,伪静态模式 '参 数:str1,str2,str3 '================================================= Function AutoPagination3(str1,str2,str3) dim AutoPagination_Tmp dim ArticleId,strContent,CurrentPage dim ContentLen,MaxPerPage,pages,i,lngBound dim BeginPoint,EndPoint ArticleId = str1 strContent = Lcase(str2) MaxPerPage = str3 ContentLen=len(strContent) CurrentPage=b if ContentLen<=MaxPerPage then AutoPagination_Tmp = AutoPagination_Tmp & strContent AutoPagination_Tmp = AutoPagination_Tmp & "" else if CurrentPage="" then CurrentPage=1 else CurrentPage=Cint(CurrentPage) end if pages=ContentLen\MaxPerPage if MaxPerPage*pages<ContentLen then pages=pages+1 end if lngBound=ContentLen '最大误差范围 if CurrentPage<1 then CurrentPage=1 if CurrentPage>pages then CurrentPage=pages dim lngTemp dim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3 dim lngTemp2,lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2 dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2 dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2 dim lngTemp5,lngTemp5_1,lngTemp5_2 dim lngTemp6,lngTemp6_1,lngTemp6_2 if CurrentPage=1 then BeginPoint=1 else BeginPoint=MaxPerPage*(CurrentPage-1)+1 lngTemp1_1_1=instr(BeginPoint,strContent,"</table>",1) lngTemp1_1_2=instr(BeginPoint,strContent,"</TABLE>",1) lngTemp1_1_3=instr(BeginPoint,strContent,"</Table>",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(BeginPoint,strContent,"<table",1) lngTemp1_2_2=instr(BeginPoint,strContent,"<TABLE",1) lngTemp1_2_3=instr(BeginPoint,strContent,"<Table",1) if lngTemp1_2_1>0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=BeginPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2 else lngTemp1=lngTemp1_1+8 end if end if lngTemp2_1_1=instr(BeginPoint,strContent,"</p>",1) lngTemp2_1_2=instr(BeginPoint,strContent,"</P>",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(BeginPoint,strContent,"<p",1) lngTemp2_2_2=instr(BeginPoint,strContent,"<P",1) if lngTemp2_2_1>0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=BeginPoint else if lngTemp2_1>lngTemp2_2 then lngtemp2=lngTemp2_2 else lngTemp2=lngTemp2_1+4 end if end if lngTemp3_1_1=instr(BeginPoint,strContent,"</ur>",1) lngTemp3_1_2=instr(BeginPoint,strContent,"</UR>",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(BeginPoint,strContent,"<ur",1) lngTemp3_2_2=instr(BeginPoint,strContent,"<UR",1) if lngTemp3_2_1>0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=BeginPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2 else lngTemp3=lngTemp3_1+5 end if end if if lngTemp1<lngTemp2 then lngTemp=lngTemp2 else lngTemp=lngTemp1 end if if lngTemp<lngTemp3 then lngTemp=lngTemp3 end if if lngTemp>BeginPoint and lngTemp<=BeginPoint+lngBound then BeginPoint=lngTemp else lngTemp4_1_1=instr(BeginPoint,strContent,"</li>",1) lngTemp4_1_2=instr(BeginPoint,strContent,"</LI>",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(BeginPoint,strContent,"<li",1) lngTemp4_2_1=instr(BeginPoint,strContent,"<LI",1) if lngTemp4_2_1>0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=BeginPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2 else lngTemp4=lngTemp4_1+5 end if end if if lngTemp4>BeginPoint and lngTemp4<=BeginPoint+lngBound then BeginPoint=lngTemp4 else lngTemp5_1=instr(BeginPoint,strContent,"<img",1) lngTemp5_2=instr(BeginPoint,strContent,"<IMG",1) if lngTemp5_1>0 then lngTemp5=lngTemp5_1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2 else lngTemp5=BeginPoint end if if lngTemp5>BeginPoint and lngTemp5<BeginPoint+lngBound then BeginPoint=lngTemp5 else lngTemp6_1=instr(BeginPoint,strContent,"<br>",1) lngTemp6_2=instr(BeginPoint,strContent,"<BR>",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2 else lngTemp6=0 end if if lngTemp6>BeginPoint and lngTemp6<BeginPoint+lngBound then BeginPoint=lngTemp6+4 end if end if end if end if end if if CurrentPage=pages then EndPoint=ContentLen else EndPoint=MaxPerPage*CurrentPage if EndPoint>=ContentLen then EndPoint=ContentLen else lngTemp1_1_1=instr(EndPoint,strContent,"</table>",1) lngTemp1_1_2=instr(EndPoint,strContent,"</TABLE>",1) lngTemp1_1_3=instr(EndPoint,strContent,"</Table>",1) if lngTemp1_1_1>0 then lngTemp1_1=lngTemp1_1_1 elseif lngTemp1_1_2>0 then lngTemp1_1=lngTemp1_1_2 elseif lngTemp1_1_3>0 then lngTemp1_1=lngTemp1_1_3 else lngTemp1_1=0 end if lngTemp1_2_1=instr(EndPoint,strContent,"<table",1) lngTemp1_2_2=instr(EndPoint,strContent,"<TABLE",1) lngTemp1_2_3=instr(EndPoint,strContent,"<Table",1) if lngTemp1_2_1>0 then lngTemp1_2=lngTemp1_2_1 elseif lngTemp1_2_2>0 then lngTemp1_2=lngTemp1_2_2 elseif lngTemp1_2_3>0 then lngTemp1_2=lngTemp1_2_3 else lngTemp1_2=0 end if if lngTemp1_1=0 and lngTemp1_2=0 then lngTemp1=EndPoint else if lngTemp1_1>lngTemp1_2 then lngtemp1=lngTemp1_2-1 else lngTemp1=lngTemp1_1+7 end if end if lngTemp2_1_1=instr(EndPoint,strContent,"</p>",1) lngTemp2_1_2=instr(EndPoint,strContent,"</P>",1) if lngTemp2_1_1>0 then lngTemp2_1=lngTemp2_1_1 elseif lngTemp2_1_2>0 then lngTemp2_1=lngTemp2_1_2 else lngTemp2_1=0 end if lngTemp2_2_1=instr(EndPoint,strContent,"<p",1) lngTemp2_2_2=instr(EndPoint,strContent,"<P",1) if lngTemp2_2_1>0 then lngTemp2_2=lngTemp2_2_1 elseif lngTemp2_2_2>0 then lngTemp2_2=lngTemp2_2_2 else lngTemp2_2=0 end if if lngTemp2_1=0 and lngTemp2_2=0 then lngTemp2=EndPoint else if lngTemp2_1>lngTemp2_2 then lngTemp2=lngTemp2_2-1 else lngTemp2=lngTemp2_1+3 end if end if lngTemp3_1_1=instr(EndPoint,strContent,"</ur>",1) lngTemp3_1_2=instr(EndPoint,strContent,"</UR>",1) if lngTemp3_1_1>0 then lngTemp3_1=lngTemp3_1_1 elseif lngTemp3_1_2>0 then lngTemp3_1=lngTemp3_1_2 else lngTemp3_1=0 end if lngTemp3_2_1=instr(EndPoint,strContent,"<ur",1) lngTemp3_2_2=instr(EndPoint,strContent,"<UR",1) if lngTemp3_2_1>0 then lngTemp3_2=lngTemp3_2_1 elseif lngTemp3_2_2>0 then lngTemp3_2=lngTemp3_2_2 else lngTemp3_2=0 end if if lngTemp3_1=0 and lngTemp3_2=0 then lngTemp3=EndPoint else if lngTemp3_1>lngTemp3_2 then lngtemp3=lngTemp3_2-1 else lngTemp3=lngTemp3_1+4 end if end if if lngTemp1<lngTemp2 then lngTemp=lngTemp2 else lngTemp=lngTemp1 end if if lngTemp<lngTemp3 then lngTemp=lngTemp3 end if if lngTemp>EndPoint and lngTemp<=EndPoint+lngBound then EndPoint=lngTemp else lngTemp4_1_1=instr(EndPoint,strContent,"</li>",1) lngTemp4_1_2=instr(EndPoint,strContent,"</LI>",1) if lngTemp4_1_1>0 then lngTemp4_1=lngTemp4_1_1 elseif lngTemp4_1_2>0 then lngTemp4_1=lngTemp4_1_2 else lngTemp4_1=0 end if lngTemp4_2_1=instr(EndPoint,strContent,"<li",1) lngTemp4_2_1=instr(EndPoint,strContent,"<LI",1) if lngTemp4_2_1>0 then lngTemp4_2=lngTemp4_2_1 elseif lngTemp4_2_2>0 then lngTemp4_2=lngTemp4_2_2 else lngTemp4_2=0 end if if lngTemp4_1=0 and lngTemp4_2=0 then lngTemp4=EndPoint else if lngTemp4_1>lngTemp4_2 then lngtemp4=lngTemp4_2-1 else lngTemp4=lngTemp4_1+4 end if end if if lngTemp4>EndPoint and lngTemp4<=EndPoint+lngBound then EndPoint=lngTemp4 else lngTemp5_1=instr(EndPoint,strContent,"<img",1) lngTemp5_2=instr(EndPoint,strContent,"<IMG",1) if lngTemp5_1>0 then lngTemp5=lngTemp5_1-1 elseif lngTemp5_2>0 then lngTemp5=lngTemp5_2-1 else lngTemp5=EndPoint end if if lngTemp5>EndPoint and lngTemp5<EndPoint+lngBound then EndPoint=lngTemp5 else lngTemp6_1=instr(EndPoint,strContent,"<br>",1) lngTemp6_2=instr(EndPoint,strContent,"<BR>",1) if lngTemp6_1>0 then lngTemp6=lngTemp6_1+3 elseif lngTemp6_2>0 then lngTemp6=lngTemp6_2+3 else lngTemp6=EndPoint end if if lngTemp6>EndPoint and lngTemp6<EndPoint+lngBound then EndPoint=lngTemp6 end if end if end if end if end if end if if EndPoint < BeginPoint then 'BeginPoint = BeginPoint + str4 'EndPoint = BeginPoint + str4 end if On Error Resume Next AutoPagination_Tmp = AutoPagination_Tmp & mid(strContent,BeginPoint,EndPoint-BeginPoint) If Err Then Err.clear 'response.Write "BeginPoint = "& BeginPoint 'response.Write "<br>" 'response.Write "EndPoint = "& EndPoint AutoPagination_Tmp = AutoPagination_Tmp & "</p><div id=""clear""></div><p align=center style='color:red;'>对不起,自动分页错误,请直接点下一页即可接上页继续。</p>" End If AutoPagination_Tmp = AutoPagination_Tmp & "</p><div id=""clear""></div>" & VbCrLf AutoPagination_Tmp = AutoPagination_Tmp & "<div id=""page""><ul>" & VbCrLf if CurrentPage>1 then AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/Html/" & ArticleId & "_" & CurrentPage-1 AutoPagination_Tmp = AutoPagination_Tmp & ".html'>上一页</a></li>" & VbCrLf else AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>上一页</span></li>" & VbCrLf end if for i=1 to pages if i=CurrentPage then AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>" & cstr(i) & "</span></li>" & VbCrLf else AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/Html/" & ArticleId & "_" & i AutoPagination_Tmp = AutoPagination_Tmp & ".html'>" & i & "</a></li>" & VbCrLf end if if (i Mod 12) = 0 then AutoPagination_Tmp = AutoPagination_Tmp & "</ul><ul>" next if CurrentPage<pages then AutoPagination_Tmp = AutoPagination_Tmp & "<li><a href='/Html/" & ArticleId & "_" & CurrentPage+1 AutoPagination_Tmp = AutoPagination_Tmp & ".html'>下一页</a></li>" & VbCrLf else AutoPagination_Tmp = AutoPagination_Tmp & "<li><span>下一页</span></li>" & VbCrLf end if AutoPagination_Tmp = AutoPagination_Tmp & "</ul></div>"& VbCrLf end if AutoPagination3 = AutoPagination_Tmp end Function %>