⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page.asp

📁 新闻发布系统
💻 ASP
字号:
<%
'-------------判断分页开始
  Sub Pagination(Operation)
 	  if instr(1,request.form("content"),"<TABLE",1)<>0 and instr(1,request.form("content"),"[page",1)<>0 then
	    for v=1 to len(request.form("content"))
          if instr(v,request.form("content"),"[page",1)>0 then
		    PageCount=PageCount+1
            v=instr(v,request.form("content"),"[page",1)
	      end if
	    next
		PageCount=PageCount+1
        content=request.form("content")
		PageNum=1
	    for y=1 to PageCount
          PageNum=instr(1,content,"[page]",1)
          if PageNum=>1 then PageContent=left(content,PageNum-1)
		  if y=PageCount then PageContent=content
          content=mid(content,PageNum+6,len(content))
		  if Operation="ModifyHtml" then
		    Call ModifyHtml(PageCount,PageContent,y)
		  else
		    Call CreateHtml(PageCount,PageContent,y)
		  end if
	    next
		elseif instr(1,request.form("content"),"<TABLE",1)<>0 and instr(1,request.form("content"),"[page]",1)=0 then
		if Operation="ModifyHtml" then
		  Call ModifyHtml("1",request.form("content"),1)
		else
		  Call CreateHtml("1",request.form("content"),1)
		end if
	  elseif instr(1,request.form("content"),"<TABLE",1)=0 and instr(1,request.form("content"),"[page]",1)<>0 then
	    for v=1 to len(request.form("content"))
          if instr(v,request.form("content"),"[page",1)>0 then
		    PageCount=PageCount+1
            v=instr(v,request.form("content"),"[page",1)
	      end if
	    next
		PageCount=PageCount+1
        content=request.form("content")
		PageNum=1
	    for y=1 to PageCount
          PageNum=instr(1,content,"[page]",1)
          if PageNum=>1 then PageContent=left(content,PageNum-1)
		  if y=PageCount then PageContent=content
          content=mid(content,PageNum+6,len(content))
		  if Operation="ModifyHtml" then
		   Call ModifyHtml(PageCount,PageContent,y)
		  else
		    Call CreateHtml(PageCount,PageContent,y)
		  end if
	    next
	  else
	    if instr(1,request.form("content"),"</P>",1)<>0 then		
	    set rs=conn.execute("select WordNumber from Config")
	    WordNumber=rs("WordNumber")
	    rs.close
	    set rs=nothing
	    PageCount=len(request.form("content"))/WordNumber
        PageCount2=int(len(request.form("content"))/WordNumber)
	    if PageCount>PageCount2 then PageCount=PageCount2+1
		content=request.form("content")
        for y=1 to PageCount
          PageContent=left(content,WordNumber)          
		    if right(PageContent,4)<>"</P>" then
              PNum=instr(WordNumber,content,"</P>",1)
		      PageContent=left(content,PNum+3)
			  content=mid(content,PNum+4,len(content))
		    else
              content=mid(content,WordNumber+1,len(content))
		    end if
		  if Operation="ModifyHtml" then
		    Call ModifyHtml(PageCount,PageContent,y)
		  else
		    Call CreateHtml(PageCount,PageContent,y)
	      end if
	    next
	    else
		  content=mid(content,WordNumber+1,len(content))
		  if Operation="ModifyHtml" then
		    Call ModifyHtml(PageCount,PageContent,y)
		  else
		    Call CreateHtml(PageCount,PageContent,y)
	      end if
		end if
	  end if
  end Sub  
'-------------------------判断分页结束
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -