<% dim articleheading,article,promotext,id,lnarticle,num_chars_per_page, article_on_this_page, start_from,page num_chars_per_page=3000 ' ain= article index = Id of the article id=request.querystring("ain") page=request.querystring("page") if(page=0) then page=1 end if set connupdate = server.createobject("ADODB.Connection") set rs = server.createobject("ADODB.recordset") connupdate.Open "DSN=samsem-contentDBDSN" sqlStr = "select * from article where id="& id 'response.write(sqlstr) rs.open sqlStr, connupdate do while not rs.eof articletitle=rs("articletitle") articleheading=rs("articleheading") article=rs("article") promotext=rs("promotext") rs.movenext loop start_from=1+(page-1)*num_chars_per_page lnarticle=len(article) 'response.write("Here is :"& start_from) article=Replace(article,vbCrLf,"
") article_on_this_page=mid(article,start_from,num_chars_per_page) total_pages=round(lnarticle/num_chars_per_page) if(total_pages<0)then total_pages=1 end if if (lnarticle mod num_chars_per_page <>0) then total_pages=total_pages+1 end if if(lnarticle <%=articletitle%>
  
 
 
 

Study Guide

<% 'response.write("Total Pages:" & total_pages) 'response.write("
Page:"&page) if(total_pages>1) then%> Page: <%for i= 1 to total_pages %> <%=i%>  <%next%> <% if(total_pages>int(page)) then%> Next <%end if%> <%end if%>
<% if(page>1) then%> <% end if%>

<%=articleheading%>

By http://www.SemSim.com © 2004

Continued...(Page <%=page%> of <%=total_pages%>)
<%=article_on_this_page%>
<% if(total_pages>1) then%>

Page: <%for i= 1 to total_pages %> <%=i%>  <%next%> <% if(total_pages >int(page)) then%> Next <%end if%> <%end if%>

 Print This Page

  Mail This Page