Article content paging display function

xiaoxiao2021-03-06  15

When reading an article from the database, if the content is too long, you need to display the article paging, this article provides a function source code for a document paging. This process is provided by 9CBS membership Tatty_bad

'==================================================== 'Process Name: AutoPagination' Making: Using Auto Package Method Display Specific Content 'Number: MaxcharPerPage ----- File Words per page "Strautoid ----- Need to process ID' strautoidname ----- ID's name 'strcontent ----- need to process content' =================================== ============== sub AutoPagination (MaxCharPerPage, StrAutoId, StrAutoIdName, StrContent) dim CurrentPage dim ContentLen, MaxPerPage, pages, i, lngBound dim BeginPoint, EndPoint ContentLen = len (strContent) CurrentPage = trim (request ( "ArticlePage")) if ContentLen <= MaxCharPerPage then response.write strContent else if CurrentPage = "" then CurrentPage = 1 else CurrentPage = Cint (CurrentPage) end if pages = ContentLen / MaxCharPerPage if MaxCharPerPage * pages Pages Ten 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 = MaxCharPerPage * (CurrentPage-1) 1 lngTemp1_1_1 = instr (BeginPoint, StrContent, "", 1) LNGTEMP1_1_2 = INSTEMP1_1_3 = INSTEMP1_1_3 = INSTEMP1_1_3 = INSTR (BeginPoint, Strcontent, "", 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, " 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, "", 1) lngTemp2_1_2 = instr (BeginPoint, strContent, "", 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, " 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, "", 1) lngTemp3_1_2 = instr (BeginPoint, strContent, "", 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, " 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

if lngTemp> BeginPoint and lngTemp <= BeginPoint lngBound then BeginPoint = lngTemp else lngTemp4_1_1 = instr (BeginPoint, strContent, "", 1) lngTemp4_1_2 = instr (BeginPoint, strContent, "", 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, " 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, " 0 then lngTemp5 = lngTemp5_1 elseif lngTemp5_2> 0 then lngTemp5 = lngTemp5_2 else lngTemp5 = BeginPoint end if if lngTemp5> BeginPoint and lngTemp5 ", 1) LNGTEMP6_2 = INSTEMP6_2 = INSTR (Beginpoint, Strcontent,"
", 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 = ContentLen then EndPoint = ContentLen else lngTemp1_1_1 = instr (EndPoint, strContent, "", 1) lngTemp1_1_2 = instr (EndPoint, strContent, "", 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,"

0 then lngTemp1_2 = lngTemp1_2_1 elseif lngTemp1_2_2> 0 then lngTemp1_2 = lngTemp1_2_2 elseif lng Temp1_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, "", 1) lngTemp2_1_2 = instr (EndPoint, strContent, "", 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, " 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, "", 1) lngTemp3_1_2 = instr (EndPoint, strContent, "", 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, " 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

if lngTemp> EndPoint and lngTemp <= EndPoint lngBound then EndPoint = lngTemp else lngTemp4_1_1 = instr (EndPoint, strContent, "", 1) lngTemp4_1_2 = instr (EndPoint, strContent, "", 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, " 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, " 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 ", 1) LNGTEMP6_2 = INSTEMP6_2 = INSTR (Endpoint, StrContent,"
", 1) if LNGTEMP6_1> 0 Then LngTemp6 = LNGTEMP6_1 3 elseif LNGTEMP6_2> 0 Then LngTemp6 = LNGTEMP6_2

转载请注明原文地址:https://www.9cbs.com/read-45568.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.039, SQL: 9